cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1151
Views
5
Helpful
5
Replies
dwaynepeeters
Beginner

OSPF Broadcast netwerk neigbor cost

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
Mentor

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
Mentor

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 Expert

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 Master

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
Beginner

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
Beginner

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

Kinda strang if you ask me