cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1613
Views
5
Helpful
3
Replies

OSPF Intra External vs Inter External path selection

Hello everybody

I have a question about the OSPF path selection regard Intra External route vs Inter External route.

I have this simple topology

 

ospf-cisco-forum.jpg


R2 redistribute the Loopback as E2 in Area 0.
In the same way, I have R4 in Area 1 that redistribuite the same prefix as E2.

I have incremented from R1 point of view the cost toward R2 to “30”.
In such way the forwarding metric it’s worse toward my Intra External destination:

R1#show ip ospf border-routers

OSPF Router with ID (1.1.1.1) (Process ID 1)


Base Topology (MTID 0)

Internal Router Routing Table
Codes: i - Intra-area route, I - Inter-area route

I 4.4.4.4 [20] via 192.168.13.3, Ethernet0/0, ASBR, Area 0, SPF 11
i 2.2.2.2 [30] via 192.168.12.2, Ethernet0/1, ASBR, Area 0, SPF 11
i 3.3.3.3 [10] via 192.168.13.3, Ethernet0/0, ABR, Area 0, SPF 11

 

I expected that R1 stil prefer the path toward ASBR R2 as Intra ASBR.
However it’s not true, R1 prefer now the Interpath toward ASBR R4 because has a low forwarding metric:

R1# show ip cef 10.10.10.10
10.10.10.10/32
nexthop 192.168.13.3 Ethernet0/0
R1#show ip rou
R1#show ip route 10.10.10.10
Routing entry for 10.10.10.10/32
Known via "ospf 1", distance 110, metric 20, type extern 2, forward metric 20
Last update from 192.168.13.3 on Ethernet0/0, 00:03:40 ago
Routing Descriptor Blocks:
* 192.168.13.3, from 4.4.4.4, 00:03:40 ago, via Ethernet0/0
Route metric is 20, traffic share count is 1

 

Also, If I decrement the OSPF path cost to "20" toward R2, R1 now has a ECMP from R2 and R4. Still not prefer R2 as Intra External E2 destination:

 

R1#show ip ospf border-routers

OSPF Router with ID (1.1.1.1) (Process ID 1)


Base Topology (MTID 0)

Internal Router Routing Table
Codes: i - Intra-area route, I - Inter-area route

I 4.4.4.4 [20] via 192.168.13.3, Ethernet0/0, ASBR, Area 0, SPF 12
i 2.2.2.2 [20] via 192.168.12.2, Ethernet0/1, ASBR, Area 0, SPF 12
i 3.3.3.3 [10] via 192.168.13.3, Ethernet0/0, ABR, Area 0, SPF 12

 

R1#show ip cef 10.10.10.10
10.10.10.10/32
nexthop 192.168.12.2 Ethernet0/1
nexthop 192.168.13.3 Ethernet0/0

 

So, It’s correct to said that OSPF machinery path selection should prefer Intra External vs Inter External or I’m missing something?

I've tried with EVE-NG and IOS Version 15.5(2)T

 

Thanks a lot.

Americo

3 Replies 3

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello @Americo Massotti ,

I hope you are well.

You are doing an interesting lab.

Can you post the following

 

show ip ospf database external 10.10.10.10

 

I would like to see the Forwarding address field  I would expect it to be 0.0.0.0 in both instances the one generated by R2 and the one generated by R4.

 

The lab might show us that LSA type 4 is not only used to verify that a remote ASBR in another area is alive ( it is acting as ASBR in this moment, this provides a validation check for an LSA type 5 originated by that ASBR node), but it can influence the choice of the internal path.

However, from the output of show ip ospf border-routers it shows that R1 is aware of the different nature of the paths to the two ASBR nodes

 

>>

nternal Router Routing Table
Codes: i - Intra-area route, I - Inter-area route

I 4.4.4.4 [20] via 192.168.13.3, Ethernet0/0, ASBR, Area 0, SPF 12
i 2.2.2.2 [20] via 192.168.12.2, Ethernet0/1, ASBR, Area 0, SPF 12
i 3.3.3.3 [10] via 192.168.13.3, Ethernet0/0, ABR, Area 0, SPF 12

 

