[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: single Dhcp server on multiple networks



On Sat January 17 2009 02:44:09 Ken Teague wrote:
> On Wed, Jan 14, 2009 at 09:35:37PM -0800, Mike Bird wrote:
> > On Thu January 15 2009 13:28:19 Rod James Bio wrote:
> > > I was wondering if anyone had tried to configure a single linux dhcp
> > > server to give IP to different network. We have multiple networks here
> > > in our area and I am thinking of using a single dhcp server to serve
> > > all other networks.
> >
> > It works fine, e.g.:
>
> Did you have to setup VLANs on your switch to separate the networks, or use
> separate switches?

VLANs work.  Separate switches work.  We normally use VLANs on switches
but separate NICs for each VLAN on servers.

> How exactly does the server know to give our IPs for 
> subnet-X to subnet-X instead of subnet-Y?  Does the server have multiple
> NICs with different IPs on each?... or does it have a single NIC with
> multiple IPs assigned to it?

A DHCP server with multiple NICs hands out DHCP leases in the subnets
associated with each NIC.  The subnet is specified in dhcpd.conf, not
the NIC.

If you wanted to support multiple DHCP subnets on a single NIC you'd
probably have to use a static mapping for each MAC address to IP
address:

  host foo {
        hardware ethernet 01:23:45:67:89:ab;
        fixed-address 192.168.99.99;
  }

YMMV - I've never tried multiple DHCP subnets on a single NIC.

--Mike Bird


Reply to: