Quick Note On DHCP

Every network has its own address, for example 192.168.1.x. The devices in a network get their own host identifier or a host address. When a network administrator manually assigns an IP address to the devices in a network, it is referred to as static configuration of IP addresses but if someone gives the same IP address to the multiple devices accidentally, we will have an IP conflict.

Nowadays, we are having hundreds of devices and keeping track of these IP addresses manually is time consuming and error prone. Here comes DHCP - Dynamic Host Configuration Protocol, which dynamically assigns the IP addresses.

Consider the example given below.

  • A subnet- 192.168.1.x
  • Router- 192.168.1.1
  • Host- 192.168.1.2

The four step process is given below, which occurs when a new host joins the network.

Discover

Here, te host searches for the available DHCP Servers to get the address. Since the host does not know where the DHCP Server is, it will send discovered messages to all the nodes in a network. (192.168.1.1 and 192.168.1.2). This is called broadcasting.

Offer

Router will broadcast to everyone on the network (192.168.1.2 and new host) because it does not know the address of the new host.

Request

At this point, the host has received at least one offer and it picks the address. (192.168.1.3). Now the host will send DHCP request message to all the devices on the network and say which IP address it picked.

ACK

In this step, DHCP Server confirms to the hosts in the network that IP can be used.

X

Build smarter apps with Machine Learning, Bots, Cognitive Services - Start free.

Start Learning Now