- [Narrator] Let's talk about stateless
and stateful configuration.
Both of them provide an autoconfiguration feature.
Stateless autoconfiguration is a specially useful
solution because it allows devices on a network
to adjust themselves with a link-local unicast address
as well as with a global unicast address.
This process happens through first learning
the prefix from a router and then appending
the devices own interface address as the interface ID.
So where does it get that interface ID?
Well, from the MAC address.
However, I know what you're thinking.
A MAC address is only 48 bits long
and I needs 64 bits for the address.
So what we're going to do is add 16 bits in the middle
of it with an FFFE.
So stateless autoconfiguration uses neighbor discovery
to find routers and dynamically create IPv6 addresses.
Stateful autoconfiguration uses a DHCPv6 server
to assign IPv6 addresses and more parameters.
The reality is in production, you're going to use
a combination of both.
There is no reason not to allow the host to autoconfigure
themselves and just get the prefix from the router.
However, you still need things like DNS servers.
So we're going to use autoconfiguration both
with stateful and stateless.
So in this graphic, we can see that the host
has received from the router, the 64-bit prefix
and then added its own 64 bits to create a 128-bit address.
So with stateless autoconfiguration the router advertisement
is going to be 64 bits long and it's going to use
ICMPv6 type 134.
This is a router link-local address.
So we can see the FF02 multicast address is actually
a router multicast advertising itself both as
a prefix and as a default gateway.
So the FF02::1 is an all nodes multicast address
saying hey, I'm your router.
This is the link you're on.
Add your 64-bit host ID and now you have 128-bit
valid IPv6 address and, by the way,
remember, I'm the way out.
Looking from the host, if a host receives a prefix
and creates 128-bit address, now it's going to go and ask,
hey, I need a way out of the network.
Unlike IP version four where our default gateway address
is handed out through DHCP or statically configured,
we certainly can do that with IPv6.
However, we just allow it to use
the advertisements from the routers.
In this case, I'm going to solicit looking for routers
using an ICMPv6 type 133
with an FF02 multicast 002,
which is saying, hey, all routers that are seeing this
that are on my same link, tell me about yourself.
Now, notice in this example, Router A and Router B
both provide an answer and say I'm the way out.
So now, Host A could actually load bounce automatically
across multiple routers.
This is a huge advantage over IP version four.