DHCPv6 enables IPv6 clients to obtain network configuration through a structured exchange between clients, a Layer 3 switch acting as the default gateway, and a DHCPv6 server. The process supports both stateless and stateful address configuration depending on how router advertisement flags are set.
DHCPv6 Process
Our layer 3 switch is going to be our default gateway, and so it's actually what's going to be sending out our router advertisements. In this case right here, we're going to specify that our demo Pi 2 is actually going to be a DHCP version 6 server, and so that is going to be what hands out some additional options, some additional information about this network.
So what's going to happen is, no matter what, the process is going to start out with the Neighbor Discovery Protocol. This client connects to the network and it's going to send out a router solicitation. That's going to go to all routers that are on the network. This layer 3 switch now has joined that router multicast group, and so it will respond back with a router advertisement, giving some information to this demo laptop.
Some of the information that it will give is some of the flags: the autoconfiguration flag, the other flag, and the managed flag. Let's say in this case right now we want this client to autoconfigure itself, to come up with its own IP address, so that flag is set to one. We also want it to get some additional information from this DHCP version 6 server right here, and so that's set to one. And since those two are set to one, this managed is going to be set to zero.
So this demo laptop will come up with its own IP address, but it also needs that additional information from the DHCP version 6 server. So what it will do now is it will send out a discovery, and it's going to send out that discovery to the multicast address for DHCP version 6 servers. This demo Pi 2 is part of that multicast group, so it will be receiving that, in which case it will respond with a DHCP advertisement with the information inside of it. So that will be sent back to the demo laptop. And then this demo laptop, similar to the process with IPv4 DHCP, will make the request for it, and the Pi then will return with a reply to it.
Now, since IPv6 doesn't have broadcast — when we take a look at the DHCP process for IPv4, we will have some broadcast in there — there's no broadcast for IPv6. So what happens is this first one is a multicast to all the DHCP servers, but the rest of these are all unicast and sent directly to this demo laptop.
Now, this is for a stateless setup, where the demo laptop comes up with its own IP address. What would it look like if this were actually to be stateful, where we want this demo Pi 2 to come up with an IP address for this demo laptop?
Well, in that case right there, all that we've changed here is this switch right here would actually send out autoconfigure as being a zero, and the other as being zero, and managed as being one. And then this demo laptop would know, okay, I know now what router I'm supposed to use, but now I need to go directly to this demo Pi to get some additional information. And so then it goes through this whole process — really, it goes through this whole thing. So it's very similar, except that it gets an IP address from the DHCP version 6 server along with the other information. So that's the only difference there.
So that is the DHCP version 6 process, if you were to implement a DHCP version 6 server.
TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.
Explore free tools and programs →