[Zero Foundation of Network Engineering] Xiaobai has zero foundation, you can learn the detailed tutorial at a glance

[Warm reminder] Need information or need to enter the group to communicate to the bottom

OSPF basic configuration
1. OSPF function introduction:

OSPF (Open Shortest Path First) is a link state-based internal gateway routing protocol developed by the IETF OSPF working group. OSPF is a routing protocol specially developed for IP. It runs directly on the IP layer. The protocol number is 89. It uses multicast for OSPF packet exchange. The multicast addresses are 224.0.0.5 (all OSPF devices) and 224.0.0.6 (designated devices). ). When the OSPF routing domain is large, a hierarchical structure is generally adopted, that is, the OSPF routing domain is divided into several areas (AREAs), and the areas are interconnected through a backbone area, and each non-backbone area needs to be directly connected to the backbone area.

2. OSPF application scenarios:
OSPF routing protocol is the current mainstream IGP protocol, recognized and actually adopted by most customers, widely used in various industries, such as education, finance, medical care, government, operators, enterprises, etc., regardless of group Whether the network model is complex or simple, the number of devices, and the number of routing entries, OSPF can well meet various needs. Its rich routing strategy control functions and hierarchical design are also a major advantage. Therefore, the IGP protocol is deployed in the network At the time, OSPF networking can be given priority.

OSPF packets
OSPF protocol packets are directly encapsulated into IP packets, and the protocol number is 89.

OSPF has five types of protocol messages : ****
(1) **Hello message: **Sent periodically, used to discover and maintain OSPF neighbor relationships, and stop DR (Designated Router, designated router)/BDR ( Backup Designated Router, backup designated router) election.

(2) **DD (Database Description, database description) message: ** describes the summary information of each LSA (Link State Advertisement) in the local LSDB (Link State DataBase), Used for two routers to stop database synchronization.

(3) **LSR (Link State Request, link state request) message: ** Solicit the required LSA from the other party. After the two routers exchange DD packets with each other, they know which LSAs of the opposite router are lacking in the local LSDB. At this time, they need to send LSR packets to solicit the required LSAs from each other.

(4) **LSU (Link State Update) message: ** Send the LSA required by the other party.

(5) **LSAck (Link State Acknowledgment, Link State Acknowledgment) message: ** is used to stop confirming the received LSA.


The description of link shape information in LSA type OSPF is all encapsulated and advertised in LSA.

Commonly used LSAs have the following types:
(1) Router LSA (Type-1): Generated by each router, depicting the router's link form and expenditure, and communicated in the area where it originated.

(2) Network LSA (Type-2): Occurs by DR, depicts the link form of all routers in this network segment, and transmits it in the area where it originated.

(3) Network Summary LSA (Type-3): Generated by ABR (Area Border Router, area border router), which depicts the route of a certain network segment in the area and advertises it to other areas.

(4) ASBR Summary LSA (Type-4): Occurs by ABR, depicts the route to ASBR (Autonomous System Boundary Router), and advertises it to the relevant area.

(5) AS External LSA (Type-5): Occurs by the ASBR, describes the route to the AS (Autonomous System, autonomous system), and advertises it to all areas (except the Stub area and the NSSA area).

(6) NSSA External LSA (Type-7): Occurs by the ASBR in the NSSA (Not-So-Stubby Area) area, and describes the route to the AS, which is only communicated in the NSSA area.

(7) Opaque LSA: An extended general mechanism for OSPF, currently there are Type-9, Type-10 and Type-11.

Among them, Type-9 LSA stops flooding only in the local link range, Grace LSA used to support GR (Graceful Restart) is a type of Type-9; Type-10 LSA stops flooding only in the area , LSA used to support MPLS TE is a type of Type-10; Type-11 LSA can stop flooding in an autonomous system.

OSPF area
Insert picture description here

​1. The border of the area is the router, not the link.

A router can belong to different areas, but a network segment (link) can only belong to one area, or each interface running OSPF must specify which area it belongs to. After the area is divided, route aggregation can be stopped on the area border router to increase the number of LSAs advertised to other areas, and to minimize the impact of network topology changes.

2. Backbone area and virtual connection

(1) Backbone Area (Backbone Area) After OSPF divides the area, not all areas have a peer-to-peer relationship. One area is unusual, its area number is 0, and it is usually called the backbone area. The backbone area serves as the route between areas, and routing information between non-backbone areas must be forwarded through the backbone area.

In this regard, OSPF has two rules:
All non-backbone areas must be connected to the backbone area;
The backbone area itself must also be connected.

In practical use, due to various conditions, the following requirements may not be met. At this time, it can be processed by configuring OSPF virtual connection.

(2) Virtual Link Virtual Link refers to a logical connection channel established between two ABRs through a non-backbone area. It must be ABR at both ends, and it must be configured at both ends to fail. The area that provides a non-backbone area external route for both ends of the virtual connection is called the Transit Area.

3. Stub area and Totally Stub area

Stub areas are specific areas. The ABR in this area will transmit the routing information between the areas to this area, but will not introduce autonomous system internal routes. The size of the routing table of the routers in the area and the number of LSAs will be greatly reduced. To ensure that routes outside the autonomous system are still reachable, the ABR in the area will generate a default route Type-3 LSA and advertise it to other non-ABR routers in the area.

In order to further increase the size of the router's routing table and the number of LSAs in a stub area, the area can be configured as a totally stub (completely stub) area. The ABR in this area will not pass the routing information between the areas and the autonomous system internal routing information to the area . To ensure that routes to other areas of the autonomous system and outside the autonomous system are still reachable, the ABR in this area will generate a default route Type-3 LSA and advertise it to other non-ABR routers in the area.

4. NSSA area and Totally NSSA area

The NSSA (Not-So-Stubby Area) area is a variant of the Stub area. The difference from the Stub area is that the NSSA area allows the introduction of autonomous fragmented internal routes, and the ASBR advertises Type-7 LSAs to the area. When the Type-7 LSA arrives at the ABR of the NSSA, the ABR converts the Type-7 LSA into the Type-5 LSA and transmits it to other areas.

The area can be configured as a Totally NSSA (Full NSSA) area, the ABR of this area will not pass the routing information between the areas to this area. To ensure that routes to other areas of the autonomous system are still reachable, the ABR in this area will generate a default route Type-3 LSA and advertise it to other non-ABR routers in this area.

In order to better help you learn and understand network engineers, and other related content, I deliberately organize all the materials systematically, and share them here for free. Necessary information for everyone, including:

Huawei certification mind map (super fine);

Huawei certification essential knowledge document (pdf);

A collection of essential knowledge documents for net workers;

Essential Toolkit for NetWorkers;

Necessary experiment package for net workers;

Necessary video interview package for net workers.

Of course, I still have a lot of organized data files and video files, and get more data files. The
previous teaching videos are mainly for the novice Xiaobai to make detours. Want a full set of videos, materials, Q&A, or Huawei, H3C, relevant certification learning materials + Q group: 519345103

There is a lot of information, I won’t list all of them, so I’ll write here first. If you have any questions, please leave a message and discuss private messages~

Guess you like

Origin blog.csdn.net/ZYJY2020/article/details/113607761