On Fri, Feb 18, 2005 at 09:23:09AM +0100, Marko Lerota wrote: M> I have two nic bge0 and bge0, and I would like them M> to have the same IP address in case that my redundant M> switch stop responding. Bridge is not an option, M> I tried with netgraph but I did not succeed. M> Does anyone have some solution? M> M> here is my config M> M> rc.conf M> ifconfig_bge0="1.2.3.4 netmask 255.255.0.0 media 100baseTX mediaopt M> full-duplex" M> ifconfig_bge1="media 100baseTX mediaopt full-duplex" M> M> and /usr/local/etc/rc.d/bonding.sh M> M> #!/bin/sh M> ifconfig bge1 up M> kldload /boot/kernel/ng_ether.ko M> kldload /boot/kernel/ng_one2many.ko M> ngctl mkpeer bge0: one2many upper one M> ngctl connect bge0: bge0:upper lower many0 M> ngctl connect bge1: bge0:upper lower many1 M> ngctl msg bge1: setpromisc 1 M> ngctl msg bge1: setautosrc 0 M> ngctl msg bge0:upper setconfig "{xmitAlg=1 failAlg=1 enabledLinks =[ 1 M> 1 ] }"
M> I followed the examples from google groups and I stuck with M> duplicated packets when both ethernets are plugged and M> 50% packet loss when one ethernet is unplugged, damn [EMAIL PROTECTED]@[EMAIL PROTECTED]@ It is very strange that you have duplicates. Do you see duplicates of incoming or outgoing packets? 50% packet loss is because to ng_one2many can't detect which link is active and which is not. We have a solution for this in HEAD, but I'm very sorry we can't MFC this to RELENG_5 due to ABI freeze. You can bring up patches from HEAD to your system. Actually, I'd better recommend you the following setup: ifconfig bge0 up ifconfig bge1 up kldload /boot/kernel/ng_ether.ko kldload /boot/kernel/ng_one2many.ko kldload /boot/kernel/ng_eiface.ko ngctl mkpeer bge0: one2many lower many0 ngctl connect bge1: bge0:lower lower many1 ngctl msg bge1: setenaddr ${MAC-address-of-bge0} ngctl mkpeer bge0:lower eiface one ether ngctl msg bge0:lower.one set ${MAC-address-of-bge0} ngctl msg bge0:lower setconfig "{xmitAlg=1 failAlg=2 enabledLinks =[ 1 1 ] " ifconfig ngeth0 1.2.3.4 netmask 255.255.0.0 Notice that I use failAlg=2, to make ng_one2many listen to flow control messages. However, ng_ether can't send these messages in RELENG_5, see above. And this setup is not guaranteed to work flawlessly unless you have a smart switch and this two cables are plugged into one trunk group on switch. M> manual for this sucks I plan to write a handbook chapter on netgraph sometime this year. -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE _______________________________________________ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "[EMAIL PROTECTED]"