提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档
前言
纯手工指定在这里
86.配置IPV6过渡技术——隧道技术: 手动隧道IPv6 over IPv4
一、GRE VPN实验
AR4、AR6 为公司边界路由,R5模拟互联网 ;在 R4、R5
路由器上配置 GRE Tunnel,令两边Lo 0 可通信
R4
<Huawei>sys
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 45.1.1.1 30
[Huawei-GigabitEthernet0/0/0]int lo 0
[Huawei-LoopBack0]ip add 192.168.1.1 30
[Huawei-LoopBack0]q
[Huawei]int Tunnel 0/0/0
[Huawei-Tunnel0/0/0]ip add 77.77.77.1 30
[Huawei-Tunnel0/0/0]tunnel-protocol gre
[Huawei-Tunnel0/0/0]source 45.1.1.1
[Huawei-Tunnel0/0/0]destination 56.1.1.2
[Huawei]ip route-static 0.0.0.0 0 45.1.1.2
[Huawei]ip route-static 172.16.1.0 30 Tunnel 0/0/0
R5
<Huawei>sys
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 45.1.1.2 30
[Huawei-GigabitEthernet0/0/0]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 56.1.1.1 30
R6
interface GigabitEthernet0/0/0
ip address 56.1.1.2 255.255.255.252
interface LoopBack0
ip address 172.16.1.1 255.255.255.252
#
interface Tunnel0/0/0
ip address 77.77.77.2 255.255.255.252
tunnel-protocol gre
source 56.1.1.2
destination 45.1.1.1
#
ip route-static 0.0.0.0 0.0.0.0 56.1.1.1
ip route-static 192.168.1.0 255.255.255.252 Tunnel0/0/0
#
二、 GRE 手动隧道IPv6 over IPv4
R1
interface GigabitEthernet0/0/0
ip address 12.1.1.1 255.255.255.252
interface LoopBack0
ipv6 enable
ipv6 address 3001:DB8:1::1/128
interface Tunnel0/0/0
ipv6 enable
ipv6 address 2001:DB8:1::1/64
tunnel-protocol gre
source 12.1.1.1
destination 23.1.1.2
ip route-static 0.0.0.0 0.0.0.0 12.1.1.2
ipv6 route-static 3002:DB9:1::1 128 Tunnel0/0/0
R2
interface GigabitEthernet0/0/0
ip address 12.1.1.2 255.255.255.252
#
interface GigabitEthernet0/0/1
ip address 23.1.1.1 255.255.255.252
R3
interface GigabitEthernet0/0/0
ip address 23.1.1.2 255.255.255.252
interface LoopBack0
ipv6 enable
ipv6 address 3002:DB9:1::1/128
interface Tunnel0/0/0
ipv6 enable
ipv6 address 2001:DB8:1::2/64
tunnel-protocol gre
source 23.1.1.2
destination 12.1.1.1
ip route-static 0.0.0.0 0.0.0.0 23.1.1.1
ipv6 route-static 3001:DB8:1::1 128 Tunnel0/0/0
[Huawei]ping ipv6 -a 3002:DB9:1::1 3001:DB8:1::1
PING 3001:DB8:1::1 : 56 data bytes, press CTRL_C to break
Request time out
Reply from 3001:DB8:1::1
bytes=56 Sequence=2 hop limit=64 time = 40 ms
Reply from 3001:DB8:1::1
bytes=56 Sequence=3 hop limit=64 time = 30 ms
Reply from 3001:DB8:1::1
bytes=56 Sequence=4 hop limit=64 time = 30 ms
Reply from 3001:DB8:1::1
bytes=56 Sequence=5 hop limit=64 time = 20 ms
总结
[Huawei]dis ipv6 routing-table 3002:DB9:1::1
Routing Table :
Summary Count : 1
Destination : 3002:DB9:1::1 PrefixLength : 128
NextHop : 2001:DB8:1::1 Preference : 60
Cost : 0 Protocol : Static
RelayNextHop : :: TunnelID : 0x0
Interface : Tunnel0/0/0 Flags : D
[Huawei]dis interface Tunnel 0/0/0
Tunnel0/0/0 current state : UP
Line protocol current state : DOWN
Description:HUAWEI, AR Series, Tunnel0/0/0 Interface
Route Port,The Maximum Transmit Unit is 1500
Internet protocol processing : disabled
Encapsulation is TUNNEL, loopback not set
Tunnel source 12.1.1.1 (GigabitEthernet0/0/0), destination 23.1.1.2
Tunnel protocol/transport GRE/IP, key disabled