ospf 多区域实验

简介: ospf 多区域实验

第一步配置ip地址

[Huawei]sys ar1
[ar1]
[ar1]
<ar1>sys
Enter system view, return user view with Ctrl+Z.
[ar1]int g0/0/0
[ar1-GigabitEthernet0/0/0]ip ad 
[ar1-GigabitEthernet0/0/0]ip address 1.1.1.2 24
Mar  2 2020 14:10:05-08:00 ar1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
 on the interface GigabitEthernet0/0/0 has entered the UP state. 
[ar1-GigabitEthernet0/0/0]ip address 1.1.1.1 24
*************************************************************************************************
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys ar2
[ar2]
[ar2]int g0/0/0
[ar2-GigabitEthernet0/0/0]ip ad 
[ar2-GigabitEthernet0/0/0]ip address 1.1.1.2 24
[ar2-GigabitEthernet0/0/0]quit 
[ar2]int g0/0/1
[ar2-GigabitEthernet0/0/1]ip a  
[ar2-GigabitEthernet0/0/1]ip add  
[ar2-GigabitEthernet0/0/1]ip address 2.2.2.1 24
*************************************************************************************************
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys ar3
[ar3]
[ar3]int g0/0/0
[ar3-GigabitEthernet0/0/0]ip ad 
[ar3-GigabitEthernet0/0/0]ip address 2.2.2.2 24
Mar  2 2020 14:17:36-08:00 ar3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
 on the interface GigabitEthernet0/0/0 has entered the UP state. 
[ar3-GigabitEthernet0/0/0]quit
[ar3]int g0/0/1
[ar3-GigabitEthernet0/0/1]ip ad 
[ar3-GigabitEthernet0/0/1]ip address 3.3.3.1 24
[ar3-GigabitEthernet0/0/1]
Mar  2 2020 14:18:11-08:00 ar3 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
 on the interface GigabitEthernet0/0/1 has entered the UP state. 
*************************************************************************************************
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys ar4
<ar4>sys
Enter system view, return user view with Ctrl+Z.
[ar4]int g0/0/0
[ar4-GigabitEthernet0/0/0]ip ad 
[ar4-GigabitEthernet0/0/0]ip address 3.3.3.2 24
[ar4-GigabitEthernet0/0/0]qui 
[ar4-GigabitEthernet0/0/0]quit 
[ar4]int g0/0/1
[ar4-GigabitEthernet0/0/1]ip ad 
[ar4-GigabitEthernet0/0/1]ip address 4.4.4.1 24
Mar  2 2020 14:19:13-08:00 ar4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
 on the interface GigabitEthernet0/0/1 has entered the UP state. 
**************************************************************************************
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys ar5
<ar5>sys
Enter system view, return user view with Ctrl+Z.
[ar5]int  
[ar5]interface g  
[ar5]interface GigabitEthernet 0/0/0
[ar5-GigabitEthernet0/0/0]ip ad 
[ar5-GigabitEthernet0/0/0]ip address 4.4.4.2 24
Mar  2 2020 14:19:55-08:00 ar5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
 on the interface GigabitEthernet0/0/0 has entered the UP state. 
[ar5-GigabitEthernet0/0/0]qui 
[ar5-GigabitEthernet0/0/0]quit 
[ar5]int g  
[ar5]int GigabitEthernet 0/0/1
[ar5-GigabitEthernet0/0/1]ip ad 
[ar5-GigabitEthernet0/0/1]ip address 5.5.5.1 24
Mar  2 2020 14:41:40-08:00 ar5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
 on the interface GigabitEthernet0/0/1 has entered the UP state. 
[ar5-GigabitEthernet0/0/1]
*********************************************************************************************
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys ar8
[ar8]
  Please check whether system data has been changed, and save data in time
  Configuration console time out, please press any key to log on
<ar8>sys
Enter system view, return user view with Ctrl+Z.
[ar8]int  
[ar8]interface g  
[ar8]interface GigabitEthernet 0/0/0
[ar8-GigabitEthernet0/0/0]ip ad 
[ar8-GigabitEthernet0/0/0]ip address 5.5.5.2 24

第二步ospf协议配置

