11-13-2015 08:57 PM - edited 03-08-2019 02:42 AM
Good day.
Please review topology used:
R1 and R3 - both ASBRs and redistributes information about connected networks 11.11.11.0/24 and 33.33.33.0/24. AREA1 is NSSA Area.
Both interfaces on R2 in directions to R1 and R3 have cost of 10. But take a look at R2 output:
R2#sh ip route 11.11.11.0 Routing entry for 11.11.11.0/24 Known via "ospf 1", distance 110, metric 20, type extern 2, forward metric 10 Last update from 192.168.12.1 on FastEthernet0/0, 00:00:06 ago Routing Descriptor Blocks: * 192.168.12.1, from 1.1.1.1, 00:00:06 ago, via FastEthernet0/0 Route metric is 20, traffic share count is 1 R2#sh ip route 33.33.33.0 Routing entry for 33.33.33.0/24 Known via "ospf 1", distance 110, metric 20, type NSSA extern 2, forward metric 11 Last update from 192.168.23.3 on FastEthernet0/1, 00:00:58 ago Routing Descriptor Blocks: * 192.168.23.3, from 3.3.3.3, 00:00:58 ago, via FastEthernet0/1 Route metric is 20, traffic share count is 1 |
Forward metric to route from NSSA area is 11!
Lets check boundary routers output
R2#sh ip ospf border-routers OSPF Process 1 internal Routing Table Codes: i - Intra-area route, I - Inter-area route i 1.1.1.1 [10] via 192.168.12.1, FastEthernet0/0, ASBR, Area 0, SPF 8 i 3.3.3.3 [10] via 192.168.23.3, FastEthernet0/1, ASBR, Area 1, SPF 6 |
Cost to both ASBRs same. But why is forward metric different? Obviously this is somehow connected to NSSA but i cant find place where this is described. Can somebody point me where I can find description of this behaviour? At RFC 3101 I found nothing about this.
Solved! Go to Solution.
11-14-2015 08:59 AM
Hm, I guess 3.3.3.3 is R3's Loopback interface?
And the next-hop of the static route on R3 is the loopback interface?
R3#show ip route static
33.0.0.0/24 is subnetted, 1 subnets
S 33.33.33.0 is directly connected, Loopback0
R3#show ip ospf interface brief
Interface PID Area IP Address/Mask Cost State Nbrs F/C
Lo0 1 1 3.3.3.3/32 1 LOOP 0/0
(...)
That's how R2 calculates the forward metric: R2's outgoing interface cost (10) + R3's next-hop interface cost (1) = 11
A 'show ip route 3.3.3.3' should show the same metric.
You can change R3's loopback cost and/or R2's Fa0/1 - the forward metric should always be the sum of both.
11-13-2015 09:48 PM
Hello,
On which router did you set IP ospf cost?
11-14-2015 08:15 AM
On none indeed =)
11-14-2015 04:32 AM
Hi Alexey,
the (internal) cost of an OSPF external route is evaluated first by the examination of the Forwarding Address (FA) field of the Type-5 LSA or, in the case of a NSSA, the Type-7 LSA.
Only if the FA is set to 0.0.0.0 the router will evaluate the path to the ASBR for the internal cost calculation.
For Type-5 LSAs, certain conditions must be met in order to set the FA to an non-zero value: Common Routing Problem with OSPF Forwarding Address
So normally we don't see very often Type-5 LSAs with the FA set to non-zero values.
This is different inside a NSSA; here, Type-7 LSAs with non-zero FAs are not the exeption, but the rule (see RFC 3101 2.3ff).
You can see the content of the FA fields with 'show ip ospf database {external | nssa-external}', with the (non-zero) FA IP-address you'll need to do a routing-table lookup.
Feel free to ask further!
HTH
Rolf
11-14-2015 04:32 AM
I'm not so sure, what you wrote abiut FA is correct but R3 use it's wond address as FA, so R2 make a lookup and find it is directly connected and use interf cost as metric. I made a little lab in GNS and in my lab and the to route has extaly the same forward metric. See attachment.
Alexey could you post a sh ip ospf interf ?
Enrico
11-14-2015 05:52 AM
Enrico,
thanks for your comment.
I simplified some things in my first post, you know it can be painful to dive into the details of OSPF ;-)
so R2 make a lookup and find it is directly connected and use interf cost as metric
I guess you applied the static route to the null interface on R3 or the exit-interface isn't OSPF enabled?
When an OSPF internal route for the next-hop address of the static route exists, the FA should be set to that next-hop address, and the forward-metric (internal part of OSPF cost) should be equal to the metric of the OSPF route to the FA network.
Rolf
11-14-2015 07:29 AM
Hi Rolf,
ou're right. I forgot this OSPF trick. In any case we have to suppose that Alexey's config has some difference between R1 and R3 otherwise thay should have the same matric, inst'it ?
In the draft, both routers have inteface to external network outside OSPF domain but he may accidently put R3 interface in OSPF.
E
11-14-2015 08:24 AM
we have to suppose that Alexey's config has some difference
The only difference is area 1 nssa command, and if i delete this command the output becomes more predictible
R2#sh ip route 11.11.11.0 R2#sh ip route 33.33.33.0 |
11-14-2015 09:38 AM
You would see the same behaviour in a regular area when the FA of the Type-5 LSA was set to a non-zero value.
But to achieve that, you'd have to redistribute a static route with a next-hop reachable through an multi-access interface which is (non-passive) OSPF enabled.
With a Loopback interface as next-hop this is not possible.
To demonstrate this, I've added an FastEth interface on R1 and changed the static route like this:
R1#show ip ospf int br
Interface PID Area IP Address/Mask Cost State Nbrs F/C
Fa1/0 1 0 192.168.1.1/24 1 DR 0/0
Fa0/0 1 0 192.168.12.1/24 1 DR 1/1
R1#show ip route static
11.0.0.0/24 is subnetted, 1 subnets
S 11.11.11.0 [1/0] via 192.168.1.2
R2#show ip ospf database external
OSPF Router with ID (2.2.2.2) (Process ID 1)
Type-5 AS External Link States
Routing Bit Set on this LSA
LS age: 122
Options: (No TOS-capability, DC)
LS Type: AS External Link
Link State ID: 11.11.11.0 (External Network Number )
Advertising Router: 1.1.1.1
LS Seq Number: 80000003
Checksum: 0x2DE9
Length: 36
Network Mask: /24
Metric Type: 2 (Larger than any link state path)
TOS: 0
Metric: 10
Forward Address: 192.168.1.2
External Route Tag: 0
R2#show ip route 192.168.1.2
Routing entry for 192.168.1.0/24
Known via "ospf 1", distance 110, metric 11, type intra area
Last update from 192.168.12.1 on FastEthernet0/0, 00:00:11 ago
Routing Descriptor Blocks:
* 192.168.12.1, from 1.1.1.1, 00:00:11 ago, via FastEthernet0/0
Route metric is 11, traffic share count is 1
R2#show ip route 11.11.11.11
Routing entry for 11.11.11.0/24
Known via "ospf 1", distance 110, metric 10, type extern 2, forward metric 11
Last update from 192.168.12.1 on FastEthernet0/0, 00:00:38 ago
Routing Descriptor Blocks:
* 192.168.12.1, from 1.1.1.1, 00:00:38 ago, via FastEthernet0/0
Route metric is 10, traffic share count is 1
11-14-2015 09:44 AM
With Type5 it seems obvious, but with redistributed loopback as to me there are a couple of differencies. Nevertheless it seems that behaviour is the same
11-14-2015 08:27 AM
Here you are
R2#sh ip ospf interface brief Interface PID Area IP Address/Mask Cost State Nbrs F/C Lo0 1 0 2.2.2.2/32 1 LOOP 0/0 Fa0/0 1 0 192.168.12.2/29 10 P2P 1/1 Fa0/1 1 1 192.168.23.2/29 10 P2P 1/1 |
BTW based on your output with same Forward metric Im not sure now - maybe i hit some bag instead of feature ^^
Can you please tell your IOS version and how had you done redistribution - via redustribute connected?
11-14-2015 08:17 AM
Hi Rolf,
In this particular case Forwarding address is the same with ASBR (R3) address - there is no other ABR`s between R2 and R3.
R2#sh ip ospf database nssa-external OSPF Router with ID (2.2.2.2) (Process ID 1) Type-7 AS External Link States (Area 1) Routing Bit Set on this LSA |
11-14-2015 08:59 AM
Hm, I guess 3.3.3.3 is R3's Loopback interface?
And the next-hop of the static route on R3 is the loopback interface?
R3#show ip route static
33.0.0.0/24 is subnetted, 1 subnets
S 33.33.33.0 is directly connected, Loopback0
R3#show ip ospf interface brief
Interface PID Area IP Address/Mask Cost State Nbrs F/C
Lo0 1 1 3.3.3.3/32 1 LOOP 0/0
(...)
That's how R2 calculates the forward metric: R2's outgoing interface cost (10) + R3's next-hop interface cost (1) = 11
A 'show ip route 3.3.3.3' should show the same metric.
You can change R3's loopback cost and/or R2's Fa0/1 - the forward metric should always be the sum of both.
11-14-2015 09:03 AM
Hi Rolf,
Thank you for helping! I appreciate you intent to help me figure out the cause of this behaviour.
You are right its loopback as well as 33.33.33.0. So there is no static route - I redistributed connected. And because fact that this is Type 2 route it have nothing to do with loopbacks cost.
11-14-2015 09:20 AM
And because fact that this is Type 2 route it have nothing to do with loopbacks cost.
Type 2 means that only the external part of the cost is used for the metric of the route.
But he internal part (forward metric) will be compared when more than one E2 external LSA for the same prefix and with the same external metric exist. The one with the lower internal cost will be installed in the routing table in such a case.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide