Concept and features of OSPF Routing Protocol

Source: Internet
Author: User

1. OSPF features

Fast convergence;
Able to adapt to large networks;
Able to correctly process error routing information;
The use area can reduce the CPU burden on a single router and form a structured network;
Supports classless routing, full support for classless network, variable length subnet, and other classless features;
Supports Load Balancing across multiple paths;
Multicast addresses are used for information intercommunication, reducing the load of non-OSPF routers;
Use routing labels to represent routes from external regions.
Ii. Definitions of Neighbor and Adjacency

Neighbor:
In the network, the OSPF router can send a Hello message to search for neighbors. When the content of several fields in the Hello packet is consistent, the adjacent OSPF router will form a Neighbor relationship. Neighbor is saved in the Neighbor table and requires information about the Router ID and IP address.

Confirm the Router ID:
1. Select the IP address of the Loopback interface with the largest IP address as the Router ID. If there is only one Loopback interface, the Router ID is the address of the Loopback interface.
2. if there is no Loopback interface, select the IP address of the physical interface with the largest IP address as the Router ID, but as the physical interface of the Router ID, OSPF cannot be run, that is, this interface cannot send or accept OSPF packets.

Benefits of using the Loopback IP address as the Router ID:
A. the Loopback interface is a logical interface and will never be down, which is conducive to the stable operation of OSPF;
B. Easy to control the Router ID of the OSPF Router.

Features of the Hello protocol:

1. Purpose:
A. Used to discover OSPF Neighbor;
B. The Hello packet contains multiple parameters that require OSPF router negotiation to form a Neighbor relationship;
C. It can be used to maintain the survival of links between neighbors;
D. used to determine the selection of DR and BDR routers.
2. Message content:
A. Router ID
B. Area ID
C. IP address and mask
D. authentication method and authentication information
E. Hello Interval and Dead Interval
F. Router priority
The Router ID of g. DR and BDR.
H.264 characteristic control information
I. After the last Hello message, in Dead Interval, the Router's Neighbor Router ID list

When each OSPF router receives a hello message, it will negotiate with the above information to determine whether the information is correct. If the information does not match, the Hello message will be discarded.
When a Router receives a Hello message with its Router ID in the Neighbor robor ID List, it enters the 2-way mode. once it enters the 2-way mode, the Adjacency will be created.

3. DR and BDR use 224.0.0.5 (ALLSPFRouter Address) to send Hello Packet, while the router that receives the Packet sends the confirmation message 224.0.0.6 (ALLDRRouter Address), indicating that the Hello Packet is received.

4. Point-to-Multipoint: similar to a set of multiple Point-to-Point networks, but does not generate DR and BDR elections. Route information packets are sent through multicast packets.

5. Only the NBMA network and the network using virtual links send a single broadcast.

6. Stub Network: there is only one egress to connect to the vro Network. The original and destination addresses of the messages are in the Network.
Selection of DR and BDR features:
1. DR and BDR are interface features and have nothing to do with the router itself.
2. DR and BDR and other routers in the multiaccess network form adjancency, but they do not form adjancency.
3. Each interface has a priority. If the priority is 0, you do not need to select DR or BDR.
Adjacency:

Is a virtual connection formed between OSPF Neighbor. These connections have different properties, depending on the different network types of the router connection.
Steps to form Adjacency:
1. Neighbor Discovery
2. bidirectional communication
3. Database Synchronization
To enable the router to achieve Database Consistency and synchronization, Database Synchronization is achieved by exchanging DD, LSR, and LSU packets.
4. Completely forming a connection
Relationship between Master and Slave and selection

In the ExStart state, the neighbors negotiate to determine which router controls the Database sychronization.

The data structure of the Neighbor table item:
The information in the Neighbor table is learned from the Hello message through the router, some information about neighbors.
1. Neighbor ID
2. Neighbor IP Address
3. Area ID
4. Interface
5. Neighbor Priority
6. State
7. PollInterval
This is a concept used in the NBMA network. Because the NBMA network cannot use multicast to send packets, that is, it cannot automatically discover neighbors. If the Neighbor is in the down state, the Hello message is sent once every other PollInterval time to discover and maintain the neighbor relationship.
8. Neighbor Option
9. Inactivity Time
10. DR
11. BDR
12. Master/Slave
13. DD Sequence Number
14. Last modified ed Database Description Packet
15. Lik State Retransmission List
It refers to the LSA that has been sent, but has not received the Acknowledge message. If it exceeds RxmtInterval, it will be re-transmitted. 16. Database Summary List
The form of the LSA sent during database synchronization.
17. Link State Request List
It refers to the list of LSA contained in the latest Database Description message received. The router sends the LSR to the Neighbor for the latest LSA. After receiving the LSU, it deletes the corresponding entries in the list.

Iii. Neighbor status Mechanism

