cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2162
Views
10
Helpful
16
Replies

Question about OSPF Forwarding Address

Sean.N
Level 1
Level 1

Below is the examp

 

Snipaste_2022-04-15_18-16-50.png

 

In above setup, R3 will reach 192.168.1.1 via R5, R4, R2. This is due to forwarding address is 0.0.0.0. In order to fix this we can run OSPF on R2's Gi0/0. By doing this, the forwarding address for 192.168.1.1 will change to R1's IP address 10.123.1.1 (for example). But R3 will not install 192.168.1.1 into RIB because the forwarding address is not a OSPF intra or inter area route. Instead, it's direct connected route on R3 itself. Till here I can fully understand.

 

However, in the book R3's Gi0/0 run OSPF as well (see below). By doing this, R3 can install 192.168.1.1 into RIB and reach it directly from Gi0/0.

Snipaste_2022-04-15_18-22-28.png

I dont understand why this can work. Even we run OSPF on R3's Gi0/0, the 10.123.1.0/24 still a connected route in RIB and not meeting the requirement "If the Type 5 LSA forwarding address is not a default value, the address must be an intra-area or interarea OSPF route. If the route does not exist, the LSA is ignored and is not installed into the RIB"

 

Or my understanding is wrong, as long as the forwarding address is in OSPF DB it will work (not necessary to be in RIB) ?

16 Replies 16

Jon Marshall
Hall of Fame
Hall of Fame

 

Correct, the router needs to find the forwarding address in it's OSPF routing table and that is why you need to run OSPF on R3's gi0/0 interface. 

 

Obviously, as you say, the route for that subnet in the global routing table will not be OSPF but directly connected. 

 

Should add, I have never used or tested it but the above is my understanding of how it works. 

 

Jon

In RFC2328:

If the forwarding address is non-zero, look up the forwarding address in the routing table.[24] 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.

 

Couple of things about that. 

 

Firstly that is RFC and vendors are free to modify the behaviour if they so wish. 

 

Secondly, which routing table because OSPF has it's own routing table. 

 

Jon

"OSPF routing table"? are you are talking about "OSPF DB"? Routing table should refer to RIB. RFC never use "OSPF routing table".

 

Secondly, base on your logic what's the difference between enable and dont enable OSPF on R3's Gi0/0? As long as R2 run OSPF on Gi0/0, R3 can have forwarding address in it's OSPF DB. So your point is not valid.

 

 

Have you labbed this up and tested it because I think I may well have got this wrong but unfortunately don't have access to a lab at the moment. 

 

Jon

 

Did a bit of searching on these forums as I am sure I have seen this before and found this - 

 

https://community.cisco.com/t5/switching/ospf-forward-address/td-p/3335178

 

not exactly the same but similiar in that enabling OSPF on R4's interface is enough to pass the forwarding address check. 

 

Still I understand the point you are making. 

 

Jon

...


....

As RFC2328 indicates:

If the forwarding address is non-zero, look up the forwarding address in the routing table.[24] 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.

 

How does case 3 actually works? The forwarding address in the routing table is not coming from OSPF.

...

 

The issue is this - 

 

"If the Type 5 LSA forwarding address is not a default value, the address must be an intra-area or interarea OSPF route. If the route does not exist, the LSA is ignored and is not installed into the RIB" 

 

In the OPs example the forwarding address would be 10.23.1.1 but because R3 is directly connected to that subnet the route in the routing table will be a directly connected route and not an OSPF route as above. 

 

I have read multiple different articles all suggesting to start OSPF on R3's gi0/0 interface but what they don't explain is how this then puts an OSPF intra or inter area route into the RIB (it doesn't obviously). 

 

I have even read an article where it is suggested Cisco's implementation of OSPF will use any route to the forwarding address in the routing table which is why I wondered if the OP had tested it. 

 

Jon

 

...

Yes, u got my point ... i couldn't find why we need to enable  OSPF on R3's gi0/0 as well. They just say "enable it" and it works...

 

I dont think Cisco use any route for FA, i tested it as long as disable OSPF on R3's Gi0/0, the destination 192.168.1.1/32 will be removed from RIB.

 

I found below from Cisco as well

 

In IOS when you have an OSPF external route in the database and the forwarding address is set, the forwarding address must be known via OSPF inter or intra area route. If the forwarding address is not known via either OSPF intra or inter area route, router does not install the external OSPF route into Routing Information Base (RIB).

 

https://community.cisco.com/t5/routing/question-about-ospf-forwarding-address/m-p/4593458/thread-id/365219

 

 

 

Yep, I keep finding contradictory information on Cisco's and other sites so not sure exactly what is happening here. 

 

That link I posted to has two of the best guys on here so it may be worth adding to that and one of them may see it and shed some light on it. 

 

Apoologies for the original answer, thought I understood it but clearly didn't (happens a lot on here) 

 

Jon