one2many/bonding/loadbalancing/failover/ freebsd 5.3

34 views
Skip to first unread message

kennux

unread,
Sep 27, 2005, 8:36:58 AM9/27/05
to freebsd
Hi all!

I want to make a NFS server with a freebsd 5.3. I have 2 network cards.
So I want to put loadbalancing and failover. With gentoo and the
bonding module, I haven't any problem.
Packets are sent on the 2 cards, if a cable is unplugged, all packets
are transmit on the NIC which is still active.
Here my configuration:
1 gentoo, 2 NICs in bonding
1 freebsd with 2 NICs I want to put in bonding.
1 ipcop router.
1 switch 10/100Mb

I first try with the ng_fec module. But I read that it must have been
completed with the Fast Ether Channel, a Cisco technology. With this, I
just managed to have one card which transmits all packets, and if it
falls down, the second become active.
Thus, I try with the ng_one2many module. I wrote a script in order to
have it enabled at boot. It's a combination of multiples URL I visited.


######### SNIP ##########
#load necessary modules
kldload ng_ether
kldload ng_one2many

# create virtual interface
ngctl mkpeer . eiface hook ether
ngctl mkpeer ngeth0: one2many upper one

# connect real interfaces to ngeth0
ngctl connect vr0: ngeth0:upper lower many0
ngctl connect de0: ngeth0:upper lower many1

# setting real interfaces up
ifconfig vr0 up -arp
ifconfig de0 up -arp

#set modes promisc
ngctl msg vr0: setpromisc 1
ngctl msg de0: setpromisc 1
ngctl msg vr0: setautosrc 0
ngctl msg de0: setautosrc 0

# configure new virtual interface
ngctl msg ngeth0:upper setconfig "{ xmitAlg=2 failAlg=1 enabledLinks=[
1 1 ]}"

#ifconfig ngeth0 link 00:fe:80:28:ff:9a
#ifconfig vr0 link 00:fe:80:28:ff:9a
#ifconfig de0 link 00:fe:80:28:ff:9a

ifconfig ngeth0 inet 192.168.1.1 netmask 255.255.255.0
ifconfig ngeth0 up
######## /SNIP ##########

Here are my results:
With the option xmitAlg=1, I have packets which are sent alternativly
on the 2 cards. But if one cable is unplugged, I receive one about two
packets. For an example, with ping, the sequences are 0, 2, 4 etc.
With the option xmitAlg=2, each NIC send a packet. With a ping, one
card receives only the replys, and the other receives 2 replys. If it's
not very clear, excuse me. I can add tcpdump tests to see what I mean.
I wanted to know, if it was possible to have the same as linux and
bonding. Do I have to have a 10/100/1000Mb switch if I want to increase
my bw?

I hope someone could help me.
Thanks a lot

Kennux:

PS: I apologize for english mistakes and the long post..

Reply all
Reply to author
Forward
0 new messages