Open Shortest Path First

2 minute read

Updated:

Open Shortest Path First, Short Brief

  • Open Shortest Path First (OSPF) is link-state (OSPFv2 for IPv4) routing protocol for the Internet Protocol (IP) network.
  • OSPF determines the best path (route) in topology at the cost of egress interface (out interface) bandwidth, delay, and load.
  • OSPF falls into the group of interior gateway protocols (IGPs).

  • Router ID (RID) are 32 bits IP address in OSPF, which is maybe manually configured, loopback interface (highest IP) or any active interface IP address (highest IP) respectively.

  • Designated Router (DR) and Backup Designated Router (BDR) are elections made on OSPF priority and RID.
  • DR and BDR election is made in a shared network only.
  • DR is sent type2 LSA information on multicast address (224.0.0.6) to other routers in a shared network.
  • Type1 LSA is sent by every router (directly connected link and cost of the link) multicast address 225.0.0.5. In point to point link its sends LSDB on the unicast address.

These five state are to establish neighbor relationship is Init, 2-Way, EXT, LOADING and FULL.

  1. Init: The init state indicates that a HELLO packet has been received from a neighbor, but the router has not established a two-way conversation.
  2. 2-Way: The 2-Way state indicates the establishment of a bidirectional conversation between two routers. This state immediately precedes the establishment of adjacency. This is the lowest state of a router that may be considered as a Designated Router.
  3. Exstart: Once the DR and BDR are elected, the actual process of exchanging link state information can start between the routers and their DR and BDR.
  4. Loading: In the Loading state, a router requests the most recent (LSAs) from its neighbor discovered in the previous state.
  5. Full: The Full state concludes the conversation when the routers are fully adjacent, and the state appears in all router- and network-LSAs. 5.

The link-state databases of the neighbours are fully synchronized.

As a link-state routing protocol, OSPF maintains link-state databases (LSDB), which are really network topology maps. The state of a given route in the network is the cost, and OSPF allows every router to calculate the cost of the routes to any reachable destination. A router interface with OSPF will then advertise its link cost to neighbouring routers through multicast address 224.0.0.5, known as the hello procedure. All routers with OSPF implementation continuously update their link-state databases with information about the network topology and adjust their routing tables.

An OSPF network can be divided into areas that are logical groupings of hosts and networks. An area includes its connecting router having interfaces connected to the network. Each area maintains a separate link-state database. Thus, the topology of an area is unknown outside the area. This reduces the routing traffic between parts of an autonomous system.

These two commands are useful in OSPF to try.

show ip ospf interface brief, show ip ospf neighbor

Comments