The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
This document describes the concepts and the problem associated with the Open Shortest Path First (OSPF) forwarding address. Refer to Why Are Some OSPF Routes in the Database but Not the Routing Table? for more information about troubleshooting OSPF.
The problem explained in this document is only observable with Cisco IOS® Software releases earlier than 12.1(3). The behavior of redistribution has changed in Cisco IOS Software Release 12.1(3) and later. For more details, refer to Cisco bug ID CSCdp72526 (registered customers only) . This bug has the list of Cisco IOS Software releases affected and the fixed versions. Also refer to Redistributing Connected Networks into OSPF where the change in Cisco IOS behavior is explained.
Readers of this document should have knowledge of these topics:
General IP routing.
OSPF routing protocol concepts and terms.
The information in this document is based on these software and hardware versions:
Cisco 2503 routers
Cisco IOS® Software Release 12.2(24a) running on all the routers
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.
For more information on document conventions, refer to the Cisco Technical Tips Conventions.
The concept of the OSPF forwarding address was introduced to avoid extra hops when traffic is routed to an external autonomous system (AS), as shown in this figure.
In the figure, there are two routers in the OSPF domain that connect to the external domain. However, only Router 1 exchanges routing information with Router 100. Router 1 redistributes the information learned from Router 100 into OSPF and advertises the information to the rest of the OSPF domain. In doing this, Router 1 becomes the next hop (or forwarding address) for the information that it redistributes to the OSPF domain. When Router 2 receives a packet from the OSPF domain destined for an address in the external domain, it forwards the packet to Router 1. Router 1 then forwards it to Router 100. The forwarding address concept allows this extra hop to be avoided because it allows Router 1 to specify another router's IP address as the forwarding address. In the figure, Router 1 can specify Router 100 as the forwarding address for external information that Router 1 redistributes into the OSPF domain. When Router 2 receives a packet from the OSPF domain destined for an address in the external domain, it forwards the packet to Router 100. The result is that the extra hop is avoided through Router 1.
The value of the forwarding address specified by the autonomous system boundary router (ASBR) (Router 1 in the previous figure) can be either 0.0.0.0 or non-zero. The 0.0.0.0 address indicates that the originating router (the ASBR) is the next hop. The forwarding address is determined by these conditions:
The forwarding address is set to 0.0.0.0 if the ASBR redistributes routes and OSPF is not enabled on the next hop interface for those routes. This is true in the figure if Router 1 does not have OSPF enabled on the Ethernet interface.
These conditions set the forwarding address field to a non-zero address:
OSPF is enabled on the ASBR's next hop interface AND
ASBR's next hop interface is non-passive under OSPF AND
ASBR's next hop interface is not point-to-point AND
ASBR's next hop interface is not point-to-multipoint AND
ASBR's next hop interface address falls under the network range specified in the router ospf command.
Any other conditions besides these set the forwarding address to 0.0.0.0.
For information on how the forwarding address is set and affects path selection refer to The Effects of the Forwarding Address on Type 5 LSA Path Selection.
The R2513 router, which only runs RIP (and may be connected to a RIP-only network), is added to the Token Ring network in the figure. When the routes learned from R2513 are redistributed into OSPF by the ASBR (R2515), some of the routes are not installed into the routing table of some of the routers. The relevant configuration information of each of the routers is given in these tables.
interface Serial0 ip address 18.104.22.168 255.255.255.0 interface TokenRing0 ip address 22.214.171.124 255.255.255.0 router ospf 1 network 126.96.36.199 0.0.0.255 area 0 network 188.8.131.52 0.255.255.255 area 1 area 1 range 184.108.40.206 255.0.0.0
interface Serial0 ip address 220.127.116.11 255.255.255.0 interface Serial1 ip address 18.104.22.168 255.255.255.0 router ospf 1 network 22.214.171.124 0.0.0.0 area 0 default- information originate metric 20 ip route 0.0.0.0 0.0.0.0 Serial1
interface TokenRing0 ip address 126.96.36.199 255.255.255.0 interface ethernet 0 ip address 188.8.131.52 255.255.255.0 router rip network 184.108.40.206 network 220.127.116.11
interface TokenRing0 ip address 18.104.22.168 255.255.255.0 interface ethernet 0 ip address 22.214.171.124 255.255.255.0 interface ethernet 1 ip address 126.96.36.199 255.255.255.0 router ospf 1 redistribute rip metric 20 subnets network 0.0.0.0 255.255.255.255 area 1 router rip network 188.8.131.52 passive-interface ethernet 0 passive-interface ethernet 1
The configurations in the tables show that R2515 redistributes RIP into OSPF and that R2504 (the area border router [ABR]) creates a summarized network 184.108.40.206/8.
These are the routing tables for each of the OSPF enabled routers:
R2507# show ip route Gateway of last resort is 0.0.0.0 to network 0.0.0.0 220.127.116.11/ 24 is subnetted, 1 subnets C 18.104.22.168 is directly connected, Serial0 22.214.171.124/ 8 is variably subnetted, 4 subnets, 2 masks O IA 126.96.36.199/ 8 [110/ 70] via 188.8.131.52, 00: 15: 37, Serial0 O E2 184.108.40.206/ 24 [110/ 20] via 220.127.116.11, 00: 06: 37, Serial0 O E2 18.104.22.168/ 24 [110/ 20] via 22.214.171.124, 00: 06: 37, Serial0 O E2 126.96.36.199/ 24 [110/ 20] via 188.8.131.52, 00: 06: 37, Serial0 184.108.40.206/ 24 is subnetted, 1 subnets C 220.127.116.11 is directly connected, Serial1 S* 0.0.0.0/ 0 is directly connected, Serial1 R2504# show ip route Gateway of last resort is 18.104.22.168 to network 0.0.0.0 22.214.171.124/ 24 is subnetted, 1 subnets C 126.96.36.199 is directly connected, Serial0 188.8.131.52/ 8 is variably subnetted, 4 subnets, 2 masks S 184.108.40.206/ 8 is directly connected, Null0 C 220.127.116.11/ 24 is directly connected, TokenRing0 O 18.104.22.168/ 24 [110/ 11117] via 22.214.171.124, 00: 15: 16, TokenRing0 O 126.96.36.199/ 24 [110/ 11117] via 188.8.131.52, 00: 15: 16, TokenRing0 O E2 184.108.40.206/ 24 [110/ 20] via 220.127.116.11, 00: 06: 16, TokenRing0 O* E2 0.0.0.0/ 0 [110/ 20] via 18.104.22.168, 00: 15: 16, Serial0 R2515# show ip route Gateway of last resort is 22.214.171.124 to network 0.0.0.0 126.96.36.199/ 24 is subnetted, 1 subnets O IA 188.8.131.52 [110/ 70] via 184.108.40.206, 00: 10: 28, TokenRing0 220.127.116.11/ 24 is subnetted, 3 subnets C 18.104.22.168 is directly connected, TokenRing0 R 22.214.171.124/ 24 [120/ 1] via 126.96.36.199, 00: 00: 10, TokenRing0 O* E2 0.0.0.0/ 0 [110/ 20] via 188.8.131.52, 00: 10: 28, TokenRing0
R2515 has a RIP (R) derived route for network 184.108.40.206/24. R2515 is the ASBR and redistributes the RIP protocol into OSPF. R2504 learns about network 220.127.116.11/24 from R2515 and installs it in its routing table as an OSPF external type 2 (E2) route. The problem is that R2507 does not have network 18.104.22.168/24 in its routing table.
R2507 has external routes for networks 22.214.171.124/24, 126.96.36.199/24 and 188.8.131.52/24, even though all of these networks should be included in the summary of 184.108.40.206/8.
The reason these external routes show up is that the ASBR, which redistributes RIP into OSPF, has RIP running on these three subnets. It therefore redistributes the subnets as external routes into OSPF. Since these subnets are external routes, they are not summarized by the ABR (R2504). External OSPF routes can only be summarized by the ASBR. In this case, R2515. The ABR summarizes only internal OSPF routes from area 1 into area 0.
Note: With the fix of Cisco bug ID CSCdp72526 (registered customers only) , OSPF does not generate a type-5 link-state advertisement (LSA) of an overlapped external network. R2507 only has a summary inter-area route of 220.127.116.11/8. Then, R2507 installs 18.104.22.168/24 as the forwarding address and it is reachable via inter-area route 22.214.171.124/8. This is in compliance with RFC 2328 .
This output shows the external LSA for network 126.96.36.199/24 in the OSPF database of R2507:
R2507# show ip ospf data external 188.8.131.52 OSPF Router with ID (184.108.40.206) (Process ID 1) Type- 5 AS External Link States LS age: 72 Options: (No TOS- capability, DC) LS Type: AS External Link Link State ID: 220.127.116.11 (External Network Number ) Advertising Router: 18.104.22.168 LS Seq Number: 80000001 Checksum: 0xF161 Length: 36 Network Mask: /24 Metric Type: 2 (Larger than any link state path) TOS: 0 Metric: 20 Forward Address: 22.214.171.124 External Route Tag: 0
OSPF allows the ASBR to specify another router as the forwarding address to external routes. In this case, the ASBR (R2515) has specified 126.96.36.199 as the forwarding address for the external network 188.8.131.52.
RFC 2328 , section 16.4 (Calculating AS external routes), states:
"If the forwarding address is non-zero, look up the forwarding address in the routing table. The matching routing table entry must specify an intra-area or inter-area path; if no such path exists, do nothing with the LSA and consider the next in the list."
In this example, the route to the forwarding address 184.108.40.206 is shown here:
R2507# show ip route 220.127.116.11 Routing entry for 18.104.22.168/ 24 Known via "ospf 1", distance 110, metric 20,type extern 2, forward metric 70 Redistributing via ospf 1 Last update from 22.214.171.124 on Serial0, 00: 00: 40 ago Routing Descriptor Blocks: * 126.96.36.199, from 188.8.131.52, 00: 00: 40 ago, via Serial0 Route metric is 20, traffic share count is 1
The forwarding address of 184.108.40.206 is matched by the external route 220.127.116.11/24 instead of the inter-area summary route 18.104.22.168/8 due to the longest match rule. Because the router does not have an internal OSPF route to the forwarding address, it does not install the external route 22.214.171.124/24 in the routing table. The use of an external route to reach another external route may lead to loops. Therefore OSPF does not permit it.
How can you ensure that the non-zero forwarding address exists in the routing table as an intra-area or inter-area route?
The first solution is not to summarize on the ABR.
The second solution is not to configure any LSA type 3 filtering. If type 3 routes are filtered, the Forwarding address that appears on the output of the show ip ospf database external command is not reachable. This makes the external network unreachable. In this case, R2504. This causes routers in area 0 to have inter-area routes (instead of external routes) for all the specific subnets in other areas.
Use these commands to remove the summarization on the ABR:
R2504(config)# router ospf 1 R2504(config- router)# no area 1 range 126.96.36.199 255.0.0.0
The results of this command in the routing table on R2507 are shown here:
R2507# show ip route Gateway of last resort is 0.0.0.0 to network 0.0.0.0 188.8.131.52/ 24 is subnetted, 1 subnets C 184.108.40.206 is directly connected, Serial0 220.127.116.11/ 24 is subnetted, 3 subnets O IA 18.104.22.168 [110/ 70] via 22.214.171.124, 00: 00: 48, Serial0 O IA 126.96.36.199 [110/ 80] via 188.8.131.52, 00: 00: 48, Serial0 O IA 184.108.40.206 [110/ 80] via 220.127.116.11, 00: 00: 48, Serial0 18.104.22.168/ 24 is subnetted, 1 subnets C 22.214.171.124 is directly connected, Serial1 O E2 126.96.36.199/ 24 [110/ 20] via 188.8.131.52, 00: 00: 48, Serial0 S* 0.0.0.0/ 0 is directly connected, Serial1 R2507# show ip route 184.108.40.206 Routing entry for 220.127.116.11/24 Known via "ospf 1", distance 110, metric 70, type inter area Last update from 18.104.22.168 on Serial1, 00:03:52 ago Routing Descriptor Blocks: * 22.214.171.124, from 126.96.36.199, 00:03:52 ago, via Serial1 Route metric is 74, traffic share count is 1
From the output, you can see that the address 188.8.131.52 is reachable through an inter-area route to the network 184.108.40.206/24 . The router R2507 learns the route to this network through both a Type-5 LSA and Type-3 LSA, after summarization on the ABR R2504 is removed. Since OSPF prefers an inter-area route over an external route to the same network, it installs it as an inter-area route. Sine R2507 now has an inter-area route to the forwarding address 3.3.4,4, the external network 220.127.116.11/24 is also installed in its routing table.
Note: If the NSSA ( Not So Stubby Area) is used and if the type 3 LSA filtering is done on NSSA ABR, then the same issue Forwarding Address unreachable will exist.
Another solution is to prevent the subnet 18.104.22.168 from being redistributed into OSPF as an external route, since OSPF runs on it. These configuration commands in the ASBR (R2515) create a route-map. This is used by the redistribute command to allow only network 22.214.171.124/24 to be redistributed into OSPF. The ABR (R2504) still summarizes internal OSPF routes from area 1 into area 0.
R2515# configure terminal R2515(config)# router ospf 1 R2515(config-router)# redistribute rip metric 20 subnets route-map rip_to_ospf_filter R2515(config-router)# exit R2515(config)# access-list 28 permit 126.96.36.199 0.0.0.255 R2515(config)# route-map rip_to_ospf_filter permit 10 R2515(config-route-map)# match ip address 28
The results of this command in the routing table on R2507 are shown here:
R2507# show ip route Gateway of last resort is 0.0.0.0 to network 0.0.0.0 188.8.131.52/ 24 is subnetted, 1 subnets C 184.108.40.206 is directly connected, Serial0 O IA 220.127.116.11/ 8 [110/ 70] via 18.104.22.168, 00: 07: 05, Serial0 22.214.171.124/ 24 is subnetted, 1 subnets C 126.96.36.199 is directly connected, Ethernet0 O E2 188.8.131.52/ 24 [110/ 20] via 184.108.40.206, 00: 00: 21, Serial0 S* 0.0.0.0/ 0 is directly connected, Ethernet0
The only external route in the routing table is 220.127.116.11/24. This network is in the routing table because the forwarding address of this external network (18.104.22.168) is covered by the summary route 22.214.171.124/8, which is an inter-area route.