DHCP -Dynamic Host Configuration Protocol is a network protocol that dynamically assigns the IP address and other needed information to the client on the network so that they can communicate with each other.
STATIC IP configuration.
In any designed computer network your device must have an IP address for exchanging information between each other. where a specific IP address is assigned to each device connected in the network. Two different methods in which an IP address can be assigned to a device are Static IP or Dynamic IP.
When an administrator inputs an IP manually to a device it is called static IP. This was the normal method used since designing networking. For manual input of IP address setting you must go to the network settings menu and manually enter the IP address decided for that device, but it’s not enough to enter only IP address along with the IP address you must enter Subnet Mask, Default Gateway, and DNS Servers settings and you must do this with every device. Hence from this you can notice that it will take a long time to assign so many settings in each device and one more difficulty is that even if all IP’s are inserted manually they should be unique and should not be repeated on any other device otherwise error of IP address conflict will occur and network cannot be assessed.
With the IPv6 environment, if static IP addresses are attached there could be lots of problems. There will be a probability that those users will face problems of wrong IP details as long number of digits and characters. This will be a tedious job form systems administrator to maintain the network in a Static IPv6 environment.
In an organization, there are employees who frequently travel and using portable devices such as laptops and tablets. These users frequently change their networks while traveling. Using static IP becomes a waste of time for them hence DHCP IP configuration will be more efficient for them so they do not have to change IP addresses manually.
DHCP -Dynamic Host Configuration Protocol
The other method to assign IP address is Dynamic IP address assigning. Dynamic IP is when a computer automatically gets an IP address from the DHCP server. A DHCP server automatically assigns an IP address to the computer and besides it; the Subnet Mask, Default Gateway, and DNS Server are also assigned automatically.
In this example, we have opened the network settings window in Microsoft Windows
The computer is configured to obtain an IP address automatically when this DHCP setting is selected it sends a request to all IP addresses on the network. Then the DHCP server assigns an IP address from its IP pool and assigns it to the computer. After assigning the IP address we can check the assigned IP address by following method.
Open Command Prompt on from your Windows computer and type as below
C:\>ipconfig/all and then press Enter
As DHCP is enabled on this computer, we can see the IP address received from a DHCP server and we can also check the received IP address Subnet Mask, Default Gateway, and DNS server. All these settings of IP addresses are obtained from a DHCP server Pool. Dynamic IP is the easiest and best choice for networking.
The DHCP server assigns IP addresses to network devices from the range of addresses which is called as IP pool. For example, we will take a range of IP addresses on a server. The pool starts from this 192.168.1.1 IP address and ends with 192.168.1.10 IP address. The device on the network gets addresses from this pool it contains ten IP addresses. This value can be changed increased or decreased by the system administrator. When a device is assigned an IP address from this pool the DHCP server considers this address as leased so the network device doesn’t actually own the IP address it gets it on a lease that has an expiration. This IP address is rented for a period of a specific time.
In this example, we will add 10 network devices or computers to our network, when these 10 devices are added DHCP server will assign them IP addresses from its pool which in the example has a capacity of 10 IP addresses. The DHCP server has reached the limit of IP addresses after assigning IP’s to 10 network devices. All IP addresses reserved for the pool have been used up.
If one of the devices is removed from the network, the device will leave the address that it received from the pool. If another device is attached to the network the problem is the device won’t be able to access the network because the DHCP server has run out of IP addresses even though the old device is disconnected from the network it takes an IP address that could be given to a new computer.
This is why IP addresses are not permanently given away but leased. Because if addresses are leased then the DHCP server can check which address is still in assigned and which one is free.
In this Illustration, the IP addresses given are leased for a specific amount of time, after completion of this time the device sends a signal to the DHCP server which demands the server to renew the lease of the IP address. In this way, the DHCP server understands that the device is still connected and online and the address is still in use.
As discussed if a device is disconnected from a network it will not be able to send a signal for the renew lease of IP address and its lease time will end. Hence DHCP comes to know that the IP address assigned to it is free and returns this IP address to IP pool and can be assigned to other or new device.
If a system administrator wants a to assign every time same IP address for a specific device such as network printer, plotter, etc. he can reserve an address for this device in the DHCP server settings do that every time this device is connected in the network Mac address of this device is identified and the same IP address is assigned to this device by DHCP server.
There are many ways the DHCP server can be configured. Nowadays most devices such as Routers, Switches come with an inbuilt DHCP server. The DHCP server also runs on Windows and Linux server environments, So DHCP is the most efficient service for networking.