cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
859
Views
0
Helpful
6
Replies

OSPF load balancing

sir_ulrick
Level 1
Level 1

Hi, 

by default, using OSPF if we find a different paths to same subnet, Cisco IOS will use load balancing (maximun-paths 4 by default). How we can check this? I mean if is working successfully.

Would be possible to check how packets are distributed between all interfaces? Is it possible change % between interfaces? For example:

interface 1 ->80%

interface 2 ->10%

interface 3 ->5%

interface 4 ->5%

2 Accepted Solutions

Accepted Solutions

Seb Rupik
VIP Alumni
VIP Alumni

Hi there,

OSPF only supports ECMP, to that end you cannot add weights to those equal cost links.

 

You can confirm that ECMP is working but looking at ip route for the the prefix. You should see multiple entries under the same router descriptor block.

 

cheers,

Seb.

View solution in original post

Joseph W. Doherty
Hall of Fame
Hall of Fame
"How we can check this?"

As noted by Seb, look for multiple entries for the same destination in the route table.

"Would be possible to check how packets are distributed between all interfaces?"

Are you asking how or which interface a packet will use or just load? If the latter, interface stats will show that. For the former, I recall (?) it's either new flows (or if per packet load sharing) round-robin on the ECMP interfaces or it's deterministic for CEF.

"Is it possible change % between interfaces?"

Yes and no. By default, flows are distributed across the interfaces, so individual flow usage will determine interface loading. However, if per-packet load sharing is enabled, you'll usually obtain a very fair and proportional load split. (NB: per-packet load sharing is highly NOT recommended.)

View solution in original post

6 Replies 6

Seb Rupik
VIP Alumni
VIP Alumni

Hi there,

OSPF only supports ECMP, to that end you cannot add weights to those equal cost links.

 

You can confirm that ECMP is working but looking at ip route for the the prefix. You should see multiple entries under the same router descriptor block.

 

cheers,

Seb.

Cristian Matei
VIP Alumni
VIP Alumni

Hi,

 

     That kind of load-balancing can't be achieved via pure routing, you'll need smarter solutions like SD-WAN. Even if OSPF (actually RIB/FIB is the one routing packets in the end, not OSPF, OSPF just provides best paths to the RIB like all other routing protocols do) would support that kind of load distribution, it will end up doing it per flow, not per consumed bandwidth, which is most probably what you want in a real production.

     What you can do is change the CEF load-sharing algorithm to something which fits your traffic flows, but don't expect to get a consistent and repetitive load share.

 

Regards,

Cristian Matei.

balaji.bandi
Hall of Fame
Hall of Fame

Personally OSPF not the right choice here, may be EIGRP ?

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Hi,

 

    EIGRP fixes the flow sharing (you can tweak it as you want), but in the end BW consumption is what you care about, and this can't be fixed just by using routing protocols, without some over-the-top orchestration.

 

Regards,

Cristian Matei.

Thanks for your reply but is not possible to use EIGRP in this topology.

Thanks for your help.

Joseph W. Doherty
Hall of Fame
Hall of Fame
"How we can check this?"

As noted by Seb, look for multiple entries for the same destination in the route table.

"Would be possible to check how packets are distributed between all interfaces?"

Are you asking how or which interface a packet will use or just load? If the latter, interface stats will show that. For the former, I recall (?) it's either new flows (or if per packet load sharing) round-robin on the ECMP interfaces or it's deterministic for CEF.

"Is it possible change % between interfaces?"

Yes and no. By default, flows are distributed across the interfaces, so individual flow usage will determine interface loading. However, if per-packet load sharing is enabled, you'll usually obtain a very fair and proportional load split. (NB: per-packet load sharing is highly NOT recommended.)