DHCP Server | Things You need to know about It

DHCP Server

What Is DHCP Server?

DHCP acronym stands for dynamic host configuration protocol and is a client/server protocol used on IP networks, where a DHCP server automatically assigns an IP address and other information such as the subnet mask and default gateway to each endpoint devices on the network, So that all endpoint devices can communicate with other efficiently without any error.

Apart from IP address and subnet mask, DHCP also assigns the domain name server (DNS) address and other configuration parameters. Request for comments (RFC) 2131 and 2132 define DHCP as an Internet Engineering Task Force (IETF)- defined standard based on the Bootstrap Protocol (BOOTP). It allows a host or endpoint devices to find its IP address and the name of a load file from a server on the network.

DHCP Components

Before understanding the working of DHCP, it is important to understand all of the components.

  1. DHCP Server: DHCP Server holds IP addresses and related configuration information. Basically it is either a server or router/switch or could be anything that acts as a host that runs on the DHCP service.
  2. DHCP Client: Endpoint devices that receive configuration information from a DHCP server. It can be a workstation, computer, mobile device, smart watches, IoT or anything else that requires an IP Address to access internet.
  3. IP Address Pool: IP address pool contains the range of addresses that are available to DHCP clients.
  4. Lease: When DHCP server assign an IP to client, client does not own the IP address assigned to it but instead leases it for a period of time and the period of time for which a DHCP client holds the IP address information called DHCP lease. When a lease expires, DHCP server unassigned the IP address from client, the client must renew it.
  5. DHCP Relay: A router/switch or host that listens for client messages being broadcast on that network and then forwards them to a configured server. DHCP Relay agents receive broadcast DHCP messages from clients and then re-send those messages with configuration information to servers. This can by a centralize DHCP servers.
  6. Subnet: IP address networks can be partitioned into segments known as subnets. Subnets help keep networks manageable.

How does DHCP Server assigns IP Addresses to Clients?

The DHCP is a connectionless service model, using the UDP Protocol. For DHCP operation, It is implemented with two UDP port. UDP port number 67 is the destination port of a server, and UDP port number 68 is used by the client. DHCP working fall into four stages: server discovery, IP lease offer, IP lease request, and IP lease acknowledgement. These stages are also known as DORA for Discovery, Offer, Request and Acknowledgement.

How DHCP Works

Stage 1: In first stage client send a discover packet to DHCP Server. DHCP server may be a router or switch.

Stage 2: In second stage DHCP server respond to the client with a DHCP offer packet containing an IP address.

Stage 3: In third stage client receives and validates the offer sent by the server, and sends a request packet back to the DHCP server to accept the IP address.

Stage 4: In forth stage DHCP server sends an acknowledgement packet back to the client to confirm the chosen IP address. And in the end of process client got an IP Address.

Benefits of DHCP Server:

Without DHCP, Network Administrators manually assigns the IP address to all the endpoint devices. Keeping the record of which device has what IP address and when devices require access to the network and when they leave, it’s nearly impossible to understand. DHCP makes this whole process easy and automated to the Network Administrators. Centralized DHCP server automatic assign an IP address to all devices which is connected to the network and keep a record of all IP addresses.

All the devices connected to the network have an IP address. Each device has a unique IP address. If two devices have a same IP address will result in a conflict where one or both of the devices cannot be connected to the network. This scenario happened only when IP addresses are assigned manually by network admin. But if IP assigned by DHCP server, It ensure that each address is only used once.

With the use of DHCP server, it makes easy to change scopes, IP addresses and endpoint devices. Let understand with an example- a company has 1000 endpoint devices and company  want to change its IP address range from 192.x.x.x to 10.x.x.x. Without centralized DCHP server it is complex and time taking process, a network admin manually change all IPs by himself. But with the help of DHCP server, we need to just configure DHCP server with the new information and the information will be propagated to the all endpoints devices.

DHCP servers can provide redundancy and high availability.  If one DHCP server were to fail, the clients will preserve their current IP addresses and not cause an interruption for the end-nodes.

How to configure DHCP Server in our home router?

  1. Go to router home address mostly the address is 192.168.0.1
  2. Enter your credentials.
  3. Go to Administration section and enable/disable DHCP Server setting as shown in below image.
  4. Here you can also assign start and end IP address range.
  5. After applying all the setting just save it.

Related Contents

1. What is an IP address?
2. Difference between IPv4 & IPv6.
3. Difference between Public and Private IP Address.
4. What is DNS Server and How Its work?
5. What is Ports and Protocols in computer networks?
6. How Proxy Server hides IP Addresses?
7. What is Firewall?
8. How DNS Server related to IP Address?
9. IDS Vs IPS in Security.
10. Difference between Hub, Switch & Router.

Leave a Reply

Your email address will not be published. Required fields are marked *