03-07-2015 11:32 AM - edited 03-07-2019 10:59 PM
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
Solved! Go to Solution.
03-07-2015 03:15 PM
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.
03-16-2015 11:34 AM
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
03-07-2015 03:15 PM
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.
03-13-2015 12:26 PM
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
03-16-2015 11:34 AM
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
03-18-2015 04:57 AM
Hi Cf,
Thanks a million! Yeap, i spotted the "transaction ID"
Regards,
Noob
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide