Earlier I was setting up a PXE boot server that was connected to two networks and wanted to hand out DHCP addresses only on the second interface which in this case was eth1. The primary interface on the server is eth0 however that Ethernet port is attached to a switch that already has a DHCP server connected to it so I needed to make sure that the DHCP server only replies to requests on eth1. Use the dhcpd.conf configuration option below to specify the Ethernet interface that dhcpd will listen for and reply to DHCP and/or BOOTP requests.
Modify dhcpd.conf To Include INTERFACES Configuration Option:
- INTERFACES="eth1";
The above configuration option was added near the top of the dhcpd.conf file which is located in /etc/dhcp3. This configuration option will tell dhcpd to only reply/listen for DHCP/BOOTP requests on eth1. Make sure that after you make any configuration changes you restart dhcpd using a command similar to “/etc/init.d/dhcpd restart” for the changes to take effect. You can specify numerous interfaces by including a space between interfaces as shown in the below example.
Modify dhcpd.conf To Include INTERFACES Configuration Option:
- INTERFACES="eth1 eth2";
That is it. If you used the first example your DHCP server is now only operational on the eth1 Ethernet interface.