DHCP
Trending

Define DHCP & How Does it work

DHCP

Any network’s IP address can be given to the host either by hand or automatically. In a small home network with only two or three computers, the IP addresses can be given by hand. But imagine a network with hundreds of computers, and you have to give IP addresses to each one.

It can be a headache for people in charge of networks! No two hosts can have the same IP address, and directly assigning IP addresses can cause mistakes and confusion. So, DHCP is what is needed to fix this problem. A network needs the DHCP to make it easier to give IP numbers. So, let’s use this blog to learn more about DHCP. For further information about DHCP Port numbers, check out the blog written by How To Network.

What is DHCP?

Dynamic Host Configuration Protocol is a network management protocol that is used to dynamically give each host on the network an IP address and other details so that they can talk to each other easily. DHCP automates and handles IP address assignments centrally, making it easier for network administrators to do their jobs. DHCP also gives the host the subnet mask, default router, domain name server (DNS) address, and other settings in addition to the IP address. This makes the job of the network administrator easy.

DHCP Server: Most of the time, a computer or a router holds the information about how a network is set up.

DHCP Client: It is the endpoint, such as a computer or phone, that gets the setup information from the server.

DHCP Relay Agent: If you have more than one LAN but only one DHCP server, the DHCP relay worker in each network will send the DHCP request to the server. This is because DHCP messages can’t go through the router. Because of this, the DHCP servers need the relay agent so that they can handle requests from all the networks.

IP address pool: It holds a list of all the IP addresses that can be given to clients.

Subnet Mask: This tells the host which network it is on right now.

Lease Time: This is the amount of time that the client can use the IP address. After this time, the IP address must be renewed by the client.

Gateway Address: The gateway address tells the host where the gateway is so it can link to the internet.

Options: DHCP servers may provide additional configuration options to clients, such as the subnet mask, domain name, and time server information.

Renewal: DHCP client machines can request to renew their lease before it expires to ensure that they continue to have a valid IP address and configuration information.

Failover: DHCP servers can be set for failover, in which two servers collaborate to provide redundancy and ensure that clients always have access to an IP address and configuration information, even if one server fails.

Dynamic Updates:DHCP servers can also be configure to dynamically update DNS records with the IP addresses of DHCP clients, enabling network resource management easier.

Audit Logging: All DHCP operations can be monitored and audited by DHCP servers, giving administrators visibility into which devices are utilising which IP addresses and when leases are granted or renewed.

Read Also:What is Active Directory and How Does It Work?

 How DHCP Works?

DHCP works at the application layer to give the client a new IP address on the fly. This is done by sending and receiving a series of messages called DHCP transactions or DHCP conversations.

DHCP Discovery: To find the DHCP hosts, the DHCP client sends out messages. The client computer sends a packet to 255.255.255.255, which is the default broadcast address, or to a unique subnet broadcast address, if one has been set up. 255.255.255.255 is a special broadcast address that means “this network.” It lets you send a broadcast packet to the network you’re linked to.

DHCP Offer: When the DHCP server gets the DHCP Discover message, it sends the client a DHCP offer message to suggest or give an IP address from the IP address pool. This DHCP offer message has the client’s suggested IP address, the server’s IP address, the client’s MAC address, the subnet mask, the default gateway, the DNS address, and information about the lease.

DHCP Request: Most of the time, a client can get more than one DHCP offer. This is because there are many DHCP servers in a network, which allows for problem tolerance. If one server’s IP address stops working, other computers can take over. But the client will only take one offer from DHCP. As a response to the offer, the client makes a DHCP Request to one of the DHCP servers, asking for the address that was offered. All the other IP addresses given by the remaining DHCP servers are taken away and added back to the pool of IP addresses that can be used.

DHCP Acknowledgment: The server then sends the client an Acknowledgement message that confirms the DHCP lease. The server could give the client any other settings that the client might have asked for. At this point, the IP setup is done, and the client can use the new IP settings.

DHCP-DORA-Process

The above process is called DORA (Discover, Offer, Request, Acknowledgement).

  • Discover Via Client using port no. 67
  • Offer Via server using port no. 68
  • Request Via Client using port no. 67
  • Acknowledge Via server using port no. 68

DHCP provides the following benefits.

  • Reliable IP address configuration. DHCP minimizes configuration errors caused by manual IP address configuration, such as typographical errors, or address conflicts caused by the assignment of an IP address to more than one computer at the same time.
  • Reduced network administration. DHCP includes the following features to reduce network administration:
    • Centralized and automated TCP/IP configuration.
    • The ability to define TCP/IP configurations from a central location.
    • The ability to assign a full range of additional TCP/IP configuration values by means of DHCP options.
    • The efficient handling of IP address changes for clients that must be updated frequently, such as those for portable devices that move to different locations on a wireless network.
    • The forwarding of initial DHCP messages by using a DHCP relay agent, which eliminates the need for a DHCP server on every subnet.

So, that’s all in this blog. I will meet you soon with next stuff .Have a nice day !!!

How useful was this post?

Click on a star to rate it!

As you found this post useful...

Follow us on social media!

Was this article helpful?
YesNo

Vipan Kumar

He is an Active Directory Engineer. He has been working in IT industry for more than 10 years. He is dedicated and enthusiastic information technology expert who always ready to resolve any technical problem. If you guys need any further help on subject matters, feel free to contact us on admin@windowstechno.com Please subscribe our Facebook page as well website for latest article. https://www.facebook.com/windowstechno

Leave a Reply

Back to top button