DHCP for multiple subnets (was: Re: Routing and bandwidth problem)

Rodolfo J. Paiz rpaiz at simpaticus.com
Sun Jun 13 01:53:04 UTC 2004


At 09:00 5/5/2004, duncan brown wrote:
>Rodolfo J. Paiz said:
> > I do not see how to use DHCP to assign the  192.168.1.0/24 block to
> > Tenant #1, the 192.168.2.0/24 block to Tenant #2,  etc. via DHCP on
> > a single server if all of them are coming in via a switch.

As a follow-up, I have discovered that the ISC dhcp server package included 
in Fedora and Red Hat Linux releases will identify and assign an address 
based on the active subnet of the interface on which the request came in, 
and it will do so automatically without any configuration. So if you have 
these interfaces...

eth0: 192.168.0.1/24
eth1: 192.168.1.1/24

...and you have this in /etc/dhcpd.conf...

subnet 192.168.0.0 netmask 255.255.255.0 {
         options routers 192.168.0.1;
         options domain-name "domain.com";
         options domain-name-servers 192.168.0.1;
}

subnet 192.168.1.0 netmask 255.255.255.0 {
         options routers 192.168.1.1;
         options domain-name "domain2.com";
         options domain-name-servers 192.168.1.1;
}

...then any host on the network connected to eth0 will be dynamically 
assigned a 192.168.0.x address and any host coming in on eth1 will be 
assigned a 192.168.1.y address. Perfect.

This is not clear from "man dhcpd.conf" and confused me for a while. 
Hopefully this post will help someone on these lists, and I'll work with 
the ISC folks to add a few comments to the documentation.

Cheers,


-- 
Rodolfo J. Paiz
rpaiz at simpaticus.com
http://www.simpaticus.com





More information about the fedora-list mailing list