当前位置:网站首页>OSPF路由信息协议-拓扑实验
OSPF路由信息协议-拓扑实验
2022-07-26 22:50:00 【m0_72586049】
目录
3.OSPF协议进行区域划分和激活直连网段接口(包括R4缺省路由的配置)
一、实验目的
通过OSPF路由信息协议(动态路由)让如下图所示的拓扑环境实现全网可达

二、实验需求
1.R1-R3均有一个环回,R1-R3(包括其环回)为区域0;R3-R4在区域1;
2.R1-R3路段中,R3为DR设备,没有BDR设备;
3.R4环回地址已固定,为4.4.4.0/24,其他所有网段使用192.168.1.0/24进行合理分配
4.R4环回不能宣告,整个拓扑环境实现全网可达,保障更新安全,避免环路产生,减少路由表条目数量;
三、需求分析
1.对192.168.1.0/24网段进行子网划分:
由拓扑环境图可得
1)R1-R3每个路由器均存在1个环回接口,用于模拟连接PC网段,因此需要3个环回路段;
2)R1到R3的骨干链路为一个广播域,R3-R4为一个广播域;因此需要2个骨干链路;
3个环回网段+2个骨干链路=5个网段;
根据实验要求,整个拓扑环境需保障更新,因此需要将192.168.1.0网段划分成4个大网段;一个网段代表区域0,一个网段代表区域1,剩余两个大网段用来未来机房升级;
总母网:192.168.1.0/24(即192.168.1.00000000 255.255.255.0)
OSPF 0区域:
母网:192.168.1.0/26
子网:
①R1-R3骨干链路:192.168.1.0/28
②R1环回:192.168.1.16/28
③R2环回:192.168.1.32/28
④R3环回:192.168.1.48/28
OSPF 1区域:
192.168.1.64/26
升级网段:
192.168.1.128/26
192.168.1.192/26
IP地址子网划分如图所示:

2.更该设备接口优先级:
由实验要求,在R1-R3网段中,R3为DR设备,没有BDR设备;
在MA网络中,将进行DR/BDR选举,DR优先级最大,BDR优先级次大(切记OSPF的选举是非抢占性的),因此需将R1和R2的优先级设为比R3的优先级小,且为了满足无BDR设备条件,需将R1和R2的优先级调为一致;
3.边界路由器缺省路由配置:
由于不能直接通过宣告R4上的4.4.4.0/24网段,因此只能通过对边界路由器配置缺省路由,这样边界路由器将自动向内网下放一条缺省路由,之后,内网设备将自动生产缺省路由指向边界服务器;
4.接口认证和区域汇总:
由于实验要求整个拓扑环境需保障更新安全,且需减少路由表条目数量,因此应该在直连邻居的接口上配置认证(模式、编码、密码要求领居间一致),在子网划分中,我们将子网划分成2个区域,0区域和1区域,因此可以通过对R3路由器的GE0/0/1接口汇总0区域全部子网,即192.168.1.0/26;
四、实验步骤
1.更改路由器名称:
以R1为例:
[Huawei]sysname r1
[r1]
![]()
2.内网ip地址配置:
1)R1:
[r1]interface g0/0/0
[r1-GigabitEthernet0/0/0]ip address 192.168.1.1 28
[r1]interface LoopBack 0
[r1-LoopBack0]ip address 192.168.1.17 28

2)R2:
[r2]interface g0/0/0
[r2-GigabitEthernet0/0/0]ip address 192.168.1.2 28
[r2]interface LoopBack 0
[r2-LoopBack0]ip address 192.168.1.33 28

3)R3:
[r3]interface g0/0/0
[r3-GigabitEthernet0/0/0]ip address 192.168.1.3 28
[r3]interface g0/0/0
[r3-GigabitEthernet0/0/1]ip address 192.168.1.65 26
[r3]interface LoopBack 0
[r3-LoopBack0]ip address 192.168.1.49 28

4)R4:
[r4]interface g0/0/0
[r4-GigabitEthernet0/0/0]ip address 192.168.1.66 26
[r4]interface LoopBack 0
[r4-LoopBack0]ip address 4.4.4.1 24

3.OSPF协议进行区域划分和激活直连网段接口(包括R4缺省路由的配置):
1)R1:
[r1]ospf 1 router-id 1.1.1.1
[r1-ospf-1]area 0
[r1-ospf-1-area-0.0.0.0]network 192.168.1.17 0.0.0.0
[r1-ospf-1-area-0.0.0.0]network 192.168.1.1 0.0.0.0

2)R2:
[r2]ospf 1 router-id 2.2.2.2
[r2-ospf-1]area 0
[r2-ospf-1-area-0.0.0.0]network 192.168.1.33 0.0.0.0
[r2-ospf-1-area-0.0.0.0]network 192.168.1.2 0.0.0.0

