From owner-freebsd-hackers Tue Jan 6 11:50:45 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.7/8.8.7) id LAA14791 for hackers-outgoing; Tue, 6 Jan 1998 11:50:45 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from alpo.whistle.com (alpo.whistle.com [207.76.204.38]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id LAA14786 for ; Tue, 6 Jan 1998 11:50:36 -0800 (PST) (envelope-from julian@whistle.com) Received: (from daemon@localhost) by alpo.whistle.com (8.8.5/8.8.5) id LAA22793; Tue, 6 Jan 1998 11:45:34 -0800 (PST) Received: from UNKNOWN(), claiming to be "current1.whistle.com" via SMTP by alpo.whistle.com, id smtpd022786; Tue Jan 6 11:45:30 1998 Message-ID: <34B28925.2781E494@whistle.com> Date: Tue, 06 Jan 1998 11:42:29 -0800 From: Julian Elischer Organization: Whistle Communications X-Mailer: Mozilla 3.0Gold (X11; I; FreeBSD 2.2.5-RELEASE i386) MIME-Version: 1.0 To: Chrisy Luke CC: freebsd-hackers@FreeBSD.ORG Subject: Re: Multipath Routing. References: <19980106104520.25045@flix.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk Chrisy Luke wrote: > > This is a scouting survey to see if anyone else is interested in what > I've been playing with... > > I'm just finishing off a pretty neat kernel hack I started last week to > implement multipath routing in the BSD kernel, using FreeBSD as my > development base. Not much has changed across the BSD's or time to the > code I've changed so it should be portable to other BSD's quite easily. > > What it changes is the rule that an entry in the routing table can > only have one next-hop gateway. Unlike Sun's implementation of the > same. this load balances across the installed gateways for a route. > Sun's method merely allowed two nodes in the patricia tree to have the same > network and netmask. On route lookup, it finds the first one and disregards > any others. > > You end up with a routing table that looks something like: > > chrisy@om[~]> netstat -rn > Routing tables so can different routes have different metrics? > > Internet: > Destination Gateway Flags Refs Use Netif Expire > default UGSc 3 138832 > 193.131.248.183 46278 fxp0 > *193.131.248.254 46277 fxp0 > 193.131.248.186 46277 fxp0 > 127.0.0.1 *127.0.0.1 UH 0 2 lo0 > 193.131.248 *link#1 UC 0 0 > 193.131.248.2 *0:0:f8:30:2:4b UHLW 0 13785 fxp0 1198 > 193.131.248.24 *0:0:c0:53:22:e4 UHLW 0 1 fxp0 697 > 193.131.248.97 *8:0:3:22:47:ae UHLW 0 0 fxp0 572 > 193.131.248.173 *0:0:c0:3a:22:e4 UHLW 0 772 fxp0 782 > 193.131.248.179 *0:0:c0:b0:3b:e7 UHLW 0 0 fxp0 1081 > 193.131.248.180 *8:0:3:23:15:e5 UHLW 0 0 fxp0 571 > 193.131.248.183 *0:0:c0:78:22:e4 UHLW 4 0 fxp0 682 > 193.131.248.185 *0:0:c0:6e:22:e4 UHLW 0 0 fxp0 1194 > 193.131.248.186 *0:0:c0:9c:b1:e3 UHLW 2 0 fxp0 1170 > 193.131.248.187 *0:0:c0:5c:10:dc UHLW 0 0 fxp0 1198 > 193.131.248.254 *0:0:f8:30:98:a8 UHLW 4 6076 fxp0 1184 > 195.40.1 UGSc 0 0 > *193.131.248.183 0 fxp0 > 193.131.248.186 0 fxp0 > > Note the subtle changes. The '*' that preceeds some of the Gateway fields > shows the target of the next packet to hit ip_output() and is destined for > that network. Note also that each gateway has it's own Use and netif field. >