Introduction
OSPF (Open Shortest Path First) is a routing protocol used to distribute routing information within a single autonomous system (AS). OSPF is an open standard protocol that is widely used in large enterprise networks due to its scalability and fast convergence times. OSPF uses a hierarchical network structure, with routers grouped into areas, each with its own designated router (DR) and backup designated router (BDR). This structure helps to reduce the amount of routing traffic and improve the efficiency of the network. The OSPF protocol exchanges routing information between routers using link-state advertisements (LSAs), which are packets that contain information about the state of the router's links. Each router maintains a database of link states (LSDB) of all the LSAs it has received from other routers in the network. OSPF uses a metric called "cost" to calculate the shortest path between two routers. The cost is based on the bandwidth of the link, with higher bandwidth links having a lower cost. OSPF uses the Dijkstra algorithm to calculate the shortest path between two routers based on the cost. One of the benefits of OSPF is its ability to support unequal cost load balancing, which allows traffic to be distributed across multiple paths with different costs. OSPF also provides support for authentication and route summarization, which helps to reduce the amount of routing information in the network.
OSPF Router Types
OSPF uses multiple router types to maintain the OSPF process:
The DR is elected by the highest priority, highest router ID or the highest available interface IP address, depending on which information is available for the OSPF election process. The second router in that list becomes the BDR. If no priority and no router ID has been configured, the process searches for the highest interface IP address it can find and elects that router as DR and the router with the second highest IP address available as the BDR. It is recommended to use priority & router ID to determine DR & BDR when planning a OSPF network. DR & BDR are best used in broadcast multi access environments.
If a change in the network occurs, the corresponding router sends an update only to the DR. The DR listens to the multicast address 224.0.0.6. The DR then informs all other routers in the area via the multicast address 224.0.0.5. All other routers listen to the multicast address 224.0.0.5. If the DR fails, and comes back online, no new election starts. The former DR will not become the designated router again. The current DR keeps the DR role. the OSPF election process is not preemptive.
The topology above shows a OSPF broadcast multi access environment.
OSPF Tables
OSPF routers use tables that contain information to maintain the OSPF process:
OSPF Packet Types
Routers exchange mulitple different packets types to maintain the OSPF process:
Hello packets are sent via the multicast address 224.0.0.5. They contain the following information:
LSA Types
A Link State Advertisement is a packet that contains information about the state of a link or a router in a link-state routing protocol. There are several types of LSAs, which carry different types of information, and are used for different purposes in a network.
Area Types
In OSPF, a stub area is an area in which certain types of external routes are not propagated. This can help reduce the amount of OSPF traffic and improve network performance. There are several different types of stub areas in OSPF:
Network Types
Each OSPF network type has its own characteristics and considerations in terms of neighbor discovery, adjacency formation, and routing information exchange. The choice of OSPF network type depends on the underlying network topology and requirements of the OSPF deployment.
SPF Path Cost
Each link between routers is assigned a metric known as the "cost" or "path cost." OSPF calculates the shortest path by summing the costs of all the links along the path.
The Reference Bandwidth is a configurable value in OSPF and is set to 100 Mbps by default. For this example, it has been configured to 1000 Mbps manually.
The path cost is determined by the bandwidth of the link. The higher the bandwidth, the lower the cost. For example, a fast Ethernet link may have a cost of 10 while a gigabit Ethernet link may have a cost of 1. The lowest cost path is always preferred.
Administrative Distance
Administrative Distance (AD) is a value that is used to rate the priority of different routing protocols. AD is used by routers to determine which routing protocol should be preferred if multiple routing protocols are providing routing information for the same destination network. The router compares the AD of each routing protocol and selects the route with the lowest AD value as the best path.
0 Comments