MGRE+OSPF实验

实验拓扑

实验要求:

1、左边三台设备配置OSPF 10,区域0;

2、右边为OSPF 1 中间是Area0,下挂Area1和Area2;

3、两个进程之间有ISP设备,需要访问公网。

4、OSPF 1区域零中,中心设备不启动动态路由协议,配置MGRE。

实验分析:

首先分配IP地址。

在左边启动OSPF,并宣告,配置R3指向ISP的缺省,并下放缺省,配置NAT

在右边,先配置MGRE环境,配置mgre环境之间的路由,然后再将各路由器(除R7)启动OSPF,在r5上配置指向ISP的缺省,并下放,在R5上配置NAT

在R3和R5之间配置VPN,并选择配置左右两边需要通信的路由。

实验配置

IP配置按图上所示

在左侧区域启动OSPF

在R3配置缺省并下放

在R3上配置NAT

在R6、R8、R10、R12上配置MGRE环境

修改tunnel接口的网络类型为broadcast或者p2mp。broadcast需要进行DR和BDR的选举,hello时间为10S,P2MP不需要进行DR和BDR选举,hello时间为30S。MGRE环境下,broadcast可以能因为DR和BDR身份认知不同,导致缺失路由,所以选择P2MP,并将hello时间改回10S。

[r6-Tunnel0/0/0]tunnel-protocol gre p2mp
[r6-Tunnel0/0/0]source 192.168.4.2
[r6-Tunnel0/0/0]nhrp entry multicast dynamic
[r6-Tunnel0/0/0]ospf network-type p2mp
[r6-Tunnel0/0/0]ospf timer hello 10

[r8-Tunnel0/0/0]tunnel-protocol gre p2mp
[r8-Tunnel0/0/0]source GigabitEthernet 0/0/0
[r8-Tunnel0/0/0]nhrp entry 192.168.16.1 192.168.4.1 register
[r8-Tunnel0/0/0]ospf network-type p2mp
[r8-Tunnel0/0/0]ospf timer hello 10

[r10-Tunnel0/0/0]tunnel-protocol gre p2mp
[r10-Tunnel0/0/0]source GigabitEthernet 0/0/0
[r10-Tunnel0/0/0]nhrp entry 192.168.16.1 192.168.4.1 register 
[r10-Tunnel0/0/0]ospf network-type p2mp
[r8-Tunnel0/0/0]ospf timer hello 10

[r12-Tunnel0/0/0]tunnel-protocol gre p2mp
[r12-Tunnel0/0/0]source GigabitEthernet 0/0/0
[r12-Tunnel0/0/0]nhrp entry 192.168.16.1 192.168.4.1 register
[r12-Tunnel0/0/0]ospf network-type p2mp
[r12-Tunnel0/0/0]ospf timer hello 10

因为需要在边界下放缺省,所以MGRE之间的路由选择使用静态。

在各路由器上启动OSPF

在R5上配置指向ISP的缺省,并下放

在R5上配置NAT

在R3和R5上配置VPN

[r3-Tunnel0/0/0]ip add 192.168.15.1 24
[r3-Tunnel0/0/0]tunnel-protocol gre
[r3-Tunnel0/0/0]source 4.4.1.1
[r3-Tunnel0/0/0]destination 4.4.2.2

[r5-Tunnel0/0/0]ip add 192.168.15.2 24
[r5-Tunnel0/0/0]tunnel-protocol gre
[r5-Tunnel0/0/0]source 4.4.2.2
[r5-Tunnel0/0/0]destination 4.4.1.2

最后选择需要开放的配置静态路由,下一跳写VPN隧道。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值