cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
821
Views
0
Helpful
2
Replies

Prefer Default Route over OSPF

himanshudwivedi
Level 1
Level 1

Hello,

 

Consider below topology, in which there are 3 Routers.

1. R1 and R2 are connected and default router is configured on both the routers towards each other.

2. R1 and R3 are connected and OSPF is configured on both the routers and

3. R2 and R3 are connected to each other. Static route for R3 Subnet are configured on R2 and Default router is configured on R3 towards R2.

 

When I am checking the tracroute from Users connected to R3 it is going directly via OSPF. Means Directly going R3 - > R1, but customer wants that Traffic should routed like R3 -> R2 -> R1 and vice versa, means it should prefer default Route from R3->R2 and OSPF R3->R1 will be the backup path. How can I achieve. 

 

 

All the configuration are attached.

 

Screenshot 2022-04-22 210330.png

1 Accepted Solution

Accepted Solutions

Jon Marshall
Hall of Fame
Hall of Fame

 

The most specific prefix in the routing table is always used so you either need to run OSPF between R2 and R3 and manipulate the metrics or you need to use PBR. 

 

Note you would probably need PBR both ways to ensure the return traffic went the same way. 

 

Jon

View solution in original post

2 Replies 2

Jon Marshall
Hall of Fame
Hall of Fame

 

The most specific prefix in the routing table is always used so you either need to run OSPF between R2 and R3 and manipulate the metrics or you need to use PBR. 

 

Note you would probably need PBR both ways to ensure the return traffic went the same way. 

 

Jon

Applied PBR and it working fine now.

Review Cisco Networking for a $25 gift card