OSPF

如图所示,配置设备名称和IP地址

a) 设备Ra与设备Rb之间的互联地址按照192.168.ab.a/24和192.168.ab.b/24的方式规划(a<B)
R3与R4互联地址为192.168.34.3/24和192.168.34.4/24,以此类推。

a) 每台设备都有环回口Loopback0,设备Ra的地址为a.a.a.a/32
R1就有Lo0:1.1.1.1/32

在所有路由器上运行OSPF,满足以下需求:

a) OSPF进程号为1,RID手动设置为Lo0地址。

b) 如图所示划分OSPF区域,network命令使用接口配置掩码的反掩码。

c) ABR的环回口宣告到区域0中。

d) R2 R3 R4的邻居关系中,设置R3为DR,并且R2与R4保持2way状态。

e) 区域1中使用区域md5验证,key-id为1,口令为“spoto”(不含引号),且使用display命令可以查看到口令。

f) R4与R5使用接口明文验证,口令为“huawei”(不含引号),且使用display命令无法查看到明文口令。

 AR1配置

复制代码
interface GigabitEthernet0/0/0
 ip address 192.168.12.1 255.255.255.0 
#
interface GigabitEthernet0/0/1
 ip address 192.168.1.254 255.255.255.0 
interface LoopBack0
 ip address 1.1.1.1 255.255.255.255
ospf 1 router-id 1.1.1.1 
 area 0.0.0.1 
  authentication-mode md5 1 plain spoto
  network 1.1.1.1 0.0.0.0 
  network 192.168.1.0 0.0.0.255 
  network 192.168.12.0 0.0.0.255 
复制代码

AR2配置

复制代码
interface GigabitEthernet0/0/0
 ip address 192.168.12.2 255.255.255.0 
#
interface GigabitEthernet0/0/1
 ip address 192.168.234.2 255.255.255.0 
 ospf dr-priority 0
interface LoopBack0
 ip address 2.2.2.2 255.255.255.255 
ospf 1 router-id 2.2.2.2 
 area 0.0.0.0 
  network 2.2.2.2 0.0.0.0 
  network 192.168.234.0 0.0.0.255 
 area 0.0.0.1 
  authentication-mode md5 1 plain spoto
  network 192.168.12.0 0.0.0.255 
复制代码

AR3配置

复制代码
interface GigabitEthernet0/0/1
 ip address 192.168.234.3 255.255.255.0 
 ospf dr-priority 255
#
interface LoopBack0
 ip address 3.3.3.3 255.255.255.255 
#
ospf 1 router-id 3.3.3.3 
 area 0.0.0.0 
  network 3.3.3.3 0.0.0.0 
  network 192.168.234.0 0.0.0.255 
#
复制代码

AR4配置

复制代码
interface GigabitEthernet0/0/0
 ip address 192.168.45.4 255.255.255.0 
 ospf authentication-mode simple cipher %$%$e^=4:4(0R!|Gy]#0nn8*I$OZ%$%$ 
#
interface GigabitEthernet0/0/1
 ip address 192.168.234.4 255.255.255.0 
 ospf dr-priority 0
interface LoopBack0
 ip address 4.4.4.4 255.255.255.255 
#
ospf 1 router-id 4.4.4.4 
 area 0.0.0.0 
  network 4.4.4.4 0.0.0.0 
  network 192.168.234.0 0.0.0.255 
 area 0.0.0.2 
  network 192.168.45.0 0.0.0.255 
#
复制代码

AR5配置

复制代码
interface GigabitEthernet0/0/0
 ip address 192.168.45.5 255.255.255.0 
 ospf authentication-mode simple cipher %$%$:o^>/SxTf2(Rv\1DD<:EI${y%$%$ 
#
interface GigabitEthernet0/0/1
 ip address 192.168.2.254 255.255.255.0 
#
interface LoopBack0
 ip address 5.5.5.5 255.255.255.0 
#
ospf 1 router-id 5.5.5.5 
 area 0.0.0.2 
  network 5.5.5.5 0.0.0.0 
  network 192.168.2.0 0.0.0.255 
  network 192.168.45.0 0.0.0.255 
#
复制代码

测试

 

 

 

 

 

posted @   星火撩原  阅读(300)  评论(0编辑  收藏  举报
编辑推荐:
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
点击右上角即可分享
微信分享提示