1. IPV6基本配置
 
注:
PC1,PC2均为XP双协议栈系统,但环境中只是用IPV6地址
UTM1,UTM2均为linux双协议栈系统,,多张网卡,此环境中只是用IPV6地址

PC1的配置如下:
(Xp下使用netsh工具配置)
netsh interface ipv6>add address 5 2011:2::2
netsh interface ipv6>add route ::/0 5 2011:2::1
PC2的配置如下:
netsh interface ipv6>add address 5 2011:3::2
netsh interface ipv6>add route ::/0 5 2011:3::1
UTM1的配置如下:
[UTM-DX]$ ifconfig eth1 2011:2::1/64 up
[UTM-DX]$ ifconfig eth0 2011:1::1/96 up
[UTM-DX]$ route -A inet6 add default gw 2011:1::2
[UTM-DX]$ echo "1" > /proc/sys/net/ipv6/conf/all/forwarding
特别注意最后一个命令,开启IPV6转发功能。
UTM2的配置如下:
[UTM-DX]$ ifconfig eth1 2011:3::1/64 up
[UTM-DX]$ ifconfig eth0 2011:1::2/96 up
[UTM-DX]$ route -A inet6 add default gw 2011:1::1
[UTM-DX]$ echo "1" > /proc/sys/net/ipv6/conf/all/forwarding
PC1 ping PC2结果如下:
C:\Documents and Settings\Aben.Zong>ping 2011:3::2

Pinging 2011:3::2 with 32 bytes of data:

Reply from 2011:3::2: time=6ms
Reply from 2011:3::2: time=1ms
Reply from 2011:3::2: time<1ms
Reply from 2011:3::2: time=1ms

Ping statistics for 2011:3::2:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 6ms, Average = 2ms
2. IPV6隧道配置
现在修改上面的网络环境,使IPV6的业务网络经过IPV4的网络访问IPV6的业务网络,情况如下图:
 
PC1,PC2的配置和上述配置一致;
UTM1的配置如下:
[UTM-DX]$ ifconfig eth0 192.168.1.2 up
[UTM-DX]$ route add default gw 192.168.1.1
UTM2的配置如下:
[UTM-DX]$ ifconfig eth0 192.168.2.2 up
[UTM-DX]$ route add default gw 192.168.2.1
此时,网络状况为PC1与UTM1互通/PC2与UTM2互通/UTM1与UTM2互通,但PC1与PC2不通。
UTM1的隧道配置如下:
[UTM-DX]$ ip tunnel add sit1 mode sit ttl 64 local 192.168.1.2 remote 192.168.2.2
[UTM-DX]$ ifconfig sit1 up
[UTM-DX]$ route -A inet6 add ::/0 dev sit1
[UTM-DX]$ echo "1" > /proc/sys/net/ipv6/conf/all/forwarding
特别注意最后一个命令,开启IPV6转发功能,不开起的情况下隧道不通。

UTM2的隧道配置如下:
[UTM-DX]$ ip tunnel add sit1 mode sit ttl 64 local 192.168.2.2 remote 192.168.1.2
[UTM-DX]$ ifconfig sit1 up
[UTM-DX]$ route -A inet6 add ::/0 dev sit1
[UTM-DX]$ echo "1" > /proc/sys/net/ipv6/conf/all/forwarding
特别注意最后一个命令,开启IPV6转发功能
PC1 ping PC2的结果如下:
C:\Documents and Settings\Aben.Zong>ping 2011:3::2

Pinging 2011:3::2 with 32 bytes of data:

Reply from 2011:3::2: time=1ms
Reply from 2011:3::2: time=1ms
Reply from 2011:3::2: time=1ms
Reply from 2011:3::2: time=1ms

Ping statistics for 2011:3::2:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 1ms, Average = 1ms

如果不通,注意查看ip6tables的规则信息。