3)R3:
[r3]ospf 1 router-id 2.2.2.2
[r3-ospf-1]area 0
[r3-ospf-1-area-0.0.0.0]network 192.168.1.49 0.0.0.0
[r3-ospf-1-area-0.0.0.0]network 192.168.1.3 0.0.0.0
[r3]ospf 1 router-id 2.2.2.2
[r3-ospf-1]area 1
[r3-ospf-1-area-0.0.0.1]network 192.168.1.65 0.0.0.0

4)R4:
[r4-ospf-1]area 1
[r4-ospf-1-area-0.0.0.1]network 192.168.1.66 0.0.0.0
[r4-ospf-1]default-route-advertise always

4.更改设备优先级并同时重启OSPF进程:
1)更改设备优先级
①R1:
[r1]interface g0/0/0
[r1-GigabitEthernet0/0/0]ospf dr-priority 0
②R1:
[r2]interface g0/0/0
[r2-GigabitEthernet0/0/0]ospf dr-priority 0
③R3:
[r3]interface g0/0/0
[r3-GigabitEthernet0/0/0]ospf dr-priority 1
[r3-GigabitEthernet0/0/1]ospf dr-priority 1
④R4:
[r4]interface g0/0/0
[r4-GigabitEthernet0/0/0]ospf dr-priority 0
2)重启OSPF进程:
以R1为例:
<r1>reset ospf process
Warning: The OSPF process will be reset. Continue? [Y/N]:
<r1>y
若一会儿各路由器命令行出现如下图所示现象(以R1为例),则重启成功;

5.接口认证:
对每个路由器接口进行接口认证,保障更新的安全;
以R1为例:
[r1-GigabitEthernet0/0/0]ospf authentication-mode md5 1 cipher 123456(密码随意,但路由器模式、编码、密码要求与领居一致)

6.区域总汇:
由本文章需求分析模块第4条得,需将R3的GE0/0/1接口进行区域0汇总,以此来减少路由表条目数量;
[r3-ospf-1-area-0.0.0.0]abr-summary 192.168.1.0 255.255.255.192
查看R4路由表判断汇总是否成功
[r4]display ip routing-table protocol ospf

五、全网可达测试:


终上所述:该实验的所有要求已经达成 ,实验成功。
边栏推荐
- Esp8266wi fi data communication
- RS-485 bus communication application
- C语言——数据类型、基本数据类型的取值范围
- The basic configuration of static routing (planning of IP address and configuration of static routing) realizes the accessibility of the whole network.
- Codeforces Round #810 (Div. 2), problem: (B) Party
- Static comprehensive experiment (comprehensive exercise of static route, loopback interface, default route, empty interface, floating static)
- C language - characters and strings, arithmetic operators, type conversions
- NB-IOT联网通信
- Timer interrupt experiment
- Experiment exercise of two-layer packaging technology (HDLC, ppp--pap\chap, GRE)
猜你喜欢

HCIP第一天静态路由综合实验

OSPF protocol knowledge summary

7.13 Weilai approved the written examination in advance

C语言——关系运算符和逻辑运算符、if语句、switch语句、分支结构的嵌套

Tcp的三次握手与四次挥手

Codeforces Round #809 (Div. 2), problem: (C) Qpwoeirut And The City

NB-IOT联网通信

C语言——字符和字符串、算术运算符、类型转换

The basic configuration of static routing (planning of IP address and configuration of static routing) realizes the accessibility of the whole network.

数字集成电路:MOS管器件章(一)
随机推荐
Tcp的三次握手与四次挥手
OSPF basic configuration application (comprehensive experiment: interference election default routing area summary authentication -- interface authentication)
TCP's three handshakes and four waves (brief introduction)
Lecture 4 - explain GPIO_ Write function and related routines
C语言——while语句、dowhile语句、for循环和循环结构、break语句和continue语句
NAT网络地址转化实验
(题意+详细思路+加注释代码) Codeforces Round #805 (Div. 3)F. Equate Multisets
C language -- while statement, dowhile statement, for loop and loop structure, break statement and continue statement
TreeSet集合存储元素的问题
RS-485总线通信应用
Codeforces Round #796 (Div. 2), problem: (1688C) Manipulating History
Codeforces Round #809 (Div. 2), problem: (C) Qpwoeirut And The City
OSPF protocol overview and basic concepts
Lvs+keepalived project practice
ensp中的简单静态路由
Self introduction and planning about programming
Experiment of OSPF in mGRE environment
Lora通信应用开发
今天浅讲一下转义字符【萌新版】
Detailed source code of golang bufio reader