# ifconfig eth0 inet6 add 2001:da8:2004:1000:202:116:160:41/64 (手工添加配置固定IPv6地址)
# route -A inet6 add default gw 2001:da8:2004:1000::1 (添加默认路由)
# ping6 ipv6.scau.edu.cn
PING ipv6.scau.edu.cn(2001:da8:2004:1000:202:116:160:48) 56 data bytes
64 bytes from 2001:da8:2004:1000:202:116:160:48: icmp_seq=0 ttl=64 time=0.020 ms
64 bytes from 2001:da8:2004:1000:202:116:160:48: icmp_seq=1 ttl=64 time=0.019 ms
64 bytes from 2001:da8:2004:1000:202:116:160:48: icmp_seq=2 ttl=64 time=0.014 ms
这个显示表明IPv6已配置成功。
Linux设置isatap隧道配置IPv6
Linux 设置如下:
ip tunnel add sit1 mode sit remote 192.168.253.49 local a.b.c.d
ifconfig sit1 up
ifconfig sit1 add 2001:da8:2004:2301:0:5efe:a.b.c.d
route -A inet6 add ::/0 fe80::5efe:192.168.253.49
注意: 上面的 a.b.c.d 请使用你的真实IPv4地址代替
vi /etc/network/interfaces
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
# The loopback interface
# automatically added when upgrading
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet6 static
address 2001:da8:2:10d::2
netmask 64
up route -A inet6 add default gw 2001:da8:2:10d::1 dev $IFACE
iface eth0 inet static
address 58.1.4.74
netmask 255.255.255.0
up route add default gw 58.1.4.1 dev $IFACE