Friday 9 October 2015

Linux DHCP Server won't reply to DHCP clients in Routing mode to DHCP relayed clients

Problem  Description:

Setup :     ----           
Win DHCP Server 1 ---Linux DHCP Server 2------Linux DHCP relay -------Win XP DHCP client PC
                                               Routing mode             Routing mode

Config :

Win DHCP Server 1 : IP address

Linux DHCP Server 2 : , ( As its in routing mode)

Linux DHCP relay : ,

Win XP DHCP Client : Has to get IP from DHCP servers.

Config/ Observations 1:

1) DHCP server 1 is disabled, now only one server is present in the network.

2) In DHCP relay the DHCP server is mentioned as and client interface as

3) On DHCP server in the config file (dhcpd.conf) subnet is defined for network, make a note that this subnet is not part of the subnet on which server is runnning ( server is running on and

4) Start DHCP client on windows PC, the DHCP discover can be seen on Linux DHCP Server , but it is not replying to the discover.As i know, if the subnets configured are not of the same subnet as one of its interfaces the DHCP server will not reply. So this is expected behavior. ( Correct me if I am wrong , i am trying to find supporting links, will update on this also)

 Config/ Observations 2:

1) Now start Windows DHCP Server 2 and on DHCP relay configure the DHCP server as and  client interface as

2) Again run "ipconfig/release" and "ipconfig /renew" on the WIndows DHCP client PC.

3) On Linux PC forwarding is enabled and it is forwarding the "unicast DHCP DISCOVER"  packet to the Windows Server.

4) Now suddenly both Linux DHCP Server starts working and it start replying along with the Windows DHCP server. Both the servers are replying for the intended subnets ( , even though the DHCP discover packet is not intended for the Linux server.


The question is why the Linux server is replying now? As it is supposed to reply only to the connected interfaces IP subnets.

I am still trying to find answers, if you have any comments/ideas let me know in comments.

Keep Researching !