Network Kings, India’s Leading IT Career Training Academy
In this blog, we will learn about one of the most important Internet protocols that are used in a router. You must know that Dynamic Host Configuration Protocol (DHCP) is mostly used in our homes! Our home routers usually function as DHCP servers.
Until now, you must be familiar with the process of routing and how it works. We have also learned about switching as well. Let’s begin learning about the Dynamic Host Configuration Protocol (DHCP) without any further ado!
Note: If you haven’t read the previous blog of our CCNA 200-301 series, I highly recommend you do so.
We will understand what a Dynamic Host Configuration Protocol (DHCP) is and why it is used. We will also learn how the DHCP works. It is also very important to understand the features of the DHCP servers.
Let’s start learning!
There are billions of devices that want to access the Internet or communicate with each other. As you have learned before, it is very important for any networking device to have its own IP Address.
However, it was a very difficult task to assign the IP addresses to different network devices manually. Therefore, we needed a service that could assign the IP addresses to networking devices automatically.
The Dynamic Host Configuration Protocol (DHCP) is a networking protocol that automatically assigns IP addresses. The DHCP works on the Client-Server Model. It means that the client requests the servers to complete its assigned task.
Note: You must note that the DHCP assigns private IP addresses to the hosts. These private IP addresses are then converted into public IP addresses with the help of Network Address Translation (NAT) protocol.
It is an Internet protocol that functions in the Application Layer of the TCP/IP model. Therefore, it uses TCP and UDP in layer 4 because of which it also has its own port number.
In the Layer 4 header, there is a source port number and a destination port number. The DHCP uses 2 port numbers:
The following are the key features of the Dynamic Host Configuration Protocol (DHCP). These are:
The DHCP protocol runs in a Dynamic Host Configuration Protocol (DHCP) server. It is the task of the DHCP server to automatically assign IP addresses, default gateways and other network services to client devices.
A lot of companies still use DHCP on IPv4 in their router and switches. This is a great alternative for the Network Engineers/Administrators who want quick access to the DHCP without spending on a DHCP server.
Note: The IP addresses assigned by the DHCP server are dynamic. They change when a client’s contract for that particular IP address expires.
Imagine a DHCP server as a contract-based worker. The DHCP server has a pool of IP addresses that it can dynamically assign to the DHCP-enabled hosts.
Any network device needs a unicast IP address in order to communicate with the Internet. IP addresses for any new computer or a computer that changes its subnet has to be configured manually.
All thanks to the DHCP server. It is able to automate this process of assigning IP addresses. Therefore, there is a contract-based relationship between a host and the DHCP server. A DHCP server is established by a Network Administrator which maintains the TCP/IP configuration information.
This TCP/IP configuration information is stored in a database by the DHCP server which consists of the following:
Note: DHCP also provides the following facilities to the client:
In order to get the IP address assigned, a DHCP-enabled client sends a request to the DHCP server in order to get connected to the Internet.
The following steps are followed in the assignment of the IP address:
The DHCP-enabled client configured with DHCP broadcasts a request to the DHCP server and also requests the network configuration information for the local network.
The DHCP server responds to the client’s request. It then provides the IP configuration information specified by a Network Administrator. It includes: IP address and allocation of contracted time period (lease).
After allocating the IP address to a DHCP-enabled client, the DHCP server notes down the IP address. Media Access Control (MAC) address avoids the configuration of multiple devices with the same IP address.
The DHCP server acknowledges the assignment of the IP address.
This is how a DHCP server works!
A DHCP server is the most feasible in Local Area Networks (LANs). In the case of Wide Area Networks (WANs), multiple DHCP servers need to be configured. In a LAN, one or two DHCP servers are enough.
You must note that there is no built-in mechanism in the DHCP server to authenticate the client. Any fake client exhausts the pool of DHCP IP addresses.
Now that you know how a DHCP server works and why it is used, we will learn about the static and dynamic IP addressing in the upcoming blogs.
Stay tuned for the upcoming blog of our CCNA 200-301 series.
Happy learning!