Now we've come to everyone's favorite part of the module, the demo.
In this demo,
we will hit up one of my lab servers and we will
examine an actual DHCPv4 transaction.
The Wireshark file for this particular DHCPv4 transaction that we're going to
examine is available for download as a part of the course.
We'll also configure DHCPv4 on a Windows server and on a Cisco router.
And again, like I said at the beginning of the course,
that covers about 80% of what you'll run into out in the real world,
and even if you happen to not be using one of these platforms,
the concepts will at least carry over.
We'll also configure a DHCP relay agent.
I have a very small Cisco network and we'll show you how the helper
address works when it's configured there on the network.
So without further ado, what is ado and why would we want further of it,
let's jump into the lab.
So here we are on the lab server, and ignore those first two packets up there,
that is an actual DHCP and form from another
workstation on the network I took this from,
and where I released the IP address on this workstation so I
could capture the release and renew cycle.
So we're going to start here with packet number 3,
and this is the DHCP Discover that as you'll recall,
starts off the whole DHCP lease process.
If we expand the Bootstrap Protocol,
you'll see that this is a request that has all 0s,
client IP address, my IP address, the next server,
the relay agent, they're all 0s,
and it is actually a broadcast because you the
destination is all 255s up here in the header.
Here are the DHCP options that we discussed elsewhere in the course.
There's option 53 that is the DHCP message type.
We also have options for the client identifier, the requested IP address.
In this case,
this is the requested IP address because it's the last
IP address that this workstation had,
even though we are broadcasting for any valid server on the network.
Windows will request the last IP address that it had.
We can look at the Host Name, which is what the DHCP server uses to identify it,
especially if you're using DNS integrated DHCP.
Oh, and I just expanded it and collapsed it again.
It's DemoUser-PC, which is the name of the PC that I took this from.
Vendor class identifier, Option 60.
It's Microsoft 5.
0 because it is Windows 7.
There's a Parameter Request List.
It's asking for a Subnet Mask, a Domain Name,
a default Router, a Domain Name Server, and NetBIOS over TCP/IP.
It will also accept a Static Route.
Now, I've never known anyone to distribute static routes via DHCP,
but the options are there if you wanted to do so.
We look further down and we see all the various
options that the client can request, and that is just the DHCP Discover.
Again, this is the Offer, the next packet, that comes back from the DHCP server.
In this case, my DHCP server is 10.
10.
1.
5, and again, it's going back to the broadcast because as we mentioned,
the client doesn't actually have a unicast IP address yet and
so you can't send unicast packets to it.
And again, you can see all of the options that come back from the server.
They're already expanded because I expanded them in the previous packet.
If we scroll up some we can see again, there's the Option 53,
and there's the DHCP Server Identifier, and all of the other options,
there's Subnet Mask.
In this case, I'm using a Class B Subnet Mask.
There are the two DNS servers from my network.
There's the Renewal Time and Rebinding Time,
that's the T1 and the T2 Timers, 3 days,
12 hours, and 6 days, 3 hours.
There's my Time Offset,
so I'm actually handing out quite a bit of information from my DHCP server.
And again,
the next packet in line is the Request where the client is
requesting the address from the server.
Again, we won't go through all of the various options because well,
we've already gone through them all twice.
But again,
you see that it's requesting essentially all of the
information that came in the DHCP Offer Packet.
And at which point the server says, yes absolutely,
you can have that IP address you requested because again,
I did just offer it to you.
Now again, I only have one DHCP server on my network,
but since these are all broadcast packets,
if I'd had more than one DHCP server,
then you would've seen other DHCP servers
potentially giving this client an offer,
and then this client would have had to figure out which one
to accept and which request to send back.
And as I mentioned,
this particular file is part of the downloads available
for the course if you wanted to sit and stare at these six
packets for an hour yourself, you're more than welcome to do so.
This concludes the review of the DHCP packet.
In the next section of the demo, we will actually configure DHCP and test it out on our Cisco network.