cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
936
Views
0
Helpful
1
Replies

OSPF route selection

from88
Level 4
Level 4

Hello,

 

I have 4 OSPF external LSA's which represents: 10.33.0.0/16 network: 

 

show ip ospf database 10.33.0.0 detail vrf lan
OSPF Router with ID (10.2.254.251) (Process ID 1 VRF lan)

Type-5 AS External Link States

LS age: 103
Options: 0x20 (No TOS-capability, DC)
LS Type: Type-5 AS-External
Link State ID: 10.33.0.0 (Network address)
Advertising Router: 10.1.254.202
LS Seq Number: 0x8000029f
Checksum: 0xb4c8
Length: 36
Network Mask: /16
Metric Type: 2 (Larger than any link state path)
TOS: 0
Metric: 50
Forward Address: 0.0.0.0
External Route Tag: 100

LS age: 245
Options: 0x20 (No TOS-capability, DC)
LS Type: Type-5 AS-External
Link State ID: 10.33.0.0 (Network address)
Advertising Router: 10.2.254.2
LS Seq Number: 0x80000007
Checksum: 0x9847
Length: 36
Network Mask: /16
Metric Type: 2 (Larger than any link state path)
TOS: 0
Metric: 50
Forward Address: 0.0.0.0
External Route Tag: 100

LS age: 1141
Options: 0x20 (No TOS-capability, DC)
LS Type: Type-5 AS-External
Link State ID: 10.33.0.0 (Network address)
Advertising Router: 10.3.254.236
LS Seq Number: 0x80000cc2
Checksum: 0x73b8
Length: 36
Network Mask: /16
Metric Type: 2 (Larger than any link state path)
TOS: 0
Metric: 50
Forward Address: 0.0.0.0
External Route Tag: 100

LS age: 453
Options: 0x2 (No TOS-capability, No DC)
LS Type: Type-5 AS-External
Link State ID: 10.33.0.0 (Network address)
Advertising Router: 10.254.2.211
LS Seq Number: 0x80000062
Checksum: 0xbd13
Length: 36
Network Mask: /16
Metric Type: 2 (Larger than any link state path)
TOS: 0
Metric: 50
Forward Address: 0.0.0.0
External Route Tag: 100

as you see these LSA's are identical. I don't understand by which OSPF number these two routes are slelected:

 

JAY1# sh ip route 10.33.0.0/16 vrf lan
10.33.0.0/16, ubest/mbest: 2/0
*via 10.254.2.2, Eth1/7, [110/50], 03:25:24, ospf-1, type-2, tag 100
*via 10.254.2.209, Vlan432, [110/50], 03:25:24, ospf-1, type-2, tag 100
 
JAY1# sh ip ospf route 10.33.0.0/16 vrf lan
OSPF Process ID 1 VRF lan, Routing Table for prefixes 10.33.0.0/16
(D) denotes route is directly attached (R) denotes route is in RIB
10.33.0.0/16 (type-2)(R) area 0.0.0.0, tag 100
via 10.254.2.2/Eth1/7 , cost 50 distance 110
via 10.254.2.209/Vlan432 , cost 50 distance 110

 If these 4 routes have a metric of 50. How correct ones are selected ? What is the tiebreaker ? Metric to next hop ? Thanks

1 Accepted Solution

Accepted Solutions

Seb Rupik
VIP Alumni
VIP Alumni

Hi there,
As these are LSA Type 5, metric type 2 routes the metric value you see listed is just the external cost to reach the destination prefix.

With OSPF route selection, if metric type 2 routes have the same external cost and destination prefix, then the path with the lowest cost to the ASBR is selected. In your case OSPF is performing ECMP which is why you have two ASBRs listed in your routing table.

https://www.cisco.com/c/en/us/support/docs/ip/open-shortest-path-first-ospf/7039-1.html

cheers,
Seb.

View solution in original post

1 Reply 1

Seb Rupik
VIP Alumni
VIP Alumni

Hi there,
As these are LSA Type 5, metric type 2 routes the metric value you see listed is just the external cost to reach the destination prefix.

With OSPF route selection, if metric type 2 routes have the same external cost and destination prefix, then the path with the lowest cost to the ASBR is selected. In your case OSPF is performing ECMP which is why you have two ASBRs listed in your routing table.

https://www.cisco.com/c/en/us/support/docs/ip/open-shortest-path-first-ospf/7039-1.html

cheers,
Seb.