Open In App

Setting IP Address Using DHCP Server

Last Updated : 06 Mar, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

Every computer on the network has to have an IP address for communication purposes. An IP address is an identifier for a computer or device on a network. The IP address can be assigned in two ways i.e. Static IP or Dynamic IP. 

Static IP: A static IP is where a user assigns an IP address manually. It has certain drawbacks for example you have 100 computers or devices in your network and you want to assign IP addresses to each one statically, so keep in mind that the IP address must be unique because if you assign the same IP address twice it would cause an IP conflict and it would not have access to a network. 

Dynamic IP: A dynamic IP is where a computer gets an IP address from a DHCP server. A DHCP server automatically assigns a computer an IP address along with a subnet mask, default gateway, DNS server. 

DHCP Server: A Dynamic Host Configuration Protocol is an application layer protocol that is used to provide dynamic IP addresses to computers and devices. DHCP is a service that runs on a server, such as a Microsoft server or a Linux server. It’s also a service that runs on routers.

Why set the IP address using the DHCP server?

When a computer obtains an IP address from a DHCP server the server assigns the IP address on lease. The computer doesn’t own the IP address its lease and lease is the amount of time an IP address is assigned to a computer. For example, the lease could be for one day.

Another reason for lease is to make sure that the DHCP server does not run out of IP addresses. A DHCP server has its scope, let’s just say that this DHCP scope has only a range of three IP addresses so it can give only three IP addresses. Now obviously this is not so realistic as no network administrator is going to create a scope with such a small range. But for now, as an example let use this example let’s go ahead and add three computers to a network once they get added, a DHCP server is going to assign them IP addresses so in this example let’s just say that the IP address given to computers is not on lease so the DHCP has reached out its limit on giving IP address all these three IP addresses are currently being used.

What if one of the computers gets removed from the network. If a computer is removed it takes the IP address that it has been given with it. Let’s say another computer gets added to the network but the problem is the computer won’t be able to access the network because the DHCP server has run out of IP addresses. Even though that third computer has been removed it still occupies an IP address that could be used for another computer. 

This is why the IP address leased and are not given permanently because if IP addresses are leased then this would tell the DHCP server which IP address is still being used and which ones are not being used so in this example the IP address are leased, after a certain period during lease a computer must send a signal to the server asking to the server to renew its list of the IP addresses. In another word, we can say informing the DHCP server that it is still present on the network and its IP address is still being used.

If a computer is removed from the network that computer not going to ask the DHCP server for renewal and if it doesn’t ask for renewal then the list will expire and then the IP address will go back to their IP address pool of servers. Now the IP address can be used for another computer and this is why the IP address is leased.  

How to set the IP address using the DHCP server?

Lets us see practically how to assign an IP address using DHCP to your windows 10/8/7 computer step by step :

Step 1:  Go to the control panel.

Step 2:  Select the Networking and sharing option.

Step 3:  Select change adapter setting.

Step 4:  Select and open your internet, ethernet, or wi-fi connection to which you want to set the IP address using the DHCP server. 

Step 5: Once you have done with Step 4 a pop-up of wi-fi status (in my case connected with wi-fi) will appear on your screen, now click on properties.

WiFi Status

Step 6: Once you click on the properties option a new pop-up of wi-fi properties will appear on your screen. Now, select Internet Protocol version 4(TCP/IPv4) in some cases it may have IPv6. Once you select this option properties option will enable and once it is enabled click on that.

WiFi Properties

Step 7: After clicking on the properties option of the recent screen a new screen of Internet Protocol Version will appear where you have to go inside the general tab which by default opens and click on the option of obtain an IP address automatically along with this option click on obtain DNS server address automatically.  

Ipv4

When we choose this option computer will broadcast a request for an IP address on the network then the DHCP server will assign an IP address from its pool and deliver it to the computer. once it is done you can verify that the DHCP server has given address to your computer or not by opening a command prompt on your system and typing a command ipconfig  /all and you can see there is DHCP enable or not along with IPv4 or IPV6 address, subnet mask, and default gateway.

All of these settings are given by the DHCP server. Dynamic IP addressing is the best choice because it automatically manages the network and makes the process a lot easier.


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads