cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2237
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

Hi @tlxbx ,

You are absolutely right. The revised access-list is the proper way to go. 

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

Perhaps:

route-map test deny 10
match ip address prefix-list prefix1
match ip next-hop prefix-list nh1
route-map test permit 20

!or

route-map test permit 10
match ip address prefix-list prefix1
match ip next-hop prefix-list nh1
set metric 32000
route-map test permit 20

The latter possibly supporting the "auto" fail-over @Harold Ritter suggested as a good thing (which often it is).

Tried below & nothing changed. 

route-map test permit 10

ip prefix-list nh1 seq 5 permit 192.168.0.1/32
!
ip prefix-list prefix1 seq 5 permit 1.1.1.1/32
!
route-map test permit 10
match ip address prefix-list prefix1
match ip next-hop prefix-list nh1
set metric 32000
!
route-map test permit 20

router ospf 1
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
distribute-list route-map test in

**********

R5#sh ip route os
1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/2] via 192.168.0.4, 00:00:01, FastEthernet0/0
                 [110/2] via 192.168.0.1, 00:00:01, FastEthernet0/0

 

 

Did you try first alternative?

PS:

I.e.:

route-map test deny 10
match ip address prefix-list prefix1
match ip next-hop prefix-list nh1
route-map test permit 20

Hi @Joseph W. Doherty ,

Option 2 would have been a good idea, but the "distribute-list with route-map" feature doesn't allow to change anything on the route. Only the match statement will be taken in consideration. The set statement will be ignored.

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

BTW, found this "working [?] example" of using a "set" with an OSPF distribute-lise: https://docs.ruckuswireless.com/fastiron/08.0.60/fastiron-08060-l3guide/GUID-EB1339A2-5DCB-41D0-A215-F3A9D69174D9.html

Hi @Joseph W. Doherty , 

It definitely looks like IOS, but it is not. FastIron is an NOS from Ruckus, which is a competitor.

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

Harold Ritter
Cisco Employee
Cisco Employee

I completely agree @Joseph W. Doherty . Sometimes the solution might be cumbersome than the problem itself.

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

Thank you both for your input. I'd still like to complete it at least in a lab environment. If nothing else it will solidify my  OSPF understanding  

we can play with cost in two case 
P2P 
P2M 

here we have broadcast, so only we change the network type to P2M to solve the problem 

then 

neighbor x.x.x.x cost <value>

this make R3 prefer either R1 or R2 for prefix Lo 1.1.1.1

 

Screenshot (51).pngScreenshot (52).png

Thank you. Can you do a lab with distribute-list as it didn't work for me?

It would look something like the following:

route-map test permit 10
match ip address prefix-list prefix1
match ip next-hop prefix-list nh1
!
ip prefix-list nh1 seq 5 permit <nexthop to R1>
ip prefix-list prefix1 seq 5 permit 1.1.1.1/32
!
router ospf xxx
distribute-list route-map test in

Regards,

Harold Ritter
Sr Technical Leader

 

I am out now, but from my experience distrubte-list not work at all for this case , as @Harold Ritter mention before.

Hi @tlxbx ,

Have you been able to test the following configuration, which might be compatible with the IOS version you run.

access-list 199 permit ip host 192.168.0.1 host 1.1.1.1
router ospf 1
distribute-list 199 in

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
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card