实验条件
网络拓朴
环境配置
在我的资源里可以下载(就在这篇文章的开头也可以下载)
开始配置
先检测3台路由都能通过公网IP互联互通、
R2#ping 13.1.1.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 13.1.1.3, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/1 ms
R2#ping 14.1.1.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 14.1.1.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
R2#
基础有了
部署MGRE
R2:
interface tunnel0
ip address 10.1.1.2 255.255.255.0
tunnel source Ethernet0/0
tunnel mode gre multipoint
R3:
interface tunnel0
ip address 10.1.1.3 255.255.255.0
tunnel source Ethernet0/1
tunnel mode gre multipoint
R4:
interface tunnel0
ip address 10.1.1.4 255.255.255.0
tunnel source Ethernet0/2
tunnel mode gre multipoint
部署NHRP
R2 Hub:
interface tunnel0
ip nhrp network 100
ip nhrp authentication D-CISCO
ip nhrp map multicast dynamic
R3 Spoke:
interface tunnel0
ip nhrp network 100
ip nhrp authentication D-CISCO
ip nhrp map 10.1.1.2 12.1.1.2
ip nhrp map multicast 12.1.1.2
ip nhrp nhs 10.1.1.2
R4 Spoke:
interface tunnel0
ip nhrp network 100
ip nhrp authentication D-CISCO
ip nhrp map 10.1.1.2 12.1.1.2
ip nhrp map multicast 12.1.1.2
ip nhrp nhs 10.1.1.2
检测网络是否连通(私网IP)
R4#ping 10.1.1.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
R4#ping 10.1.1.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
R4#
部署动态路由协议
OSPF协议
宣告网络时,注意不能宣告公网的IP(12段、13段、14段网络),
只宣告公网,不宣告私网IP,无法建立邻居,因为没有私网的IP,MGRE不会把hello包报文通过tunnel转发给HUB,
同时宣告公网和私网IP,会造成邻居关系翻滚。也不行
只能宣告私网IP以及除tunnel source口IP的其它IP。
R2 Hub:
router ospf 100
router-id 2.2.2.2
network 10.2.2.2 0.0.0.0 area 0
network 10.1.1.0 0.0.0.255 area 0
R3 Spoke:
router ospf 100
router-id 3.3.3.3
network 10.3.3.3 0.0.0.0 area 0
network 10.1.1.0 0.0.0.255 area 0
R4 Spoke:
router ospf 100
router-id 4.4.4.4
network 10.4.4.4 0.0.0.0 area 0
network 10.1.1.0 0.0.0.255 area 0
检查配置结果
R2,R3,R4一直报错
R2(config-router)#
*Apr 5 15:39:26.093: %OSPF-5-ADJCHG: Process 100, Nbr 4.4.4.4 on Tunnel0 from LOADING to FULL, Loading Done
*Apr 5 15:39:26.097: %OSPF-5-ADJCHG: Process 100, Nbr 4.4.4.4 on Tunnel0 from FULL to DOWN, Neighbor Down: Adjacency forced to reset
*Apr 5 15:39:26.098: %OSPF-5-ADJCHG: Process 100, Nbr 3.3.3.3 on Tunnel0 from EXCHANGE to DOWN, Neighbor Down: Adjacency forced to reset
*Apr 5 15:39:26.099: %OSPF-5-ADJCHG: Process 100, Nbr 4.4.4.4 on Tunnel0 from EXCHANGE to DOWN, Neighbor Down: Adjacency forced to reset
*Apr 5 15:39:26.099: %OSPF-5-ADJCHG: Process 100, Nbr 3.3.3.3 on Tunnel0 from EXCHANGE to DOWN, Neighbor Down: Adjacency forced to reset
*