Configuring IPv6 on FreeBSD 9.0

As long as I have been using IPv6 on FreeBSD (Since FreeBSD 4.x i think) IPv6 has basically been configured the same way in rc.conf. I usually either configure my systems with a static address or use stateless autoconfiguration.

From FreeBSD 9.0 and forward the syntax in rc.conf has changed a bit - mostly for the autoconfiguration case. I have made up examples of both cases with "before" and "after" configuration. By looking at these examples it should be easy enough to convert your own configuration to the new form.

Static address

FreeBSD ≤ 8:

ipv6_enable="YES"
ipv6_network_interfaces="em0"
ifconfig_em0_ipv6="2001:470:dd78::21 prefixlen 64"
ipv6_defaultrouter="2001:470:dd78::1"

FreeBSD ≥ 9:

ipv6_network_interfaces="em0"
ifconfig_em0_ipv6="inet6 2001:470:dd78::21 prefixlen 64"
ipv6_defaultrouter="2001:470:dd78::1"
ip6addrctl_policy="ipv6_prefer"

Autoconfiguration

FreeBSD ≤ 8:

ipv6_enable="YES"

FreeBSD ≥ 9:

ipv6_network_interfaces="em0"
ifconfig_em0_ipv6="inet6 accept_rtadv"
ip6addrctl_policy="ipv6_prefer"

E-mail Valid XHTML 1.1 Valid CSS!