MGRE环境下OSPF实验

目录

实验要求

实验过程

1,根据传统的手法来分配网段

2,搭建MGRE环境

完成星型结构的搭建

 完成全连的拓扑结构

3,启动OSPF获取整个未知网段的拓扑信息 


 

实验要求

1,r6为isp只能配置ip地址,r1-r5的环回为私有网段

2,r1/4/5为全连的MGRE结构,r1/2/3为星型拓扑结构,r1为中心站点

3,所有私有网段可以互相通讯,私有网段使用OSPF来完成

实验过程

1,根据传统的手法来分配网段

R1

[r1]int g0/0/1
[r1-GigabitEthernet0/0/1]ip add 116.0.0.1 24
[r1-GigabitEthernet0/0/1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip add 16.0.0.1 24
[r1-GigabitEthernet0/0/0]int l0
[r1-LoopBack0]ip add 192.168.1.1 24

[r1]ip route-static 0.0.0.0 0 116.0.0.2
[r1]ip route-static 0.0.0.0 0 16.0.0.2
 

R2/3/4/5/6同上

公网的网络就通了 

2,搭建MGRE环境

完成星型结构的搭建

R1中心站点
[r1]int Tunnel 0/0/0
[r1-Tunnel0/0/0]ip address 192.168.7.1 24 
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp 
[r1-Tunnel0/0/0]source 16.0.0.1
Jul 12 2022 21:21:27-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface Tunnel0/0/0 has entered the UP state. 
[r1-Tunnel0/0/0]
[r1-Tunnel0/0/0]nhrp network-id 100  ---创建nhrp域来自动换取目标ip
[r1-Tunnel0/0/0]nhrp entry multicast dynamic   ---开启伪广播

分支R2
[r2]int Tunnel 0/0/0
[r2-Tunnel0/0/0]ip add 192.168.7.2 24  
[r2-Tunnel0/0/0]tunnel-protocol gre p2mp  ---定义封装类型
[r2-Tunnel0/0/0]source g0/0/0
Jul 12 2022 21:28:03-08:00 r2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface Tunnel0/0/0 has entered the UP state. 
[r2-Tunnel0/0/0]nhrp network-id 100  ---加入nhrp域
[r2-Tunnel0/0/0]nhrp entry 192.168.7.1 16.0.0.1 register  ---找中心注册

R3同上

 完成全连的拓扑结构

R1

[r1]int Tunnel 0/0/1
[r1-Tunnel0/0/1]ip add 192.168.6.1 24
[r1-Tunnel0/0/1]tunnel-protocol gre p2mp 
[r1-Tunnel0/0/1]source 116.0.0.1 
Jul 12 2022 21:40:11-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]nhrp network-id 110
[r1-Tunnel0/0/1]nhrp entry multicast dynamic 


[r1-Tunnel0/0/1]nhrp entry 192.168.6.2 46.0.0.1 register 
[r1-Tunnel0/0/1]nhrp entry 192.168.6.3 56.0.0.1 register
 

R4,R5同上(分别承担中心站点,并互相注册)

 

私网就连通了

3,启动OSPF获取整个未知网段的拓扑信息 

R1

[r1]ospf 1 router-id 1.1.1.1
[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

R2/3/4/5同上

 点到点的工作模式只能建立一个邻居关系,会导致未知网段的信息获取不全。考虑到DR和BDR的选举有可能不统一,可以选择P2MP类型

R1

[r1]int t0/0/0
[r1-Tunnel0/0/0]ospf ne    
[r1-Tunnel0/0/0]ospf network-type p2mp

R2/3同上

 

 

在全连的MGRE环境下,3者互相能通讯,不用考虑DR和BDR选举不同意,可以选择broadcast

R1

[r1-Tunnel0/0/0]int t0/0/1
[r1-Tunnel0/0/1]ospf network-type broadcast

R4/5同上
 

 

 

 


 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

一路喝狗狗

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

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

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

打赏作者

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

抵扣说明:

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

余额充值