From owner-freebsd-hackers Sat Apr 27 18:28:37 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from rwcrmhc52.attbi.com (rwcrmhc52.attbi.com [216.148.227.88]) by hub.freebsd.org (Postfix) with ESMTP id 81D1E37B41C for ; Sat, 27 Apr 2002 18:28:30 -0700 (PDT) Received: from max ([12.254.136.195]) by rwcrmhc52.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with SMTP id <20020428012830.UBGL12183.rwcrmhc52.attbi.com@max>; Sun, 28 Apr 2002 01:28:30 +0000 Message-ID: <025801c1ee54$0a6661f0$0900a8c0@max> From: "John Nielsen" To: , "Gary Stanley" References: <5.1.1.2.2.20020426234504.029f7c30@208.141.46.3> Subject: Re: load balancing with 2 nic cards possible? Date: Sat, 27 Apr 2002 19:28:45 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG ----- Original Message ----- From: "Gary Stanley" To: Sent: Friday, April 26, 2002 9:47 PM Subject: load balancing with 2 nic cards possible? > Is it possible to split the load of IP traffic with 2 ethernet cards on a > 4.x machine? I'm new to "load balancing" in a sense, however, I'd like to > try something that seems more "robust" The netgraph one2many framework allows you to aggregate 2 or 4 NICs together even on an unmanaged switch. Obviously, this is only really beneficial if the machine is serving several clients attached to the same switch or if there is another machine set up similarly (also on the same switch), since unmanaged switches generally only have one uplink port. See the ng_one2many(4) manpage for details. Following is a script I use to set this up (I call it from rc.local). fxp0 is the "primary" interface and rl0 is the "secondary". JN --------------------- #!/bin/sh ifconfig rl0 up kldload /modules/ng_ether.ko kldload /modules/ng_one2many.ko ngctl mkpeer fxp0: one2many upper one ngctl connect fxp0: fxp0:upper lower many0 ngctl connect rl0: fxp0:upper lower many1 ngctl msg rl0: setpromisc 1 ngctl msg rl0: setautosrc 0 ngctl msg fxp0:upper setconfig "{xmitAlg=1 failAlg=1 enabledLinks =[ 1 1 ] }" To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message