Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 May 1999 08:56:32 +0200
From:      Alex Bligh <amb@gxn.net>
To:        andreas@klemm.gtn.com, andreas.klemm.ak@bayer-ag.de, freebsd-net@freebsd.org, zebra@zebra.org, Kunihiro Ishiguro <kunihiro@zebra.org>
Subject:   Re: [zebra 553] OSPF eequal-cost paths, which algorithm, how exactly  load balancing ?
Message-ID:  <E10nHVI-0005YN-00@sapphire.noc.gxn.net>
In-Reply-To: Your message of "Fri, 28 May 1999 08:40:02 %2B0200." <19990528084002.A41138@titan.klemm.gtn.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
Andreas,

> I'm looking for the algorithm how OSPF does a routing decision and
> what kind of load balancing is been done, between the two 4 MBit
> leased lines, when OSPF has equal-cost paths like this.
> Cisco IOS 11.2 or 11.3.

Roughly:

When Cisco has (by any meothod) two equal cost routes installed in
the RIB (i.e. routing table), both get installed in the FIB (i.e.
forwarding table).

When a packet comes to be forwarded, generally some form of route cache
is used, which is normally just a hash of the destination IP being
routed to (+/- hardware accellerated routing on higher end boxes,
CEF etc. etc.). However, occasionally (normally the first packet
*to* a given host) this caching algorithm will miss, and a lookup
will be made in the FIB. Where there is more than one entry, these
algorithm round-robbins between each of them (well actually I think
it may chose randomly between them, which is the same thing in
practice).

So if you enter "no ip route-cache" on the interface, you will find
packets (whereever they are to) round robin between the equal cost
routes, thus load sharing.

But when you have route-caching switched on (normally), you will find
all the traffic to a given destination goes the same way, but providing
you have traffic to a large number of destinations, in practice
you get good load sharing (don't try putting 2 newsfeeds down 2 2Mb
lines this way though).

The situation is more complex when you have protocols like EIGRP which
will on later IOS versions do *non* equal load sharing. I believe what
they do then is tag the relevant load sharing weight onto the RIB
entry which propagates to the FIB and modifies the round robin algorithm.
However I have not tested this in practice.

-- 
Alex Bligh
GX Networks (formerly Xara Networks)




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E10nHVI-0005YN-00>