当前位置: 首页 > 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.lryc.cn/news/469536.html

相关文章:

  • 【C++初阶】一文讲通C++内存管理
  • Vue学习笔记(九、简易计算器)
  • Maven 不同环境灵活构建
  • 第三十篇:TCP连接断开过程,从底层说明白,TCP系列五
  • 代码随想录算法训练营第七天| 哈希表理论基础 454.四数相加II 383.赎金信 15.三数之和 18.四数之和
  • 搜维尔科技:Manus新品发布Metagloves Pro专业版,专为高精度需求的客户打造,尤其是人形机器人产业与人机工效研究使用
  • Spring Boot实现的动态化酒店住宿管理系统
  • 数字IC后端实现Innovus |给各种IP子模块添加port buffer和antenna diode万能脚本
  • 反向代理服务器---NGINX
  • unity3d————场景管理类SceneManager
  • 鹅厂面试官:Transformer 为何需要位置编码?
  • MySQL数据库学习指南
  • 算法刷题-小猫爬山
  • Maven项目管理工具-初始+环境配置
  • 【JavaEE初阶】网络编程TCP协议实现回显服务器以及如何处理多个客户端的响应
  • Android 中的串口开发
  • TensorRt OP
  • 构建负责任的人工智能:数据伦理与隐私保护
  • 微信小程序live-pusher和video同时使用,video播放声音时时大时小
  • MySQL 分库分表实战
  • MySQL—CRUD—进阶—(二) (ಥ_ಥ)
  • 时序分解 | TTNRBO-VMD改进牛顿-拉夫逊算法优化变分模态分解
  • 2024“源鲁杯“高校网络安全技能大赛-Misc-WP
  • CSS行块标签的显示方式
  • Go 语言中的 for range 循环教程
  • 青训营 X 豆包MarsCode 技术训练营--小M的比赛胜场计算
  • 海王3纯源码
  • 【ShuQiHere】Linux 系统中的硬盘管理详解:命令与技巧
  • 数据结构之堆和二叉树的简介
  • 微信小程序上传图片添加水印