<ar1>sys
Enter system view, return user view with Ctrl+Z.
[ar1]ospf
[ar1-ospf-1]area 0
[ar1-ospf-1-area-0.0.0.0]net 1.1.1.0 0.0.0.255
[ar1-ospf-1-area-0.0.0.0]
上面配置错误 需要重新配置
使用undo 
[ar1-ospf-1-area-0.0.0.0]undo net 1.1.1.0 0.0.0.255
[ar1-ospf-1-area-0.0.0.0]quit
[ar1-ospf-1]undo area 0
[ar1-ospf-1]area 1
[ar1-ospf-1-area-0.0.0.1]
[ar1-ospf-1-area-0.0.0.1]net 1.1.1.0 0.0.0.255
**************************************************************************
<ar2>sys
Enter system view, return user view with Ctrl+Z.
[ar2]ospf
[ar2-ospf-1]area 1
[ar2-ospf-1-area-0.0.0.1]net 1.1.1.0 0.0.0.255
[ar2-ospf-1-area-0.0.0.1]area 0
[ar2-ospf-1-area-0.0.0.0]
[ar2-ospf-1-area-0.0.0.0]net 2.2.2.0 0.0.0.255
[ar2-ospf-1-area-0.0.0.0]
*******************************************************************************************
[ar3]ospf
[ar3-ospf-1]area 0
[ar3-ospf-1-area-0.0.0.0]net 2.0.0.0 0.0.0.255
[ar3-ospf-1-area-0.0.0.0]undo 2.0.0.0 0.0.0.255
                              ^
Error: Unrecognized command found at '^' position.
[ar3-ospf-1-area-0.0.0.0]undo net 2.0.0.0 0.0.0.25
[ar3-ospf-1-area-0.0.0.0]net 2.2.2.0 0.0.0.255
[ar3-ospf-1-area-0.0.0.0]net 3.3.3.0 0.0.0.255
*************************************************************************************************
<ar4>sys
Enter system view, return user view with Ctrl+Z.
[ar4]ospf
[ar4-ospf-1]area 0
[ar4-ospf-1-area-0.0.0.0]net 3.3.3.0 0.0.0.255
[ar4-ospf-1-area-0.0.0.0]area 2
[ar4-ospf-1-area-0.0.0.2]
[ar4-ospf-1-area-0.0.0.2]net 4.4.4.0 0.0.0.255
[ar4-ospf-1-area-0.0.0.2]
***********************************************************************************
<ar5>sys
Enter system view, return user view with Ctrl+Z.
[ar5]ospf
[ar5-ospf-1]area 2
[ar5-ospf-1-area-0.0.0.2]net 4.4.4.0 0.0.0.255
[ar5-ospf-1-area-0.0.0.2]
[ar5-ospf-1-area-0.0.0.2]area 3
[ar5-ospf-1-area-0.0.0.3]net 5.5.5.0 0.0.0.255
[ar5-ospf-1-area-0.0.0.3]
***************************************************************************************
<ar8>sys
Enter system view, return user view with Ctrl+Z.
[ar8]ospf 
[ar8-ospf-1]area 3
[ar8-ospf-1-area-0.0.0.3]net 5.5.5.0 0.0.0.255
[ar8-ospf-1-area-0.0.0.3]
*************************************************************************************
[ar1]dis ospf
              ^
Error:Incomplete command found at '^' position.
[ar1]dis ospf routing
   OSPF Process 1 with Router ID 1.1.1.1
      Routing Tables 
 Routing for Network 
 Destination        Cost  Type       NextHop         AdvRouter       Area
 1.1.1.0/24         1     Transit    1.1.1.1         1.1.1.1         0.0.0.1
 2.2.2.0/24         2     Inter-area 1.1.1.2         1.1.1.2         0.0.0.1
 3.3.3.0/24         3     Inter-area 1.1.1.2         1.1.1.2         0.0.0.1
 4.4.4.0/24         4     Inter-area 1.1.1.2         1.1.1.2         0.0.0.1
 Total Nets: 4  
 Intra Area: 1  Inter Area: 3  ASE: 0  NSSA: 0 
*************************************************************************************************************************************
[ar5-ospf-1]dis ospf pee  
[ar5-ospf-1]dis ospf peer 
   OSPF Process 1 with Router ID 4.4.4.2
     Neighbors 
 Area 0.0.0.2 interface 4.4.4.2(GigabitEthernet0/0/0)'s neighbors
 Router ID: 4.4.4.1          Address: 4.4.4.1         
   State: Full  Mode:Nbr is  Slave  Priority: 1
   DR: 4.4.4.1  BDR: 4.4.4.2  MTU: 0    
   Dead timer due in 35  sec 
   Retrans timer interval: 5 
   Neighbor is up for 00:05:28     
   Authentication Sequence: [ 0 ] 
     Neighbors 
 Area 0.0.0.3 interface 5.5.5.1(GigabitEthernet0/0/1)'s neighbors
 Router ID: 5.5.5.2          Address: 5.5.5.2         
   State: Full  Mode:Nbr is  Master  Priority: 1
   DR: 5.5.5.1  BDR: 5.5.5.2  MTU: 0    
   Dead timer due in 40  sec 
   Retrans timer interval: 5 
   Neighbor is up for 00:03:03     
   Authentication Sequence: [ 0 ] 
