CCNP实验:OSPF综合、MGRE、特殊区域、减少LSA的更新量

CCNP实验:OSPF综合、MGRE、特殊区域、减少LSA的更新量

关于此次实验不懂的可以参考我这两篇博客:
CCNP4:OSPF(数据包、状态机、工作过程、接口网络类型、建立邻接关系的条件)
CCNP5:OSPF的【不规则、末梢、NSSA】区域、【1、2、3、4、5、7】类LSA、【3、5、7】缺省
这是此次实验的拓扑:
在这里插入图片描述

实验要求:
①R4为ISP,其上只能配置IP地址,R4与其他所有直连设备间使用公有IP
②R3、R5-7为MGRE环境,R3为中心站点
③整个OSPF环境IP地址为172.16.0.0/16
④所有设备均可访问R4的环回
⑤减少LSA的更新量,加快收敛,保障更新安全
⑥全网可达

1、规划IP:

我们发现该拓扑中即存在OSPF,又存在EIGRP。标准的做法是将所给地址一分为二,一半跑EIGRP,一半跑OSPF。但是这张图中,EIGRP没有邻居,只有R12上的俩环回,因此我们就不按一分为二的思路进行划分。我们把EIGRP当做一个区域,这样总共6个区域,我们可以划分8个区域这样每个区域可以容纳相对多的用户:

区域IP具体规划
A0172.16.0.0/190.0/29搭建骨干MA网络,0.128/25及之后用作环回
A1172.16.32.0/1932.0/29搭建骨干MA网络,32.128/25及以后用作环回
A2172.16.64.0/1964.0/30作为骨干网络,64.128/25及以后用作环回
A3172.16.96.0/19同上
A4172.16.128.0/19同上
EIGRP172.16.160.0/19分为两部分160.1/20、176.1/20

2、配置:

(1)底层:

该底层中的公网IP是随便配置的,运营商的环回IP为4.4.4.4/24,绿色虚线模拟MGRE。
在这里插入图片描述

(2)路由:

①配置缺省:

在R3、R5-7上需要配置缺省路由指向运营商ISP:

R3(config)#ip route 0.0.0.0 0.0.0.0 34.1.1.2
R5(config)#ip route 0.0.0.0 0.0.0.0 45.1.1.2
R6(config)#ip route 0.0.0.0 0.0.0.0 46.1.1.2
R7(config)#ip route 0.0.0.0 0.0.0.0 47.1.1.2

此时R3可以ping通R5、R6、R7

②搭建MGRE:

配置中心站点:

R3(config)#int tunnel 0
R3(config-if)#ip add 172.16.0.1 255.255.255.248
R3(config-if)#tunnel source 34.1.1.1
R3(config-if)#tunnel mode gre multipoint
R3(config-if)#ip nhrp map multicast dynamic 
R3(config-if)#ip nhrp network-id 100

R5、R6、R7均同下配置:

R5(config)#int tunnel 0
R5(config-if)#ip add 172.16.0.2 255.255.255.248
R5(config-if)#tunnel source s0/0
R5(config-if)#tunnel mode gre multipoint 
R5(config-if)#ip nhrp nhs 172.16.0.1
R5(config-if)#ip nhrp map 172.16.0.1 34.1.1.1
R5(config-if)#ip nhrp network-id 100

此时MGRE就算搭建完成了。
在这里插入图片描述
考虑到后面我们会使用OSPF协议实现全网可达,此时只有R3开启了伪广播,R5-7都没有开启。

R5(config-if)#ip nhrp map multicast 34.1.1.1
R6(config-if)#ip nhrp map multicast 34.1.1.1
R7(config-if)#ip nhrp map multicast 34.1.1.1

此时还需要将R3、R5-7的工作方式改为点到多点,并关闭R3水平分割:

R3(config)#int tunnel 0
R3(config-if)#ip ospf network point-to-multipoint 

在这里插入图片描述

③路由宣告:

