Question regarding DHCP message

FreddyIWFreddyIW Member Posts: 27 ■□□□□□□□□□
Hello guys :) I have this question regarding DHCP:

A company uses DHCP servers to dynamically assign IPv4 addresses to employee workstations. The address lease duration is set as 5 days. An employee returns to the office after an absence of 3 days. When the employee boots the workstation, it sends a message to obtain an IP address. Which Layer 2 and Layer 3 destination addresses will the message contain?

A) both MAC and IPv4 addresses of the DHCP server

B) FF-FF-FF-FF-FF-FF and IPv4 address of the DHCP server

C) FF-FF-FF-FF-FF-FF and 255.255.255.255

D) MAC address of the DHCP server and 255.255.255.255


What's the correct answer and why?

Comments

  • showintshowint Member Posts: 68 ■■□□□□□□□□
    I think option C will be correct.

    DHCP Discover message contains the following addresses:

    1) Destination MAC Address as FF-FF-FF-FF-FF-FF
    2) Destination IP Address as 255.255.255.255
    3) Source MAC Address as client's MAC address
    4)Source IP address as 0.0.0.0

    That is, there will be only one known address - Source MAC Address.
  • siggnationsiggnation Member Posts: 182
    I believe the answer is A since the lease hasn't expired yet, so the client should only need to send a dhcprequest to the known dhcp server l2/l3 addresses.
    Currently Reading:

    CCIE Routing and Switching Written Exam v. 5.1
    CCIE Routing and Switching 5.0 OCG, Vol. I
    Cisco Lan Switching
  • tecnodog7tecnodog7 Member Posts: 129
    Agree with Sigg, since there is no mention of the lease being expired that would rule out 3. Also B is a viable option since the mac address of the DHCP server would be gone from the cache i presume.

    Where the guru's at?
  • OfWolfAndManOfWolfAndMan Member Posts: 923 ■■■■□□□□□□
    siggnation wrote: »
    I believe the answer is A since the lease hasn't expired yet, so the client should only need to send a dhcprequest to the known dhcp server l2/l3 addresses.

    How does the computer know the DHCP's address? It doesn't, but the router or L3 switch knows it, therefore the computer will need to broadcast a request at both the link layer and IP layer. If the server is in the same subnet, the FF:FF:FF:FF:FF:FF dest will be the DHCP server's MAC on that segment. If it's not, then the SVI's command "ip helper-address" will route it to the proper subnet after changing the dest address from 255.255.255.255 to the helper address, assuming it's in the RIB. Remember that without DHCP snooping, any DHCP Offer packet that is sent, even if it's spoofed, will be accepted, that's why having trusted DHCP ports (Mainly when on the same subnet as your DHCP server) is recommended.

    The answer is C.
    :study:Reading: Lab Books, Ansible Documentation, Python Cookbook 2018 Goals: More Ansible/Python work for Automation, IPSpace Automation Course [X], Build Jenkins Framework for Network Automation []
  • MonkerzMonkerz Member Posts: 842
    Key phrase here being, "it sends a message to obtain an IP address." Meaning there is no locally cached DHCP settings (including dhcp server address). The answer would be C.


    Now if that phrase was not there, this would be a loaded question as assumptions would need to be made in regard to the workstation. The answer could be either. A few examples of assumptions:
    (1) OS of the workstation and capability to cache dhcp settings and presist through reboot.
    (2) The workstation possibly booting on a foreign network while absent and storing locally cached foreign dhcp settings that persist through a reboot.
    (3) The workstation remaining completely powered down for the entire 3 days and retaining the dhcp cache.
  • siggnationsiggnation Member Posts: 182
    How does the computer know the DHCP's address? It doesn't, but the router or L3 switch knows it, therefore the computer will need to broadcast a request at both the link layer and IP layer. If the server is in the same subnet, the FF:FF:FF:FF:FF:FF dest will be the DHCP server's MAC on that segment. If it's not, then the SVI's command "ip helper-address" will route it to the proper subnet after changing the dest address from 255.255.255.255 to the helper address, assuming it's in the RIB. Remember that without DHCP snooping, any DHCP Offer packet that is sent, even if it's spoofed, will be accepted, that's why having trusted DHCP ports (Mainly when on the same subnet as your DHCP server) is recommended.

    The answer is C.

    Thanks Wolf and Monkerz. Great explanation.
    Currently Reading:

    CCIE Routing and Switching Written Exam v. 5.1
    CCIE Routing and Switching 5.0 OCG, Vol. I
    Cisco Lan Switching
  • thomas_thomas_ Member Posts: 1,012 ■■■■■■■■□□
    I think the possibility exists for the answer to be "A" if you assume that the PC retains its DHCP settings in cache. Reason being is that after 50% of the lease has been used the PC will send a renewal request. If it's turned on after 3 days then more than 50% of the lease time has passed and it will then send a renewal request. If it doesn't cache the DHCP settings then the answer would be C.
  • FreddyIWFreddyIW Member Posts: 27 ■□□□□□□□□□
    How does the computer know the DHCP's address? It doesn't, but the router or L3 switch knows it, therefore the computer will need to broadcast a request at both the link layer and IP layer. If the server is in the same subnet, the FF:FF:FF:FF:FF:FF dest will be the DHCP server's MAC on that segment. If it's not, then the SVI's command "ip helper-address" will route it to the proper subnet after changing the dest address from 255.255.255.255 to the helper address, assuming it's in the RIB. Remember that without DHCP snooping, any DHCP Offer packet that is sent, even if it's spoofed, will be accepted, that's why having trusted DHCP ports (Mainly when on the same subnet as your DHCP server) is recommended.

    The answer is C.

    Since the least hasn't expired yet, doesn't the PC keep the IP address of the previous DHCP server that assigns it the IP address, thus using a unicast DHCPREQUEST to get its previous IP address while renewing the lease at the same time ?
  • OfWolfAndManOfWolfAndMan Member Posts: 923 ■■■■□□□□□□
    FreddyIW wrote: »
    Since the least hasn't expired yet, doesn't the PC keep the IP address of the previous DHCP server that assigns it the IP address, thus using a unicast DHCPREQUEST to get its previous IP address while renewing the lease at the same time ?

    It never said it hasn't expired. It said the lease was five days and an employee returned after three. When did he get the previous lease on the computer though? Nobody knows. It seems like a play with words, so I'm sticking with my answer. It says it sends a request, which assumes the lease has expired, or it never had one. The lease would be cached if it hadn't expired.
    :study:Reading: Lab Books, Ansible Documentation, Python Cookbook 2018 Goals: More Ansible/Python work for Automation, IPSpace Automation Course [X], Build Jenkins Framework for Network Automation []
  • KragsterKragster Member Posts: 44 ■■□□□□□□□□
    From my understanding the PC does not cache the dhcp server ip or any other info. It will go through the exact same dhcp discover-offer-request-acknowledge process as if it never had a lease. The server will see there is an existing lease for the source mac in it's table and offer the same info back to the client from the original lease.
  • MonkerzMonkerz Member Posts: 842
    Kragster wrote: »
    From my understanding the PC does not cache the dhcp server ip or any other info.

    You have much to learn my friend. Enjoy the journey.
  • OfWolfAndManOfWolfAndMan Member Posts: 923 ■■■■□□□□□□
    So you're telling me whenever you shutdown your computer, when it comes back on, it has to broadcast another DHCP Request, that would flood the whole segment mind you, for each and every computer that was turned off, every time it turns off and back on again? Part of the whole point of the DHCP lease is to prevent having to send out a recurring frame every time it powers down and boots up, otherwise you'd have unknown unicast packets bouncing all around the segment.
    :study:Reading: Lab Books, Ansible Documentation, Python Cookbook 2018 Goals: More Ansible/Python work for Automation, IPSpace Automation Course [X], Build Jenkins Framework for Network Automation []
Sign In or Register to comment.