The following DHCP interview questions are a sample from below Ebook – 250+ Network Engineer Interview questions and answers
What is an IP Helper address feature and why is it required in a DHCP environment
DHCP Discover packets are broadcast packets. This means that a DHCP Discover packet which is sent from the client would not reach the DHCP Server, if the server resides on a different network. This is because, routers are required for communication between different networks and routers do not forward broadcast packets. The IP Helper address feature is configured on the router. The feature informs the router the DHCP Servers IP address for the network. So, when the router receives the DHCP Discover packet, it would convert it from broadcast to unicast packet and then send it to the DHCP Server.
What is a DHCP Scope and why is it required
A scope includes information like IP address ranges, Subnet Masks, gateway address, DNS Server etc. This required so that clients would require the necessary information from the server.
What would happen if there are multiple DHCP servers on a network
The clients would trigger DHCP Discover packets and the server which responds first would provide the IP address to the client
How does a client know that a lease has expired and how is it renewed
When a client receives an IP address from the DHCP Server, the lease expiry date and time is provided as part of DHCP options. This is maintained and recorded by the client. Just before the lease expiry time, the client would initiate a renew request to the server for a new lease
How many DHCP Servers can reside on one subnet
It’s unlimited. But if there is a DHCP client, which server would lease out the IP address ? It’s a simple logic. The first server which responds to the DHCP clients IP address request would lease out the IP address.
Explain the communication flow between a DHCP client and server on a network with two DHCP Servers
The first packet the DHCP Client initiates would be the DHCP Discover packet. The DHCP Discover packet is broadcast in nature and would be received by both the DHCP servers. The DHCP servers would respond with DHCP offer packet containing the IP addresses which they offer. Based on the first DHCP offer the client receives, the client would respond with DHCP request packet which contains the IP address which it would be using along with the DHCP servers IP address which had provide the respective. This packet is send as broadcast. The packet, when received by the other DHCP server would understand that the IP address which it had leased to the client (In the DHCP offer packet) is not taken. So the DHCP server would put the IP address back to its pool.
Which field in a DHCP message exchange for a client would keep track of the message flow to avoid getting mismatched with a different DHCP packet from a different client?
Transaction ID in DHCP packets
Will the DHCP client trigger for a lease renewal before or after the lease time has expired.
The DHCP Client triggers for a lease renewal just before the DHCP lease expires and not after the lease expires.