提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档
前言
一、实验目的
R1的Lo 0的IPV6地址穿越手动隧道与R3的Lo 0的IPV6地址通信
置 IPv6 over IPv4 手动隧道
二、基础配置
1.路由器相关地址
R1
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 12.1.1.1 30
[Huawei]ipv6
[Huawei]int lo 0
[Huawei-LoopBack0]ipv
[Huawei-LoopBack0]ipv6 add
[Huawei-LoopBack0]ipv6 address 3001:DB8:1::1/128
[Huawei-Tunnel0/0/0]ip
[Huawei-Tunnel0/0/0]ipv6 enable
[Huawei-Tunnel0/0/0]ipv6 address 2001:DB8:1::1/64
R3
[Huawei]int lo 0
[Huawei-LoopBack0]ipv6 address 3002:DB9:1::1/128
[Huawei]int Tunnel 0/0/0
[Huawei-Tunnel0/0/0]ipv6 enable
[Huawei-Tunnel0/0/0]ipv6 address 2001:DB8:1::2/64
2.配置 IPv6 over IPv4 手动隧道
R1
建立R1-R3的隧道
[Huawei]int Tunnel 0/0/0
[Huawei-Tunnel0/0/0]tunnel-protocol ipv6-ipv4
[Huawei-Tunnel0/0/0]source 12.1.1.1
[Huawei-Tunnel0/0/0]destination 23.1.1.2
静态路由
[Huawei]ip route-static 0.0.0.0 0 12.1.1.2
让目的地IPv6地址走隧道
[Huawei]ipv6 route-static 3002:DB9:1::1 128 Tunnel 0/0/0
R3
Huawei]int Tunnel 0/0/0
[Huawei-Tunnel0/0/0]tunnel-protocol ipv6-ipv4
[Huawei-Tunnel0/0/0]source 23.1.1.2
[Huawei-Tunnel0/0/0]description 12.1.1.1
[Huawei]ip route-static 0.0.0.0 0 23.1.1.1
[Huawei]ipv6 route-static 3001:DB8:1::1 128 Tunnel 0/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
Reply from 3001:DB8:1::1
bytes=56 Sequence=1 hop limit=64 time = 50 ms
Reply from 3001:DB8:1::1
bytes=56 Sequence=2 hop limit=64 time = 20 ms
Reply from 3001:DB8:1::1
bytes=56 Sequence=3 hop limit=64 time = 20 ms
Reply from 3001:DB8:1::1
bytes=56 Sequence=4 hop limit=64 time = 20 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
总结 又是一天的ping不通
查看配置没看到问题,查看两编路由表
R1可以查看到路由
<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
R3却没看到对端的R1的路由。可以ping下tunnel帮助排障,没ping通最后其实还是没发现问题,怀疑R3的tunnel配置,重新配置 +静态 好了………………(可能是地址问题 )
ping下tunnel
[Huawei]ping ipv6 2001:DB8:1::2
PING 2001:DB8:1::2 : 56 data bytes, press CTRL_C to break
Reply from 2001:DB8:1::2
bytes=56 Sequence=1 hop limit=64 time = 1 ms
Reply from 2001:DB8:1::2
bytes=56 Sequence=2 hop limit=64 time = 1 ms
Reply from 2001:DB8:1::2
bytes=56 Sequence=3 hop limit=64 time = 1 ms
Reply from 2001:DB8:1::2
bytes=56 Sequence=4 hop limit=64 time = 1 ms
Reply from 2001:DB8:1::2
bytes=56 Sequence=5 hop limit=64 time = 1 ms
[Huawei]ping ipv6 -a 2001:DB8:1::2 2001:DB8:1::1
PING 2001:DB8:1::1 : 56 data bytes, press CTRL_C to break
Reply from 2001:DB8:1::1
bytes=56 Sequence=1 hop limit=64 time = 30 ms
Reply from 2001:DB8:1::1
bytes=56 Sequence=2 hop limit=64 time = 40 ms
Reply from 2001:DB8:1::1
bytes=56 Sequence=3 hop limit=64 time = 30 ms
Reply from 2001:DB8:1::1
bytes=56 Sequence=4 hop limit=64 time = 30 ms
Reply from 2001:DB8:1::1
bytes=56 Sequence=5 hop limit=64 time = 30 ms
可以查看到有两个IP报头,V4在外面