Solved FreeBSD IPv6 basics

astyle

Aspiring Daemon

Reaction score: 374
Messages: 849

Point is that it does seem to require a bit of effort to get it working, even if the ISP provides it. On the other hand, on my workstation at work, I just have the rtsold line and it's all automatic, but we do better networking there than Spectrum.
Funny... NYC is a terminus for the Transatlantic cable, so one would think that NYC-based ISP's would offer better networking speeds / reliability / utilities / organization than the impression I'm getting so far...
 
OP
grahamperrin

grahamperrin

Daemon

Reaction score: 526
Messages: 1,707

… it's either shop around for an ISP that provides (as opposed to just support) IPv6 as part of a consumer-grade subscription, or connect to a tunnel. Vote with your hard-earned money.

I'm happy enough with a tunnel, since discovering the requirement.

Re: the money,


– really, it's a very nice price. Some time ago I chose to downgrade, I have a good deal (including a mobile phone number) that suits me fine.
 

Zirias

Daemon

Reaction score: 1,416
Messages: 2,468

scottro then the solution is not to use DHCPv6. It's an optional alternative way for address auto-configuration, while SLAAC is the mandatory way. If you're moving between different networks, it makes much more sense to use SLAAC exclusively, and with that, all you have to do is enable IPv6 as described in the handbook and it will just work in networks offering it and not hurt in other networks.

The reason it might fail with dhclient in DHCPv6 mode is that it configures "cached" configurations when it doesn't receive any offers.
 

astyle

Aspiring Daemon

Reaction score: 374
Messages: 849

scottro then the solution is not to use DHCPv6. It's an optional alternative way for address auto-configuration, while SLAAC is the mandatory way. If you're moving between different networks, it makes much more sense to use SLAAC exclusively, and with that, all you have to do is enable IPv6 as described in the handbook and it will just work in networks offering it and not hurt in other networks.

The reason it might fail with dhclient in DHCPv6 mode is that it configures "cached" configurations when it doesn't receive any offers.
Yeah, SLAAC is what I use - it's part of the base FreeBSD install. Just gotta remember to pay attention and say yes to it when the the install prompts you. Then it's smooth sailing, really, no real need to look for help on setting stuff up by hand (and possibly messing up along the way). Of course, there's another way to look at it - if you set stuff up by hand, and struggle with it, and spend time mired in errors that are difficult to troubleshoot - that's a valuable learning experience, it stays with you much better than [pushing a button, having it work out of the box, and then learning from others about how it was done].
 

scottro

Daemon

Reaction score: 874
Messages: 2,022

Keep in mind that NYC is a terminus but something like Spectrum's home service is for consumers. There's also their business service. There's also Verizon FIOS and RCN available. What I'm doing now is working for me, though not perfectly. I'll have to look into it again and see if I *can* get it working with Spectrum. As I think I said, at work, everything just works, and even here, (at home), with some Linux versions, everything just works.

I don't know very much about ipv6, learned most of it in the last week. :) I just tried changing the router's LAN config to SLAAC, (it has the choice for both WAN and LAN--as far as I can find, Spectrum uses dhcpv6 on the WAN, though I'm not positive), and it did seem to help with the AlmaLinux install. Now I don't have to do dhclient -6 on it, it automatically gets a global address. However the FreeBSD laptop still seems to need everything defined in rc.conf. This isn't a major problem, though, and really, I can leave it set in rc.conf and just turn it off when I don't need it. Thanks to both Zirias and astyle.
 

astyle

Aspiring Daemon

Reaction score: 374
Messages: 849

There's a new thread on this forum, and from links posted there, I just learned that DHCPv6 cannot be used on its own - there's no 'default router' provided in FreeBSD's kame implementation of IPv6. Pay attention to slide 10.
 

Zirias

Daemon

Reaction score: 1,416
Messages: 2,468

DHCPv6 cannot be used on its own
I'd rephrase that: it doesn't replace NDP. But NDP replaces ARP, so it's necessary anyways.

The difference is that for IPv6, the responsibility to configure routing is integrated in NDP and not available in the optional DHCPv6.

All you need to auto-configure routing is a network interface that accepts router advertisements. It's probably a good idea to run rtsold(8) to actively request these advertisements (but that's not strictly required).
 

Alain De Vos

Daemon

Reaction score: 613
Messages: 2,071

In my ppp.linkup script of my pppoe i have,
Code:
service ip6addrctl onestart
service rtsold     onestart
And without it ipv6 does not work.
 

Alain De Vos

Daemon

Reaction score: 613
Messages: 2,071

As I PPP through my router the correct value is probably 1480.
Otherwise , default settings using the routers NAT is probably 1500.
 
OP
grahamperrin

grahamperrin

Daemon

Reaction score: 526
Messages: 1,707


Thanks! So, I wasn't alone with difficulties in areas such as these (not specific to IPv6):
  • the rc.conf(5) page is too long
  • finding information can be difficult
  • running service netif restart leaves you with no default route, need to run service routing start as well
    • This should work without tmux/screen nohup sh -c 'service netif restart && service routing restart'
… i.e. a need to run service routing start for what's not started by a restart.
 

scottro

Daemon

Reaction score: 874
Messages: 2,022

I've also, thanks to many here, figured out a few things with ipv6 on Spectrum's residential network. I now set my router (cheap residential one, though not Spectrum's) for WAN to use dhcpv6 but LAN to use SLAAC. If I install, and during install, ask for it to try stateless configuration, it creates entries in /etc/rc.conf but doesn't run rtsold (nor require dual-dhcp, it just works), but that was a CURRENT install, not sure about 13.0-RELEASE. On 13.0 release, I have found I can do it manually as well. I do leave an entry in rc.conf to create wlan0, then and an entry of
Code:
ifconfig_wlan0_ipv6="inet6 aceept_rtadv"
This is put there by the installation.
As mentioned, I like to do it manually, because sometimes I use ethernet, etc. So, I then run a script that uses wpa_supplicant to connect to the router, and then, I find, I have to restart rtsold. Once I do that, it works.
WIth my tower that has a static ethernet connection, I have the lines
Code:
ifconfig_re0_ipv6="inet6 accept_rtadv"
rtsold_enable="YES"
And it gets an ipv6 connection upon boot.

It seems the key to a lot of my problems was changing the LAN from dhcpv6 to SLAAC. Again, I don't know enough about what I'm doing here to fully understand it, but at least I now have it working on both Linux and FreeBSD. With Linux, once I made that change, it works out of the box with both NetworkManager and iwd. I also found that once I did this, I didn't need dhclient -6 (or dual-dhclient) as it now seems automatic. So as usual, problem between chair and keyboard. :)
 
OP
grahamperrin

grahamperrin

Daemon

Reaction score: 526
Messages: 1,707

… I chose one of the London servers: …

Some time later, a peculiar view of YouTube content:

Web ( epiphany) believes that I'm Russian, which is wrong, …

I noticed a comparable problem with Google at <https://www.google.com/search?q=site:i.reddit.com/r/freebsd/+expression&tbs=li:1#unfucked>:
1624594347512.png

Worked around by taking down the tunnel interface to Hurricane Electric's service.
 

astyle

Aspiring Daemon

Reaction score: 374
Messages: 849

Sometimes, Google thinks I'm in India, sometimes Texas.... no need for onion routing.
 
Top