Everybody welcome to the next video.
So in this video we're going to be talking about DCP I've mentioned it very very briefly when we were
configuring up the windows nodes.
So let me go over this a little bit more detail.
So DHS is Dynamic Host Configuration Protocol.
This is the protocol that provides an IP address Gateway information and then DNS information to a host
that's new on the network.
Now the way this works is it a D DCP server will have a pool or a set of IP that are not currently being
used.
Now when a host comes onto the network it will ask for an IP address.
So what the DTP server will do is it will grab one from the pool assign it to that particular hostname
based on its hostname and MAC address and then it will remove it from the pool so that it won't be used
by anybody else.
Now this is done to avoid IP overlaps and also it's not feasible to start managing millions of IP is
when your network gets big enough and you start bringing up virtual machines by the handful of 50 60
hundred at a time you do not want to be sitting there going through them hand by hand or one by one
and setting everything up.
Now you can set up on the DCP piece or rest static IP so that way this host with this MAC address and
this hostname always get the same IP.
So that way it's never in the pool it's never available.
It's always set and nobody else will get the will get the same one.
So this is kind of DCP at the high level.
But we're gonna go a little bit further into it now.
DHS DP is a UDP based protocol not TTP and you'll commonly find this import sixty eight and sixty seven.
So when you start doing and map scans or any type of scans and you start seeing UDP 68 and 67 this means
that it is a DHS server now.
Dora DHB can be looked at it as like a common acronym called Dora.
So this is Discover offer request and acknowledgement.
So these are of course the core four steps that DHS does when it tries to give somebody an IP address.
So we're going to go over this each step one by one.
So discover.
So the first thing it does is a client will send a DHS or discover packet to the broadcast address of
255 255 255 255.
Now a broadcast address is one that when you when you send something to this address it gets sent to
every device on the network.
It's not going to a switch isn't going to go hey this I don't recognize this it should go up to my upstream.
It's going to send it to everybody on the switch and then it's going to be sent to the upstream and
then that upstream gateway will then send it to everybody and then send it up to its upstream.
So it goes.
The goal is for this to get anywhere possible.
So inside of this request when we look at it in wire chakra the packet level we'll see the client IP
that it's coming from is 0 0 0 0.
This is the default because we don't have an IP address yet.
So the way this is the client is reachable is through its mac address which like we said it can't resolve
the IP to Mac we just use the Mac directly.
Now this packet contains a transaction.
This idea will be used through most of the door a process to communicate or to the entire door process
to communicate with everything and make sure everything is kept on track.
Now there's gonna be two transaction I.D. total for this communication but understand that the transaction
I.D. itself is what is responsible for keeping everything in line especially over UDP.
And to know who's talking to who because of the MAC addresses can be spoofed.
Now the offer the DHS IP server is listening for Discover packets and then we'll respond to the client
directly.
However it's still I still want to understand that it's only contacting it being the MAC address.
So the DTV server will respond with its own IP address basically saying I'm my IP address is this.
It's going to give you the new.
It's gonna give you a new IP address for the client to use and then release information.
So how long can How long can you have the IP address before you before you have to renew it.
So in this case it might be a day 30 minutes 60 days forever whatever whatever the DTV server's been
set to.
And then it will also include the transaction IP from the original request.
So at this point the client now has the information it needs to start responding over the network so
the client will send a request back the actual request back to the DOJ server.
I want you to understand that this is still the the client is still talking over the broadcast address
it's not talking directly to the DTV server yet it will say it's basically saying the request of I accept
the new IP and it generates a new transaction.
At this point in time what I want you to also understand that in this offer it's not written here but
it will also include the DNS name and the gateway that the machine should be using.
So the last part is the acknowledgement.
So the DHB servo now ACH knowledge.
Back to the client that they are confirming the IP belongs is being taken and less information on top
of this the client will also take configured OS with the new IP address the subnet mask the DNS the
gateway everything will be configured at this point and the DSP server will then remove it from the
pool and set it up in its own local database that this hostname in this MAC address has this IP for
this amount of time.
Now it's important I understand that your client will connect the DNA to the DHS server making a similar
request and say I want to renew this IP instead of asking for a new one.
That's a whole nother process.
I'm not going to go over that in this particular video.
But I want you to go ahead and look a little bit deeper into how will the renewal process works with
DHS.