ipv6 over ipv4隧道技术
首先配置基础信息
[R1]ipv6.
[R1]int Vlanif 1
[R1-Vlanif1]ipv6 enable.
[R1-Vlanif1]ipv6 address 2001:1::1 64
[R1-Vlanif1]q
[R1]in g0/0/0
[R1-GigabitEthernet0/0/0]ip add 12.1.1.1 24
[R1-GigabitEthernet0/0/0]q
[R1]ip route-static 12.1.2.0 24 12.1.1.2
[R2]in g0/0/0
[R2-GigabitEthernet0/0/0]ip add 12.1.1.2 24
[R2-GigabitEthernet0/0/0]q
[R2]q
[R2]in g0/0/1
[R2-GigabitEthernet0/0/1]ip add 12.1.2.2 24
[R2-GigabitEthernet0/0/1]q
[R3]ipv6
[R3]in g0/0/0
[R3-GigabitEthernet0/0/0]ip add 12.1.2.1 24
[R3-GigabitEthernet0/0/0]q
[R3]in vlanif 1
[R3-Vlanif1]ipv6 enable
[R3-Vlanif1]ipv6 add 2001:3::1 64
[R3-Vlanif1]q
[R3]ip route-static 12.1.1.0 24 12.1.2.2
[R3]q
[R1]interface Tunnel 0/0/0[R1-Tunnel0/0/0]tunnel-protocol ipv6-ipv4
[R1-Tunnel0/0/0]source 12.1.1.1
[R1-Tunnel0/0/0]destination 12.1.2.1
[R1-Tunnel0/0/0]ipv6 enable
[R1-Tunnel0/0/0]ipv6 address 2001:2::1 64
IR1]ipv6 route-static 2001:3:: 64 2001:2::2
[R3]ipv6[R3]interface Tunnel 0/0/0
[R3-Tunnel0/0/0]tunnel-protocol ipv6-ipv4
[R3-Tunnel0/0/0]source 12.1.2.1
[R3-Tunnel0/0/0]destination 12.1.1.1
[R3-Tunnel0/0/0]ipv6 enable
[R3-Tunnel0/0/0]ipv6 address 2001:2::2 64
[R3-Tunnel0/0/0]quit
[R3lipv6 route-static 2001:1:: 64 2001:2::1
配置结束,进行测试
如果配置结束发现配置存在问题,可以删除隧道,重新进行隧道的配置,步骤如下
<R1> system-view
[R1] interface Tunnel 0/0/0
[R1-Tunnel0/0/0] shutdown
[R1-Tunnel0/0/0] quit
[R1] undo interface Tunnel 0/0/0
# 重新创建隧道
[R1] interface Tunnel 0/0/0
[R1-Tunnel0/0/0] tunnel-protocol ipv6-ipv4
[R1-Tunnel0/0/0] source 12.1.1.1
[R1-Tunnel0/0/0] destination 12.1.2.1
[R1-Tunnel0/0/0] ipv6 enable
[R1-Tunnel0/0/0] ipv6 address 2001:2::1 64
[R1-Tunnel0/0/0] quit
<R3> system-view
[R3] interface Tunnel 0/0/0
[R3-Tunnel0/0/0] shutdown
[R3-Tunnel0/0/0] quit
[R3] undo interface Tunnel 0/0/0
# 重新创建隧道
[R3] interface Tunnel 0/0/0
[R3-Tunnel0/0/0] tunnel-protocol ipv6-ipv4
[R3-Tunnel0/0/0] source 12.1.2.1
[R3-Tunnel0/0/0] destination 12.1.1.1
[R3-Tunnel0/0/0] ipv6 enable
[R3-Tunnel0/0/0] ipv6 address 2001:2::2 64
[R3-Tunnel0/0/0] quit
配置结束后
# 在R1和R3上分别执行
<Router> system-view
[Router] ipv6
确保ipv6开启