MGER-OSPF的LSA-OSPF的优化 综合实验报告

该文详细描述了构建OSPF网络的步骤,包括地址规划,拓扑设计,IP地址配置,MGRE环境的建立,OSPF的配置,加速收敛策略,区域汇总以及NAT和安全认证的设置。文章提供了具体路由器配置示例,旨在实现高效且安全的网络通信。
摘要由CSDN通过智能技术生成

目录

题目:​编辑

步骤一:拓扑设计,地址规划

地址规划:

拓扑设计: 

​编辑

步骤三:配置IP地址

步骤四:构建 MGRE环境

设置中心站点(R3上进行配置)

配置分支站点(R5 R6 R7):

步骤五:配置OSPF

MGER环境下使用OSPF后续补充配置命令(三种)

步骤六:加快收敛

步骤七:给R9 R12做双向重发布

步骤八:区域汇总

区域汇总:

做特殊区域减少LSA更新量:

步骤九:给MGRE环境配置NAT

步骤十:保证更新安全(认证)


题目:

步骤一:拓扑设计,地址规划

地址规划:

有题意知:整个OSPF环境基于172.16.0.0/16划分。则据提意划分出子网掩码长度为20的,十六个网段,如下:

一开始先根据协议不同进行第一次子网划分
172.16.0.0/17      OSPF
172.16.128.0/17    RIP
OSPF内按区域划分子网:
172.16.0.0/20   area0
172.16.16.0/20  area1
172.16.32.0/20  area2
172.16.48.0/20  area3
172.16.64.0/20  area4
保留:
172.16.80.0/20
172.16.96.0/20
172.16.112.0/20

        area0 
                172.16.0.0 24
                172.16.1.0 24
                172.16.2.0 24
                172.16.3.0 24
                ......
                172.16.15.0 24
        area1

                172.16.16.0 24
                172.16.17.0 24
                172.16.18.0 24
        area2
                172.16.32.0 24
                172.16.33.0 24
                以此类推

拓扑设计: 

步骤三:配置IP地址

# R1
interface GigabitEthernet0/0/0
 ip address 172.16.16.1 255.255.255.248 
interface LoopBack0
 ip address 172.16.17.1 255.255.255.0 

# R2
interface GigabitEthernet0/0/0
 ip address 172.16.16.2 255.255.255.248 
interface LoopBack0
 ip address 172.16.18.1 255.255.255.0 

# R3
interface Serial4/0/0
 ip address 34.0.0.1 255.255.255.0 
interface GigabitEthernet0/0/0
 ip address 172.16.16.3 255.255.255.248 
interface LoopBack0
 ip address 172.16.19.1 255.255.255.0 

# R4(ISP)
interface Serial3/0/0
 ip address 46.0.0.2 255.255.255.0 
interface Serial4/0/0
 ip address 34.0.0.2 255.255.255.0 
interface Serial4/0/1
 ip address 45.0.0.2 255.255.255.0 
interface GigabitEthernet0/0/0
 ip address 47.0.0.2 255.255.255.0 
interface LoopBack0
 ip address 4.4.4.4 255.255.255.0 

# R5
interface Serial4/0/0
 ip address 45.0.0.1 255.255.255.0 
interface LoopBack0
 ip address 172.16.1.1 255.255.255.0 

# R6
interface Serial4/0/0
 ip address 46.0.0.1 255.255.255.0 
interface GigabitEthernet0/0/0
 ip address 172.16.32.1 255.255.255.252 
interface LoopBack0
 ip address 172.16.2.1 255.255.255.0 

# R7 
interface GigabitEthernet0/0/0
 ip address 47.0.0.1 255.255.255.0 
interface GigabitEthernet0/0/1
 ip address 172.16.48.1 255.255.255.252 
interface LoopBack0
 ip address 172.16.3.1 255.255.255.0

# R8
interface GigabitEthernet0/0/0
 ip address 172.16.48.2 255.255.255.252 
interface GigabitEthernet0/0/1
 ip address 172.16.48.5 255.255.255.252 
interface LoopBack0
 ip address 172.16.49.1 255.255.255.0 

# R9
interface GigabitEthernet0/0/0
 ip address 172.16.48.6 255.255.255.252 
interface GigabitEthernet0/0/1
 ip address 172.16.64.1 255.255.255.252 
interface LoopBack0
 ip address 172.16.65.1 255.255.255.0 

# R10
interface GigabitEthernet0/0/0
 ip address 172.16.64.2 255.255.255.252 
interface LoopBack0
 ip address 172.16.66.1 255.255.255.0 

# R11
interface GigabitEthernet0/0/0
 ip address 172.16.32.2 255.255.255.252 
#interface GigabitEthernet0/0/1
 ip address 172.16.32.5 255.255.255.252 
interface LoopBack0
 ip address 172.16.33.1 255.255.255.0 

# R12
interface GigabitEthernet0/0/0
 ip address 172.16.32.6 255.255.255.252 
interface LoopBack0
 ip address 172.16.128.1 255.255.192.0 
interface LoopBack1
 ip address 172.16.192.1 255.255.192.0 

步骤四:构建 MGRE环境

设置中心站点(R3上进行配置)

查看注册情况:display nhrp peer all

interface Tunnel0/0/0
 ip address 172.16.0.1 255.255.255.0 
 tunnel-protocol gre p2mp
 source 34.0.0.1
 nhrp entry multicast dynamic
#
ip route-static 0.0.0.0 0.0.0.0 34.0.0.2

配置分支站点(R5 R6 R7):

R5

