OSPFv2 and OSPv3

Overview

OSPF is a hierarchical link-state interior gateway protocol that operates within ASs and is used in IP networks. OSPFv2 applies to IPv4 addressing whereas OSPFv3 applies to IPv6 addressing. OSPFv2 is defined in RFC 2328; OSPFv3 is defined in RFC 5340.

OSPF packets are routed based on the destination IP address of the IP packets. Each OSPF router collects link-state information to build a network topology based on OSPF areas. This topology is used to apply the Dijkstra algorithm to calculate the shortest path to each destination in the network.

OSPFv3 can run in Sparse or Only mode. In Sparse mode OSPFv3 uses Legacy LSAs to compute the shortest path and extended LSA is used by segment routing. In Only mode OSPFv3 uses extended LSA for SPF computation. See the appropriate device documentation for more information about OSPF.

When LDP over RSVP is enabled for OSPF, LSP can be used by the IGP to calculate its SPF tree. The IGP then provides LDP with all of the ECMP IDP next-hops and tunnel endpoints that the IGP identifies as the lowest cost path to the destination. If an IGP calculation and an LDP over RSVP have the same cost, LDP chooses an LDP over RSVP tunnel over an IGP route and ECMP between the two types is not considered. The type and number of tunnels that are to be considered by LDP depend on the IGP costs, where the lowest cost between the tunnel endpoint and the target is selected.

Flexible Algorithm support

Flexible IGP algorithms allow IGPs to compute constraint-based paths over the network. A flexible algorithm definition can be configured for each NE in the global NE properties. The flexible algorithm definition provides topology constraints on a per-NE basis. A flexible algorithm definition requires an administrative group; see To configure an administrative group policy.

A set of flexible algorithm definitions creates a flexible algorithm topology. If flexible participation has been configured on an OSPF instance, the IGP uses constraint-based shortest path first and the flexible algorithm definitions to find the best paths through the flexible algorithm topology.

OSPF areas

The hierarchical design of OSPF allows a collection of networks to be grouped into a logical OSPF area. The topology of the area is hidden from the rest of the AS, which significantly reduces OSPF protocol traffic. Routing in the AS takes place on two levels, depending on whether the source and destination of a packet reside in the same area (intra-area routing) or different areas (inter-area routing). In intra-area routing, the packet is routed solely on information obtained within the area; routing information obtained from outside the area is not used. Routers that belong to more than one area called an ABR. An ABR maintains a separate topological database for each area it is connected to. Every router that belongs to the same area has an identical topological database for that area.

OSPF neighbors

Routers in the same broadcast domain or at each end of a point-to-point telecommunications link form adjacencies when they detect each other. The detection occurs when a router identifies itself in a hello OSPF protocol packet. This is called a two-way state and is the most basic relationship. The routers in an Ethernet or frame relay network select a designated router and a backup designated router which act as a hub to reduce traffic between routers. OSPF uses both Unicast and multicast to send hello packets and link state updates.

The OSPF protocol establishes and maintains neighbor relationships in order to exchange routing updates with other routers. The neighbor relationship table is called an adjacency database in OSPF. Provided that OSPF is configured correctly, OSPF forms neighbor relationships only with the routers directly connected to it. In order to form a neighbor relationship between two routers, the interfaces used to form the relationship must be in the same area. An interface can only belong to a single area.

OSPF super-backbone

The OSPF super-backbone provides an additional layer of hierarchy in OSPF. The OSPF super-backbone functions include:

The PE routers that connect OSPF areas to the super-backbone function as ABRs in the OSPF areas to which they are attached. To achieve full compatibility, the PE routers can also serve as ASBRs in non-stub areas.

PE routers insert inter-area routes from other areas into the area in which the CE router is present. The CE routers are not involved at any level and are not aware of the super-backbone or other OSPF areas that exist outside of the super-backbone.

When you configure the super-backbone, all destinations that are learned by PEs with matching domain IDs become inter-area routes.

See the appropriate device documentation for more information about the OSPF super-backbone.