Now we'll move on to the next module where we talk about Understanding DHCPv6.
DHCPv6 is very similar to DHCPv4, in some ways at least.
It is a client-server protocol just like DHCPv4,
you have the concept of a DHCP server and the clients are DHCP clients.
And DHCPv6 provides client configuration information just like DHCPv4.
Unfortunately, that's about where the similarities end,
and these fairly significant differences are why I broke out DHCPv6 into its own
module and we address it completely separately from DHCPv4.
I felt we would just muddy the waters if we tried to
cover them both at the same time.
Some of the differences between DHCPv6 and DHCPv4 is
that DHCPv6 comes in 2 flavors, stateful and stateless,
which we will of course cover here in just a few minutes later on in the module.
The packet exchange has different names.
Instead of those DORA packets,
the DHCP packets for DHCPv6 are actually named a
little more logically in my opinion.
Also depending upon the flavor of DHCPv6 used,
either stateful or stateless, and the configuration on the device,
the packet exchange may only use 2 packets instead of 4 like we do in DHCPv4.
DHCPv6 also uses different UDP ports for its clients and server communication,
that's probably the most minor change between the 2 protocols honestly,
but it's worth throwing in there.
Again, we'll cover all of these differences here in just a moment.
So before we jump into DHCPv6,
I'm going to take just a couple of minutes and do a review of IPv6.
Now this is not an in-depth networking course,
we won't go super in-depth with IPv6,
but because a lot of networks still use IPv4 and many network engineers,
myself included to a degree, don't really use IPv6,
a lot of the concepts may not come as easily to mind unless we
spend a couple of minutes and go over them.
If you're an IPv6 expert, you can just probably skip the next couple of minutes,
but I'd really like it if you stuck around and heard me out.
IPv6 has a 128-bit address space as opposed to the 32-bit address space in IPv4.
Those 128-bit IP addresses allow for just a
ridiculously large number of IPv6 addresses,
and yes, I know that's probably what they said when they started with IPv4,
oh 4.
2 billion addresses, well we'll never use all of that,
and then you've got connected refrigerators,
and toasters, and everything else using addresses on the internet,
but there's all kinds of comparisons out there about the
number of IP addresses compared to the number of stars in
the sky and so and so forth.
Suffice it to say, we probably will not run out of IPv6 addresses in my lifetime,
and I'm only in my early 40's so hopefully I've still got
a few good years left on the planet.
IPv6 addresses are autoassigned based on the client MAC address,
and if you'll recall that's called the EUI- 64 where it takes the MAC
address of the interface and flips the middle octet and that becomes the
client unique identifier portion of the IPv6 address.
IPv6 can also discover its default gateway,
or technically any gateways or any routers on the segment that they're on.
It does this using the Neighbor Discovery Protocol,
specifically Router Solicitation and Router Advertisements.
Router Solicitation packets are sent out by the
clients on a particular IPv6 segment,
and the Router Advertisements are the routers responding
back to the multicast address saying, hey,
I am a router and you can use me to get traffic off of the local subnet.
You can optionally discover DNS servers using what's called
the Stateless Autoaddress Configuration,
or SLAAC.
However,
support for this on the Windows operating system is actually kind of
spotty from some of the documentation that I've read.
So given those pieces of information, that it can discover the default gateway,
it knows where the routers are, it knows where the DNS servers are,
you might ask yourself the question that I did when I
first started learning about DHCPv6, which is why bother having DHCP with IPv6?
Other than the potential spottiness of not being able to discover
the DNS server on certain Windows platforms,
it seems like you can learn most, if not all,
of the information you need to get on an IPv6 network
using the built-in protocol mechanisms.
You can learn your IP address, you can learn your prefix,
you can learn the default gateway, you can learn the DNS names,
why would you even bother going to all the trouble
of setting up a DHCPv6 server?
Well, quite honestly,
it's so you can distribute additional options to the clients,
including the DNS domain name,
which is something that you can't learn dynamically
using the features built-in to IPv6.
Again,
Windows support for automatically learning the DNS server IP
addresses is kind of spotty so you'll probably want to distribute
the DNS server along with the domain name.
Additionally, you need to use DHCPv6 to distribute any client specific options,
such as a TFTP server for a voice-over IP compatibility.
Now honestly all the things I've just listed can actually
be accomplished with stateless DHCP,
so you don't have to set up a full stateful DHCP implementation.
However,
for enterprises where you want to do things like configure a
specific gateway per-subnet so that you're just not learning all
of the gateways on a particular subnet,
and for more control over your IP address leases,
you will want to go with Stateful DHCP.
A lot of enterprises do this just for the control that it gives them to
know exactly what addresses are on what subnets and so they can track
those addresses as they move around the subnets, if they so desire.