interface Tunnel0/0/0
 ip address 172.16.0.2 255.255.255.0 
 tunnel-protocol gre p2mp
 source Serial4/0/0
 nhrp entry 172.16.0.1 34.0.0.1 register
#
ip route-static 0.0.0.0 0.0.0.0 45.0.0.2

R6

interface Tunnel0/0/0
 ip address 172.16.0.3 255.255.255.0 
 tunnel-protocol gre p2mp
 source Serial4/0/0
 nhrp entry 172.16.0.1 34.0.0.1 register
#
ip route-static 0.0.0.0 0.0.0.0 46.0.0.2

R7

interface Tunnel0/0/0
 ip address 172.16.0.4 255.255.255.0 
 tunnel-protocol gre p2mp
 source GigabitEthernet0/0/0
 nhrp entry 172.16.0.1 34.0.0.1 register
#
ip route-static 0.0.0.0 0.0.0.0 47.0.0.2

步骤五:配置OSPF

配置完成后用   display ospf peer brief 随时查看配置状态

使用display  ospf routing 查看路由

R1

ospf 1 router-id 1.1.1.1 
 area 0.0.0.1 
  network 172.16.16.1 0.0.0.0 
  network 172.16.17.1 0.0.0.0 

R2

ospf 1 router-id 2.2.2.2 
 area 0.0.0.1 
  network 172.16.16.2 0.0.0.0 
  network 172.16.18.1 0.0.0.0 

R3

 ospf 1 router-id 3.3.3.3 
 area 0.0.0.0 
 network 172.16.0.1 0.0.0.0
 area 0.0.0.1 
  network 172.16.16.3 0.0.0.0 
  network 172.16.19.1 0.0.0.0 

R5

ospf 1 router-id 5.5.5.5 
 area 0.0.0.0 
  network 172.16.0.2 0.0.0.0 
  network 172.16.1.1 0.0.0.0 

R6

ospf 1 router-id 6.6.6.6 
 area 0.0.0.0 
  network 172.16.0.3 0.0.0.0 
  network 172.16.2.1 0.0.0.0 
 area 0.0.0.2 
  network 172.16.32.1 0.0.0.0 

R7

ospf 1 router-id 7.7.7.7 
 area 0.0.0.0 
  network 172.16.0.4 0.0.0.0
  network 172.16.3.1 0.0.0.0 
 area 0.0.0.3 
  network 172.16.48.1 0.0.0.0      

R8

ospf 1 router-id 8.8.8.8 
 area 0.0.0.3 
  network 172.16.48.2 0.0.0.0 
  network 172.16.48.5 0.0.0.0 
  network 172.16.49.1 0.0.0.0 

R9

ospf 1 router-id 9.9.9.9 
 area 0.0.0.3 
  network 172.16.48.6 0.0.0.0 
#
ospf 2 
 area 0.0.0.4 
  network 172.16.64.1 0.0.0.0 
  network 172.16.65.1 0.0.0.0 
[R9-ospf-2]default-route-advertise always 

R10

ospf 2 
 area 0.0.0.4 
  network 172.16.64.2 0.0.0.0 
  network 172.16.66.1 0.0.0.0 

R11

ospf 1 router-id 11.11.11.11 
 area 0.0.0.2 
  network 172.16.32.2 0.0.0.0 
  network 172.16.32.5 0.0.0.0 
  network 172.16.33.1 0.0.0.0 

R12

ospf 1 router-id 12.12.12.12 
 area 0.0.0.2 
  network 172.16.32.6 0.0.0.0 
#
rip 1
 version 2
 network 172.16.0.0

MGER环境下使用OSPF后续补充配置命令(三种)

1.修改接口网络类型:   进入对应接口(隧道接口)后  ospf network-type ~类型~

        若类型修改为p2mp则不需要进行一下俩个步骤,若修改为broadcast 则需要进行一下俩个步骤

            2.打开伪广播  :进入对应接口(中心站点隧道)后   nhrp entry multicast dynamic

            3.强制规定DR: 更改一些接口优先级,以达让某些路由器接口不参与选举

                                        进入对应接口(隧道接口)后    ospf  dr-priority 0

步骤六:加快收敛

修改hello时间:每个使用OSPF协议的路由器接口均需要修改:ospf timer hello  5

步骤七:给R9 R12做双向重发布

R9

ospf 1 router-id 9.9.9.9 
 import-route ospf 2
#
ospf 2 
 import-route ospf 1

R12

ospf 1 router-id 12.12.12.12 
 import-route rip 1
#
rip 1
 import-route ospf 1

步骤八:区域汇总

区域汇总:

#    R3
[R3-ospf-1-area-0.0.0.1]abr-summary 172.16.16.0 255.255.240.0
#    R9
[R9-ospf-1]asbr-summary 172.16.64.0 255.255.240.0
#    R12
[R12-ospf-1]asbr-summary 172.16.128.0 255.255.128.0

做特殊区域减少LSA更新量:

area3 area2 做完全NSSA,给area1 做完全STUD区域。

命令名为进入area3 area2内的所有路由器OSPF协议对于区域界面,在ASBR上输入nssa no-summary。其于输入nssa

命令名为进入area1 内的所有路由器OSPF协议对于区域界面,在ASBR上输入stub no-summary 

其于输入stub

步骤九:给MGRE环境配置NAT

给R3 R5 R6 R7配置 

acl 2000
rule 1 permit source any 
int g 0/0/1  或者 int s 4/0/0(具体看接口)
nat outbound 2000

步骤十:保证更新安全(认证)

给每个路由器配置:authentication-mode md5  1 cipher 123456

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

爱玩网络的小石

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

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

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

打赏作者

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

抵扣说明:

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

余额充值