Skip to content

Top DHCP Interview Questions and Answers

Top DHCP Interview Questions and Answers

In Today’s post, we will be discussing the important DHCP Interview Questions and Answers. As you know, Each computer that uses TCP/IP protocol suite needs to know its IP address. If the computer uses classless addressing than it also needs to know its subnet mask and Default gateway. DHCP ( Dynamic Host Control Protocol) is client/server protocol which provides the following information to the diskless computer or computer booted the first time i.e.

  1. The IP Address of the Computer
  2. Subnet mask of the Computer
  3. Default Gateway
  4. IP address of Name Server (DNS)

Here is the list of Top DHCP Interview Questions and Answers.

        1. What is DHCP?

          DHCP is the Dynamic Host Control Protocol. It assigns the IP address to the hosts/endpoints machines dynamically. With the use of DHCP services, there is no need to statically configure the IP address, subnet mask and other configuration on the hosts. It is used in the large LAN environment where hundreds of hosts or more than hundreds of computers need an IP address. It reduces the manual task of the administrator of going to each machine and configuring the IP schema.

          DHCP works on client/server architecture. The DHCP server uses UDP port 67 to provide the services. DHCP client uses UDP port number 68 for the communication. DHCP clients send the broadcast request as soon they boot up and DHCP server reply to the client requests.

          DHCP Server

        2. What type of information is provided by the DHCP server to the clients?

          DHCP server provides the following information to the DHCP clients:
          a. IP address for the Computer/desktop/laptop/VoIP phones etc.
          b. Subnet mask information
          c. Default Gateway IP address
          d. IP address of the Domain Name Server

        3. How DHCP Works and What is DORA process?

          DHCP works on DORA process. DORA stands for ( Discover–Offer–Request–Acknowledgement).

          DISCOVER:

          As the host boots up, it requires the IP details for its automatic configuration, For that, it needs to locate the DHCP server. To locate the DHCP server, the client sends the broadcast DISCOVER message over the LAN. This broadcast is known as DHCP DISCOVER. The DHCP DISCOVER message will have the destination mac address FF::FF::FF::FF::FF:: FF and destination IPv4 address will be 255.255.255.255.

          While sending the DISCOVER request client uses the source port UDP 68 and Destination Port is UDP 67.

          Note: Source IP: 0.0.0.0 ,Destination IP: 255.255.255.255, Source MAC: Mac address of host, Destination MAC: FF::FF::FF::FF::FF:: FF, Host to DHCP server Communication: Broadcast

          DHCP OFFER:

          Once the request is received by the DHCP server of the host. DHCP server OFFER message to the client, the message sent by the DHCP server to the client is the unicast communication because the DHCP server knows the MAC address of the host now. The OFFER message contains the proposed IP schema for the host which is the Host IP address, Default Gateway IP address, DNS server details, Subnet Mask Information.

          Note: Source MAC: MAC address of DHCP Server, Destination MAC: MAC address of the Host machine

          DHCP REQUEST:

          After receiving the IP schema proposal from the DHCP server, the client checks the configuration file received by the DHCP server. If the client finds the offer agreeable it sends the DHCP REQUEST message to the DHCP server for the acceptance of the proposal and asking the DHCP server to lease the IP address for itself.

          DHCP DORA Process

          DHCP Acknowledgment:

          Once the DHCP server receives the REQUEST message from the host. It adds the IP address into its configuration against the MAC address of the host. It defines the lease time for the IP address for how much time it will be with that client. In return, it sends the unicast ACKNOWLEDGEMENT message to the client confirming the request has been accepted.

        4. What are the minimum and maximum packet length of DHCP Packet?

          The minimum packet length of DHCP packet is 236 ( without the options field) and maximum length of DHCP packet is 300 bytes ( with the options field).

        5. What is the DHCP relay agent?

          When the client and server are on two different networks distinguish by several other networks. Clients are not able to get the IP address because when they broadcast the Discover message for DHCP server. The edge Routers connecting two different networks drop the packets because Routers do not forward the broadcast packets. In that case, some solution is required. We can configure one of the hosts ( or router itself ) to transform the broadcast messages into unicast messages.so that they can pass through the router.

        6. What is APIPA address and What is the range used for APIPA address scheme?

          APIPA is Automatic Private IP Addressing. When the machine is unable to get the IP information from the DHCP server and static IP is not configured in the system than the client machine will automatically assign an IP address to itself of APIPA range. The range used for APIPA addressing is 169.254.0.1 to 169.255.255.254 (class B).

        7. What is renewing state in the DHCP process?

          When the lease time of the DHCP host reaches 50%. The client sends another DHCP REQUEST message to the DHCP server to ask for the renewal of the lease. If the lease is renewed again then DHCP host resets its timer and if DHCP ACK message is not received by the DHCP host it goes to the rebinding state.

        8. Explain the timers used in the DHCP process?

          There are three types of the timer in the DHCP process i.e:
          a. Renewal Timer 50% of lease time
          b. Rebinding Timer 87.5% of lease time
          c. Expiration Timer 100% of the lease time

        9. What is the DHCPINFORM message?

          When host request the DHCP server for the local configuration parameters and client host has externally configured address.

        10. What is the DHCPDECLINE message?

          When DHCP server OFFER the IP address to the host. After acknowledgment host sends the gracious ARP to check network address is not use already. If gracious ARP reply comes than host sends the DHCPDECLINE message to the server indicating that network address is already in use.

        11. What is DHCPRELEASE message?

          When the host is ready to release the IP address or decided to move on in other subnets. It sends the message to the DHCP server to release the IP and cancel the remaining time of lease.

          Conclusion

          DHCP is a very important protocol and uses in almost 99% networks now as days. All the network engineers should have good knowledge of how DHCP works.

          Don’t forget to check my new posts on Firewalls and TOP 50 CCNA networking Questions and Answers. Check them below:

          TOP 50 CCNA Questions and Answers

           

Leave a Reply

Your email address will not be published. Required fields are marked *