<ar4>dis ospf p 
<ar4>dis ospf peer 
   OSPF Process 1 with Router ID 4.4.4.1
     Neighbors 
 Area 0.0.0.0 interface 3.3.3.2(GigabitEthernet0/0/0)'s neighbors
 Router ID: 2.2.2.2          Address: 3.3.3.1         
   State: Full  Mode:Nbr is  Slave  Priority: 1
   DR: 3.3.3.1  BDR: 3.3.3.2  MTU: 0    
   Dead timer due in 40  sec 
   Retrans timer interval: 5 
   Neighbor is up for 00:07:39     
   Authentication Sequence: [ 0 ] 
     Neighbors 
 Area 0.0.0.2 interface 4.4.4.1(GigabitEthernet0/0/1)'s neighbors
 Router ID: 4.4.4.2          Address: 4.4.4.2         
   State: Full  Mode:Nbr is  Master  Priority: 1
   DR: 4.4.4.1  BDR: 4.4.4.2  MTU: 0    
   Dead timer due in 27  sec 
   Retrans timer interval: 5 
   Neighbor is up for 00:06:10     
   Authentication Sequence: [ 0 ] 
建立虚连接
[ar4]ospf
[ar4-ospf-1]area 2
[ar4-ospf-1-area-0.0.0.2]vl 
[ar4-ospf-1-area-0.0.0.2]vlink-peer 4.4.4.2
[ar4-ospf-1-area-0.0.0.2]
[ar5-ospf-1]area 2
[ar5-ospf-1-area-0.0.0.2]vl 
[ar5-ospf-1-area-0.0.0.2]vlink-peer 3.3.3.2
[ar5-ospf-1-area-0.0.0.2]

查看ospf的数据库

目录
相关文章
|
10月前
|
人工智能 安全 Devops
别错过,Clawdbot(Moltbot、OpenClaw)爆火之后,我找到啦 700+ 的技能包~~~
小华同学专注AI工具与高效工作,每日分享开源技术与实战技巧。推荐「awesome-openclaw-skills」:GitHub上由VoltAgent维护的OpenClaw技能精选清单,收录700+社区构建技能,覆盖开发、AI、办公、生活等10+场景,支持CLI一键安装,助你快速扩展智能体能力。(239字)
1151 1
|
NoSQL Go Redis
用 Go + Redis 实现分布式锁
用 Go + Redis 实现分布式锁
|
机器学习/深度学习 传感器 自然语言处理
R语言KERAS用RNN、双向RNNS递归神经网络、LSTM分析预测温度时间序列、 IMDB电影评分情感
R语言KERAS用RNN、双向RNNS递归神经网络、LSTM分析预测温度时间序列、 IMDB电影评分情感
|
Shell Android开发
Android 10.0 launcher启动流程(下)
Android 10.0 launcher启动流程(下)
Android 10.0 launcher启动流程(下)
|
存储 Dart 监控
Flutter(二)之有状态的StatefulWidget
在开发中,某些Widget情况下我们展示的数据并不是一层不变的: 比如Flutter默认程序中的计数器案例,点击了+号按钮后,显示的数字需要+1; 比如在开发中,我们会进行下拉刷新、上拉加载更多,这时数据也会发生变化; 而StatelessWidget通常用来展示哪些数据固定不变的,如果数据会发生改变,我们使用StatefulWidget;
585 1
Flutter(二)之有状态的StatefulWidget
|
SQL 前端开发 关系型数据库
MySQL「 Every derived table must have its own alias」错误修复方法
在写带有子查询或者在查询时产生临时表的查询时,可能会出现这个错误: ERROR 1248 (42000): Every derived table must have its own alias意思是「每一个派生出来的表都必须给它命名一个自己的别名」
3248 0
|
网络协议 程序员 测试技术
Go 接口应用场景的说明 | 学习笔记
快速学习 Go 接口应用场景的说明
Go 接口应用场景的说明 | 学习笔记
|
存储 弹性计算 运维
征文投稿丨使用云服务器ECS快速搭建halo博客
步骤详细,可操作性强;征文投稿;玩转ECS;halo博客。
征文投稿丨使用云服务器ECS快速搭建halo博客
|
1天前
|
监控 网络协议 算法
2026年起SSL证书有效期逐年缩短:企业如何避免“续期风暴”!
SSL证书有效期将从2026年起分三阶段逐步缩短至47天,人工续期难以为继。阿里云“WoSign SSL证书+自动化服务”,支持域名监控、自动托管、云产品/服务器一键部署及智能提醒,助力企业高效应对高频续期挑战。
8058 2