DHCP Interview Questions and Answers
DHCP Interview Questions and Answers
Below diagram depicts the message flow between the DHCP client and the Server -
Step 1 -
DHCP client sends out a DHCP Discover message to find out the DHCP client. DHCP discover message
is a layer 2 broadcast as well as layer 3 broadcast.
Fields in DHCP Discover Message:
Src IP: 0.0.0.0
Dst IP: 255.255.255.255
Src MAC: DHCP clients MAC address
Dst MAC: FF: FF:FF:FF:FF:FF
Hence from the above fields it is clear DHCP Discover message is a Network Layer and Data Link
Layer Broadcast.
Step 2:
DHCP server receives the DHCP discover message from client and sends back the DHCP offer
message with field information as below:
Src IP: DHCP Server IP Address
Dst IP: 255.255.255.255 #Still Broadcast as Client still has no IP Address#
Src MAC: MAC Address of DHCP Server
Dst MAC: DHCP clients MAC address
Hence from above field it is clear that DHCP offer message is a layer 2 unicast but still as layer 3
broadcast.
Step 3:
DHCP client receives the DHCP offer from DHCP server and sends back a DHCP Request message
with following fields:
Src IP: 0.0.0.0 # Still the IP address hasn’t been assigned to Client#
Dst IP: 255.255.255.255 # Broadcast as Client must have received Offer from more than one DHCP
server in their domain and the DHCP client accepts the Offer that its receives the earliest and by
doing a broadcast it intimates the other DHCP server to release the Offered IP address to their
available pool again #
Src MAC: MAC Address of DHCP Server
Dst MAC: DHCP clients MAC address
Above fields concludes that DHCP request message is also a layer 2 unicast and a layer 3 broadcast.
Step4:
Once the DHCP client sends the request to get the Offered IP address, DHCP server responds with an
acknowledge message towards DHCP client with below fields:
Src IP: DHCP Server IP Address
Dst IP: 255.255.255.255
Src MAC : MAC Address of DHCP Server
Dst MAC: DHCP clients MAC address
To address this problem, the concept of a DHCP relay agent is used. By enabling the DHCP relay
agent function in the router allows DHCP messages to be exchanged between a DHCP client and
DHCP server residing on different subnets. The core function of this DHCP relay agent is to
convert a broadcast DHCP packet into a unicast one, and forward it to a DHCP server.
The DHCP relay agent receives DHCP Discover and Request messages broadcasted by the PC, and
unicasts them directly to the DHCP server. The DHCP server unicasts a DHCP Offer/Ack message,
with the destination IP address set as the relay agent IP address, to the DHCP relay agent. The
DHCP relay agent forwards as Broadcast message (replaces the destination IP address with the IP
address of the Client (Broadcast Flag=0) or with the broadcast IP address) modified DHCP
Offer/Ack message towards DHCP Client.
Ques 12. How do DHCP client and servers on the same subnet communicate? How is this
different from DHCP Client and Server communication on different subnet?
DHCP Client and DHCP Server on same subnet use DHCP broadcast messages to communicate
and exchange information as part of DHCP process.
This Broadcast based message exchange is different when DHCP Client and DHCP Server are on
different subnets. A key element which plays pivotal role in DHCP Clients getting Dynamic IP
from DHCP Server is the DHCP relay agent.DHCP relay agent function is to allow Layer 3 device
like in the router to allow DHCP messages to be exchanged between a DHCP client and DHCP
server residing on different subnets. DHCP relay agent converts a broadcast DHCP packet into a
unicast one, and forward it to a DHCP server.
Ques 13. What Is BOOTP?
BOOTP is short for Boot Program and was originally defined in RFC 951. BootP is a protocol that is
used to boot diskless workstations. When diskless workstations are powered up and they boots the
operating system, BOOTP messages are sent on the network to request an IP address assignment. A
BOOTP configuration server assigns an IP address based on the request from a pool of addresses
configured by an administrator.
Ques 15. Which all networking devices support and can be configured as DHCP Server?
Routers
Layer 3 Switches
Firewall
Ques 16. If the client is unable to contact DCHP server, what happens?
During the event of client unable to contact DHCP server, the client gets any IP address from the
range 169.254.0.0 to 169.254.255.255.The IP address assigned to the interface is because of
automatic private IP addressing (APIPA). It's used because the DHCP process did not receive a valid
usable IP address.
The Internet Assigned Numbers Authority (IANA) has reserved 169.254.0.0-169.254.255.255 for
Automatic Private IP Addressing.
Ques 17. What is DHCP option 150? Where is it used?
The command is used to define the IP address of the TFTP server(s) (CME/CUCM) to download the
phone configuration files. Option 150 is generally used in case of IP Phone setup. IP phones require
access to a TFTP server since they contain device configuration name files (.cnf file format), which
enables the device to communicate with Cisco Call Manager.
Ques 18. What identifier can be used to bind windows machine with Cisco network Device
configured as DHCP server?
Client-ID is the reference used when binding windows host with Cisco Network Device.
However in case of Cisco, it uses its own format of Client ID. These clients have their own IDs that
identify themselves on the network.
Ques 20. After reconfiguring the DHCP server recently, the client workstation is not able to
access any network resources. What is the likely solution?
The option for default gateway needs to be configured on the DHCP Server. Because of this, the
Clients get the IP address but unable to access network resources which are outside the Client VLAN.
Ques 21. Which layer of OSI model does DHCP work on?
DHCP works on Application layer of OSI model.
Ques 22. What is Difference between DHCP and RARP?
While both DHCP and RARP use MAC broadcast request for requesting and IP address, below table
describes their differences –
Service Port
Time 37
TACACS 49
DNS 53
BOOTP/DHCP Server 67
BOOTP/DHCP Client 68
TFTP 69
NetBIOS name service 137
NetBIOS datagram service 138