12-06-2012 06:11 AM - edited 03-07-2019 10:25 AM
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
Solved! Go to Solution.
12-06-2012 06:20 AM
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.
12-06-2012 06:20 AM
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.
12-06-2012 06:22 AM
Hi,
To prefer the other link, you can change the cost on the interface with this command:
ip ospf cost xx
HTH
12-06-2012 06:33 AM
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
12-06-2012 06:55 AM
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
12-06-2012 07:16 AM
BTW I also wonder why doesn't the Distance command work for this?
Kinda strang if you ask me
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide