当前位置:网站首页>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

韩老师招收正式学生、门徒级套餐
边栏推荐
- Simple continuous viewing PTA
- Application layer of tcp/ip protocol cluster
- C language games - minesweeping
- Hardware development notes (10): basic process of hardware development, making a USB to RS232 module (9): create ch340g/max232 package library sop-16 and associate principle primitive devices
- Kubernetes learning summary (20) -- what is the relationship between kubernetes and microservices and containers?
- 知识图谱构建流程步骤详解
- Leetcode question 448 Find all missing numbers in the array
- Use of OLED screen
- Taylor series fast Fourier transform (FFT)
- Summary of different configurations of PHP Xdebug 3 and xdebug2
猜你喜欢

Number of schemes from the upper left corner to the lower right corner of the chessboard (2)

Trends of "software" in robotics Engineering

Intel 48 core new Xeon run point exposure: unexpected results against AMD zen3 in 3D cache

Utilisation de l'écran OLED
Tencent byte and other big companies interview real questions summary, Netease architects in-depth explanation of Android Development

How to upgrade high value-added links in the textile and clothing industry? APS to help

使用.Net驱动Jetson Nano的OLED显示屏

Laravel笔记-自定义登录中新增登录5次失败锁账户功能(提高系统安全性)
![[weekly pit] calculate the sum of primes within 100 + [answer] output triangle](/img/d8/a367c26b51d9dbaf53bf4fe2a13917.png)
[weekly pit] calculate the sum of primes within 100 + [answer] output triangle

use. Net drives the OLED display of Jetson nano
随机推荐
Kubernetes learning summary (20) -- what is the relationship between kubernetes and microservices and containers?
Why do novices often fail to answer questions in the programming community, and even get ridiculed?
动态切换数据源
Web开发小妙招:巧用ThreadLocal规避层层传值
设计你的安全架构OKR
Learn to punch in Web
#yyds干货盘点#重新梳理箭头函数的this
小孩子学什么编程?
"Penalty kick" games
Notes on beagleboneblack
小孩子學什麼編程?
Recyclerview GridLayout bisects the middle blank area
全网最全的新型数据库、多维表格平台盘点 Notion、FlowUs、Airtable、SeaTable、维格表 Vika、飞书多维表格、黑帕云、织信 Informat、语雀
[DSP] [Part 1] start DSP learning
##无yum源安装spug监控
RT thread I2C tutorial
Use of OLED screen
Spiral square PTA
01 基础入门-概念名词
In unity space, an object moves around a fixed point on the sphere at a fixed speed