O routes should be preferred over O IA routes but here for the forwarding metric to ASBR it appears to make no difference between the two types of routes.

LSA type 4 are single area in scope so the LSA type 4 for 4.4.4.4 is actually re-generated in area 0 by ABR node 3.3.3.3.

The "error"  is caused by looking at LSA type 4  in area 0 for 4.4.4.4.

We should look at OSPFv2 RFC 2328

 

Edit:

https://datatracker.ietf.org/doc/html/rfc2328#page-175

 

The path preference rules, stated from highest to lowest
            preference, are as follows. Note that as a result of these
            rules, there may still be multiple paths of the highest
            preference. In this case, the path to use must be determined
            based on cost, as described in Section 16.4.

            o   Intra-area paths using non-backbone areas are always the
                most preferred.

            o   The other paths, intra-area backbone paths and inter-
                area paths, are of equal preference.

 

So according to RFC2328 it looks like that what you see is correct . R3 should prefer the path to R4 regardless of metric but R1 compares an intra area backbone route with an inter area route and treat them as the same.

I would say this is another reason for using OSPF O E1 instead of O E2 when multiple exit points ASBR nodes advertise the same prefix,

 

Hope to help

Giuseppe

 

Ciao Giuseppe!

 

Thanks for asking, I hope you too!

Yes the forwarding address it's 0.0.0.0 for both of them:

 

R1# show ip ospf database external | i Link|Advertising|Forward|Metric
Type-5 AS External Link States
LS Type: AS External Link
Link State ID: 10.10.10.10 (External Network Number )
Advertising Router: 2.2.2.2
Metric Type: 2 (Larger than any link state path)
Metric: 20
Forward Address: 0.0.0.0
LS Type: AS External Link
Link State ID: 10.10.10.10 (External Network Number )
Advertising Router: 4.4.4.4
Metric Type: 2 (Larger than any link state path)
Metric: 20
Forward Address: 0.0.0.0

 

So, R3 generate LSA-4 in which reports the metric of 10 toward ASBR

 

R1#show ip ospf database asbr-summary

OSPF Router with ID (1.1.1.1) (Process ID 1)

Summary ASB Link States (Area 0)

LS age: 870
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(AS Boundary Router)
Link State ID: 4.4.4.4 (AS Boundary Router address)
Advertising Router: 3.3.3.3
LS Seq Number: 80000001
Checksum: 0xCC49
Length: 28
Network Mask: /0
MTID: 0 Metric: 10

 

Proceding with the OSPF Path recursion, we solve the SPT toward ABR (Ospf cost of 10)

 

1# show ip ospf database router 3.3.3.3 | i point|Advertising|Metrics|Data
Advertising Router: 3.3.3.3
Link connected to: another Router (point-to-point)
(Link Data) Router Interface address: 192.168.13.3
TOS 0 Metrics: 10

 

The result:

 

R1#show ip ospf border-routers | i 4.4.4.4
I 4.4.4.4 [20] via 192.168.13.3, Ethernet0/0, ASBR, Area 0, SPF 7

 

R1#show ip route 10.10.10.10 | i forward|4.4.4.4
Known via "ospf 1", distance 110, metric 20, type extern 2, forward metric 20
* 192.168.13.3, from 4.4.4.4, 00:14:06 ago, via Ethernet0/0

 

However for R2, R1 can solve the SPT path directly with LSA-1, as Intra-Area

 

R1#show ip ospf database router 2.2.2.2 | i Advertising|192.168.12.2|Metrics
Advertising Router: 2.2.2.2
(Link Data) Router Interface address: 192.168.12.2
TOS 0 Metrics: 20

 

So, to recap: The intra E2 vs inter E2 (Anyway any different external route when both are of the same type) it's true only when the Node is and ABR, not an Internal router.

 

Thanks once again Giuseppe.

 

Americo

 

 

 

 

 

 

follow

Review Cisco Networking for a $25 gift card