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

【华为路由】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>save
  The current configuration will be written to the device. 
  Are you sure to continue? (y/n)[n]:y
  It will take several minutes to save configuration file, please wait.......
  Configuration file had been saved successfully
  Note: 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>save
  The current configuration will be written to the device. 
  Are you sure to continue? (y/n)[n]:y
  It will take several minutes to save configuration file, please wait.......
  Configuration file had been saved successfully
  Note: 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>save
  The current configuration will be written to the device. 
  Are you sure to continue? (y/n)[n]:y
  It will take several minutes to save configuration file, please wait.......
  Configuration file had been saved successfully
  Note: 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>save
  The current configuration will be written to the device. 
  Are you sure to continue? (y/n)[n]:y
  It will take several minutes to save configuration file, please wait.......
  Configuration file had been saved successfully
  Note: The configuration file will take effect after being activated
<RTD>

 结果验证


http://www.kler.cn/news/365589.html

相关文章:

  • 【Linux系统编程】冯诺依曼体系结构与操作系统
  • 隨筆 20241025 Kafka数据一致性的韭菜比喻
  • 24.redis高性能
  • 2024年10月24日第一部分AOP编程和自信
  • 基于springboot企业微信SCRM管理系统源码带本地搭建教程
  • 网站建设中需要注意哪些安全问题?----雷池社区版
  • LINUX1.2
  • 主机电子邮件访问:实现高效通信的关键
  • Node.js 23 发布了!不再支持 32 位 windows 系统
  • Ceph入门到精通-Osd db扩容
  • 【赵渝强老师】Hive的内部表与外部表
  • C语言运算符——[]下标运算符
  • 【开源免费】基于SpringBoot+Vue.JS在线视频教育平台(JAVA毕业设计)
  • 离offer更进一步的JVM详细面试题(含答案)
  • ⭐ Unity 序列帧播放脚本
  • NVIDIA发布Nemotron-70B-Instruct,超越GPT-4o和Claude 3.5的AI模型
  • 提示词高级阶段学习day3.2结构化 Prompt 的优势
  • 什么是3D展厅?有哪些应用场景?
  • 0160____declspec(noreturn)的用法
  • vue3中watch的用法以及使用场景以及与watchEffect的使用对比
  • 数据清洗-总结
  • 如何从iconfont中获取字体图标并应用到微信小程序中去?
  • 【个人记录】新电脑的配置截图和电源选项的修改
  • Python爬虫:从入门到精通
  • 微信小程序中关闭默认的 `navigationBar`,并使用自定义的 `nav-bar` 组件
  • 文案语音图片视频管理分析系统-视频矩阵