cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
976
Views
0
Helpful
3
Replies

ospf selection

Anukalp S
Level 1
Level 1

 Hi Experts.

 i have some confusion in ospf path selection process. I have a core switch which connects to two router(RA&RB) these are running ospf. Core switch is receving E2 routes for x.x.x.x/24 from both routers. How is it possible to make one router say RA as primary & RB as secondary. I can not manipulate this routes other than E2 so in this case path cost is going to work??

Pls help me here.

1 Accepted Solution

Accepted Solutions

Hi,

 

the main characteristic of E2 routes is that the external part of the metric takes precedence over the internal part.

That means, the cost of the Type-5 LSA's 'metric' fields are always evaluated first, the LSA with the lower cost will be installed in the routing table, regardless of the internal cost, which is the cost of the path to the border router [1].

If, like in your case, the costs of the LSAs are equal, the paths to the ASBRs (in terms of costs) [1] are evaluated. The lower-cost path wins; in case of equality both routes are installed (ECLB).

You can see the two parts of the metric with a "show ip route <prefix>":

R1#show ip route 169.254.0.0
Routing entry for 169.254.0.0/16
  Known via "ospf 1", distance 110, metric 20, type extern 2, forward metric 100

R1#show ip ospf border-routers

i 2.2.2.2 [100] via 172.16.12.2, Serial0/0, ASBR, Area 0, SPF 9
i 3.3.3.3 [64] via 172.16.13.3, Serial0/1, ASBR, Area 0, SPF 9

This route has been installed although there is a "cheaper" ASBR, but it obviously injects the LSA for this prefix with a metric greater than 20:

R1#show ip ospf database external 169.254.0.0
  LS Type: AS External Link
  Link State ID: 169.254.0.0 (External Network Number )
  Advertising Router: 3.3.3.3
  Network Mask: /16
        Metric Type: 2 (Larger than any link state path)
        TOS: 0
        Metric: 30

 

So yes, you can achieve a primary/secondary path when both LSAs have the same metrics by changing a interface's cost, but remember that this may affect the whole topology.

 

HTH

Rolf

 

EDIT:

[1]: More precisely it's the path to the 'forwarding address', which is another field of external LSAs and used to avoid unnecessary extra-hops. If the FA is 0.0.0.0, the path to the advertising ASBR is used instead.

View solution in original post

3 Replies 3

Reza Sharifi
Hall of Fame
Hall of Fame

Hi,

If both links are the same, say 1Gig, give higher cost to the link connecting to the secondary router. 

HTH

 

Thanks Reza, you mean to say even in E2 prefix case, configuring cost on interface could help in selecting primary & secondary path??

Hi,

 

the main characteristic of E2 routes is that the external part of the metric takes precedence over the internal part.

That means, the cost of the Type-5 LSA's 'metric' fields are always evaluated first, the LSA with the lower cost will be installed in the routing table, regardless of the internal cost, which is the cost of the path to the border router [1].

If, like in your case, the costs of the LSAs are equal, the paths to the ASBRs (in terms of costs) [1] are evaluated. The lower-cost path wins; in case of equality both routes are installed (ECLB).

You can see the two parts of the metric with a "show ip route <prefix>":

R1#show ip route 169.254.0.0
Routing entry for 169.254.0.0/16
  Known via "ospf 1", distance 110, metric 20, type extern 2, forward metric 100

R1#show ip ospf border-routers

i 2.2.2.2 [100] via 172.16.12.2, Serial0/0, ASBR, Area 0, SPF 9
i 3.3.3.3 [64] via 172.16.13.3, Serial0/1, ASBR, Area 0, SPF 9

This route has been installed although there is a "cheaper" ASBR, but it obviously injects the LSA for this prefix with a metric greater than 20:

R1#show ip ospf database external 169.254.0.0
  LS Type: AS External Link
  Link State ID: 169.254.0.0 (External Network Number )
  Advertising Router: 3.3.3.3
  Network Mask: /16
        Metric Type: 2 (Larger than any link state path)
        TOS: 0
        Metric: 30

 

So yes, you can achieve a primary/secondary path when both LSAs have the same metrics by changing a interface's cost, but remember that this may affect the whole topology.

 

HTH

Rolf

 

EDIT:

[1]: More precisely it's the path to the 'forwarding address', which is another field of external LSAs and used to avoid unnecessary extra-hops. If the FA is 0.0.0.0, the path to the advertising ASBR is used instead.

Review Cisco Networking products for a $25 gift card