Sei sulla pagina 1di 2

DHCP concept

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

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

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 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.

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).

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.

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

What is the DHCPINFORM message?


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

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.

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.

Potrebbero piacerti anche