IPv6 DHCP

Good morning.

Can FreeBSD do IPv6 DHCP? I have seen recent discussions where people say no, but in the handbook it says:

"If the network has a DHCP server, it is very easy to configure the network interface to use DHCP. dhclient(8) will provide automatically the IP, the netmask and the default router."

After reading that, I disabled all the rc.conf options I'd tried, but it still didn't pick up an address.

Regards,
Henrik Morsing
 
Good morning.

Can FreeBSD do IPv6 DHCP? I have seen recent discussions where people say no, but in the handbook it says:

"If the network has a DHCP server, it is very easy to configure the network interface to use DHCP. dhclient(8) will provide automatically the IP, the netmask and the default router."

After reading that, I disabled all the rc.conf options I'd tried, but it still didn't pick up an address.

Regards,
Henrik Morsing
Just something to keep in mind: Even if you succeed in setting up an IPv6 stack on a FreeBSD machine you own at home, that will do absolutely nothing for Internet-legal IPv6 addresses.

FreeBSD Foundation does have IPv6-only machines that build packages for repos and are reachable over IPv6 Internet, but that does nothing if your ISP does not provide you with an Internet-legal, routable IPv6 address as part of your subscription.

Even SirDice mentioned somewhere on these Forums that he's using a tunnel provider like Hurricane Electric.
 
Even @SirDice mentioned somewhere on these Forums that he's using a tunnel provider like Hurricane Electric.
I was, for about a decade or so. Last year I was finally able to switch to fibre internet (and a different provider; 1Gbps up and down!) and now have a 'native' IPv6 connection.
 
It's not. You just assumed IP meant IPv4 and IPv6. And it specifically mentioned DHCP, not DHCPv6 (entirely different protocol).

As I said, blatantly wrong.

If that is meant as IPv4, some people need to work on their documenting skills.


IPv6_DHCP.jpg
 
Just something to keep in mind: Even if you succeed in setting up an IPv6 stack on a FreeBSD machine you own at home, that will do absolutely nothing for Internet-legal IPv6 addresses.

FreeBSD Foundation does have IPv6-only machines that build packages for repos and are reachable over IPv6 Internet, but that does nothing if your ISP does not provide you with an Internet-legal, routable IPv6 address as part of your subscription.

Even SirDice mentioned somewhere on these Forums that he's using a tunnel provider like Hurricane Electric.

I have had native IPv6 through my ISP for nearly twenty years now. They have offered that since around year 2000, IIRC, and quite frankly, any ISP that hasn't should bow their head in shame.

And for FreeBSD not embracing it, I don't really know what to say.
 
That appears to be a mistake, it's the same couple of lines from 7.3.2. Configuring Dynamic IPv4 Address

 
As I said, blatantly wrong.

If that is meant as IPv4, some people need to work on their documenting skills.


View attachment 21165
And some people need a bit more education about how IPv6 even works. Just because theoretical capabilities have been around for a while, that means squat for practice and availability on the mass market.

I have Comcast as my ISP. Yeah, it's offered IPv6 for a while - or so it said in news releases. Yep, the network is capable of carrying IPv6 traffic. But y'know, IPv6 was not even mentioned on consumer device boxes until about 2015. Even if the firmware in those devices theoretically supported IPv6, there was not a lot of infrastructure support for it. Even these days, public hotspots don't offer IPv6 addresses, only IPv4. And good luck trying to get the owners of every single public hotspot to properly configure their equipment. 😏

And for FreeBSD not embracing it, I don't really know what to say.
Oh, it did. In fact, it was testing grounds for some of the IPv6 implementations. Somebody just needs to realize that IPv6 is more than a mere software stack.
 
I have Comcast as my ISP. Yeah, it's offered IPv6 for a while - or so it said in news releases. Yep, the network is capable of carrying IPv6 traffic. But y'know, IPv6 was not even mentioned on consumer device boxes until about 2015. Even if the firmware in those devices theoretically supported IPv6, there was not a lot of infrastructure support for it.
My previous cable internet provider did support IPv6, but only if their crap modem was in routing mode. That meant there was no way to do any kind of port forwarding, or configure anything else, that modem was completely locked down. The modem could be switched to "bridge" mode though, which got you a "direct" connection but it only worked for IPv4. In order to get IPv6 again I had to resort to the aforementioned HE tunnel broker. Which worked pretty much without issues for at least 10 years, which is rather surprising for a completely free service. In the 10 years I think I had only a handful of (short) outages. Even support questions got answered and fixed quicker than most paid services would.

The last few years they did start throttling the maximum speed, it used to be unlimited and typically maxed out on my home internet connection. And streaming services like Disney+ and Netflix often complained I was using a "VPN" to circumvent their region locks (even though I specifically chose a Dutch IPv6 tunnel endpoint). Aw shucks, just turned off IPv6 on those streaming boxes.
 
