OSPF cost per neighbor in a normal "broadcast" LAN

Unanswered Question
Sep 27th, 2007
User Badges:
  • Bronze, 100 points or more


I have a small OSPF design problem.

let say we have 1 edge router "E1" and two distribution routers "D1" and "D2".

they are connected to VLAN 900 and communitace with each other via this single VLAN.

OSPF is configured on those interfaces and all routers see each other in neighbor list and exchange the route information. It means that E1 has for each prefix two pathes - one via D1 and second via D2 and because the cost is the same for both (cost is defined on physical interface on E1 ) E1 tries to loadbalance the traffic between D1 and D2. It's not bad but I'd like to define that E1 uses only D1 as primary and D2 only as secondory next hop.

I can't define the neighbor cost in my current OSPF configuration, because per default OSPF now in "broadcast" mode. But if I'm afraid to change the mode to "point-to-multipoint" because I don'T know how this mode works in normal broadcast LAN.

Any suggesting to help to solve my problem?

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
paul.matthews Thu, 09/27/2007 - 02:21
User Badges:
  • Silver, 250 points or more

Batter to create two VLANs and adjust the cost on one of them.

Konstantin Dunaev Thu, 09/27/2007 - 02:57
User Badges:
  • Bronze, 100 points or more

but I need to create the VLANs on my edge router E1, what I don't want to do, or I should create the subinterfaces on E1's physical interface and put them in different vlan.

both aproaches need much more changes that I'd like to make.

paul.matthews Thu, 09/27/2007 - 04:30
User Badges:
  • Silver, 250 points or more

Two VLANs is much less of a kludge than any other alternative I can think of.

You have not given any info on your topology - I assume your E1 router is connected to a switch and then on to the D routers?

If so, move one of the D routers to a new VLAN (with conesquent new IP address).

You have two choices, depending on what the E1 router is. If you have a spare LAN you can add that to the switch, put it in the new VLAN and configure appropriately.

The other option (indeed the one I would probably go with) is to configure the link between E1 and the switch as a trunk and use subinterfaces to the two VLANs. Then pick the one that you don't want to use, and increase the cost (increasing it by one will do). I would do it at both ends to ncourage the traffic in both directions.

Believe me, this is much less work in the long run than trying to convince OSPF that a LAN is something it isn't!


Joseph W. Doherty Thu, 09/27/2007 - 03:59
User Badges:
  • Super Bronze, 10000 points or more

You could also use a static or PBR to override OSPF's natural route selection.

Konstantin Dunaev Thu, 09/27/2007 - 04:03
User Badges:
  • Bronze, 100 points or more

I don't wan to override the OSPF's route selection, I just want to give the different cost to the prefixes that I get from my neighbours.

I think also it should be possible to do somehow with route-maps but it means I should put the whole traffic via PBR and it's not the best solution I think.

Rajshekhar Nayak Wed, 09/02/2015 - 00:31
User Badges:
  • Cisco Employee,



                                -------- Distribution D1--------
---edge router E1<
                              \ -------- Distribution D2--------

1. you have vlan 900 in "E1"
2. "E1" has two prefix pathes , via D1, and another via D2
3. By default "E1" will do load balance between two paths
4. true, you cannot define neighbor cost
5. you can define route metric in D1 and D2, which will reflect the cost in E1
6. If D1, D2 is a ASR 9K
try the below config

In D1
router ospf <ospf name>
 redistribute connected metric 8

In D2
router ospf <ospf name>
 redistribute connected metric 16




This Discussion