cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2883
Views
75
Helpful
42
Replies

OSPF route manipulation

tlxbx
Level 1
Level 1

Attached topology. All routers interfaces are part of the same /24 & area 0. 

1.1.1.1/32 is adv. from both R1 & R4. Is there a way I can influence R5 to prefer R1 over R4? 

42 Replies 42

if this Lo is redistribute into OSPF then you can used metric when redistribute.
make metric in R1 prefer than metric in R4. 

It's not redistributed but rather by using network statements. 

I will check,  will lab it now.

Thank you

Screenshot (47).png

as @Harold Ritter  mention 
I change the cost of Lo 1.1.1.1 in R1 
and R3 select the low cost toward R2 not R1

balaji.bandi
Hall of Fame
Hall of Fame

is this OSPF configured as point to point or DR and BDR election process ?

you can change the administrative distance or metric to use R1 as prefered.

between R4 and R5 play with cost in the interface - example ip ospf cost 20

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

DR and BDR election.

you can change the administrative distance or metric to use R1 as preferred.

--> How can I do this? Since I only have 1 link that is part of the same broadcast domain. If I change anything it changes for all received prefixes. 

i have add information

between R4 and R5 play with cost in the interface (including loopback) - example ip ospf cost 20

make sure you select the router-id in ospf if not that will be duplicated.

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Harold Ritter
Cisco Employee
Cisco Employee

Hi @tlxbx ,

You can simply increase the ospf cost for lo0 on R4. This will cause R5 to prefer R1.

R4:

int lo0

ip ospf cost 2 (1 by default)

Regards,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

The one possible issue I see with @Harold Ritter's approach, it could impact other routers (no others in diagram, though) too, i.e. not just R5.

If you really wanted to limit this to just R5, perhaps a distribute-list in might work.  In OSPF distribute-list in only impacts the route table on the router it's applied to.

Ah thanks. I will look into distribute-list.

Yup..yup that did it. Now is there a way I can influence that from R5 itself?

Hi @tlxbx ,

You can indeed use a distribute-list to only allow the route coming from R1 to be installed in the RIB on R5, as suggested by @Joseph W. Doherty . The drawback of this method is that if R1 fails, the route via R4 will not be installed, as it is filtered by the distribute-list. So no automatic fall back from R1 to R4 in this case.

Regards, 

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

100% right.
we have little option here since we deal with intra-area ospf.
I have one idea but I must test it first.

Review Cisco Networking for a $25 gift card