MGRE环境下的OSPF实验

实验思路

配置所有接口IP,再在边界路由器上配置缺省路由指向ISP,搭建MGRE环境,R1/2/3为中心到站点结构,R1为中心;R1/4/5为全连结构,即每个站点都是中心,需要互相注册,运行ospf宣告私网路由,修改R1/4/5的全连tunnel口ospf网路类型broadcast;修改R1/2/3的星型tunnel口的ospf网路类型为broadcast。

 第一步配置

所有路由器配置指向ISP的缺省路由

启动ospf,宣告私网路由

根据题意配置R1为中心站点

[r1]int Tunnel 0/0/0
[r1-Tunnel0/0/0]ip add 192.168.1.6 24
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp 
[r1-Tunnel0/0/0]source 16.0.0.1
Apr  7 2023 21:31:20-08:00 r1 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP 
on the interface Tunnel0/0/0 has entered the UP state. 
[r1-Tunnel0/0/0]nhrp network-id 100
 

 配置分站点R4,R5

[r4-Tunnel0/0/0]ip add 192.168.4.6 24
[r4-Tunnel0/0/0]tunnel-protocol gre p2mp   
[r4-Tunnel0/0/0]source g0/0/0
Apr  7 2023 21:35:12-08:00 r4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface Tunnel0/0/0 has entered the UP state. 
[r4-Tunnel0/0/0]
[r4-Tunnel0/0/0]nhrp network-id 100  
[r4-Tunnel0/0/0]nhrp entry 192.168.1.6 16.0.0.1 register 

R5同上

上面写错了,配置成R1,R4,R5的拓补结构,R1为中心站点

下面将R1,R2,R3 配置为全连的MGRE结构 

由于MGRE的全连网状和星系结构不能在一根链路上使用所以使用R1的G0/0/0接口作为全连MGRE结构

创建Tunne0/0/1 搭建MGRE全连网状结构 

[r1-Tunnel0/0/1]ip add 192.168.6.1 24   
[r1-Tunnel0/0/1]tunnel-protocol gre p2mp 
[r1-Tunnel0/0/1]sou    
[r1-Tunnel0/0/1]source 61.0.0.1
Apr  7 2023 22:11:52-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface Tunnel0/0/1 has entered the UP state. 
[r1-Tunnel0/0/1]  
[r1-Tunnel0/0/1]ospf network-type broadcast   
[r1-Tunnel0/0/1]nhrp entry multicast dynamic  
[r1-Tunnel0/0/1]nhrp entry 192.168.2.6 26.0.0.1 register   
[r1-Tunnel0/0/1]nhrp entry 192.168.3.6 36.0.0.1 register 
[r1-Tunnel0/0/1] 

R2 

[r2]int t0/0/1
[r2-Tunnel0/0/1]ip add 192.168.2.6 24  
[r2-Tunnel0/0/1]tunnel-protocol gre p    
[r2-Tunnel0/0/1]tunnel-protocol gre p2mp 
[r2-Tunnel0/0/1]sou    
[r2-Tunnel0/0/1]source 26.0.0.1
Apr  7 2023 22:37:26-08:00 r2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface Tunnel0/0/1 has entered the UP state. 
[r2-Tunnel0/0/1]  
[r2-Tunnel0/0/1]ospf network-type broadcast     
[r2-Tunnel0/0/1]nhrp entry multicast dynamic 
[r2-Tunnel0/0/1]nhrp entry 192.168.6.1 61.0.0.1 register 
[r2-Tunnel0/0/1]nhrp entry 192.168.3.6 36.0.0.1 register
[r2-Tunnel0/0/1] 

R3同上

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

电力小子sp

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值