OSPF - non-zero Forwarding Address example

The forwarding address in OSPF becomes non-zero on Cisco routers when certain conditions are met. Typically, the forwarding address remains as 0.0.0.0, but when these conditions occur, it takes on a non-zero value, which is the IP address of the advertising router's interface. The configuration and network setup influence this behavior.

Conditions for the Forwarding Address to Become Non-Zero

  1. OSPF is enabled on the interface where the external route is being redistributed.

    • The interface redistributing the external route must have OSPF enabled, meaning it is part of an OSPF area and participates in OSPF routing.
  2. The interface is not a point-to-point or point-to-multipoint interface.

  3. The interface is not configured as passive in OSPF.

    • If the OSPF interface is marked as passive (passive-interface command), OSPF will not form adjacencies on that interface, and the forwarding address will remain 0.0.0.0.
  4. The interface has a valid IP address within the OSPF area.

    • The IP address of the interface that is redistributing external routes must be part of an OSPF area. If the interface is within the same area as the external route, OSPF may set the forwarding address to the interface's IP address.
  5. The external route is being redistributed into OSPF from another routing protocol (e.g., BGP, RIP, or static routes).

    • When an external route is redistributed into OSPF, and the above conditions are met, the forwarding address is set to the IP address of the interface that is doing the redistribution.

Example Scenario

Let’s say you have an OSPF-enabled router that is redistributing BGP or static routes into OSPF. The router has multiple interfaces in different OSPF areas. If the interface that is redistributing the external route into OSPF meets the above conditions, the forwarding address will be the IP address of that interface.

Example Configuration that Could Cause a Non-Zero Forwarding Address

router ospf

In this configuration:

  • OSPF is enabled on interfaces GigabitEthernet0/0 and GigabitEthernet0/1.
  • External routes (e.g., from BGP or static) are being redistributed into OSPF.
  • The forwarding address will be non-zero if OSPF-enabled interfaces are used to redistribute the external routes, and all the conditions are met (e.g., OSPF is not passive, and it's not a point-to-point interface).

Example of Redistributing a Static Route

router ospf

If the static route is redistributed into OSPF, and the interface redistributing that static route meets the above conditions (non-passive, OSPF-enabled, etc.), the forwarding address will be set to the IP address of the interface.

Summary

The forwarding address becomes non-zero when:

  • OSPF is enabled on the interface.
  • The interface is not point-to-point or point-to-multipoint.
  • The interface is not passive in OSPF.
  • The external route is being redistributed into OSPF from another routing protocol.

By configuring OSPF correctly and understanding these conditions, you can control whether the forwarding address becomes non-zero.

Links to this page: