Understanding DHCP


Here comes a slightly deeper dive into DHCP.

I know that you know DHCP stands for “Dynamic Host Configuration Protocol” and you might have learned how to configure it in RHCE Training.

Ever wondered why the word “Host” comes in DHCP, where we think its main job is to provide IP addresses automatically to the clients. (period)

Read Further…

1. DHCP is actually a Ideal Administrator. It acts as a proxy for network or linux administrator.

2. IP addresses assigned by the DHCP are temporary i.e. assigned for particular time period or on lease.

3. DHCP server assign the IP configuration to the client from the range of IP’s (or pool) already configured.

4. Once a IP is assigned, client can extend the lease time dynamically.

5. DHCP deliver other configuration for the client (read host) apart from IP. Information like – gateway address, dns servers, lease time, ntp server etc.

6. Lets now understand how IP is assigned first time to the client (host).

Step – 1 – DHCP client broadcasts [D]ISCOVER packet on local subnet

Step – 2 – DHCP servers (if more than one) send [O]FFER packet with lease information

Step – 3 – DHCP client selects lease and broadcasts [R]EQUEST packet

Step – 4 – Selected DHCP server sends [A]CK packet, confirming that he has taken IP against his request.

This whole process is also known as DORA. Check the characters in [ ].

7. One very important point to understand here is that normally, I repeat normally, DHCP servers are used within a subnet or internal to the router. As you must be knowing that routers won’t support broadcast request. So if your client and DHCP server are on different sides of router. The client won’t be able to get any IP information from DHCP, as the router will not forward any broadcast request to other interface. BUT ….

We can configure router with <ip helper> address also known as DHCP relay to allow routers to send the DISCOVER request to the ip address specified with <ip helper>. So what router actually does is that it takes DISCOVER broadcast request and then convert it info unicast and then send to the IP address specified with <ip helper>, which is the IP address of DHCP on the other side of subnet.

Check the pics for better understanding.

Check more tips on – Network NUTS Facebook Page.


Understanding DHCP

Understanding DHCP