Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

OSPF cost per neighbor in a normal "broadcast" LAN

Hi,

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?

6 REPLIES

Re: OSPF cost per neighbor in a normal "broadcast" LAN

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

Re: OSPF cost per neighbor in a normal "broadcast" LAN

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.

Re: OSPF cost per neighbor in a normal "broadcast" LAN

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!

Paul.

Super Bronze

Re: OSPF cost per neighbor in a normal "broadcast" LAN

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

Re: OSPF cost per neighbor in a normal "broadcast" LAN

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.

Cisco Employee

 Topology````````            

 

Topology
````````

                                -------- 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
But..
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

 

 

1517
Views
0
Helpful
6
Replies
CreatePlease to create content