基于RIP的MGRE实验

1.实验拓扑

2.实验要求

1.按照图配置IP地址

2.配置静态路由实现传公网通

3.配置MGRE VPN

4.NHRP的配置

5.配置RIP路由实现两端传递私有路由

6.测试全网通

 (1).根据网段配置ip地址

[R1]int G0/0/0
[R1-GigabitEthernet0/0/0]ip add 15.0.0.1 24
[R2]int G0/0/0
[R2-GigabitEthernet0/0/0]ip add 25.0.0.1 24
[R3]int G0/0/0
[R3-GigabitEthernet0/0/0]ip add 35.0.0.1 24
[R4]int G0/0/0
[R4-GigabitEthernet0/0/0]ip add 45.0.0.1 24
[R5]int G0/0/0
[R5-GigabitEthernet0/0/0]ip add 15.0.0.2 24 
[R5-GigabitEthernet0/0/0]int G0/0/1
[R5-GigabitEthernet0/0/1]ip add 25.0.0.2 24 
[R5-GigabitEthernet0/0/1]int G0/0/2
[R5-GigabitEthernet0/0/2]ip add 35.0.0.2 24
[R5]int G6/0/0
[R5-GigabitEthernet6/0/0]ip add 45.0.0.2 24

(2).配置静态路由实验公网通

[R1]ip route-static 0.0.0.0 0 15.0.0.2
[R2]ip route-static 0.0.0.0 0 25.0.0.2
[R3]ip route-static 0.0.0.0 0 35.0.0.2
[R4]ip route-static 0.0.0.0 0 45.0.0.2

(3).配置MGRE VPN

[R4]int tunnel 0/0/0
[R4-Tunnel0/0/0]ip add 192.168.5.4 24
[R4-Tunnel0/0/0]tunnel-protocol gre p2mp
[R4-Tunnel0/0/0]source 45.0.0.1
[R3]int tunnel 0/0/0
[R3-Tunnel0/0/0]ip add 192.168.5.3 24
[R3-Tunnel0/0/0]tunnel-	
[R3-Tunnel0/0/0]tunnel-protocol gre p2mp
[R3-Tunnel0/0/0]source 35.0.0.1
[R2]int Tunnel 0/0/0
[R2-Tunnel0/0/0]ip add 192.168.5.2 24
[R2-Tunnel0/0/0]tunnel-protocol gre p2mp
[R2-Tunnel0/0/0]source 25.0.0.1
[R1]int Tunnel 0/0/0
[R1-Tunnel0/0/0]ip add 192.168.5.1 24	
[R1-Tunnel0/0/0]tunnel-protocol gre p2mp
[R1-Tunnel0/0/0]source 15.0.0.1

(4).NHRP的配置

中心站点R1的配置

[R1]int tunnel 0/0/0	
[R1-Tunnel0/0/0]nhrp network-id 100

分支点配置:意思是让中心站点将自己的信息写入注册表里

[R2]int tunnel 0/0/0
[R2-Tunnel0/0/0]nhrp network-id 100
[R2-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1 register
[R3]int tunnel 0/0/0	
[R3-Tunnel0/0/0]nhrp network-id 100
[R3-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1 register
[R4]int tunnel 0/0/0	
[R4-Tunnel0/0/0]nhrp network-id 100	
[R4-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1 register 

(5).5.配置RIP路由实现两端传递私有路由

[R1]rip 1
[R1-rip-1]undo summary 
[R1-rip-1]version 2
[R1-rip-1]network 192.168.1.0
[R1-rip-1]network 192.168.5.0
[R2]rip 1
[R2-rip-1]undo summary 
[R2-rip-1]version 2
[R2-rip-1]network 192.168.2.0
[R2-rip-1]network 192.168.5.0
[R3]rip 1
[R3-rip-1]undo summary 
[R3-rip-1]version 2
[R3-rip-1]network 192.168.3.0
[R3-rip-1]network 192.168.5.0
[R4]rip 1
[R4-rip-1]undo summary 
[R4-rip-1]version 2
[R4-rip-1]network 192.168.4.0
[R4-rip-1]network 192.168.5.0

这里只有中心站有信息,通过中心站下发给分站

[R1-Tunnel0/0/0]nhrp entry multicast dynamic

此时新的问题出现,分支站点并没有像预想的那样获得完整网段信息,这跟RIP的水平分割机制有关。

解决方法:关闭RIP的水平分割机制

[R1-Tunnel0/0/0]undo rip split-horizon

[R2-Tunnel0/0/0]undo rip split-horizon

[R3-Tunnel0/0/0]undo rip split-horizon

[R4-Tunnel0/0/0]undo rip split-horizon

(6).测试全网通

  • 8
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值