UNICAST and BROADCAST mode response

Simon Hobson dhcp1 at thehobsons.co.uk
Wed Jun 1 07:01:45 UTC 2011


Vic Berdin wrote:

>I notice that my server (isc-dhcpd-4.2.1) can send replies either in 
>BROADCAST or in UNICAST mode (see wireshark screen capture). But 
>most of the time, the replies are in UNICAST. I am familiar with the 
>"always-unicast" config setting. However, if such a parameter is not 
>present, how/when does the server sends its OFFERs/AKCs/NAKs in 
>BROADCAST mode?

In general, if the client is already configured with an IP address, 
then traffic will be unicast, otherwise it will be broadcast.

So when a client first brings up it's interface, it can only 
broadcast as it has no address to use - and responses must also be 
broadcast. However, once it has an address*, the client can use 
unicast and talk directly to the server - and the server can talk 
directly back with unicast.

* Two obvious cases :

1) The client is already connected to the network and is renewing an 
active lease. That's the common case.

2) Technically, clients first bringing up an interface should assume 
they may have moved to a different network and start from scratch by 
broadcasting DHCP Discover packets.
However, many have a shortcut and test to see if they are on the same 
network as before - typically by making ARP requests for the last 
known gateway and checking that the same gateway (by MAC) is at the 
same address and is reachable.
In this case, may be configured to continue using any unexpired lease 
it already has - but may also double check by sending a DHCP Request 
for the address it's about to use. As it has an address that appears 
to be valid, it could do this by unicast and if it gets a positive 
response then the network is good to go.
This latter case is implementation dependant and I don't think it's 
100% RFC compliant - but it does mean clients can carry on even if 
the DHCP server is temporarily unavailable.

-- 
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