A Raspberry Pi is configured as a DHCPv6 server by editing the ISC DHCP server configuration files and defining an IPv6 address scope, then verified by successfully leasing an address to a client machine.
DHCPv6 Server Setup on Pi
Let's set up our demo Pi to be a DHCP server for IP version 6 addresses.
The first thing that I'm going to do is get into that file that we edited when we configured it with the DHCP version 4 address. So I'm going to jump into this ISC DHCP server file right here, and I'm going to go down to where it says interfaces version 6. I'm going to type in eth0 in there once again.
What I can do is — it's actually referencing a couple of different files up here. It says the default file is this file right here, but I'm going to reference both these files right here. So I'll reference — notice that this is the dhcpd6.com.
Let's go now into there and edit that document. I'm going to save this out, so I'll hit Ctrl-X. I want to save, and I'll save it to there.
Next, I'm going to get into that dhcpd6.com file and we'll edit that file. As we scroll through here, we will find a very similar line where it's specifying the scope. There's a lot of extra configurations, and a lot of these configurations mimic those that we saw in the DHCP version 4. But I'm going to go down to where I see where it defines my different scopes, and let's define a scope.
Here we go. This is the section where it's the subnet where the server is attached, and I have defined this subnet 6. This is the address range that we've been working with on our test network. Then I have specified the range that I want handed out through this IP version 6 DHCP. So the range is specified here. It's actually the same range, 150 to 160, as the IP version 4 addresses. And then we put the end curly bracket here to end the statement. So I just uncommented these three lines, and let's save this out and see what it looks like.
Currently we have a static IP address assigned to our demo laptop. So what we're going to do is get on there, on the properties of this interface, and we will go to IP version 6 here. Click on properties, and we'll say obtain automatically, and we'll close that out. We'll give it a second to update and then we'll check to see if it's updated.
I did ipconfig /renew on this machine and you can see it's got an updated address here. We now see that FC0000:1:60. So this is the address within the address range that we set up on that DHCP server. So it got a DHCP address.
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 →