R1-R12进行宣告,这里以R12为例,其余不再演示。

R12(config)#router ospf 1
R12(config-router)#router-id 12.12.12.12
R12(config-router)#network 172.16.64.0 0.0.0.255 a 2

R12(config)#router eigrp 90
R12(config-router)#no auto-summary 
//注意不可以主类宣告,这里需要使用精确宣告
R12(config-router)#network 172.16.160.0 0.0.31.255

R9不用不用宣告area4中的网段,因为一会儿要使用多进程双向重发布解决不规则区域

④重发布EIGRP:
R12(config)#router ospf 1
R12(config-router)#redistribute eigrp 90 subnets
⑤解决不规则区域:

解决不规则区域最好的办法就是多进程重发布:
首先启动第二个OSPF的进程:

R9(config)#router ospf 2
R9(config-router)#network 172.16.128.0 0.0.0.255 area 4

接着我们将area4中的路由重发布到area3中,但并不把area3学到的路由重发布到area4中,这个我们一会儿把area3设置为完全NSSA区域后再说。

R9(config)#router ospf 1
R9(config-router)#redistribute ospf 2 subnets

之后R5便拥有了area4的路由:
在这里插入图片描述

⑥配置NAT:

R3、R5-7均按如下方法配置:

R3(config)#access-list 1 permit 172.16.0.0 0.0.255.255
R3(config)#ip nat inside source list 1 int s1/0 overload 
R3(config)#int s1/0
R3(config-if)#ip nat outside
R3(config-if)#int e0/0
R3(config-if)#ip nat inside

(3)优化:

①减少骨干的LSA更新量:

汇总域间路由:

R3(config)#router ospf 1
R3(config-router)#area 1 range 172.16.32.0 255.255.224.0

R6(config)#router ospf 1
R6(config-router)#area 2 range 172.16.64.0 255.255.224.0

R7(config)#router ospf 1
R7(config-router)#area 3 range 172.16.96.0 255.255.224.0

汇总域外路由:

R12(config)#router ospf 1
R12(config-router)#summary-address 172.16.160.0 255.255.224.0

R9(config)#router ospf 1
R9(config-router)#summary-address 172.16.128.0 255.255.224.0 

汇总之后它们的路由表应该只有3条O IA,2条O E2
在这里插入图片描述

②减少非骨干的LSA更新量:

Ⅰ、优化区域1为完全末梢区域:
这是没有把area1设置为完全末梢区域的数据库表:
在这里插入图片描述

R3(config)#router ospf 1
R3(config-router)#area 1 stub no-summary
R1(config-router)#area 1 stub 
R2(config-router)#area 1 stub

之后优化之后,3类只剩下一条缺省:
在这里插入图片描述
Ⅱ、将area2优化为完全NSSA:
这是优化前的数据库表:
在这里插入图片描述
优化之后,它应该会删除3、4、5类LSA,然后只保留一条3类缺省,并多出一条7类LSA:

R6(config)#router ospf 1
R6(config-router)#area 2 nssa no-summary

R11(config)#router ospf 1
R11(config-router)#area 2 nssa
R12(config-router)#area 2 nssa

在这里插入图片描述
Ⅲ、将area3也设置为完全NSSA区域:

R7(config)#router ospf 1
R7(config-router)#area 3 nssa no-summary

R8(config)#router ospf 1
R8(config-router)#area 3 nssa

R9(config)#router ospf 1
R9(config-router)#area 3 nssa

R8的路由表:
在这里插入图片描述
在这里插入图片描述
此时area 3被设置为了NSSA区域,R9拥有了缺省路由,那么我们就可以在R9上的OSPF的进程2中下放缺省,这样才可以出去。

R9(config)#router ospf 2
R9(config-router)#default-information originate

此时R10就会有缺省:
在这里插入图片描述
做到这里局域网全部可以通了,可以让R1、R10、R12去ping一下R4的环回,检测一下。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值