home

IPv6 6to4 configuration for FreeBSD

54.81.73.2 = 2002:3651:4902::/48

You have to specify the following two items to use 6to4 interface.

Mandatory

-------/etc/rc.conf---------
	ipv6_enable="YES"
	stf_interface_ipv4addr="54.81.73.2"
		# Local IPv4 address for 6to4 tunneling interface.
		# its IPv6 address will be "2002:3651:4902::1"
	ipv6_defaultrouter="2002:c058:6301::"
		RFC3068 suggests anycast IPv4 address 192.88.99.1
		for 6to4 routers, but you can use other IPv4 address
		according to the site-adminitrator configuration.
----------------------------

Optional

Using the following options, you can specify prefix length for 6to4 interface to limit 6to4 peer. By default it's 0 (i.e. all 6to4 machine is accepted). Effective value is 0-31.

	stf_interface_ipv4plen="16"

By default, IPv6 interface-id for 6to4 interface is "::1", so the IPv6 address of 6to4 interface is "2002:(IPv4address)::1". However you can use EUI-64-based interface-id (using "AUTO" keyword) or other static interface-id.

-------/etc/rc.conf---------
	stf_interface_ipv6_ifid="1234:5678:9abc:def0"
		# By default, it is "::1"
----------------------------

Normally 49-64th bit of IPv6 address on 6to4 interface is zero, i.e. IPv6 Site Level Aggregator for 6to4 interface is 0. If you like, you can specify some appropriate value (it's not necessary at all in normal cases, though).

-------/etc/rc.conf---------
	stf_interface_ipv6_slaid="0001"
		# By default, it is "0"
----------------------------

© version6.ru, 2017