From owner-freebsd-net Fri May 28 0:57: 7 1999 Delivered-To: freebsd-net@freebsd.org Received: from sapphire.noc.gxn.net (sapphire.noc.gxn.net [194.143.161.5]) by hub.freebsd.org (Postfix) with ESMTP id 103F214DC6 for ; Fri, 28 May 1999 00:56:59 -0700 (PDT) (envelope-from amb@gxn.net) Received: from localhost ([127.0.0.1] helo=gxn.net) by sapphire.noc.gxn.net with esmtp (Exim 2.05 #2) id 10nHVI-0005YN-00; Fri, 28 May 1999 08:56:32 +0100 X-Mailer: exmh version 2.0.2 2/24/98 From: Alex Bligh To: andreas@klemm.gtn.com, andreas.klemm.ak@bayer-ag.de, freebsd-net@freebsd.org, zebra@zebra.org, Kunihiro Ishiguro Subject: Re: [zebra 553] OSPF eequal-cost paths, which algorithm, how exactly load balancing ? In-reply-to: Your message of "Fri, 28 May 1999 08:40:02 +0200." <19990528084002.A41138@titan.klemm.gtn.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 28 May 1999 08:56:32 +0200 Message-Id: Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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