пятница, 22 апреля 2011 г.

LACP Debian

Quick update: I built a Debian Squeeze box recently and the same steps worked for me.
So you need a fat network connection on your Debian 5 server, but a 10 GoE infrastructure is not in your budget? No fear! Link Aggregation Control Protocol is here to save the day!
This was both the problem I had, and the solution I learned to implement thanks to a question posted on serverfault.com (Multiplexed 1 Gbps Ethernet?) and some hours of research & experimentation. Here's what I did:
  • Purchase a NIC capable of LACP with solid Linux driver support. I went with an Intel PRO/1000 PT Quad Port Server Adapter.
  • Purchase a Switch capable of LACP. It should be more than capable of handeling the bandwidth. We opted for an HP ProCurve 2510G-24.
  • Install ifenslave-2.6: apt-get install ifenslave-2.6
  • Purchase some network cables. Cat 6 if you can, Cat 5e if not.
  • Edit /etc/modules and add bonding mode=4 miimon=100 max_bonds=2. This will load the module at boot time in the future. The value of max_bonds is the number of bonding devices your system will have. The default is 1.
  • Load the module, so we can proceed. modprobe bonding. There should be no errors. Confirm it is loaded with modprobe -l | grep bond
  • Edit /etc/network/interfaces to look something like this:
    # The loopback network interface
    auto lo
    iface lo inet loopback
    
    auto  bond0
    iface bond0 inet static
        address     192.168.1.131
        gateway     192.168.1.1
        broadcast   192.168.1.255
        netmask     255.255.255.0
        up   /sbin/ifenslave    bond0 eth0 eth1 eth2 eth3
        down /sbin/ifenslave -d bond0 eth0 eth1 eth2 eth3
    
    #similar configuration for bond1
    
  • Add to /etc/modprobe.d/arch/X86_64.conf something like this for a 64-bit installation:
    
    alias bond0 bonding
    alias bond1 bonding
    
    
  • Plug in the network cables
  • Restart the network: /etc/init.d/network restart
  • Configure the switch to use the four ports as a single trunk.

Комментариев нет:

Отправить комментарий