dhcpd shared-network

| | Comments (0)
I've found out about something kind of neat and practical about the isc dhcpd even though it goes against what I have been taught about networking, which is to not have more than one subnet on a network segment. If you more than one subnet in overlay on the same network segment you can have dhcpd serve them with only one ip address for itself in only one of the subnets because the dhcpd is listening on 255.255.255.255/0 anyway instead of the normal ip and the DHCPDISCOVER and DHCPOFFER comes from 0.0.0.0/0. The normal ip of the dhcp server is only used as the source address in DHCPREPLYs to the client after which it can use its own normal ip that it was leased. The dhcp server can give out an ip address in a different subnet than it is replying with without any dhcp relay. This is setup by enclosing the subnet declaration in dhcpd.conf in the shared-network declaration and dhcpd then knows they are overlay.

Before I have used vlans instead of overlay networks which I think is still neater but with ipv4 this saves a few ip addresses and allows a simple and easy to understand dhcpd configuration dealing with a network configuration that can be confusing. One of the reasons why overlay networks, and particularly with dhcp, is still not a good idea is that if some of the subnets are under different administration another dhcp server could be setup and a client without an ip address could get replies from both servers, so this is something to be careful about. However I think the clarity of this configuration is still beneficial.

With ipv6 and dhcpv6 multicast addresses are used so there can still be an address savings even with actually separate subnets. I'm looking forward to support for dhcpv6 in dnsmasq and it is already in isc dhcpd since release 4, although it isn't widely distributed yet.

Leave a comment

About this Entry

This page contains a single entry by nick published on December 2, 2008 3:35 PM.

ip address usage auditing was the previous entry in this blog.

IPv6 certification with he.net is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.