04-20-2024 02:38 AM - edited 04-28-2024 04:41 AM
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?
Solved! Go to Solution.
04-28-2024 09:42 AM
Hello
The reason is the route forward metric between between r3-r2 is (10) which is higher than the route forward metric between r3-r1 (2) due to the ospf interface costing you have applied on the link between r3-r2
04-20-2024 02:58 AM
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
04-20-2024 05:33 AM
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
04-20-2024 05:42 AM
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
04-20-2024 06:14 AM
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 ?
04-20-2024 07:47 AM
04-20-2024 07:49 AM
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
04-20-2024 10:40 AM
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 ?
04-20-2024 10:44 AM
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
04-20-2024 11:33 AM
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...
04-20-2024 12:12 PM
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?
04-20-2024 01:00 PM
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
04-20-2024 07:10 PM
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#
04-20-2024 08:44 PM
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
04-28-2024 10:51 PM
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
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