What Is OSPF? How Does It Work?

What Is OSPF? How Does It Work?

What Is OSPF? How Does It Work?
What Is OSPF? How Does It Work?
a week ago - last edited a week ago

Background:

 

This post provides some information and knowledge sharing about the OSPF.

 

 

This Article Applies to:

 

Omada routers with OSPF feature supported.

 

Term Explanation:

 

How it works:

 

OSPF (Open Shortest Path First) is a link-state routing protocol designed to calculate routes quickly and efficiently. It takes three main steps to make a OSPF.

1. Establishing Neighbor Relationships:
Adjacent routers send Hello packets through their interfaces to discover and establish neighbor relationships.
During this process, the two devices negotiate a master/slave relationship and exchange Database Description (DD) packets.
By updating Link State Advertisements (LSAs), the two devices synchronize their Link State Databases (LSDBs), successfully establishing neighbor relationships.

2. Exchanging Link State Information:
Once the neighbor relationships are established, neighbors exchange link state information. This information is used to maintain and update their respective link state databases.

3. Route Calculation:
OSPF uses the Shortest Path First (SPF) algorithm to calculate routes, ensuring that routing can converge quickly. Each router calculates the shortest path to various destinations based on its link state database and places these routes into the OSPF routing table.

4. Updating the Global Routing Table:
OSPF routes are more effectively added to the global routing table compared to other routing protocols, thus enhancing the overall efficiency and stability of the network.

 

Router ID:

 

To run the OSPF protocol, a Router ID must exist. The Router ID is a 32-bit unsigned integer that uniquely identifies a router within an autonomous system.

 

There are two ways to set the Router ID:

  • Manual Configuration:

It is recommended to manually configure the OSPF Router ID in actual network deployments, as this is crucial for the stability of the protocol.

  • Automatic Selection by the OSPF Protocol:

If the Router ID is not manually configured, the device will automatically select one from the IP addresses of its current interfaces.

It follows two fundamental rules:

1. It prioritizes choosing the highest IP address from Loopback interfaces as the Router ID.

2. If no Loopback interfaces are configured, the highest IP address from the other interfaces will be selected.

 

Cost:

 

The OSPF Cost is a value used to measure the relative cost for a router to reach a specific destination. It is one of the most important parameters in the OSPF protocol and determines the priority of route selection.

 

LSA Type:

 

LSA Type Explanation
Router-LSA Generated by each device, it describes the device's link state and cost, and is propagated within the area to which it belongs.

Network-LSA

Generated by the Designated Router (DR), it describes the link state of the subnet and is propagated within the area to which it belongs.
Network-summary-LSA Generated by Area Border Routers (ABRs), it describes the routes to a subnet within the area and is advertised to non-Totally STUB or NSSA areas that publish or receive this LSA. For example, if an ABR belongs to both Area 0 and Area 1, and there is a subnet 10.1.1.0 in Area 0 and a subnet 11.1.1.0 in Area 1, the ABR generates a Type 3 LSA for subnet 11.1.1.0 for Area 0 and a Type 3 LSA for subnet 10.1.1.0 for Area 1, advertising it to non-Totally STUB or NSSA areas.
ASBR-summary-LSA Generated by ABRs, it describes the route to the AS Border Router (ASBR) and is advertised to other relevant areas excluding the area where the ASBR is located.
AS-external-LSA Generated by ASBRs, it describes routes to destinations outside the AS and is advertised to all areas (except STUB and NSSA areas).
NSSA LSA Generated by ASBRs, it describes routes to destinations outside the AS and is propagated only within NSSA areas.

 

Router Type:

 

 

Router Type Explanation

Internal Router

A device of this type has all of its interfaces belonging to the same OSPF area.
Backbone Router

This type of device has at least one interface belonging to the backbone area.
All ABRs and internal devices located in Area 0 are backbone routers.

Area Border Router (ABR)

This type of device can belong to two or more areas simultaneously, with at least one of them being the backbone area.

ABRs are used to connect the backbone area and non-backbone areas, and the connection to the backbone area can be either physical or logical.

Autonomous System Boundary Router (ASBR)

A device that exchanges routing information with another AS is called an ASBR.

An ASBR does not necessarily have to be located at the boundary of an AS; it can be an internal device within an area or an ABR. As long as an OSPF device introduces external routing information, it becomes an ASBR

 

Update Logs:

 

Nov 6th, 2024:

Release of the article.

 

Recommended Threads:

 

How to Configure OSPF on Omada Router in Standalone Mode

 

Feedback:

 

  • If this was helpful, welcome to give us Kudos by clicking the upward triangle below.
  • If there is anything unclear in this solution post, please feel free to comment below.

 

Thank you for your support and contribution to TP-Link Community!

 

------------------------------------------------------------------------------------------------

Have other off-topic issues to report? 

Welcome to > Start a New Thread < and elaborate on the issue for assistance.

Best Regards! If you are new to the forum, please read: Howto - A Guide to Use Forum Effectively. Read Before You Post. Look for a model? Search your model NOW Official and Beta firmware. NEW features! Subscribe for the latest update!Download Beta Here☚ ☛ ★ Configuration Guide ★ ☚ ☛ ★ Knowledge Base ★ ☚ ☛ ★ Troubleshooting ★ ☚ ● Be kind and nice. ● Stay on the topic. ● Post details. ● Search first. ● Please don't take it for granted. ● No email confidentiality should be violated. ● S/N, MAC, and your true public IP should be mosaiced.
  0      
  0      
#1
Options