OSPF Forwarding Address

The forwarding address appears as part of the information associated with the LSAs found within the OSPF database. It's an optional field in the OSPF Type 5 LSAs (external_ and Type7 LSAs (NSSA External) which specifies the next hop IP address to which packets for the advertised destination should be sent.

  • The forwarding address tells routers within the OSPF area that they can directly forward traffic to this address instead of sending it to the router that originated the external LSA.
  • It helps in optimizing routing paths, reducing the chance of suboptimal routing by allowing traffic to bypass the originating router when a better path exists through the forwarding address.

By default, the forwarding address is usually set to 0.0.0.0, meaning traffic is forwarded to the advertising router. However, if the advertising router's interface that is redistributing external routes belongs to an OSPF-enabled subnet, the forwarding address might be set to the IP address of that interface.

The decision to set the forwarding address depends on several conditions: 1. The external route is being redistributed into OSPF. 2. The advertising router has an interface in the same area as the external route. 3. The interface is not passive, and OSPF is enabled on that interface. 4. The interface is not point-to-point or point-to-multipoint.

If the forwarding address is set, other OSPF routers will check that address. If they have a route to the forwarding address in their OSPF routing table, they can route traffic directly to that address, potentially bypassing the OSPF router that originally advertised the external route. This can lead to more efficient routing, especially when the forwarding address is on the same network as the receiving router.

This results in:

  • External Route Optimization: In cases where a better path exists through a different router in the network, the forwarding address allows routers to directly forward packets to the external network without traversing the originating router.
  • NSSA and Type 7 LSAs: In NSSAs, where Type 7 LSAs are used to represent external routes, the forwarding address can often be more efficient for optimizing how traffic reaches those external routes.

The OSPF forwarding address helps in optimizing routing within an OSPF network by allowing traffic to be forwarded directly to an external network through an address that might be closer to the destination, instead of going through the originating router.

To see an example of when the forwarding address may become non-zero, take a look at OSPF - non-zero Forwarding Address example.

https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/iproute_ospf/command/iro-cr-book/ospf-s1.html#wp1717098229

https://www.cisco.com/c/en/us/support/docs/ip/open-shortest-path-first-ospf/25493-type5-lsa.html