OSPF-MGRE实验

实验要求:

1.R6为ISP只能配置地址,R1-R5的环回为私有网段

2.R1/R4/R5为全连的MGRE结构,R1/R2/R3为星型的拓扑结构,R1为中心站点

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

实验拓扑图:

 

 

ip如图所示;( R1-R6的环回依次为1.1.1.1,2.2.2.2,3.3.3.3,4.4.4.4以此类推)

1.R1/R4/R5为全连的MGRE结构,因此他们既是中心站点,也是分支站点,R1/R2/R3为星型结构同时也是MGRE结构,因此要把R1当作是中心站点,然后2和3作为被认证方

2.创建私有网段实现全网可达,可将R1/R4/R5的网络类型设置为broadcast,R1/R2/R3设置为p2mp(点对点)

 实验配置过程:

 IP配置并配置缺省路由(由于配置大差不差,就在这举一个例子即可):

R1

 

 R2

 R3

 R4

R5

 ISP

 星型拓扑结构的创建

[R1]int Tunnel 0/0/0   //创建虚接口
[R1-Tunnel0/0/0]ip add 192.168.1.1 24
[R1-Tunnel0/0/0]tunnel-protocol gre p2mp  //创建MGRE结构
[R1-Tunnel0/0/0]source 12.1.1.1  //源ip
Aug  4 2023 19:51:36-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    //创建域
[R1-Tunnel0/0/0]nhrp entry multicast dynamic  //开启伪传播

 

 搭建MGRE环境

[R1]int Tunnel 0/0/1
[R1-Tunnel0/0/1]ip add 7.7.7.1 24
[R1-Tunnel0/0/1]tunnel-protocol gre p2mp
[R1-Tunnel0/0/1]source 21.1.1.1
Aug  4 2023 20:00:55-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]nhrp network-id 100
[R1-Tunnel0/0/1]nhrp entry multicast dynamic 
[R1-Tunnel0/0/1]nhrp entry 7.7.7.3 65.1.1.2 register //以R5为中心注册
[R1-Tunnel0/0/1]nhrp entry 7.7.7.2 64.1.1.2 register //以R4为中心注册

[R4]int Tunnel 0/0/0
[R4-Tunnel0/0/0]ip add 7.7.7.2 24	
[R4-Tunnel0/0/0]tunnel-protocol gre p2mp
[R4-Tunnel0/0/0]source 64.1.1.2
Aug  4 2023 20:07:23-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]nhrp network-id 100
[R4-Tunnel0/0/0]nhrp entry multicast dynamic 
[R4-Tunnel0/0/0]nhrp entry 7.7.7.1 21.1.1.1 register 
Info: This peer protocol address conflicts with hub register peer protocol addre
ss. 
[R4-Tunnel0/0/0]nhrp entry 7.7.7.3 65.1.1.2 register 

[R5]int Tunnel 0/0/0
[R5-Tunnel0/0/0]ip add 7.7.7.3 24
[R5-Tunnel0/0/0]tunnel-protocol gre p2mp
[R5-Tunnel0/0/0]source 65.1.1.2
Aug  4 2023 20:09:41-08:00 R5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface Tunnel0/0/0 has entered the UP state. 	
[R5-Tunnel0/0/0]nhrp network-id 100
[R5-Tunnel0/0/0]nhrp entry multicast dynamic 
[R5-Tunnel0/0/0]nhrp entry 7.7.7.1 21.1.1.1 register 
Info: This peer protocol address conflicts with hub register peer protocol addre
ss. 
[R5-Tunnel0/0/0]nhrp entry 7.7.7.2 64.1.1.2 register 
Info: This peer protocol address conflicts with hub register peer protocol addre
ss. 

 实现全网可达

[R1]ospf 1 router-id 1.1.1.11
[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]net	
[R1-ospf-1-area-0.0.0.0]network 7.7.7.0 0.0.0.255
[R1-ospf-1-area-0.0.0.0]net	
[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 1.1.1.0 0.0.0.255
[R1]int Tunnel 0/0/0
[R1-Tunnel0/0/0]ospf network-type p2mp
[R1]int Tunnel 0/0/1
[R1-Tunnel0/0/1]ospf network-type broadcast 

[R2]ospf 1 rou	
[R2]ospf 1 router-id 2.2.2.22
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]net	
[R2-ospf-1-area-0.0.0.0]network 192.168.1.0 0.0.0.255
[R2-ospf-1-area-0.0.0.0]network 2.2.2.0 0.0.0.255
[R2-ospf-1-area-0.0.0.0]q
[R2-ospf-1]q
[R2]int t	
[R2]int Tunnel 0/0/0
[R2-Tunnel0/0/0]ospf net	
[R2-Tunnel0/0/0]ospf network-type p2mp
[R2-Tunnel0/0/0]q

 其余操作和上述类似,就不展示了,要注意宣告是否正确;

测试: 

 

以上是OSPF-MGRE的全部过程,仅供参考; 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值