目前主流网络还是IPv4网络,IPv6网络尚未规模化部署。由于网络演进还存在较长时间IPv4到IPv6过渡期或IPv4和IPv6网络共存期。为此,国际标准组织为应对较长时间过渡期,形成了相关的过渡技术标准。目前主要存在三种过渡技术:双协议栈、隧道技术、地址翻译机制。
双栈:设备能同时工作在IPV4与IPV6两种网络中,能同时与IPV4和IPV6网络中的设备进行通信。
Pv4/IPv6双协议栈机制就是使IPv6网络节点同时支持IPv4和IPv6协议的处理。IPv4和IPv6是功能相近的网络层协议,两者处于同一个物理平台,并均可承载相同的传输层协议TCP、UDP等。支持双协议栈的节点既能与支持IPv4协议的节点通信,又能与支持IPv6协议的节点通信。
R1配置
<Huawei>sy
[Huawei]sy R1
[R1]ipv6
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ipv6 enable
[R1-GigabitEthernet0/0/0]ipv6 address auto link-local
[R1-GigabitEthernet0/0/0]ipv6 address 2001:1::2 64
[R1-GigabitEthernet0/0/0]int g0/0/1
[R1-GigabitEthernet0/0/1]ip address 12.1.1.1 24
[R1-GigabitEthernet0/0/1]int tunnel0/0/0
[R1-Tunnel0/0/0]ipv6 enable
[R1-Tunnel0/0/0]ipv6 address 2031:0:fd::1 64
[R1-Tunnel0/0/0]tunnel-protocol ipv6-ipv4 //采用隧道技术
[R1-Tunnel0/0/0]source 12.1.1.1
[R1-Tunnel0/0/0]destination 23.1.1.3
[R1-Tunnel0/0/0]q[R1]ip route-static 0.0.0.0 0.0.0.0 12.1.1.2 //IPv4采用默认路由通信
[R1]ospfv3 1
[R1-ospfv3-1]router-id 1.1.1.1
[R1-ospfv3-1]int g0/0/0
[R1-GigabitEthernet0/0/0]ospfv3 1 area 0[R1-GigabitEthernet0/0/0]int tunnel0/0/0
[R1-Tunnel0/0/0]ospfv3 1 area 0
R2配置
<Huawei>sy
[Huawei]sy R2
[R2]ipv6
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip address 12.1.1.2 24
[R2-GigabitEthernet0/0/0]
[R2-GigabitEthernet0/0/0]int g0/0/1
[R2-GigabitEthernet0/0/1]ip address 23.1.1.2 24
[R2-GigabitEthernet0/0/1]q
R3配置
<Huawei>sy
[Huawei]sy R3
[R3]ipv6
[R3]int g0/0/0
[R3-GigabitEthernet0/0/0]ip address 23.1.1.3 24
[R3-GigabitEthernet0/0/0]int g0/0/1
[R3-GigabitEthernet0/0/1]ipv6 enable
[R3-GigabitEthernet0/0/1]ipv6 address auto link-local
[R3-GigabitEthernet0/0/1]ipv6 address 2002:1::2 64
[R3-GigabitEthernet0/0/1]int tunnel0/0/0
[R3-Tunnel0/0/0]ipv6 enable
[R3-Tunnel0/0/0]ipv6 address 2031:0:fd::3 64
[R3-Tunnel0/0/0]tunnel-protocol ipv6-ipv4 //使得IPv6可以在IPv4中通信
[R3-Tunnel0/0/0]source 23.1.1.3
[R3-Tunnel0/0/0]destination 12.1.1.1
[R3-Tunnel0/0/0]q
[R3]ospfv3 1
[R3-ospfv3-1]router-id 1.1.1.2
[R3-ospfv3-1]int g0/0/1
[R3-GigabitEthernet0/0/1]ospfv3 1 area 0
[R3-GigabitEthernet0/0/1]int tunnel0/0/0
[R3-Tunnel0/0/0]ospfv3 1 area 0
[R3-Tunnel0/0/0]q[R3]ip route-static 0.0.0.0 0.0.0.0 23.1.1.2