当前位置: 首页 > news >正文

【华为路由】OSPF多区域配置

网络拓扑

设备接口地址

设备

端口

IP地址

RTA

Loopback 0

1.1.1.1/32

G0/0/0

10.1.1.1/24

RTB

Loopback 0

2.2.2.2/32

G0/0/0

10.1.1.2/24

G0/0/1

10.1.2.1/24

RTC

Loopback 0

3.3.3.3/32

G0/0/0

10.1.2.2/24

G0/0/1

10.1.3.1/24

RTD

Loopback 0

4.4.4.4/32

G0/0/0

10.1.3.2/24

配置过程

1.基本配置

RTA

<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname RTA
[RTA]interface LoopBack 0
[RTA-LoopBack0]ip address 1.1.1.1 32
[RTA-LoopBack0]quit 
[RTA]interface GigabitEthernet 0/0/0
[RTA-GigabitEthernet0/0/0]ip address 10.1.1.1 24
[RTA-GigabitEthernet0/0/0]quit 
[RTA]

 RTB

<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname RTB
[RTB]interface LoopBack 0
[RTB-LoopBack0]ip address 2.2.2.2 32
[RTB-LoopBack0]quit 
[RTB]interface GigabitEthernet 0/0/0
[RTB-GigabitEthernet0/0/0]ip address 10.1.1.2 24
[RTB-GigabitEthernet0/0/0]quit 
[RTB]interface GigabitEthernet 0/0/1
[RTB-GigabitEthernet0/0/1]ip address 10.1.2.1 24	
[RTB-GigabitEthernet0/0/1]quit 
[RTB]

 RTC

<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname RTC
[RTC]interface LoopBack 0
[RTC-LoopBack0]ip address 3.3.3.3 32
[RTC-LoopBack0]quit 
[RTC]interface GigabitEthernet 0/0/0
[RTC-GigabitEthernet0/0/0]ip address 10.1.2.2 24
[RTC-GigabitEthernet0/0/0]quit 
[RTC]interface GigabitEthernet 0/0/1
[RTC-GigabitEthernet0/0/1]ip address 10.1.3.1 24
[RTC-GigabitEthernet0/0/1]quit 
[RTC]

RTD

<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname RTD
[RTD]interface LoopBack 0
[RTD-LoopBack0]ip address 4.4.4.4 32
[RTD-LoopBack0]quit 
[RTD]interface GigabitEthernet 0/0/0
[RTD-GigabitEthernet0/0/0]ip address 10.1.3.2 24
[RTD-GigabitEthernet0/0/0]quit 
[RTD]

2.OSPF配置

 RTA

[RTA]router id 1.1.1.1
[RTA]ospf 1
[RTA-ospf-1]area 1
[RTA-ospf-1-area-0.0.0.1]network 1.1.1.1 0.0.0.0
[RTA-ospf-1-area-0.0.0.1]network 10.1.1.0 0.0.0.255
[RTA-ospf-1-area-0.0.0.1]return
<RTA>saveThe current configuration will be written to the device. Are you sure to continue? (y/n)[n]:yIt will take several minutes to save configuration file, please wait.......Configuration file had been saved successfullyNote: The configuration file will take effect after being activated
<RTA>

RTB

[RTB]router id 2.2.2.2
[RTB]ospf 1
[RTB-ospf-1]area 0
[RTB-ospf-1-area-0.0.0.0]network 10.1.2.0 0.0.0.255
[RTB-ospf-1-area-0.0.0.0]quit
[RTB-ospf-1]area 1
[RTB-ospf-1-area-0.0.0.1]network 2.2.2.2 0.0.0.0
[RTB-ospf-1-area-0.0.0.1]network 10.1.1.0 0.0.0.255
[RTB-ospf-1-area-0.0.0.1]return
<RTB>saveThe current configuration will be written to the device. Are you sure to continue? (y/n)[n]:yIt will take several minutes to save configuration file, please wait.......Configuration file had been saved successfullyNote: The configuration file will take effect after being activated
<RTB>

 RTC

[RTC]router id 3.3.3.3
[RTC]ospf 1
[RTC-ospf-1]area 0
[RTC-ospf-1-area-0.0.0.0]network 10.1.2.0 0.0.0.255
[RTC-ospf-1-area-0.0.0.0]quit 
[RTC-ospf-1]area 2
[RTC-ospf-1-area-0.0.0.2]network 3.3.3.3 0.0.0.0
[RTC-ospf-1-area-0.0.0.2]network 10.1.3.0 0.0.0.255
[RTC-ospf-1-area-0.0.0.2]return
<RTC>saveThe current configuration will be written to the device. Are you sure to continue? (y/n)[n]:yIt will take several minutes to save configuration file, please wait.......Configuration file had been saved successfullyNote: The configuration file will take effect after being activated
<RTC>

RTD

[RTD]router id 4.4.4.4
[RTD]ospf 1
[RTD-ospf-1]area 2
[RTD-ospf-1-area-0.0.0.2]network 4.4.4.4 0.0.0.0
[RTD-ospf-1-area-0.0.0.2]network 10.1.3.0 0.0.0.255
[RTD-ospf-1-area-0.0.0.2]return
<RTD>
<RTD>saveThe current configuration will be written to the device. Are you sure to continue? (y/n)[n]:yIt will take several minutes to save configuration file, please wait.......Configuration file had been saved successfullyNote: The configuration file will take effect after being activated
<RTD>

 结果验证


http://www.mrgr.cn/news/56491.html

相关文章:

  • uploads-labs靶场刷题记录
  • element-ui 的el-calendar日历组件样式修改
  • pymobiledevice3使用介绍(安装、常用命令、访问iOS沙盒目录)
  • MySQL 密码忘记了怎么办?
  • Java爬虫:API数据界的“宝藏猎人”
  • 第十八课:Python学习之多态
  • c++日常积累
  • Recall/Coarse Ranking/Fine Ranking
  • Kafka之消费者组与消费者
  • uniapp项目结构基本了解
  • 基于图像拼接开题报告
  • Springboot启动过程详解
  • MySQL实现主从同步
  • jmeter学习(6)逻辑控制器
  • U盘数据丢失不用慌,这4个工具可以帮你恢复。
  • sqlserver小练习
  • 基于Multisim三极管B放大系数放大倍数测量电路设计(含仿真和报告)
  • 手机功耗技术领域
  • Java 实现协同过滤算法推荐算法
  • ecmascript标准
  • Python|基于Kimi大模型,实现上传文档并进行“多轮”对话(7)
  • 【C++刷题】力扣-#350-两个数组的交集II
  • 【校园小情书微信小程序源码】
  • 运用AI实践|如何从AI工具提升工作效率实践
  • 前端算法:字典and哈希表(力扣1题、349题解法)
  • AUTOSAR_EXP_ARAComAPI的6章笔记(2)