cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
9710
Views
0
Helpful
4
Replies

DHCP broadcast - why does it broadcast after DISCOVER ?

SJ K
Level 5
Level 5

Hi all,

a) I am new to network and is reading up about broadcasting, hence decided to do a /ipconfig renew to get a new IP from my DHCP server which will trigger a broadcast, as my host does not know its IP address and need 1 from the DHCP server.

b) Hence I do a network capture on my host computer and I did saw the 4 different bootstrap protocol (DISCOVER,OFFER,REQUEST,ACK)

c) In the DISCOVER packet, I see that all the dst mac and dst ip are all broadcast addresses as the host does not know where the DHCP server is.

d) However, in the OFFER packet from the DHCP server to the requesting HOST, it is using broadcast dst addresses as well for both L2,L3.

===========================================================================================================

q1) Why ? I can understand that requesting host does not have an IP yet, hence the L3 broadcast, but in L2,  the mac address of the requesting host is already made know in the DISCOVER packet, why is the DHCP server still sending L2 broadcast ? why can't it just send the OFFER directly to the requesting HOST via L2 ?

q2) Also, what happen if there are more then 1 host requesting IP from the DHCP server, wouldnt the OFFER packet be creating confusion if it is done in a broadcast manner ?

   (e.g. host 1 send discover packet (broadcast) to DHCP server

           host 2 send discover packet (broadcast) to DHCP server at the same time

            DHCP server decide to assign an IP (e.g 1.10) and send out the OFFER packet (broadcast)

          both host 1 and host 2 receive the OFFER

      )

What will happen next ? Since the subsequent REQUEST and ACK are both using broadcast too ?

============================================================================================================

Regards,
Alan

2 Accepted Solutions

Accepted Solutions

Roberto Kippins
Level 1
Level 1

Hi, DHCP uses broadcast by nature, when a host needs an ip address on the network it sends a DHCP discover message, this is sent at both l2 and l3 as: 

source: host macaddress and an ip address of 0.0.0.0 

destination: ff:ff:ff:ff:ff:ff and ip address 255.255.255.255

 

if multiple hosts send a DCHP discover message simultaneously the source mac address would be different for each host and the DHCP server will see this and send multiple offers for each source mac address it sees.

View solution in original post

Hi szejiekoh,

There is a transaction ID filed in the all the DHCP requests. This transaction ID is created by the client in the Discover packet. This SAME transaction ID will used for remaining 3 communications(Offer,Request,Ack) that are happening between the client and the server.

This will help to ensure integrity of the request.

Hope I made myself clear.

CF

 

View solution in original post

4 Replies 4

Roberto Kippins
Level 1
Level 1

Hi, DHCP uses broadcast by nature, when a host needs an ip address on the network it sends a DHCP discover message, this is sent at both l2 and l3 as: 

source: host macaddress and an ip address of 0.0.0.0 

destination: ff:ff:ff:ff:ff:ff and ip address 255.255.255.255

 

if multiple hosts send a DCHP discover message simultaneously the source mac address would be different for each host and the DHCP server will see this and send multiple offers for each source mac address it sees.

Hi Roberto,

 

Realize in the DHCP offer from the server - although it is still a broadcast (but inside the payload, it did mention the requesting machine's mac) -- i guess that's how the requesting machine knows that the IP is for it.

Regards,
Noob

 

Hi szejiekoh,

There is a transaction ID filed in the all the DHCP requests. This transaction ID is created by the client in the Discover packet. This SAME transaction ID will used for remaining 3 communications(Offer,Request,Ack) that are happening between the client and the server.

This will help to ensure integrity of the request.

Hope I made myself clear.

CF

 

Hi Cf,

Thanks a million! Yeap, i spotted the "transaction ID"


Regards,
Noob

Review Cisco Networking for a $25 gift card