From owner-freebsd-net@FreeBSD.ORG Fri Feb 18 08:52:26 2005 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C1F7616A4CE; Fri, 18 Feb 2005 08:52:26 +0000 (GMT) Received: from tigra.ip.net.ua (tigra.ip.net.ua [82.193.96.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8485B43D5A; Fri, 18 Feb 2005 08:52:25 +0000 (GMT) (envelope-from ru@ip.net.ua) Received: from localhost (rocky.ip.net.ua [82.193.96.2]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id j1I8qNP0071771; Fri, 18 Feb 2005 10:52:23 +0200 (EET) (envelope-from ru@ip.net.ua) Received: from tigra.ip.net.ua ([82.193.96.10]) by localhost (rocky.ipnet [82.193.96.2]) (amavisd-new, port 10024) with LMTP id 59602-17; Fri, 18 Feb 2005 10:52:22 +0200 (EET) Received: from heffalump.ip.net.ua (heffalump.ip.net.ua [82.193.96.213]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id j1I8qMZg071768 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 18 Feb 2005 10:52:22 +0200 (EET) (envelope-from ru@ip.net.ua) Received: (from ru@localhost) by heffalump.ip.net.ua (8.13.1/8.13.1) id j1I8qSq7047518; Fri, 18 Feb 2005 10:52:28 +0200 (EET) (envelope-from ru) Date: Fri, 18 Feb 2005 10:52:28 +0200 From: Ruslan Ermilov To: Marko Lerota Message-ID: <20050218085228.GB47403@ip.net.ua> References: <86ll9mcm4y.fsf@redcloud.local> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Bn2rw/3z4jIqBvZU" Content-Disposition: inline In-Reply-To: <86ll9mcm4y.fsf@redcloud.local> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at ip.net.ua cc: freebsd-net@FreeBSD.org cc: Gleb Smirnoff Subject: Re: redundant ethernet interfaces X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Feb 2005 08:52:26 -0000 --Bn2rw/3z4jIqBvZU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Feb 18, 2005 at 09:23:09AM +0100, Marko Lerota wrote: > I have two nic bge0 and bge0, and I would like them=20 > to have the same IP address in case that my redundant=20 > switch stop responding. Bridge is not an option,=20 > I tried with netgraph but I did not succeed.=20 > Does anyone have some solution? >=20 > I followed the examples from google groups and I stuck with > duplicated packets when both ethernets are plugged and=20 > 50% packet loss when one ethernet is unplugged, damn !!#@!#@!$%^@$#@ >=20 > here is my config=20 >=20 > rc.conf=20 > ifconfig_bge0=3D"1.2.3.4 netmask 255.255.0.0 media 100baseTX mediaopt > full-duplex" > ifconfig_bge1=3D"media 100baseTX mediaopt full-duplex" >=20 > and /usr/local/etc/rc.d/bonding.sh >=20 > #!/bin/sh > ifconfig bge1 up > kldload /boot/kernel/ng_ether.ko > kldload /boot/kernel/ng_one2many.ko > ngctl mkpeer bge0: one2many upper one > ngctl connect bge0: bge0:upper lower many0 > ngctl connect bge1: bge0:upper lower many1 > ngctl msg bge1: setpromisc 1 > ngctl msg bge1: setautosrc 0 > ngctl msg bge0:upper setconfig "{xmitAlg=3D1 failAlg=3D1 enabledLinks =3D= [ 1 > 1 ] }"=20 >=20 > manual for this sucks=20 >=20 This isn't going to work -- packets will be transmitted in round-robin manner, which is not what you want for failure protection. What you need is to use xmitAlg=3D2 (NG_ONE2MANY_XMIT_ALL) so that each frame is delivered out of all interfaces, and then enable STP on your switches. I didn't test it, but it should work. The example in the ng_one2many(4) manpage, like the one you quote above but with four interfaces, is to demonstrate how to set up a 400Mbit/s connection between two hosts. Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --Bn2rw/3z4jIqBvZU Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFCFazMqRfpzJluFF4RAsBWAJ0U20EJ7EMR+G51J/SaZF35PHeU0ACgj1xE xb6TdNjx2bAi3Dp4bmWIzp4= =9fmk -----END PGP SIGNATURE----- --Bn2rw/3z4jIqBvZU--