rc.conf changes IPV6

Stefan Bethke stb at lassitu.de
Mon Nov 21 20:11:02 UTC 2011

Am 21.11.2011 um 20:25 schrieb Dan The Man:

> I notice we have changed way IPV6 is done in rc.conf now.
> I assume someone will update:
> http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-ipv6.html
> My question now concerns aliases, and what the norm will end up being.
> Here is example below:
> Here we have the new layout with IPV6, the below works fine, however since
> the ifconfig lines for IPV4 and IPV6 are essentially the same other than the actual "inet" and "inet6", will it be ok to start with alias0 for both IPV4 and IPV6, or should I in this example be starting at alias4 for IPV6?
> I would like idea to keep it way it is each protocal starting at alias0.
> defaultrouter=""
> hostname="sunsaturn.com"
> #IPV4
> ifconfig_em1="inet netmask"
> ifconfig_em1_alias0="inet netmask"
> ifconfig_em1_alias1="inet netmask"
> ifconfig_em1_alias2="inet netmask"
> ifconfig_em1_alias3="inet netmask"
> #IPV6
> ipv6_activate_all_interfaces="YES"
> ipv6_network_interfaces="em1"
> ipv6_defaultrouter="2001:49f0:4004:0000:0000:0000:0000:0001"
> ifconfig_em1_ipv6="inet6 2001:49f0:4004:0000:0000:0000:0000:0002 prefixlen 48"
> ifconfig_em1_alias0="inet6 2001:49f0:4004:0000:0000:0000:0000:0003 prefixlen 48"
> ifconfig_em1_alias1="inet6 2001:49f0:4004:0000:0000:0000:0000:0004 prefixlen 48"

Remember that rc.conf follows shell syntax and sematics, so the second _alias0 and _alias1 will overwrite the previous ones.

In 9.0 you can use the ipv4_addrs_<ifname> variable to set both the IPv4 "main" address as well as "alias" addresses, see rc.conf(5).  There doesn't seem to be an equivalent IPv6 option, as best as I can tell.


Stefan Bethke <stb at lassitu.de>   Fon +49 151 14070811

More information about the freebsd-current mailing list