> > > Hi, > > is there a preferred way to do ethernet load balancing? My situation is - 2 > > cable modems connected to two ethernet cards on with a machine functioning > > as a NAT gateway for LAN. I tried netgraph (ng_ether with round robin and > > ng_fec). With ng_ether, I achieved packets being sent via one interface and > > received on another one(not what I want), ng_fec didn't work at all (it just > > silently dropped all outgoing packets). > > ng_fec needs a cisco at the other end (or possibly another freebsd > machine with ng_fec but I don't know that). > yes, bond.c does as well, but it worked in my situation because of the structure of the network I am on (basically, the nearest other host that understands IP is Cisco 6K (i think). It worked exactly in the way it should with ng_fec - 2 interfaces with the same MAC and IP and round robin routing policy. But when I look at netstat -in, I see no packets being sent out via fec0 (and thus they are dropped somewhere :-( )
> > Is there another way? I already did this with linux (by using bond.c > > similiar to ng_fec) and it worked under the same conditions. > > Any advice would be appreciated. > > if your outgoing packets are going to different hosts (and not just one) > you could try: > > ipfw add 1000 fwd {remote 1} ip from any to 0.0.1.0:0.0.1.0 out xmit fxp1 > ipfw add 1001 fwd {remote 2} ip from any to 0.0.0.0:0.0.1.0 out xmit fxp1 > > where "remote 1" and "remote 2" are the gateways on each cable modem, > (or some address that will make them go to different ports) > and fxp1 is the interface tha the routing table would make them go out of > normally. I will try that, but I guess default route has precedence over ipfw. > > alternatively, the netgraph approach should work but I'm guessing > that you've set up something wrong.. > what is your configuration? > > basically, I was trying the sample from man 4 ng_ether as following: ed1: ne2k card connected to cable modem ed2: ne2k card (another clone) connected to cable modem ngctl mkpeer ed2: one2many upper one ngctl connect ed2: ed2:upper lower many0 ngctl connect ed1: ed2:upper lower many1 ngctl msg ed1: setpromisc 1 ngctl msg ed1: setautosrc 0 # Configure all four links as up ngctl msg ed2:upper \ setconfig "{ xmitAlg=1 failAlg=1 enabledLinks=[ 1 1 1 1 ] }" # Bring up interface ifconfig ed2 inet my.ip.goes.here netmask 255.255.255.0 then, I set a route to my default gw, but all packets are then routed via one interface out and one in, but I want them flowing one-by-one via both as I used to do with bond.c. The one solution would be to route packets non-interface-specificaly, that means by random or round robin, but it seems like the "route" command doesn't support specifying interface at all! To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-net" in the body of the message