当前位置:网站首页>OSPF多区域配置
OSPF多区域配置
2022-07-06 12:42:00 【51CTO】
OSPF多区域配置
参照图1搭建网络环境,网络中的路由器按照图中的拓扑连接,按照规划的网段并配置接口IP地址。一定要确保直连的路由器能够相互ping通。以下操作配置这些路由器使用OSPF协议构造路由表,将这些路由器配置在一个区域,如果只有一个区域,只能是主干区域,区域编号是0.0.0.0,也可以写成0。
图1多区域OSPF网络拓扑
路由器R1上的配置,R1是骨干区域路由器。
<R1>display router id
RouterID:40.0.0.1 --查看路由器的当前ID
<R1>system
[R1]ospf 1 router-id 1.1.1.1 --启用ospf 1进程并指明使用的Router-ID
[R1-ospf-1]area 0.0.0.0 --创建区域并进入区域 0.0.0.0
[R1-ospf-1-area-0.0.0.0]network 40.0.0.0 0.0.255.255 --指定工作在Area 0的地址接口
[R1-ospf-1-area-0.0.0.0]quit
路由器R2上的配置,R2是区域边界路由器,要指定工作在Area 0的接口和Area 1的接口。
[R2]ospf 1 router-id 2.2.2.2
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]network 40.0.0.0 0.0.255.255 --指定工作在Area 0的接口
[R2-ospf-1-area-0.0.0.0]quit
[R2-ospf-1]area 0.0.0.1
[R2-ospf-1-area-0.0.0.1]network 40.1.0.0 0.0.255.255 --指定工作在Area 1的接口
[R2-ospf-1-area-0.0.0.1]quit
[R2-ospf-1]display this --显示OSPF 1的配置
[V200R003C00]
#
ospf 1 router-id 2.2.2.2
area 0.0.0.0
network 40.0.0.0 0.0.255.255
area 0.0.0.1
network 40.1.0.0 0.0.255.255
#
return
路由器R3上的配置。
[R3]ospf 1 router-id 3.3.3.3
[R3-ospf-1]area 0.0.0.0
[R3-ospf-1-area-0.0.0.0]network 40.0.0.0 0.0.255.255
[R3-ospf-1-area-0.0.0.0]quit
[R3-ospf-1]area 0.0.0.2
[R3-ospf-1-area-0.0.0.2]network 40.2.0.1 0.0.0.0 --写接口地址,wildcard-mask为0.0.0.0
[R3-ospf-1-area-0.0.0.2]network 40.2.1.1 0.0.0.0 --写接口地址,wildcard-mask为0.0.0.0
[R3-ospf-1-area-0.0.0.2]quit
路由器R4上的配置。
[R4]ospf 1 router-id 4.4.4.4
[R4-ospf-1]area 1
[R4-ospf-1-area-0.0.0.1]net
[R4-ospf-1-area-0.0.0.1]network 40.1.0.0 0.0.255.255
[R4-ospf-1-area-0.0.0.1]quit
路由器R5上的配置。
[R5]ospf 1 router-id 5.5.5.5
[R5-ospf-1]area 1
[R5-ospf-1-area-0.0.0.1]network 40.1.0.0 0.0.255.255
[R5-ospf-1-area-0.0.0.1]quit
路由器R6上的配置。
[R6]ospf 1 router-id 6.6.6.6
[R6-ospf-1]area 2
[R6-ospf-1-area-0.0.0.2]network 40.2.0.0 0.0.255.255
[R6-ospf-1-area-0.0.0.2]quit
路由器R7上的配置。
[R7]ospf 1 router-id 7.7.7.7
[R7-ospf-1]area 2
[R7-ospf-1-area-0.0.0.2]network 40.2.0.0 0.0.255.255
[R7-ospf-1-area-0.0.0.2]quit
此文章来自于《华为认证(2021新版HCIA教材)》
京东购买本书
https://item.jd.com/13706744.html
学习计算机网络华为网络工程师华三网络工程师课程中有问题联系韩老师
华为认证(2021新版HCIA教材)课程链接 https://edu.51cto.com/course/28956.html
韩老师招收正式学生、门徒级套餐
边栏推荐
- Event center parameter transfer, peer component value transfer method, brother component value transfer
- Leetcode hot topic Hot 100 day 32: "minimum coverage substring"
- 全网最全的新型数据库、多维表格平台盘点 Notion、FlowUs、Airtable、SeaTable、维格表 Vika、飞书多维表格、黑帕云、织信 Informat、语雀
- I've seen many tutorials, but I still can't write a program well. How can I break it?
- OLED屏幕的使用
- Digital triangle model acwing 1018 Minimum toll
- How to turn a multi digit number into a digital list
- Activiti global process monitors activitieventlistener to monitor different types of events, which is very convenient without configuring task monitoring in acitivit
- RT thread I2C tutorial
- B-jiege's tree (pressed tree DP)
猜你喜欢
【微信小程序】运行机制和更新机制
Statistical inference: maximum likelihood estimation, Bayesian estimation and variance deviation decomposition
How to upgrade high value-added links in the textile and clothing industry? APS to help
Rhcsa Road
为什么新手在编程社区提问经常得不到回答,甚至还会被嘲讽?
【每周一坑】计算100以内质数之和 +【解答】输出三角形
基于STM32单片机设计的红外测温仪(带人脸检测)
(工作记录)2020年3月11日至2021年3月15日
Design your security architecture OKR
知识图谱构建流程步骤详解
随机推荐
Taylor series fast Fourier transform (FFT)
Tencent byte and other big companies interview real questions summary, Netease architects in-depth explanation of Android Development
请问sql group by 语句问题
正则表达式收集
Summary of different configurations of PHP Xdebug 3 and xdebug2
Utilisation de l'écran OLED
Detailed introduction of distributed pressure measurement system VIII: basic introduction of akka actor model
APS taps home appliance industry into new growth points
1500万员工轻松管理,云原生数据库GaussDB让HR办公更高效
华为设备命令
什么是RDB和AOF
【DSP】【第一篇】开始DSP学习
电子游戏的核心原理
I've seen many tutorials, but I still can't write a program well. How can I break it?
Dynamically switch data sources
Logic is a good thing
Rhcsa Road
RT thread I2C tutorial
【每周一坑】输出三角形
Event center parameter transfer, peer component value transfer method, brother component value transfer