需要Tunnel的原因等在Windows XP 如何配置6to4 tunnel中已经提过,在此就不罗嗦了。这里主要介绍Linux(我使用的是ubuntu)如何配置6to4 tunnel,以及删除已经配置好的Tunnel。
使用超级管理员权限:
sudo su
enter password
法一:
配置Tunnel
ip tunnel add tun6to4 mode sit ttl 128 remote any local 58.241.5.211
ip link set dev tun6to4 up
ip -6 addr add 2002:xxxx:xxxx::1/16 dev tun6to4
ip -6 route add 2000::/3 via ::192.88.99.1 dev tun6to4 metric 1

删除Tunnel
ip -6 route flush dev tun6to4
ip link set dev tun6to4 down
ip tunnel del tun6to4
法二:
配置Tunnel
ifconfig sit0 up
ifconfig sit0 add /16 具体为下面这条命令
ifconfig sit0 add 2002:xxxx:xxxx::1/16
route -A inet6 add 2000::/3 gw ::192.88.99.1 dev sit0

删除Tunnel
route -A inet6 del 2000::/3 gw ::192.88.99.1 dev sit0
ifconfig sit0 del 2002:xxxx:xxxx::1/16
ifconfig sit0 down
文中的xxxx:xxxx是有IPv4地址的十六进制表示。它是你PC IPv4的地址,而且要是Public的。