cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
544
Views
1
Helpful
3
Replies

How do I change the selected/default Path of OSPF

Rock Knot
Level 1
Level 1

RockKnot_0-1695385121194.png

How do I change the default path so that 

R1 go to R3 via

R1 > R4 > R6 > R3

and R2 go to R3 via

R2 > R4 > R5 > R7 > R6 > R3

 

1 Accepted Solution

Accepted Solutions

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello @Rock Knot ,

you will need PBR Policy Based Routing to achieve what you want.

R1 and R2 both connect to R4 and from OSPF point of view only the destination counts so the best path to R6 is chosen regardless of the source . To take in account the source you need to use PBR that moves away from destination based routing and allows to make traffic sourced from  R2 to be sent from R4 to R5.

PBR has to be applied inbound on R4 on R4 to R2 link.

Edit:

in addition

ip ospf cost

has to be increased on link between R4 and R5 to avoid to have to implement PBR on R5 too.

Hope to help

Giuseppe

 

View solution in original post

3 Replies 3

M02@rt37
VIP
VIP

Hello @Rock Knot,

You can change the cost metric on specific interfaces to influence OSPF path selection. Lower costs are preferred. This can be done using the

ip ospf cost

 command in interface configuration mode.

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello @Rock Knot ,

you will need PBR Policy Based Routing to achieve what you want.

R1 and R2 both connect to R4 and from OSPF point of view only the destination counts so the best path to R6 is chosen regardless of the source . To take in account the source you need to use PBR that moves away from destination based routing and allows to make traffic sourced from  R2 to be sent from R4 to R5.

PBR has to be applied inbound on R4 on R4 to R2 link.

Edit:

in addition

ip ospf cost

has to be increased on link between R4 and R5 to avoid to have to implement PBR on R5 too.

Hope to help

Giuseppe

 

Joseph W. Doherty
Hall of Fame
Hall of Fame

A possible alternative to what @Giuseppe Larosa describes might be to set up a tunnel between R2 and R5.

Review Cisco Networking for a $25 gift card