#12 DYNAMIC ADDRESSING WITH DHCP: THE NETWORKING SERIES

Sudarshan S
4 min readFeb 27, 2022

Are you online? Of course you are! And that’s how you are reading this blog right now. Would you like to know how this is possible? This series is all about what it takes to be online and access internet!

Hey peeps, this blog will be explaining about how network details are assigned to a host. Network details can be assigned by two ways: Static Addressing and Dynamic Addressing. So, with no more delay, let’s dive into the topic!

Static and Dynamic Addressing

Static addressing

In Static addressing, the network administrator should manually configure the network details such as IP address, subnet mask and default gateway and so on for a host. Static addresses have some advantages. For example, it is useful for servers, printers and other networking devices which are need to be accessible for the clients on the network.

If the hosts access the network device at a particular IP address, then it is not good if the IP address is changed. When a device is configure with static addressing, then we have increased control over the network resources, but it is time consuming. And also the host only performs the basic error checks on the IPv4 address. It is important to have a note of IPv4 addresses that are assigned to which devices because these will be like permanent addresses are not reusable.

Dynamic addressing

On local networks it is often that the user population keeps on changing frequently. New users may arrive with a host and need connection or existing users may leave. Rather than have the network administrator assign IPv4 addresses for each workstation, it is easier to have IPv4 addresses assigned automatically. This is done using a protocol known as Dynamic Host Configuration Protocol (DHCP).

DHCP automatically assigns addressing information such as IPv4 address, subnet mask, default gateway and other configuration information. It is generally preferred method of assigning IPv4 addresses to hosts on large networks. Another benefit is that an address is not permanently assigned but is only leased for a period of time, that is, if a host is powered off or taken off the network, then the address is returned to the pool for reuse.

DHCP Server

There are DHCP servers which makes it possible for you to access the internet. Various types of devices can be DHCP servers as long as they are running DHCP service software. With home networks, the DHCP server may be located at the ISP and a host on the home network receives IPv4 configuration directly from the ISP. Some wireless routers act as a both DHCP client and server. For instance, the router receives public IPv4 address from the ISP, and it as a DHCP server distributes private addresses to internal hosts.

DHCPv4 Configuration

When a host is first connected as a DHCP client, it does not have an IPv4 address, subnet mask, or default gateway. The DHCP server is configured with a range, or pool of IPv4 addresses that can be assigned to DHCP clients.

A client that is need of an IPv4 address will send a “DHCP Discover” message which is a broadcast with a destination IP address of 255.255.255.255 and a destination MAC address of FF-FF-FF-FF-FF-FF. All hosts on the network will receive this broadcast, but only the DHCP server will respond with a “DHCP Offer”, suggesting a IPv4 address for the client. Then the host sends a “DHCP Request” asking to use the suggested IPv4 address. Finally, the DHCP server acknowledges with “DHCP Acknowledgement”.

DHCPv4 Operation

Hope you like this blog, I’ll catch you up in the next blog.

Until then, Stay connected!!

“Buy me a coffee” is a global platform where millions of people support creators and artists, financially.

--

--

Sudarshan S

Tech enthusiast | Developer | Machine learning | Data science | Cybersecurity