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

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.

New Member

OSPF load balancing

I have 2 equal-cost paths to a network. Both have the same admin distance (110 for ospf) and metric, and they're both O routes. However, only one appears in the r-t at any one time. Does anyone know why this would be? They're pointing to 2 different vlan interfaces - but surely that doesn't make a difference?

Also, as an aside, would OSPF choose an O route over and O IA? And is there anyway to change this behaviour?

Many thanks in advance,



Re: OSPF load balancing


Ospf does not make the loadbalancing decision.

Ospf only offers multiple routes to the routing table. Once there are multiple equal cost routes in the routing table it is no longer ospf's issue.

The thing that determines how the packets actually get loadbalanced is the "switching path" through the device. The switching path question is a big union and you need to see which layer you are in.

The layers could be:

Process switching

Fast caching

Software cef

Hardware cef

Software distributed cef

Hardware distributed cef

Each one of these layers has a different way of handling ECMP.

Process switching = per packet loadbalancing

Fast caching = per destination only loadbalancing

Software cef = per hash loadbalancing - hash buck determined by last 2 bits of source and last 2 bits of destination Ips

Hardware cef = per hash loadbalancing - hash buck determined by whole source and destination ip address - sometimes also includes source and destination tcp or udp ports

Software distributed cef = same as software cef but since it is a different table you could find times when the distributed cef chooses a different interface than the software cef table

Hardware distributed cef = same as hardware cef but can sometime be different than the hardware cef table

Check the below link.



VIP Purple

Re: OSPF load balancing


in addition to Satish?s post, if both your equal cost routes are ?O? routes, OSPF should automatically put them in the routing table. You might want to try and add the interface command `ip ospf cost 1000? to both your VLAN interfaces. If that still does not get you the desired result, could you post the configuration of the router ?

Regarding your other question: within the same OSPF process, the rule of preference:

intra-area routes (O)

interarea routes (O IA)

external routes type 1 (O E1)

external routes type 2 (O E2)

cannot be changed, that is, an O IA route will never be preferred over an O route. That behaviour cannot be changed. If you add another OSPF process (e.g. ?router ospf 2? in addition to ?router ospf 1?), only the metrics and administrative distance of the respective routes are being compared, not the route type.

Does that make sense ?



New Member

Re: OSPF load balancing

Thanks for your responses.

Satish, I will investigate what method is being used on the router. It's weird because these routes used to be advertised over tunnels, which did balance and the only thing that's changed is that they're now point to point links in different vlans.

GP, I understand, that is a useful work around, thank you.

CreatePlease login to create content