[Techtalk] Linux gateway + DHCP server setup?

Brenda Bell k15a-list-linuxchix at theotherbell.com
Fri Apr 4 21:36:01 EST 2003


Quoting Subba Rao <subba9 at cablespeed.com>:

> One other question is, how do you configure the DHCP Server running on
> eth1, to serve clients with multiple interfaces?  For example, all my
> clients have 2 interfaces (eth0 and eth1).  I can configure eth0 to get
> the address from the DHCP server.  How do you tell the DHCP server to 
> give a different subnet address to the dhclient request for eth1?

If I'm not mistaken, a single DHCP server can assign addresses that fall
within its own network.  For instance, a DHCP server with a 24-bit network
address 192.168.1.0/24 could assign addresses from different address pools
that contain 24-31 bit network address -- e.g., you might have two pools
with 25-bit network address.  The first pool has 192.168.1.2 to
192.168.1.126 and the second pool has 192.168.1.129 to 192.168.1.254.  I've
always found the IP calculator at http://jodies.de/ipcalc to be very useful
in computing subnets.

As for getting a single DHCP server to assign from different pools to
different NICS, it needs to have a hint from the client on which to base
its decision.  You'll often see a DHCP server configured to assign
addresses from a particular pool based on the client's MAC address or the
DHCP client (RAS).  Since you have a few options in this regard, you
probably want to consult the rather lengthy man page for dhcpd.conf.  It's
difficult to offer specifics without knowing more about what you're trying
to accomplish.

-- 
Brenda
http://opensource.theotherbell.com



More information about the Techtalk mailing list