Huawei router OSPF basic experimental configuration

Introduction

OSPF is a dynamic routing protocol based on link status, with a regionalized hierarchical structure, good scalability, and fast convergence.
In ospf, each router must have a router-id to identify itself, and generally use loopback interface configuration ip as its router-id.

Experimental topology

Insert picture description here

Experiment content

OSPF basic configuration
DR/BDR election process
OSPF interface cost modification method
OSPF passive interface
OSPF authentication function

When configuring OSPF, first configure the basic configuration, such as: router interface IP, Loopback IP, ping to test the connectivity of each connected device, and then configure the OSPF routing protocol to locate the link between R1, R2, and R3 in area 0, R2 and The link between R4 is located in area 1, and the link between R3 and R5 is located in area 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

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

After the configuration is complete, how to check the establishment of OSPF neighbors by using commands?
Display ospf peer brief
(full indicates that the neighbor status has been established)
and then check the router routing table
display ip routing-table.
If there is no problem with the routing table, use ping to test the interoperability of each network segment.

How to check the DR/BDR election situation?
disp ospf interface

How to modify the priority of DR
interface g0/0/1
ospf dr-priority 2
How to check if the modification does not take effect? ​​This is to maintain the stability of OSPF. The DR/BDR election is not preemptive, and the DR/BDR process needs to be restarted?
reest ospf proccess

Guess you like

Origin blog.csdn.net/qq_39689711/article/details/107053177