OSPF equal costs

Unanswered Question
May 15th, 2009

Hi,

1.Since ospf is known to have equal cost loadshare properties, how does it actually loadbalance if its enabled on two routed interfaces ?

2.I have slight idea that it uses some hashing to actually allocate traffic out the n no. of links.Is this true, Please brief out or any specific link to understand this?

3.Would this property of ospf have any impact if two interfaces are assigned as part of same vlan and if its assigned as different L3 ports.

Thanks.

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 3.5 (2 ratings)
Loading.
Jon Marshall Fri, 05/15/2009 - 05:25

Sunny

OSPF like EIGRP/RIP etc. will either load-balance per flow (destination) or per packet. The protocol will alternate between the equal cost paths in it's routing table. See this link for more details -

http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094820.shtml

3) You can't assign two interfaces out of the same vlan/subnet on a router as it will complain about overlapping addresses.

Jon

suthomas1 Fri, 05/15/2009 - 05:34

Thanks.

Sorry if i put it in wrong way.What i meant was there is an SVI assigned on the L3switch which has two ports assigned in it.Physically both ports will cater to different uplinks but logically they are in one vlan.

like,

int vlan 65

access mode

Ports fa0/1 & fa0/2 assigned to this.

Would this have an impact or is it better to do it single routed interface to each.

Jon Marshall Fri, 05/15/2009 - 05:46

Ahh okay i understand.

No impact as such ie. the L3 switch would still see equal cost paths and so use both paths.

Personally for links between switches/routers if you are not trunking then i try to use routed interfaces if possible.

Jon

suthomas1 Fri, 05/15/2009 - 06:46

Thanks.

Any specific reason/belief that routed ports would be better?

My understanding, having 2 diff routed interfaces will provide dual resilience in both L3(when one uplink routing path goes down) & L2(ethernet status up/down)terms,which will cause link to move to other active one.

Does my thinking make sense here.Pls correct if this is wrong.

Richard Burts Fri, 05/15/2009 - 10:10

Sunny

If you have two ports on the same SVI (in the same subnet) and necessarily in the same VLAN, then you have effects of Spanning Tree to consider and their possible impact on convergence of the routed protocol. For many of us this is one of the reasons why we like to configure the ports as routed ports.

HTH

Rick

suthomas1 Sat, 05/16/2009 - 01:53

Sorry Rick, but i couldnt get the relation of STP for these two ports with convergence.Helpful if you explain bit more.

scenario is as in the diagram.

Site A needs to access resources at Site B.These are linked by provider network.

Site B router has two tunnels which relate to each of the two different links from Site A routers.'

Every exit traffic from Site A moves thru these tunnels to Site B from where they are further moved.

I would be putting ospf at Site A involving layer 3 switch & both routers interfaces with an intent

of using both links at the same time.Questions:

1. Should cef be used on router/switch in default mode to have both links being used in

conjuction with default ospf behaviour?

2. Would detection and failover of links be possible with just ospf alone or there would have to be

hsrp as well?

Suggested configs would also be helpful.

Richard Burts Sat, 05/16/2009 - 12:20

Sunny

If 2 ports on the switch are in the same VLAN then they must be access ports. And if they are both access ports in the same VLAN then they will run spanning tree. And if they are running spanning tree and there is some topology change in the network then the ports are potentially impacted by the spanning tree timers and their impact on network convergence. Given the details of what you show in your drawing spanning tree will not have much impact (unless there are connections not shown in your drawing). But the possible impact of spanning tree is one reason that Jon, and I, and many others have a preference for routed ports.

As to the other questions that you ask:

1) It is better to use CEF on the routers than not to use CEF. I believe that CEF in default mode (per destination) is better than CEF in per packet mode. The choice of which mode is better is dependent on some details of the traffic flows which we do not know (such as what is the impact of out of order packets, and how many devices are sources of the traffic and how many devices are destinations of the traffic).

2) Given what is shown in the drawing I do not believe that HSRP would have much advantage. Are there connections to the routers in this VLAN other than from the layer 3 switch? If so, then perhaps HSRP would have advantages. But with just the layer 3 switch and the 2 routers then I believe that OSPF is the best detection and failover and that HSRP does not help.

technical note: perhaps it may help a bit if we remember that OSPF does not forward packets. What OSPF does is to find paths through the network and to put routes into the routing table. But OSPF does not forward packets and therefore OSPF does not really have a load sharing behavior.

HTH

Rick

suthomas1 Sun, 05/17/2009 - 02:46

Thanks Rick...that brief helps.

There are no connections for the vlan to the router except the connecting links.

Yes,i agree with you on the ospfs behaviour of only installing multiple paths in routing table and not actually forwarding.But this would be helpful for the flow to move over two paths,unless my thinking is wrong.

I believe,its better to put point to point ip address on each of the links from L3 ports to routers or should it be all part of bigger segment?This is to have these address in ospf under the switch config & think there shouldnt be any specific config required on the router related to this.

Thanks.

Thanks.

Richard Burts Sun, 05/17/2009 - 03:56

Sunny

Yes I agree with you on this and would prefer to have two point to point subnets for the connections from the switch to the routers. Other than configuring the ports as routed ports rather than access ports, configuring the 2 subnets, and putting the subnets into OSPF there should not be a need for any other specific configuration on the switch for this.

HTH

Rick

Actions

This Discussion