Sunday, 5 November 2017

Introduction to DHCP Part 1

Introduction

Dynamic Host Configuration Protocol (DHCP) is the most commonly used protocol in the TCP/IP network. Suppose you are a network engineer in company and you have to assign IP address to 50 PC's of a department. Instead of assigning static IP address to each PC, You can assign them IP addresses from an IP Pool using a DHCP server. The configuration of host IP settings sits in a DHCP server. The client learn these settings using DHCP messages. DHCP assigns a temporary lease of IP addresses to the host for a temporary period of time. When the time expires, the host is then assigned with a new IP Address. When  a device is removed from the network, the server reclaim the IP addresses and assign it to someone else or save it for the future.

The DHCP Process uses four types of messages to assign an IP address to a DHCP Client
  1. Discover
  2. Offer 
  3. Request
  4. Acknowledge 
Discover
It is sent by a DHCP client to discover a DHCP server to claim an IP address.

Offer
The offer for an IP address lease is sent to the client by a DHCP server and also inform the client of it's other information and parameters.

Request
The DHCP client then sends the request to the DHCP server for the IP address lease which has been sent in the offer message.

Acknowledge
The DHCP server then assign the address and also lists the DNS server IP addresses, mask and the  default router.

IPv4 Special Address

There is a somewhat a problem with the DHCP client that they don't have an IP address yet to communicate with a DHCP server so there are two special IPV4 address that helps them to solve this problem.

0.0.0.0 : This is an address that is reserved to the host who don't have an IP address yet .

255.255.255.255: It is known as  The Local Broadcast Address. The Packets that are sent to this destination address are broadcasted on the Local data link but the routers will not forward them.

Allocation modes

DHCP server uses three allocation modes

  • Dynamic Allocation ( refers to the DHCP configuration which I will show you in the next part).
  • Automatic Allocation ( we can set the DHCP time to infinite).
  • Static Allocation  ( Configuring a specific IP address for a host based on the host's MAC address).

In the next part, we will learn the DHCP configuration for Dynamic Allocation.

No comments:

Post a Comment