Views
IPv6: A running Linux host
When tunnelling IPv6 addresses using normal addresses (either the original test addresses, or the real production addresses) you will normally see sit devices being refered to. This are point-to-point IPv6-over-IPv4 tunnel devices. When using 6to4 addresses these are not used as they place restrictions on where packets can arrive from (and therefore are more secure than 6to4 addresses).
Instead of sit devices we'll see tun6to4 devices. The only item that is configured on the device is the local IPv6 ip address.
This is the tun6to4 device on charon.twibble.org:
[egwene][ 7:38PM]~#> ifconfig tun6to4
tun6to4 Link encap:IPv6-in-IPv4
inet6 addr: 2002:cbd9:1d86::1/16 Scope:Global
UP RUNNING NOARP MTU:1480 Metric:1
RX packets:198 errors:0 dropped:0 overruns:0 frame:0
TX packets:178 errors:5 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:27028 (26.3 Kb) TX bytes:55040 (53.7 Kb)
The gateway that we use for routing packets back to the rest of the IPv6 internet is encoded in the routing table. It just requires that the device the traffic is routed through is the tun6to4 device and the target is an IPv4-compatible-IPv6 address.
This is the IPv6 routing table on charon.twibble.org:
[egwene][ 7:38PM]~#> netstat -A inet6 -r Kernel IPv6 routing table Destination Next Hop Flags Metric Ref Use Iface ::1/128 :: U 0 18 0 lo 2002:cbd9:1d86::1/128 :: U 0 202 1 lo 2002::/16 :: UA 256 0 0 tun6to4 2000::/3 ::192.88.99.1 UG 1 160 0 tun6to4 fe80::240:5ff:fee2:d8fd/128 :: U 0 0 0 lo fe80::280:c8ff:fe5a:fedc/128 :: U 0 0 0 lo fe80::/10 :: UA 256 0 0 eth0 fe80::/10 :: UA 256 0 0 eth1 fe80::/10 :: UA 256 0 0 tun6to4 ff00::/8 :: UA 256 0 0 eth0 ff00::/8 :: UA 256 0 0 eth1 ff00::/8 :: UA 256 0 0 tun6to4
These are the only things that need to be configured in order for 6to4 addresses to be used.
Note that the 2000::/3 is the global address prefix and refers to all of the addresses in the global (as opposed to local or site) scope. There's no such thing as a default route in IPv6 - this is as close as it gets.