Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Feb 2005 10:52:28 +0200
From:      Ruslan Ermilov <ru@FreeBSD.org>
To:        Marko Lerota <marko.lerota@optima-telekom.hr>
Cc:        Gleb Smirnoff <glebius@FreeBSD.org>
Subject:   Re: redundant ethernet interfaces
Message-ID:  <20050218085228.GB47403@ip.net.ua>
In-Reply-To: <86ll9mcm4y.fsf@redcloud.local>
References:  <86ll9mcm4y.fsf@redcloud.local>

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

[-- Attachment #1 --]
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 
> to have the same IP address in case that my redundant 
> switch stop responding. Bridge is not an option, 
> I tried with netgraph but I did not succeed. 
> Does anyone have some solution?
> 
> I followed the examples from google groups and I stuck with
> duplicated packets when both ethernets are plugged and 
> 50% packet loss when one ethernet is unplugged, damn !!#@!#@!$%^@$#@
> 
> here is my config 
> 
> rc.conf 
> ifconfig_bge0="1.2.3.4 netmask 255.255.0.0 media 100baseTX mediaopt
> full-duplex"
> ifconfig_bge1="media 100baseTX mediaopt full-duplex"
> 
> and  /usr/local/etc/rc.d/bonding.sh
> 
>  #!/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=1 failAlg=1 enabledLinks =[ 1
> 1 ] }" 
> 
> manual for this sucks 
> 
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=2 (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,
-- 
Ruslan Ermilov
ru@FreeBSD.org
FreeBSD committer

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (FreeBSD)

iD8DBQFCFazMqRfpzJluFF4RAsBWAJ0U20EJ7EMR+G51J/SaZF35PHeU0ACgj1xE
xb6TdNjx2bAi3Dp4bmWIzp4=
=9fmk
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050218085228.GB47403>