how to configure dhcp to listen to a specific interface

Simon Hobson dhcp at
Tue Mar 28 11:45:02 UTC 2006

Joey S. Eisma wrote:

>on my ubuntu 5.10 box, i got two nics. how do you configure dhcp to
>listen to requests in eth1 (for example)?

In the general case, it's a matter of specifying the interface to use 
when starting dhcpd, eg "dhcpd eth0" instead of just "dhcpd".

However, it is normal to start dhcpd from an init script which gets 
called during system bootup - typically (on a Linux box) with 
something like "/etc/init.d/dhcpd start". So you would need to edit 
/etc/init.d/dhcpd so that it specifies the interface when starting 
the dhcpd process. Many distros allow for a config file (eg 
/etc/sysconfig/dhcpd), so that instead of having to edit the script 
you can edit the config file.

The relevant bit from /etc/sysconfig/dhcpd on my box is :
># Interface(s) for the DHCP server to listen on
># (separated by spaces)
># Examples: DHCPD_INTERFACE="eth0"
>#           DHCPD_INTERFACE="eth0 eth1 eth2 tr0 wlan0"

The above paths are what my Suse box at home uses, I can't comment on 
how similar Ubuntu is as I haven't used it.


More information about the dhcp-users mailing list