MGRE实验

本文详细描述了在一个网络环境中如何配置静态路由、星型拓扑下的GRE隧道、全连接的MGRE隧道,以及OSPF协议的部署,包括DR(DesignatedRouter)的优先级调整。

首先配公网缺省路由

ip route-static 0.0.0.0 0.0.0.0 16.1.1.2 ip route-static 0.0.0.0 0.0.0.0 61.1.1.2

然后配星型拓补

[R1]interface Tunnel 0/0/1
[R1-Tunnel0/0/1]ip add 192.168.7.1 24
[R1-Tunnel0/0/1]tunnel-protocol gre p2mp 
[R1-Tunnel0/0/1]source 61.1.1.1
[R1-Tunnel0/0/1]nhrp entry multicast dynamic 
[R2]interface Tunnel 0/0/1
[R2-Tunnel0/0/1]ip add 192.168.7.2 24    
[R2-Tunnel0/0/1]tunnel-protocol gre p2mp 
[R2-Tunnel0/0/1]source GigabitEthernet 0/0/0
[R2-Tunnel0/0/1]nhrp entry 192.168.7.1 61.1.1.1 register
 

然后配全连MGRE

[R1]interface Tunnel 0/0/0
[R1-Tunnel0/0/0]ip add 192.168.6.1 24
[R1-Tunnel0/0/0]tunnel-protocol gre p2mp 
[R1-Tunnel0/0/0]source 16.1.1.1
[R1-Tunnel0/0/0]nhrp entry 192.168.6.4 46.1.1.1 register
[R1-Tunnel0/0/0]nhrp entry 192.168.6.5 56.1.1.1 register
 

[R4]interface Tunnel 0/0/0
[R4-Tunnel0/0/0]ip add 192.168.6.4 24
[R4-Tunnel0/0/0]tunnel-protocol gre p2mp 
[R4-Tunnel0/0/0]source 46.1.1.1
[R4-Tunnel0/0/0]nhrp entry 192.168.6.1 16.1.1.1 register 
[R4-Tunnel0/0/0]nhrp entry 192.168.6.5 56.1.1.1 register

然后配ospf

[R1]ospf 1 router-id 1.1.1.1
[R1-ospf-1]ar    
[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]network 192.168.1.0 0.0.0.255
[R1-ospf-1-area-0.0.0.0]network 192.168.6.0 0.0.0.255
[R1-ospf-1-area-0.0.0.0]network 192.168.7.0 0.0.0.255

手工改DR优先级

[R1]interface Tunnel 0/0/0
[R1-Tunnel0/0/0]ospf network-type broadcast 
[R1]interface Tunnel 0/0/1
[R1-Tunnel0/0/1]ospf network-type broadcast
 

[R3]int Tunnel 0/0/1
[R3-Tunnel0/0/1]ospf network-type broadcast 
[R3-Tunnel0/0/1]ospf dr-priority 0

[R4]int Tunnel 0/0/0
[R4-Tunnel0/0/0]ospf network-type broadcast

 

 

 

 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值