My previous cable internet provider did support IPv6, but only if their crap modem was in routing mode. That meant there was no way to do any kind of port forwarding, or configure anything else, that modem was completely locked down. The modem could be switched to "bridge" mode though, which got you a "direct" connection but it only worked for IPv4. In order to get IPv6 again I had to resort to the aforementioned HE tunnel broker. Which worked pretty much without issues for at least 10 years, which is rather surprising for a completely free service. In the 10 years I think I had only a handful of (short) outages. Even support questions got answered and fixed quicker than most paid services would.

The last few years they did start throttling the maximum speed, it used to be unlimited and typically maxed out on my home internet connection. And streaming services like Disney+ and Netflix often complained I was using a "VPN" to circumvent their region locks (even though I specifically chose a Dutch IPv6 tunnel endpoint). Aw shucks, just turned off IPv6 on those streaming boxes.
Dear sirDice:
now i am have vm in europe , can you show me a manual or pdf, or link to build vpn server in the vm with wireguard and ipv6 ? thanks.
 
I can absolutely guarantee you my ISP's IPv6 implementation has been fully functional, correct and supported on all their devices for over 20 years. It is one of the things they have always pushed very hard.
 
I can absolutely guarantee you my ISP's IPv6 implementation has been fully functional, correct and supported on all their devices for over 20 years. It is one of the things they have always pushed very hard.
Yeah, if you have a subscription that actually gives you a routable IPv6 address straight on your modem, did you have success playing with IPv6 utilities on another OS? If it returned usable results (not errors that say that a remote IPv6 host is unreachable), I can absolutely guaranteee you that FreeBSD will give you the same results if you know how to read the output and what to look for.

Just because an ISP pushes something very hard - that means nothing until you actually get it on your device easily and reliably.
 
If you want a DHCPv6 client you can install net/dhcp6. Or net/dual-dhclient-daemon which uses net/isc-dhcp44-client.

SLAAC is supported out of the box, just add accept_rtadvd, for example:
Code:
ifconfig_re0_ipv6="inet6 accept_rtadv"
Does SLAAC, which I already have that setting on, do the same as net/dhcp6 for DHCPv6? Is so, are there benefits to using dhcp6, and is the purpose of it, to be the flavor of DHCPv4, but with v6 settings? Is it better, at keeping aliases of Ethernet addresses with the IPv6 addresses to their respective IPv4 addresses than SLAAC?

Looking up the dhcp6 port: it's by the KAME project, and follows standardization through RFC's.
 
Yeah, if you have a subscription that actually gives you a routable IPv6 address straight on your modem, did you have success playing with IPv6 utilities on another OS? If it returned usable results (not errors that say that a remote IPv6 host is unreachable), I can absolutely guaranteee you that FreeBSD will give you the same results if you know how to read the output and what to look for.

Just because an ISP pushes something very hard - that means nothing until you actually get it on your device easily and reliably.

Wait, what?

I have been using this for twenty years, as already said. My Linux router connects to the Internet on IPv6 and everything I have behind it as well, Windows, iPhones, IP phones (snom) and other, more modern devices.

Also, just to clarify, the problem with FreeBSD is *internal*. Nowt to do with my ISP. All Linux, Windows and iPhones here pickup IPv6 via DHCPv6 on the Linux router, all I am asking is for FreeBSD to do the same.

I started the procedure from pebkac's link, I will let you know if it works.
 
Wait, what?

I have been using this for twenty years, as already said. My Linux router connects to the Internet on IPv6 and everything I have behind it as well, Windows, iPhones, IP phones (snom) and other, more modern devices.

Also, just to clarify, the problem with FreeBSD is *internal*. Nowt to do with my ISP. All Linux, Windows and iPhones here pickup IPv6 via DHCPv6 on the Linux router, all I am asking is for FreeBSD to do the same.

I started the procedure from pebkac's link, I will let you know if it works.
I agree; I also think FreeBSD should support DHCPv6 out of the box in 2024 since this obviously is how many networks are working now.

Saying that the requirement is wrong because FreeBSD does not support it is putting the cart before the horse in my opinion.
 
Late to the party here in 2025, it still doesn't support DHCPv6 out of the box; just DHCPv4 and SLAAC. I tried using net/dhcp6); which works fine, but doesn't support sending ia-td and hostname. I also tried using net/dhcpcd, which does support both of those features and also DHCPv4; which is handy, but could potentially conflict with the base dhclient

But I wonder if there is a port that the community prefers or if there is ever a plan to include this in the base system so we don't have to do extra configuration and ensure that no conflicts occur.
I tried searching the forums, but information is rather sparse on DHCPv6 clients and this thread is kind of the best I could find.
 
Yes, I also think that this is quite unfortunate.

I understand that net/dhcpd has the best chances of becoming part of base at one point: https://reviews.freebsd.org/D22012
Beware, there might be a misunderstanding: what you link to is dhcpd (some dhcp daemon I do not know), but the differential is about dhcpcd (the Roy Marples dhcp daemon).
I am using it and for me it is working very reliably.
I am using dhcpcd, and it (also) works very reliable. The downside with dhcpcd is that it tries to do everything, so it is quite an effort to tell it to do nothing except the one required thing (prefix delegation).

