DHCP Working Process| How DHCP works:
Ø It works based on Client-Server model.
Ø It uses UDP port no. 67 and 68 for working.
· Port no.67-Server provides services.
· Port no.68-Client listens.
Ø It uses DORA process for
it’s working (Complete IP allocation process)
·
Discover
·
Offer
·
Request
·
Acknowledgement
Ø Suppose there are four computers having IP
addresses provided by DHCP server with the help of this address, they
are communicating with each other.
Ø Let us consider, one more new device (client)
is added in the network. It needs an IP address to communicate with
other devices in the network.
Ø We have configured this device that it should take IP address dynamically
from DHCP server (Automatic setting).
Ø So this client send the Discover message in the network to all devices (Broadcasting of message-255.255.255.255)
Ø This message contains source UDP port no. 68 and
destination UDP port no. 67.
Ø Since it contains destination UDP port no. 67, the DHCP servers or ISPs respond to this message
called OFFER Message (Broadcasted
to all devices in the network).
Ø OFFER
Message contains
new IP address and MAC address of the device which Discover the message.
Ø Since all the devices contain IP address, the new
device accepts that offer message (DHCP
server is offering the IP address, Are you ready? No confliction is there regarding IP
address).
Ø The new client broadcasted a message called REQUEST Message which
contains a request to DHCP server that whatever IP
address you are offering me, please allocate that IP address.
Ø The DHCP server listen this message, since it
contains destination UDP port no.67.
Ø Then finally DHCP server broadcasted the
message called ACKNOWLEDGEMENT
Message to
all the devices.
Ø This ACKNOWLEDGEMENT Message contains
MAC address of requesting device. In this way IP address is assigned to new client and DHCP
server make new entry in database that IP address is assigned to particular
client.
Ø DORA process is done by broadcasting only because
that new client does not have IP address. So we cannot unicast and other reason is that since there are no. of DHCP servers in the network,
they will know that particular IP address is
assigned to this new client.