0% found this document useful (0 votes)
668 views8 pages

DHCP Interview Questions and Answers

The document discusses Dynamic Host Configuration Protocol (DHCP) and answers various questions related to DHCP. Some key points: - DHCP is used to dynamically assign IP addresses to devices on a network from a centralized server. It allows for automatic configuration of network settings. - A DHCP lease assigns an IP address from the server to a client for a specified period of time before it must be renewed. - DHCP scope defines the range of IP addresses available for clients from the DHCP server on a subnet. - The DHCP process between a client and server involves four message types: Discover, Offer, Request, and Acknowledge (DORA). - A DHCP relay agent allows clients and servers

Uploaded by

Arun Somashekar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
668 views8 pages

DHCP Interview Questions and Answers

The document discusses Dynamic Host Configuration Protocol (DHCP) and answers various questions related to DHCP. Some key points: - DHCP is used to dynamically assign IP addresses to devices on a network from a centralized server. It allows for automatic configuration of network settings. - A DHCP lease assigns an IP address from the server to a client for a specified period of time before it must be renewed. - DHCP scope defines the range of IP addresses available for clients from the DHCP server on a subnet. - The DHCP process between a client and server involves four message types: Discover, Offer, Request, and Acknowledge (DORA). - A DHCP relay agent allows clients and servers

Uploaded by

Arun Somashekar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

DHCP Interview Questions and Answers

Ques 1. What is DHCP? What is DHCP’s purpose?


DHCP stands for Dynamic Host Configuration Protocol. DHCP is a protocol for assigning dynamic
IP addresses to devices on a network. In other words, DHCP is used to control the network
configuration of a host through a remote server. It comes installed as a default feature in most
of the contemporary operating systems. DHCP is an excellent alternative to the time-consuming
manual configuration of network settings on a host or a network device.

Ques 2. What is a DHCP lease?


When the DHCP client boots up on the network, a negotiation process called the DHCP lease
process occurs between the DHCP server and client. DHCP-enabled client obtains a lease for an
IP address from a DHCP server. Before the lease expires, the DHCP server must renew the lease
for the client or the client must obtain a new lease.

Ques 3. What is DHCP Scope?


DHCP Scope determines which IP addresses are provided to the clients. They should be defined
and activated before DHCP clients use the DHCP server for its dynamic IP configuration. Scope is
the range of IP addresses that the DHCP server can lease to clients on a subnet.
Ques 4. What is a Client ID?
A DHCP Client id is MAC address of the host 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 5. Can DHCP work with Apple Talk or IPX?


No, DHCP doesn’t work for AppleTalk and IPX since it is strictly related to IP.Both AppleTalk and
IPX have own mechanisms for assigning their own network addresses.

Ques 6. Does DHCP support statically defined addresses?


Yes, DHCP supports manual allocation of addresses.

Ques 7. What protocol and port does DHCP use?


DHCP runs on UDP port number 67 and 68 where UDP port 67 is for the DHCP server, and UDP
port 68 is for the DHCP client.

Ques 8. What are benefits of using DHCP?


Enlisted below are benefits that can be reaped out from DHCP -
 Automatic management of IP addresses, including the prevention of duplicate IP address
problems.
 Minimal manual labor due to all configuration pushed to DHCP Client.
 Address duplication is eliminated as DHCP automatically tracks IP address assignments.
 Minimizes configuration errors which occur in manual configuration.
 Centralized configuration of IP address scope.
 Support of both IPV4 and IPV6 address assignments.
 DHCP permits vendor specific options for end nodes to be assigned even vendor specific
parameters.
 DHCP can be used to assign not only IP addresses, but also a wide range of additional
network parameters like default gateway, DNS server address etc.

Ques 9. What Is a MAC Address?


MAC Address is used by the Media Access Control sublayer of the Data-Link Layer (DLC) of
telecommunication protocols. Every NIC (also called LAN card) has a hardware address that’s known
as a MAC, for Media Access Control. The MAC address is sometimes referred to as a networking
hardware address, the burned-in address (BIA), or the physical address. A MAC address is given to a
network adapter when it is manufactured. It is hardwired or hard-coded onto your computer’s
network interface card (NIC) and is unique to it. ARP (Address Resolution Protocol) translates an IP
address into a MAC address.
Ques 10. What Is DORA In DHCP?
DORA process in DHCP is stands for following message flows between the client and the server.
 Discover
 Offer
 Request
 Acknowledge

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

Ques 11. What is purpose of relay agent?


Usually, DHCP messages are broadcasted. For messages to be exchanged via broadcast, DHCP
client and DHCP server both the client and server have to reside on the same subnet.Howeevr,
what happens when the DHCP Server and DHCP Client reside on different subnets? Layer3
devices like Routers do not forward Broadcasts i.e. if DHCP Client (in VLAN 10) wants to send
DHCP Discover message to DHCP Server which is in different subnet (VLAN 20), the broadcast
sent form Client with Destination Mac address FFFF:FFFF:FFFF will not be sent by Router towards
DHCP Server (Default behavior to Router to not send broadcasts across subnets).

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 14. What is the default duration of a DHCP lease?


In Windows DHCP Servers, The DHCP lease time is 8 days by default. In Cisco devices as DHCP Server,
default Lease time is 1 day.

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 19. Can Cisco ASA be configured as DHCP Server?


Yes, ASA can be configured as a DHCP Server. However, it’s important to remember that DHCP
Server is not the primary purpose of the ASA and should be last resort as DHCP Server.

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 –

Ques 23. What is DHCPD?


DHCPD is abbreviation for Dynamic Host Configuration Protocol Daemon. DHCP is a program that
runs as daemon on a server to provide DHCP service to clients.

Ques 24. What is the use of helper address? Where is it used?


A UDP helper address is configured in Layer 3 devices (Relay agent) to forward broadcast network
traffic outside the local subnet. In scenarios where DHCP client is not in same subnet as that of DHCP
server, helper is responsible for forwarding the request to the DHCP server.
The interface that the layer 3 device receives the discover message from the client (i.e. PC) is
configured with the ip helper-address, which is the IP address of the DHCP server.
By using the ip helper-address command, a router can be configured to accept a broadcast request
for a UDP service and then forward it as a unicast to a specific IP address,
By default, the ip helper-address command forwards the eight UDP services listed below –

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

You might also like