I do not really see why DHCP would be needed at all with IPv6 (except for prefix delegation) - I never used it with IPv4 either, and the thing DHCP does for IPv4 (see that clients get a useable network address) is already done in IPv6 via router advertisements.

If you set up your site in the way a corporate site would be built, then everything necessary is present in FreeBSD, and you only have to care to get your prefix delegation and distribute the prefixes along your subnets (dhcpcd does that), and then everything will just work.

If, however, you only want to attach your desktop machine to some plastic router and then expect everything to magically autoconfigure, that is a very different requirement - so please don't come along with 'FreeBSD sucks', because it does a far better job than most other options (where you have to pay lots of bucks to get an industrial grade site up and running). Instead, please provide some substantial suggestions on how you would expect this to be done, and how it could be practically implemented.
 
Beware, there might be a misunderstanding: what you link to is dhcpd (some dhcp daemon I do not know), but the differential is about dhcpcd (the Roy Marples dhcp daemon).

I am using dhcpcd, and it (also) works very reliable. The downside with dhcpcd is that it tries to do everything, so it is quite an effort to tell it to do nothing except the one required thing (prefix delegation).

I do not really see why DHCP would be needed at all with IPv6 (except for prefix delegation) - I never used it with IPv4 either, and the thing DHCP does for IPv4 (see that clients get a useable network address) is already done in IPv6 via router advertisements.

If you set up your site in the way a corporate site would be built, then everything necessary is present in FreeBSD, and you only have to care to get your prefix delegation and distribute the prefixes along your subnets (dhcpcd does that), and then everything will just work.

If, however, you only want to attach your desktop machine to some plastic router and then expect everything to magically autoconfigure, that is a very different requirement - so please don't come along with 'FreeBSD sucks', because it does a far better job than most other options (where you have to pay lots of bucks to get an industrial grade site up and running). Instead, please provide some substantial suggestions on how you would expect this to be done, and how it could be practically implemented.
If I am not completely missing something, net/dhcpd() is a port of the Roy Marples dhcp daemon.

At least man dhcpd says at the end:

Code:
AUTHORS
    Roy Marples <roy@marples.name>

BUGS
    Please report them to https://roy.marples.name/projects/dhcpcd

And yes, I also want to be able to connect my FreeBSD daily-driver notebook to plastic routers as you call them because the world I am living and working in is full of them and I don't control all the WIFI and LAN environments I want to or need to connect to.

Last not least, "so please don't come along with 'FreeBSD sucks', because it does a far better job than most other options etcetc": Don't put words in my mouth.
 
If I am not completely missing something, net/dhcpd() is a port of the Roy Marples dhcp daemon.
Doesn't look that way to me.

At least man dhcpd says at the end:

Code:
AUTHORS
    Roy Marples <roy@marples.name>

BUGS
    Please report them to https://roy.marples.name/projects/dhcpcd

Strange. Where do You get that? To me it says (here on the "Documentation" link):

Code:
AUTHOR
dhcpd(8) was originally written by Ted Lemon under a contract with
       Vixie Labs.  Funding for    this project was provided by Internet  Systems
       Consortium.   Version  3    of the DHCP server was funded by Nominum, Inc.
       Information  about  Internet  Systems  Consortium   is    available   at
https://www.isc.org/.

And yes, I also want to be able to connect my FreeBSD daily-driver notebook to plastic routers as you call them because the world I am living and working in is full of them and I don't control all the WIFI and LAN environments I want to or need to connect to.
That is *not* what I call plastic routers. Plastic routers are those you get on sale or from your ISP, which attach to the uplink and usually contain a botched linux.
Those "free wifi" things we encounter in supermarkets or railways are yet a different thing. I'm not sure if many of them would provide for IPv6 at all. I rather perceive (at least some of) them sitting on some CGN of sorts (and that is already ugly enough).

Last not least, "so please don't come along with 'FreeBSD sucks', because it does a far better job than most other options etcetc": Don't put words in my mouth.
That did concern the ambience of the thread as a whole. Please don't take it personally.
 
So what we have today is native IPv6 on FreeBSD for manually configured addressing and SLAAC. DHCPv6 is supported but only through the addition of a client that lives in ports. So it's all supportable, but people have different opinions on whether base should have a DHCPv6 client that has the necessary knobs in /etc/rc.conf. I don't see all that many networks that do DHCPv6, but that's probably because I don't travel all that much. All I ever see is SLAAC.

If the world at large does contain a lot of DHCPv6 for endpoint devices, I'd call it an omission that needs to be fixed in FreeBSD if it can't support that from base. Where I do see DHCPv6 is in the configuration of CPE's that need to handle a delegated prefix. On their LAN-end they just speak SLAAC though.

It would be esthetically orthagonal to have something like ifconfig_igb0="DHCPv6" and things would just sing, although I doubt if that would be idiot-proof enough to work. Merging both protocols into just the "DHCP" knob would be very very bad indeed.
 
Back
Top