OSPF basic configuration of Huawei ensp

Purpose:

  • Understand how routing protocols work;
  • Master how to configure the OSPF routing protocol on the router.

Basic knowledge of OSPF

OSPF (OpenShortestPathFirst) open shortest path first protocol Classless link state routing protocol, public protocol; cross-layer encapsulation to IP header, protocol number 89; multicast update: 224.0.0.5, 224.0.0.6
.
Triggered update, periodic update (30min);
structured deployment is required: area division address planning.

RouterID, used to uniquely identify a router in an OSPF domain. OSPF Router-ID can be set manually or automatically. The automatic selection mechanism is: if there is a loopback port, select the IP address of the largest loopback port; if not, select the IP address with the largest active physical interface as the RouterID.

effect:

  1. Reduce the scope of LSA flooding, effectively control topology changes within the area, and achieve the purpose of network optimization
  2. Route summarization can be done at the area border, reducing the routing table
  3. Make full use of the characteristics of OSPF special areas to further reduce LSA flooding and optimize routing
  4. Multi-region improves the scalability of the network, which is conducive to the establishment of large-scale networks

Network topology diagram and basic configuration:

Network Topology

A total of three areas, four routers, and two PCs are set up. The three regions are 10.10.10.0, 20.20.20.0 and 30.30.30.0. The IP addresses of the two PCs are 192.168.10.10 and 192.168.20.10 respectively.
The specific PC configurations are as follows:

Alt

PC1

Alt
PC2

Then we configure the port ip of the three routers respectively. The end of the port on the left is set to 2, and the end of the port on the right is set to 1. The configuration of the four routers is as follows: the first set is as shown above and the left end is
192.168
insert image description here
. 10.1 The right end is 10.10.10.1.
insert image description here
The second set is as shown above. The left end is 10.10.10.2. The right end is 20.20.20.1. The
insert image description here
third set is as shown above. The left end is 20.20.20.2. The right end is 30.30.30.1.
insert image description here

The fourth set is as shown above. The left end is 30.30.30.2. The right end is 192.168.20.1

ospf configuration:

It looks like this:
the first router:
insert image description here

Second router:
insert image description here
insert image description here

Third router:

insert image description here
insert image description here

Fourth router:
insert image description here
insert image description here

OSPF authentication:

Here we look at the routing table of the first router to get:
insert image description here

It is found that the protocol from him to area 0 and area 2 is the ospf protocol.
Look at the neighbor relationship:
insert image description here

Taking the second router as a representative, you can see that both the DR and the BDR have been elected.

Test PC connectivity

Directly use PC1 to ping PC2 to get:

insert image description here

The experiment was successful!
You can see by capturing the packet:
this step is optional. Use wireshark to capture the packet to get:insert image description here

Implemented the ospf protocol

Guess you like

Origin blog.csdn.net/weixin_53665577/article/details/128889222