
There are few ways to set the router ID, the first way is to set the router ID manually and the other way is to let the router decides itself. The router ID is in the format of the IPv4 address. Router ID (RID): The router ID is a number that uniquely identifies each router on a network.

The first thing is happened before the relationship is formed is that each router chooses the router ID. How a router forms a neighbor relationship? Once the LSDB information has been exchanged with each other, the router chooses the best route to be added to a routing table based on the calculation of SPF. Step 3: The third step is to choose the best route. After becoming the neighbors, the two routers exchange the LSDB information with each other. Step 2: The second step is to exchange database information.

The two connecting routers running OSPF on the same link creates a neighbor relationship. Step 1: The first step is to become OSPF neighbors. There are three steps that can explain the working of OSPF: The role of a primary area is to provide communication between different areas. This router summarizes the information about an area and shares the information with other areas.Īll the areas inside an autonomous system are connected to the backbone routers, and these backbone routers are part of a primary area. The special routers are those that are present at the border of an area, and these special routers are known as Area Border Routers. Routers that exist inside the area flood the area with routing information Like internet service providers divide the internet into a different autonomous system for easy management and OSPF further divides the autonomous systems into Areas. OSPF divides the autonomous systems into areas where the area is a collection of networks, hosts, and routers. The main goal is to have the same information about every router in an LSDBs. Once the LSAs have been flooded, the OSPF stores the information in a link-state database known as LSDB. These LSAs contain information about every router, subnet, and other networking information. The way the router learns this information by sending LSA (Link State Advertisements). Every router contains the same information about the network. The OSPF achieves by learning about every router and subnet within the entire network. It is based on a link-state routing algorithm in which each router contains the information of every domain, and based on this information, it determines the shortest path. It is an interior gateway protocol that has been designed within a single autonomous system. It is an intradomain protocol, which means that it is used within an area or a network. It is a widely used and supported routing protocol.

The OSPF stands for Open Shortest Path First.
