华为路由器OSPF基本实验配置

简介

OSPF是基于链路状态的动态路由协议,具有区域化的层次结构,扩展性好,收敛速度快。
在ospf中,每台路由器必须有一个router-id来标识自己,一般用loopback接口配置ip作为自己的router-id。

实验拓扑

在这里插入图片描述

实验内容

OSPF的基本配置
DR/BDR选举过程
OSPF接口开销修改方式
OSPF被动接口
OSPF认证功能

配置OSPF时,先配置基本配置,如:个路由器接口IP,Loopback IP,ping测试各相连设备连通性,然后配置OSPF路由协议,将R1、R2、R3之间的链路位于区域0,R2与R4之间的链路位于区域1,R3与R5之间的链路位于区域2。

R1

interface g0/0/1
ip address 10.0.12.1 24
quit
interface g1/0/2
ip address 10.0.13.1 24
quit
interface loopback 0
ip address 1.1.1.1 24
quit
interface loopback 1
ip address 11.11.11.11 24
router id 1.1.1.1
ospf
area 0
network 10.0.12.0 0.0.0.0
network 10.0.13.0 0.0.0.0
network 1.1.1.1 0.0.0.0
network 11.11.11.11 0.0.0.0

R2

interface g0/0/0
ip address 10.0.12.2 24
quit
interface serial 0/0/0
ip address 10.0.23.2 24
quit
interface e0/0/0
ip address 10.0.23.2 24
quit
interface loopback 0
ip address 2.2.2.2 32

router id 2.2.2.2
ospf
area 0
network 10.0.12.2 0.0.0.0
network 10.0.23.2 0.0.0.0
network 2.2.2.2 0.0.0.0
quit
area 1
network 10.0.24.2 0.0.0.0

R3

interface g0/0/0
ip address 10.0.13.3 24
quit
interface serial 0/0/0
ip address 10.0.23.3 24
quit
interface e0/0/0
ip address 10.0.35.3 24
quit
interface loopback 0
ip add 3.3.3.3 32

ospf
area 0
network 3.3.3.3 0.0.0.0
network 10.0.13.3 0.0.0.0
network 10.0.23.3 0.0.0.0
quit
area 2
network 10.0.35.3 0.0.0.0

R4

interface e0/0/0
ip address 10.0.24.4 24
quit
interface loopback 0
ip address 4.4.4.4 32
quit
interface loopback 1
ip address 44.44.44.44 255.255.255.0

ospf
area 1
network 10.0.24.4 0.0.0.0
network 4.4.4.4 0.0.0.0
network 44.44.44.44 0.0.0.0

扫描二维码关注公众号,回复: 11856944 查看本文章

R5

interface e0/0/0
ip address 10.0.35.5 24
interface loopback 0
ip address 5.5.5.5 32
quit
interace loopback 1
ip address 55.55.55.55 32
ospf
area 2
netowrk 10.0.35.5 0.0.0.0
network 5.5.5.5 0.0.0.0
network 55.55.55.55 0.0.0.0

配置完成后,使用命令,如何查看OSPF邻居建立情况?
display ospf peer brief
(full标识邻居状态已建立)
再查看路由器路由表
display ip routing-table
如果路由表没有问题,使用ping测试各网段互通性。

如何查看DR/BDR的选举情况?
disp ospf interface

如何修改DR的优先级
interface g0/0/1
ospf dr-priority 2
改完如何查看不生效,是为了维持OSPF的稳定性,DR/BDR选举不具备抢占性,需要重启DR/BDR进程?
reest ospf proccess

猜你喜欢

转载自blog.csdn.net/qq_39689711/article/details/107053177
今日推荐