1. Down
When no Hello message is received, or in DeadInterval, no Hello message is received.
2. Attempt
Only available in the NBMA network. Manually specify the Neighbor.
3. Init
Hello Message received
4. 2-way
When the Router sees its Router ID in the Hello message sent by the neighbor, the DR and BDR start to be elected in the broadcast network.
5. ExStart
Determines the Master/Slave relationship to initialize the DD message serial number to exchange the Database Description packet.
6. Exchange
Vro begins to exchange DD packets
7. Loading
The LSR packet is already in the Loading status. The request is sent to the latest unreceived LSA found through the Exchange DD message.
8. Full
The LSA exchange between the router and the network is completed.
After the router receives the LSA, it stores the LSA in the Database, and then copies the LSA and sends it from other OSPF interfaces until the LSA Database in the entire network area is synchronized and consistent. Then, each Router performs SPF operations based on the Link information in the LSA Database to calculate the shortest path without loops.
Iv. Database Description packets

It is a header containing all the LSA information of the router, which can be known to the router. The number of LSA on Neighbor is unknown to the router. You can request a new LSA through the LSR message.
V. multi-region OSPF features

1. backbone area: it serves to allow other non-backbone areas to know the network conditions of other areas. That is to say, route information of all non-backbone areas must flow through the backbone area.
2. Virtual link: a link from a non-backbone area to a backbone area.
Purpose:
Connect a non-backbone area to a backbone area through a non-backbone area
Connect two separate backbone areas through a non-backbone area
Rules:
The configuration must be performed between the two BRs.
The region through which the virtual link is transmitted must have complete routing information.
The intermediate transmission zone cannot be the stub zone.
6. Link State packet type in the region

1. Router LSA
It is generated by all vrouters in the region and can only be broadcast in flood scenarios in the region.
2. Network LSA
Generated by the DR or BDR router in the region. The packet includes the link information of the router connected to the DR and BDR.
3. Network Summary LSA
If an API is generated, it notifies the routers in the same region of the route information to the route information outside the region. At the same time, it can send default routes to different regions in the same Autonomous Region. routes in the same region are sent to the backbone region, if there are two paths to the same destination, only the routes with the lowest cost will be sent;
4. ASBR Summary LSA
It is generated by the API, but it is a host route, pointing to the ASBR router route.
5. Autonomous System External LSA
Generated by ASBR, which tells the vro of the same Autonomous Region to the path of the external region.
6. NSSA External LSA
Generated by ASBR. In The NSSA region, when one vro is an ASBR, the LSA 5 packet has to be generated, but The NSSA cannot contain the LSA 5 packet. All asbrs generate the LSA 7 packet, to the vro in the region.
VII. OSPF Over Demand Circuits

It is used in a link with a switched virtual circuit. When the link is idle, it will not have a virtual circuit connection. A virtual circuit will be established only when there is traffic on the link. However, OSPF Hello and LSA messages are sent every other time, while Demand Circuits provides a feature, on the virtual circuit, you only need to transmit the Hello and LSA packets for OSPF neighbor and Database Synchronization. Then, you do not need to send the preceding packets, and the LSA will not expire because the Update packets cannot be received, the neighbor relationship does not Dead either. This reduces the use of links and saves the cost of WAN links.

OSPF sets a DonotAge byte in the LSA message to negotiate the two ends so that the received LSA never expires. In addition, a flag, DC bit, is added to the LSA so that other routers know that the LSA has the characteristics of Demand Circuit, so that other routers do not think that this route has expired.

8. OSPF Configuration

OSPF has the DNS function and can replace the Router id with the vro name.
Configuration:
Ip name-server 172.19.45.1
IP address of the DNS-SERVER used by OSPF
Ip ospf name-lookup
Enable DNS for OSPF
Solution for OSPF to have multiple addresses for the interface

1. OSPF processes the route information of the secondary IP address Network only when OSPF is enabled for the main address of the interface.
2. OSPF regards the secondary IP address Network as the Stub Network. There is no OSPF neighbor, and no Hello message is sent or a link is formed with the slave address Network. Therefore, when there is a vro attached to the secondary IP address Network and the routing information of the two routers is required, you can consider using static routing.
The Area 1 nssa no-summary no-redistribution command is used on both the ABR and ASBR, so that only the Router LSA and no other types of LSA can be connected to the NSSA region, even LSA 7 does not exist. There is only one default route pointing to the ABR.
The Area 1 nssa no-redistribution default-information-originate command enables LSA 3 and 4 to enter the NSSA region in the preceding cases, but LSA 5 and LSA 7 are filtered out. After removing no-summary, although LSA 3 and 4 can enter the NSSA region, the ABR cannot generate a default route pointing to the outside network, isolate routers in the NSSA region from routes outside the autonomous region. You can use the default-information-originate parameter to generate a default route.
When configuring Address Aggregation on OSPF, it is best to add a default route pointing to the null0 port on the ABR to prevent route loopback.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.