Hello everyone. So in this
video we are going to see.
About a protocol which is called as DHCP.
So DHCP is a protocol which works
on port number 67.
The full form of DHCP is dynamic host
configuration protocol.
Why DHCP is used so DHCP is
used to assign IP addresses to host or devices.
For example in your house. Your router is DHCP
server, which assigns IP addresses
to your devices like a computer your mobile
or your printer?
How does this happens?
This happens using a process known as
Dura process.
So, let's see the door process and understand how IP
address is been assigned to any
device.
So as you can see on the left hand side, it is
a DHCP client and onto the right hand side is
a DHCP server.
You can understand with a very basic example of
taking an example as the client
is me. I want to connect.
To the internet and I want to IP address from the server, which
is my router.
So I will send a request to
the router which is the dhcv server.
As the DHCP client sends a request that request
is known as discover request.
So the client is trying to discover.
the IP address
the DHCP server will offer a IP address
from his IP address pool. Let's say
the server is offered IP, which is
192.168 1.5.
then the DHCP client will say
Yes, I am requesting for this IP address and I
would like to take this IP address Please assign this
IP address to me.
The DHCP server will finally acknowledge with
that IP address and it will be
assigned to the DHCP client, which is the device.
So we understood how a Dora process works. So, let's
see and practical example wherein I am
going to perform Dora process on my computer,
and I'm going to capture the request in Wireshark
to make you understand that how DHCP works.
I have performed a DHCP in
which I have captured the request
into the Wireshark.
My computer has been assigned IP address. So let's
see how it happened.
So this is the sample packet that I have captured. There
are a lot of packets so
to see
the desired output what I'm going to do right now
is
I'm going to apply a display filter in this
filter. I'm going to type IP.
I will type DHCP. So because I
only want to see the
requests and responses which
contains the protocol DHCP
So as you can see here, I have got some request
of DHCP protocol.
Which is discovered.
Offer request and acknowledge. So as
you can see in the Discover packet
The Source IP address is 0.0.0.0 which
is my IP address as
I do not have IP address right now as you
can see over here my device is the Apple device and
I am requesting this to my router.
and then my router there is
192.168 1.1, which is my Huawei router
is going to
offer II IP address from its pool. So as
you can see the IP address it is offering is
one dot
147
then my computer which still doesn't
have a IP address is going to acknowledge the
router that I want that IP
address.
is going to request
and then
the router is going to finally acknowledge with the IP address
to my device and my device gets a
IP new IP address there is 192.168 1.147.
So this was the DHCP analysis using Wireshark.
I hope you guys understood this how DHCP
works. Thank you.