Skip to content

OSPF

Open Shortest Path First

Open Shortest Path First (OSPF) is an IGP standardized and is frequently used in large enterprise networks. It has been standardized by IETF and offers fast convergence and excellent scalability. As it is a link-state routing protocol, it is known for being able to effectively utilize network bandwidth which is one of its main advantages.

OSPF Areas - Every router learns the full picture of the network including every router, its interfaces and what they connect to which causes a lot of issues to large networks like taking up too much memory and router reconverging. - OSPF support a hierarchical design which segments large networks into smaller areas to solve this problem. - Each router maintains full information about its own area, but only summary information about other areas. - There is a two-level hierarchy used for large networks: - Transit area (backbone or area 0) does not contain end users. - Regular area (nonbackbone areas) is used to connect end users to the transit area. By default, all transit traffic goes through transit area.

OSPF Adjacency

  • To configure different areas, we can use the network command at the interface level.
  • The neighbor router on the other side of the link should be configured in the same area so that the main router can form an adjacency.
FRR command Explanation
router ospf Enable or disable the OSPF process
network A.B.C.D/M area (0-4294967295) Configure an OSPF network and area
redistribute [metric] [route-map NAME] Redistributes routes learned from other protocols over OSPF
default-information originate always Used when distributing BGP and other routes internally in AS over OSPF. Redistribution of default routes (0.0.0.0) is often restricted by default. Apply appropriately.

OSPF3 (IPv6)

For IPv6 routing, OSPFv3 has to be used. Due to this being a completely new protocol version, the commands are similar, but distinct:

FRR command Explanation
router ospf3 Enable OSPF3 process
ospf3 router-id X.X.X.X Set router-id for OSPF-route-source identification.