DHCPACK question

Simon Hobson dhcp1 at thehobsons.co.uk
Thu Feb 12 08:01:45 UTC 2009

Defryn, Guy wrote:

>Probably a silly question but since I don't deal with DHCP much I 
>will ask anyway.
>I am doing some troubleshooting and I noticed in the logs that 
>DHCPACK sometimes
>gets requested via the gateway and other times via eth0. Why would that be?
>Here is an example of the log
>Feb 12 08:34:15 net1 dhcpd: Added new forward map from 
>it022402.domain.co.nz. to
>Feb 12 08:34:15 net1 dhcpd: DHCPREQUEST for from 
>00:0d:5e:82:75:d1 (IT022402) via
>Feb 12 08:34:15 net1 dhcpd: DHCPACK on to 
>00:0d:5e:82:75:d1 (IT022402) via
>Feb 12 08:35:18 net1 dhcpd: DHCPINFORM from via 
>Feb 12 08:35:18 net1 dhcpd: DHCPACK to 
>(00:0d:5e:82:75:d1) via eth0

The difference is that the DHCPRequest will have been broadcast - 
hence it arrives courtesy of a relay agent. The "via" 
bit in the log entry. Since the client is not yet able to do unicast 
IP (it's still configuring it's interfaces), the response is sent 
back via the relay agent - the "via" bit.

In the case of the DHCPInform, or a later DHCPRequest that is 
renewing a still current lease, the client can handle unicast IP and 
communicates directly with the DHCP server (though I'm not sure why 
the DHCPInform message here is going via the relay agent*). In this 
case, the server replies directly by sending a unicast IP message 
directed to the client - hence the "via eth0".

* In the case of INFORM, I think the client just broadcasts the 
packet (it's interested in any answer, not specifically an answer 
from the server that gave it it's lease). It does however set the 
flag to say it can handle a unicast reply and so the server replies 
directly, not via the relay agent.

For a well readable explanation of how DHCP works I would recommend 
"The DHCP Handbook" by Ralph Droms and Ted Lemon. It covers all this 
and gives a historical perspective of how we got here - which 
probably isn't where we'd want to be if starting with a clean sheet.

Simon Hobson

Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.

More information about the dhcp-users mailing list