Dynamic Host Configuration Protocol (DHCP)
DHCP or dynamic host configuration protocol. Nowadays every computer or device on a network must have an IP address for communication purposes. An IP address is a unique identifier for a computer or device on a network. And there are two ways that a computer can be assigned an IP address. They could be done by using a static IP or a dynamic IP.
- Static IP
- Dynamic IP (Using DHCP)
Static IP Address:
Now a static IP is where a user assigns a
computer or device with an IP address manually. Now this was the original
method that was done in the beginning of networking. So, for each computer on a network you had to open the computer’s
network configuration page and manually type in an IP address.
But besides an IP
address, you also must type in a subnet mask, default gateway, and a DNS
server. And anytime that you wanted to add another computer or device to the
network, you had to do the same thing.
So, as you might have
guessed this could be a lot of work especially if you are dealing with a large
network with a lot of computers. And you also must make sure that all the IP
addresses are unique because if you assign the same IP address twice it would
cause an IP conflict and would cause those computers to not have access to the
network.
Dynamic IP Address:
There is a better
and easier way to assign a computer an IP address and this is called a dynamic
IP. A dynamic IP is where a computer gets an IP address automatically from
a Dynamic Host Configuration Protocol (DHCP) server. A DHCP server
automatically assigns a computer with an IP address. Besides an IP
address, it can also assign a subnet mask, default gateway, and a DNS server.
As an example, here
we have a network connection properties window open for the network
interface card on a Microsoft Windows computer. And as you can see here this
computer is set to obtain an IP address automatically.
So, when you choose this
option, the computer would 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. And then once that's done you can verify all the settings
that the DHCP server has given to your computer. You can do this
by opening a command prompt on a Windows computer and then typing in ipconfig /all
and then pressing "enter". So, as you can see here the DHCP is enabled
on this computer so it’s getting its IP address from a DHCP server and then you
can see the IP address here, along with the subnet mask, default gateway, and
DNS server.
All these settings
were given by the DHCP server. As you can tell dynamic IP addressing
is the best choice because it is automatic, and it makes managing a network a
lot easier Now a DHCP server assigns IP addresses to computers on a network
from its scope. A scope is a range of IP addresses that a DHCP server
can hand out.
For example,
here we configure a scope of IP addresses on the server. So, set the IP
range for our DHCP lease, as you can assume the range starts with
this IP address 192.168.1.1 and ends with this IP
address 192.168.1.100.
So, computers on this
network will get an IP address from this range of IP addresses. So, this
scope can give out 100 IP addresses. Now these values can be customized to
either increase or decrease the range. It all depends on what the
network administrator wants to do, it is customizable.
Now when computers
obtain an IP address from a DHCP server, the server assigns the IP address
as a lease. The computer does not own the IP address, it is a lease.
A lease is the time an IP address is assigned to a computer. For example,
the lease could be for one day. Now the reason for the lease is to help make
sure that the DHCP server does not run out of IP addresses in its