The OSPF protocol is believed to be unfamiliar to all the friends who learn networking. So in order to let everyone know the definition of this protocol, we will consolidate the knowledge of the OSPF routing protocol here. OSPF (Open Short Path First) Optimal Path Algorithm routing protocol. The Distance value of the OSPF routing protocol is 110, which has a Metric value. This value is used by the OSPF routing protocol to measure the link quality. When the Metric value of a link is smaller, the better the link, and the worse the link.
The routing protocol is divided into two types by data transmission mode: Classfull and Classless. The Classless Routing Protocol refers to the transmission of accessible routing information (NLRI) no netmask; no classless Routing Protocol refers to transmitting accessible routing information (NLRI) with a subnet mask. The routing protocol is divided into two types by data transmission type: Distance Vector and Link State) the routing protocol does not have a Router ID (Router-ID) and only transmits accessible routing information (NLRI); Link Status (LS) the routing protocol limits that each Router must have an unused Router ID (Router-ID), and it unconditionally forwards any accessible routing information (NLRI) from its neighbors ).
Distance Vector Routing Protocol:
In this case, if RouterB has a 1.0 CIDR Block and RouterB has a 2.0 CIDR block, RouterB tells RouterB that I (RouterB) can reach the 1.0 CIDR block, and RouterB tells RouterC that I (RouterB) you can reach the 1.0 CIDR block. At this time, the route for RouterB to reach the 1.0 CIDR block is broken. Then, he will find its neighbor RouterB, and at this time, RouterC will also go to the 1.0 CIDR block, he will also search for its neighbor RouterB. At this time, RouterB's route table contains 1.0 network segment routes. Both RouterB and RouterC will send data to RouterB. However, RouterB cannot reach 1.0 network segment, this forms a routing loop. Distance Vector routing protocols have their own solutions for routing loops.
Link Status routing protocol:
Here, we use the above example to continue to discuss the OSPF routing protocol, because previously I mentioned that the link status routing protocol unconditionally forwards any accessible routing information (NLRI) from neighbors, so, after RouterB tells RouterB that I can reach the 1.0 CIDR Block, RouterB will tell RouterC that it can reach the 1.0 CIDR Block from RouterC. When RouterC sends a data packet to the 1.0 CIDR block, it will find the route table, we know that we can reach the 1.0 CIDR Block from RouterC. At this time, RouterC searches for the neighbor table and finds that RouterB is required to pass through RouterB. In this way, data packets can be sent from RouterC to the 1.0 CIDR block. When the route entry of RouterB reaches the CIDR Block 1.0 is broken, because the route table of RouterB and RouterC both knows that the CIDR block can be reached through RouterB, there will be no routing loop at this time.
The link status routing protocol has four network structures:
1. Broadcast Multi Access ):
Hello packet interval: 10 seconds; Down: 40 seconds. Send a Hello packet every 10 seconds. If the response is not received within 40 seconds, the router is deemed to be Down.
2. Multi-layer Access without broadcasting (None Broadcast Multi Access ):
Hello packet interval: 30 seconds; Down: 120 seconds. Send a Hello packet every 30 seconds. When the response is not received in 120 seconds, the router is deemed to be Down.
3. Point-to-Point ):
Hello packet interval: 10 seconds; Down: 40 seconds. Send a Hello packet every 10 seconds. If the response is not received within 40 seconds, the router is deemed to be Down.
4. Point-to-Multi Point ):
Hello packet interval: 30 seconds; Down: 120 seconds. Send a Hello packet every 30 seconds. When the response is not received in 120 seconds, the router is deemed to be Down.
OSPF Route Protocol No.: 89.
To connect the OSPF protocol, two stages are required. The first stage is to establish a neighbor relationship, and the second stage is to establish an adjacent relationship.
OSPF has three tables: Neighbor Table, which helps routers find their neighbors. The second Table is Link State Database (LSDB ), its role is to help the router find the optimal path; the third Table is the Route Table, which is used to store the optimal path.
The network running the OSPF routing protocol requires a Router dedicated for computing routing. This Router is called DR (Design Router) in the OSPF routing protocol domain, in the OSPF domain, there is also a backup DR called BDR. The OSPF routing protocol will automatically select DR and BDR. First, the router first has a higher Priority than the Priority (Priority). The highest Priority is DR, the second highest is BDR, and the first Priority is DROther, which cannot be DR or BDR, the relationship between DROther and DROther can only reach the Two-Way relationship. If the priorities are the same, the Router ID (Router-ID) is compared. The Router ID is larger than the DR, and the secondary Router ID is BDR.