cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
906
Views
1
Helpful
37
Replies

Redistribute routes on ABR router having Area0 and Area 13

dhruvbhardwaj
Level 1
Level 1

Rtr1 ----Cost1-----> Rtr2 (Area13)

Rtr1 ----Cost1-----> Rtr3 (Area13)

Rtr2 ----Cost10----> Rtr3 (Area0)

Rtr2 ----Cost10----> Rtr4 (Area0)

 

If i redistribute static route on Rtr2 then Rtr3 learns best route from Rtr1

If i redistribute static route on Rtr4 then Rtr3 learns best route from Rtr2

why?

37 Replies 37

Ospf use this rule to select best prefix

Intra

Inter 

External E1/2 (or N1/2)

So even if cost is less always the router use above rule to select best prefix

MHM

dhruvbhardwaj
Level 1
Level 1

I understand the route selection criteria, but here i want to understand why R3 is preferring route coming from area13 and not from area0, if i redistribute static route on router2 which is also having area13 and area 0

Show ip ospf database external <prefix>

Check If you redistrubte it as E2 or E1 

Then check the metric for each path 

If the metric is tie 

Check router-id

Share the output here 

MHM

Hello,

can you post a schematic drawing of your topology, showing how your routers are connected, as well as the running configs of the routers, so we can rebuild your setup in a lab environment ?

dhruvbhardwaj_0-1713624332125.png

 

Also i would like to add, when i run ospf network command for the subnet connected between R2 and R4 it takes the best path from router2

Hello,

just to clarify...the configs you posted do not match what you have posted in the original post ?

Rtr1 ----Cost1-----> Rtr2 (Area13)

Rtr1 ----Cost1-----> Rtr3 (Area13)

Rtr2 ----Cost10----> Rtr3 (Area10)

Rtr2 ----Cost10----> Rtr4 (Area0)

There is no Cost 10 configured on any interface, and there is no area 10...can you check what you have actually configured ?

dhruvbhardwaj
Level 1
Level 1

there is a typo it should be area 0 and not area10. Also interface cost is by default 10 so i have configured interface cost 1 for those connected to R1

Hello,

thanks for the clarification.

One more thing: in your original post you say:

--> If i redistribute static route on Rtr4 then Rtr3 learns best route from Rtr2

What are you redistributing the static route into ? R4 has no OSPF configured. Post the config of R4 with what you are saying you are doing...

for R4 OSPF peering and redistribution that is second scenario. In first scenario I want R3 to learn the routes from R2 and not R1. In the above config if add command under OSPF process network 10.1.24.0 0.0.0.255 then R3 learn the route from R2. just want to understand why?

 

Hello,

I assume you are talking about the redistributed static route ?

R3#sh ip route

10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
C 10.1.13.0/24 is directly connected, GigabitEthernet0/1
L 10.1.13.3/32 is directly connected, GigabitEthernet0/1
O 10.1.21.0/24 [110/2] via 10.1.13.1, 02:40:59, GigabitEthernet0/1
C 10.1.23.0/24 is directly connected, GigabitEthernet0/0
L 10.1.23.3/32 is directly connected, GigabitEthernet0/0
20.0.0.0/24 is subnetted, 1 subnets
O E2 20.20.20.0 [110/20] via 10.1.23.2, 00:02:19, GigabitEthernet0/0

yes,

20.20.20.0 is learned from 10.1.13.1 (R1), it should learn from 10.1.23.2

R3#show ip route

20.0.0.0/24 is subnetted, 1 subnets
O E2 20.20.20.0 [110/20] via 10.1.13.1, 00:00:43, FastEthernet0/1
10.0.0.0/24 is subnetted, 3 subnets
C 10.1.13.0 is directly connected, FastEthernet0/1
C 10.1.23.0 is directly connected, FastEthernet0/0
O 10.1.21.0 [110/2] via 10.1.13.1, 00:00:43, FastEthernet0/1
R3#

I got this why it's learning best route from R1 because forward metric is less via R1.

But in case where am running network 10.1.24.2 0.0.0.0 area 0 on R2 why it's choosing R2 then

Hello,

 I the case if you use network 10.1.24.2 0.0.0.0 area 0 in R2  .  R3 will chose R2 as best path for network 10.1.24.2 because of ospf Inter  and Intra area rule always intra area routes are preferred

hope it helps 

Review Cisco Networking products for a $25 gift card