FreeBSD IPv6 on CenturyLink

By Paul Heinlein | Aug 29, 2020 (updated Sep 10, 2020 )

I have a little FreeBSD host on my home network. It’s mostly a plaything, but it does host some backup files and provide a reliable platform for network debugging. I had flailed around trying to get its IPv6 settings to work consistently, so I finally put some real effort into it.

My Internet connection is provided by CenturyLink and is fully IPv6-capable. In the end, I had to do some adjustments on both my cable modem and my FreeBSD machine. Both platforms required reboots during the process, so you’ll need to plan for some short outages to complete this procedure.

CenturyLink has provided me a Zyxel C3000 series cable modem as my home ethernet router. There are some decent instructions you can follow to configure it for IPv6 usage. Here is what I ended up doing.

Once your modem works with IPv6, many (perhaps most) of the consumer devices connected to your network should soon get IPv6 addresses: iPhones, PCs (Windows, MacOS, Linux), etc. You might see some very slight increases in downloading speeds; I’ve found that IPv6 networks are often less congested than their IPv4 cousins.

FreeBSD changes

Two files needed changes to get FreeBSD setup correctly: rc.conf and sysctl.conf.

The LAN-facing interface on my FreeBSD host is igb0, so you’ll see that referenced below. Your exact configuration will depend on the name of the interface(s) you want to configure for IPv6. At the time I’m writing this document, I’m running FreeBSD 12.1-RELEASE-p8. I suspect things won’t change much during the 12.x releases, but make sure you check the FreeBSD Handbook if you encounter trouble. In my case, the IPv6 section in the Advanced Networking chapter was helpful.

The changes necessary for the /etc/rc.conf file enable IPv6 on the igb0 interface, tell the interface to accept IPv6 router advertisements (part of the Stateless networking enabled above), and start the IPv6 router solicitation daemon.

# /etc/rc.conf
ifconfig_igb0_ipv6="inet6 accept_rtadv"

It’s not strictly necessary to enable the IPv6 privacy extensions for IPv6 to work, but enabling them is a good idea. Doing so requires adjustment of two kernel parameters via /etc/sysctl.conf.

# /etc/sysctl.conf
# enable the privacy extensions
# prefer the privacy addresses

Once those two files are edited, reboot your host and run ifconfig igb0 (or whatever your interface is named) to verify operations. You will probably have five (5) inet6 addresses assigned per interface:

  1. One will have the prefix fe80::; it’s the link-local address and will end with %igb0 (with your interface name)
  2. Two others will also begin with f; mine are in fd00::. This prefix should match what you saw in the “Set the IPv6 state and addressing” box when you configured your modem. Once of these two addresses will be marked ‘autoconf’, the other ‘autoconf temporary’; the latter is due to enabling the privacy extensions and should change over time.
  3. The final two will probaby begin with 2602:: or something very similar. These are the addresses your machine will use to speak to the wider Internet. Again, one will be ‘autoconf,’ the other ‘autoconf temporary.’

Over time you’ll pick up other inet6 addresses that will be marked as ‘deprecated’; those are old temporary addresses that might be still in use for existing connections but won’t be used for new ones.

To test IPv6 connectivity, I like to use the curl utility, e.g.,

curl -6