cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1551
Views
5
Helpful
5
Replies

OSPF Broadcast netwerk neigbor cost

dwaynepeeters
Level 1
Level 1

Hi all,

I am currently having a problem with an OSPF broadcast netwerk.

I have 3 routers A, B and C.

Routers A and B both advertise network 172.16.1.0/24 to router C.

Router C now has two routes in it's routing table to the 172.16.1.0/24 network.

I would like router C to prefer the route via router A and in case of failure use the route via router B.

The problem is that because they have the same cost, they are both in the routing table.

Does anyone have a suggestion?

I have tried using the distance command, but this doesn't do anything?

Any help would be much appreciated

1 Accepted Solution

Accepted Solutions

cadet alain
VIP Alumni
VIP Alumni

Hi,

you could redistribute the prefix as E1  and set the metric so that the cost is higher through B.

Regards.

Alain

Don't forget to rate helpful posts.

Don't forget to rate helpful posts.

View solution in original post

5 Replies 5

cadet alain
VIP Alumni
VIP Alumni

Hi,

you could redistribute the prefix as E1  and set the metric so that the cost is higher through B.

Regards.

Alain

Don't forget to rate helpful posts.

Don't forget to rate helpful posts.

Reza Sharifi
Hall of Fame
Hall of Fame

Hi,

To prefer the other link, you can change the cost on the interface with this command:

ip ospf cost xx

HTH

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Dwayne,

assuming that both RB and RA are out of the same L3 interface the possible options are:

- use two different Vlans and subinterfaces and play with OSPF cost moving RA on Vlan X and RB on vlan Y as suggested by Reza

- make the IP subnet an external route of type O E1 as suggested by Alain and using different seed metric

- change OSPF network type to point-to-multipoint non-broadcast on all three routers that allows to define a per-neighbor cost with neighbor command under router ospf process

or even simpler if the network is directly connected to both RA and RB use ip ospf cost X  on RB interface to increase cost from RB you can check the ospf cost with show ip ospf interface.

Hope to help

Giuseppe

dwaynepeeters
Level 1
Level 1

Hi,

Let me first say thanks you all for your suggestions.

Alain's solution seems to be the best one but I have a little problem when implementing this.

I did the following config on both router A and B:

routers ospf 1

redistribute connected subnets metric-typ 1

The problem is that when I config this on router A the neighborrelationship with router B and C start flapping:

Am I doing something terribly wrong?

BTW: I have a DMVPN netwerk whit a multipoint tunnel where router A learns both router B and C via tunnel 0

dwaynepeeters
Level 1
Level 1

BTW I also wonder why doesn't the Distance command work for this?

Kinda strang if you ask me

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:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco