Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
https://tblogqus.com/top-dhcp-interview-questions-and-answers
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
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
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
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
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
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.
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).
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).