A router is acting as a DHCP server for a network the network space is 10.127 38.0 24
DHCP Interview QuestionsFor Quick Overview You can refer to the below video. Show
Q1. In
a DHCP environment, which of the components (Client or Server) initiates the request
How DHCP Works? Below are the steps : Step 1: When the client computer (or device) boots up or is connected to a network, a DHCPDISCOVER message is sent from the client to the server. As there is no network configuration information on the client so the message is sent with 0.0.0.0 as source address and 255.255.255.255 as destination address. If the DHCP server is on local subnet then it directly receives the message or in case it is on different subnet then a relay agent connected on client’s subnet is used to pass on the request to DHCP server. The transport protocol used for this message is UDP and the port number used is 67. The client enters the initializing stage during this step. Step 2: When the DHCP server receives the DHCPDISCOVER request message then it replies with a DHCPOFFER message. As already explained, this message contains all the network configuration settings required by the client. For example, the yaddr field of the message will contain the IP address to be assigned to client. Similarly the the subnet mask and gateway information is filled in the options field. Also, the server fills in the client MAC address in the chaddr field. This message is sent as a broadcast (255.255.255.255) message for the client to receive it directly or if DHCP server is in different subnet then this message is sent to the relay agent that takes care of whether the message is to be passed as unicast or broadcast. In this case also, UDP protocol is used at the transport layer with destination port as 68. The client enters selecting stage during this step Step 3: The client forms a DHCPREQUEST message in reply to DHCPOFFER message and sends it to the server indicating it wants to accept the network configuration sent in the DHCPOFFER message. If there were multiple DHCP servers that received DHCPDISCOVER then client could receive multiple DHCPOFFER messages. But, the client replies to only one of the messages by populating the server identification field with the IP address of a particular DHCP server. All the messages from other DHCP servers are implicitly declined. The DHCPREQUEST message will still contain the source address as 0.0.0.0 as the client is still not allowed to use the IP address passed to it through DHCPOFFER message. The client enters requesting stage during this step. Step 4: Once the server receives DHCPREQUEST from the client, it sends the DHCPACK message indicating that now the client is allowed to use the IP address assigned to it. The client enters the bound state during this step. The Concept of Lease: With all the necessary information on how DHCP works, one should also know that the IP address assigned by DHCP server to DHCP client is on a lease. After the lease expires the DHCP server is free to assign the same IP address to any other host or device requesting for the same. For example, keeping lease time 8-10 hours is helpful in case of PC’s that are shut down at the end of the day. So, lease has to be renewed from time to time. The DHCP client tries to renew the lease after half of the lease time has expired. This is done by the exchange of DHCPREQUEST and DHCPACK messages. While doing all this, the client enters the renewing stage. 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. Is a router a DHCP server?By default, home routers set to use DHCP, whereas each connected device will receive the necessary settings from the router. Therefore, on your home network, your router serves as a simple DHCP server that assigns this information to hosts.
Where is the DHCP server located on a router?DHCP Server Location
On home networks the DHCP server is on the home router or home hub. Most home routers will have the DHCP server enabled by default (turned on). However you can use another computer e.g raspberry pi as a DHCP server, but it is generally not done.
What is the command to reserve the IP address in DHCP IP DHCP excludedThe ip dhcp excluded-address command may be used to reserve addresses that are statically assigned to key hosts. A DHCP server can configure much more than an IP address.
When leasing an IPv4 address using DHCP Why does a client send the DHCP request message as a broadcast?This message is broadcast to the entire network to let all DHCP servers know which server was selected. If a server receives a DHCPREQUEST message, the server marks the address as leased. Servers that are not selected will return offered addresses to their available pool.
|