5

DHCP OFFER is a layer3 broadcast because the server don't know client Ip, but server knows the client mac address. So how it would be the broadcast?

If anyone ask me about this? how should I answer? can i say its layer3 broadcast and layer2 unicast

8

Be aware of the broadcast flag, see RFC2131 (page 24):

A client that cannot receive unicast IP datagrams until its protocol software has been configured with an IP address SHOULD set the BROADCAST bit in the 'flags' field to 1 in any DHCPDISCOVER or DHCPREQUEST messages that client sends. The BROADCAST bit will provide a hint to the DHCP server and BOOTP relay agent to broadcast any messages to the client on the client's subnet.

EDIT

A client that can receive unicast IP datagrams before its protocol software has been configured SHOULD clear the BROADCAST bit to 0. The BOOTP clarifications document discusses the ramifications of the use of the BROADCAST bit.

Added the rest of the RFC. According to the entire paragraph, it could be either broadcast, or unicast or even both.

11

The answer is that it can be either broadcast or unicast - and in some cases both unicast and broadcast before it reaches the client when an ip helper-address is used.

A client doesn't actually have an IP address until the DISCOVER-OFFER-REQUEST-ACK exchange is completed. It is possible (although very unlikely) to have a situation arise where the server will resond to the REQUEST with a NAK.

However, since unicast is generally preferred over broadcast, many clients will accept a unicast reply that matches their L2 address.

3

https://www.ietf.org/rfc/rfc2131.txt

As per this RFC:

Droms Standards Track [Page 24] RFC 2131 Dynamic Host Configuration Protocol March 1997

Normally, DHCP servers and BOOTP relay agents attempt to deliver DHCPOFFER, DHCPACK and DHCPNAK messages directly to the client using uicast delivery. The IP destination address (in the IP header) is set to the DHCP 'yiaddr' address and the link-layer destination address is set to the DHCP 'chaddr' address. Unfortunately, some client implementations are unable to receive such unicast IP datagrams until the implementation has been configured with a valid IP address (leading to a deadlock in which the client's IP address cannot be delivered until the client has been configured with an IP address).

A client that cannot receive unicast IP datagrams until its protocol software has been configured with an IP address SHOULD set the BROADCAST bit in the 'flags' field to 1 in any DHCPDISCOVER or DHCPREQUEST messages that client sends. The BROADCAST bit will provide a hint to the DHCP server and BOOTP relay agent to broadcast any messages to the client on the client's subnet. A client that can receive unicast IP datagrams before its protocol software has been configured SHOULD clear the BROADCAST bit to 0. The BOOTP clarifications document discusses the ramifications of the use of the BROADCAST bit [21].

A server or relay agent sending or relaying a DHCP message directly to a DHCP client (i.e., not to a relay agent specified in the 'giaddr' field) SHOULD examine the BROADCAST bit in the 'flags' field. If this bit is set to 1, the DHCP message SHOULD be sent as an IP broadcast using an IP broadcast address (preferably 0xffffffff) as the IP destination address and the link-layer broadcast address as the link-layer destination address. If the BROADCAST bit is cleared to 0, the message SHOULD be sent as an IP unicast to the IP address specified in the 'yiaddr' field and the link-layer address specified in the 'chaddr' field. If unicasting is not possible, the message MAY be sent as an IP broadcast using an IP broadcast address (preferably 0xffffffff) as the IP destination address and the link- layer broadcast address as the link-layer destination address.

2

A DHCP server is answering with a DHCP OFFER to provide an IP address. It knows the target MAC and IP, hence will use a unicast IP packet, toward the originating Ethernet address, hence a unicast Ethernet frame too.

If you want to see it for real, just enter the following command on your DHCP server:

    tcpdump -imy_ethernet_device-e src port bootps

where my_ethernet_device is the name of the Ethernet interface on which your DHCP server is replying to your network.

  • could you please tell me about ack,request packets also whether they are unicast or broadcast? – ashok Feb 27 '15 at 11:18
  • technet.microsoft.com/en-us/library/cc780760%28v=ws.10%29.aspx in this link they are saying that the offer packet is broadcast – ashok Feb 27 '15 at 11:20
  • Run a tcpdump (or a wireshark) and conclude for yourself how it is really working. – daniel Azuelos Feb 27 '15 at 11:30
  • i haven't any of them in my system please conclude here. – ashok Feb 27 '15 at 11:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.