dhcp-server subnet configuration for interfaces not being listened to

Amir Sagie dhcp-users at taproot.org.il
Sun Mar 17 17:22:44 UTC 2013


Hello,

I've recently been using isc-dhcp-server v4.2.4 on a box with multiple
network interfaces and noticed that it will happily accept subnet
configurations which are bound to interfaces on which dhcpd is not
configured to run. Example:

# dhcpd -t -cf /etc/dhcpd.conf eth1

where /etc/dhcpd.conf includes:

subnet 192.168.1.0 netmask 255.255.255.0 { ... }
subnet 192.168.2.0 netmask 255.255.255.0 { ... }

Assuming eth1, eth2 are bound to 192.168.1.0/24, 192.168.1.0/24
respectively, dhcpd issues no warning when eth2 is omitted from the
daemon launch command, nor does is log "dropped" DHCP discover messages.
I am aware that interfaces are expected to come & go and their addresses
to change, but in more static environments I think a log warning (upon
daemon launch) is called for, eg:

"Warning - subnet declarations exist which match interface <ifX>, while
it is not included in the interface list on which dhcpd is configured to
run. Please include this interface or remove the relevant subnet
decelerations. In dynamic-interface environments this message may safely
be ignored."

Whether this should be logged at warning/info log level is debatable,
IMO it will serve more people when logged the former.

Best,
Amir Sagie



More information about the dhcp-users mailing list