NIC bonding via Netgraph



  • Came across this yesterday and I remembered someone asking about bonding a while back:
    http://forums.pcbsd.org/viewtopic.php?f=24&t=9057

    Just for grins, I did some quick tests on a spare box. (1.2RC2) Had four Intel 10/100 cards in it- LAN=fxp0, WAN=fxp1.
    Dropped to console and tried this: (Stolen from antik's PC-BSD post with slight modifications)

    ifconfig fxp2 up
    ngctl mkpeer fxp0: one2many upper one
    ngctl connect fxp0: fxp0:upper lower many0
    ngctl connect fxp2: fxp0:upper lower many1
    ngctl msg fxp2: setpromisc 1
    ngctl msg fxp2: setautosrc 0
    ngctl msg fxp0:upper
    setconfig "{ xmitAlg=1 failAlg=2 enabledLinks=[ 1 1 ] }"

    This was just an excercise to see if this would work, and I don't have any plans to due this with a production box, but here are some observations in case anyone is interested:
    Seemed to work on an unconfigured switch. In a production environment, you might need to configure the switchports to avoid problems. Connected to a hub, you will get duplicate responses.
    I could maintain a ping, be in the webgui, and surf the Internet after unplugging fxp0. The LAN interface showed down in the webgui, but everything was still working. I didn't do any throughput tests. Again, this was a small test setup- doing this on a production box could cause your firewall to crash and make your dog pee on your slippers.


Log in to reply