cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
8575
Views
5
Helpful
5
Replies

Load Balancing with OSPF and maximum-paths command

Matthew burnley
Level 1
Level 1

Hello,

 

Just a quick query really, we have a disribution layer 3 switch, in its routing table it has 3 default routes all with the same metric from the core router, this is because the core router is setup with the comamnd "default-information originate always metric 50" which obviously proagates the default route around the area and the metric never changes from 50.

 

So i have a routing table that looks like this:

 

O*E2 0.0.0.0/0 [110/50] via 77.95.176.9, 06:44:51, GigabitEthernet4/9
               [110/50] via 77.95.176.17, 06:44:51, Vlan903
               [110/50] via 91.203.72.5, 06:44:51, Vlan262

 

Three default routes with the same metric, does this mean that the router IOS will load balance traffic over all three routes evenly?  I mean i have been reading up on it and appartemtly i dont have the command "maximum-paths 3" under my ospf process?

I have been doing some traceroutes from this switch to the internet (various sites) and all the traffic seems to be going out over the first  route in the table that next hop is 77.95.176.9

My question is how can i verify that load balancing is taking place, or if its not then i need to add this "maximum-paths 3" command to the ospf on the local switch?  I would say load balancing is not taking place but im sure i have seen traffic from one customer being routes over all 3 paths due to matching spikes on the SNMP sensors?

 

Many Thanks.

 

Matt

1 Accepted Solution

Accepted Solutions

Richard Burts
Hall of Fame
Hall of Fame

Matt

 

By default OSPF should place up to 4 equal cost routes into the routing table. So you do not need to configure maximum-paths 3.

 

Bear in mind that a router or switch will typically forward traffic coming through the switch using CEF while it may process differently when it is generating traffic (like your traceroute). Since you have not told us what kind of switch this is we can not discuss what the forwarding options for this switch should be.

 

HTH

 

Rick

HTH

Rick

View solution in original post

5 Replies 5

Richard Burts
Hall of Fame
Hall of Fame

Matt

 

By default OSPF should place up to 4 equal cost routes into the routing table. So you do not need to configure maximum-paths 3.

 

Bear in mind that a router or switch will typically forward traffic coming through the switch using CEF while it may process differently when it is generating traffic (like your traceroute). Since you have not told us what kind of switch this is we can not discuss what the forwarding options for this switch should be.

 

HTH

 

Rick

HTH

Rick

Disclaimer

The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.

Liability Disclaimer

In no event shall Author be liable for any damages whatsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.

Posting

Yes, your traffic should use all three paths, as Rick notes, OSPF, on Cisco, normally defaults to using up to 4 equal cost paths.

As Rick also notes mentioning CEF, how actual traffic is forwarded across ECMP can vary.  Often, the device will keep all traffic for the same flow on the same egress port, and attributes selected for actual egress port selection might be deterministic.  I.e. it's possible same traffic flow will always be sent to the same egress port.  (This means even with ECMP, you may not see an equal load distribution.)

Many thanks for a swift response.

Richard, it’s a 6509 with a Sup720 supervisor, I forget what version but it uses CEF and FIB.  Can you suggest a way I could prove without a shadow of a doubt that the traffic from the switch is using all three paths?

 

Matt.

Matthew burnley
Level 1
Level 1

This is interesting, i have just noticed something, a little * from the output, does this little * next to the route mean its the primary route ? If so why has it chose this as the primary and not the other two if the metrics are the same?

 

sw1.dc14#show ip route 0.0.0.0
Routing entry for 0.0.0.0/0, supernet
  Known via "ospf 1", distance 110, metric 50, candidate default path
  Tag 1, type extern 2, forward metric 20
  Last update from 77.95.176.9 on GigabitEthernet4/9, 07:20:35 ago
  Routing Descriptor Blocks:
  * 77.95.176.9, from 188.92.232.1, 07:20:35 ago, via GigabitEthernet4/9
      Route metric is 50, traffic share count is 1

      Route tag 1
    77.95.176.17, from 188.92.232.1, 07:20:35 ago, via Vlan903
      Route metric is 50, traffic share count is 1
      Route tag 1
    91.203.72.5, from 188.92.232.1, 07:20:35 ago, via Vlan262
      Route metric is 50, traffic share count is 1
      Route tag 1

When there are more than one equal cost route to a destination the * is usually used to identify the route that will be used for the next process switched packet.

 

HTH

 

Rick

HTH

Rick
Review Cisco Networking for a $25 gift card