Contents
|
To aggreate multiple network interfaces (wireless in our case) into a single logical interface.
The Linux bonding driver provides a method for aggregating multiple network interfaces into a single logical bonded interface. The behavior of the bonded interfaces depends upon the mode; generally speaking, modes provide either hot standby or load balancing services.
Select "Bonding driver support" in the "Network device support" section.
The ifenslave user level control program is included in the kernel source tree, in the file Documentation/networking/ifenslave.c. It is generally recommended that you use the ifenslave that corresponds to the kernel that you are using (either from the same source tree or supplied with the distro).
For manual configuration:
modprobe bonding mode=balance-rr modprobe <network-driver> ifconfig bond0 192.168.1.1 netmask 255.255.255.0 up ifenslave bond0 eth0 ifenslave bond0 eth1
For auto configuration: in /etc/network/interfaces
iface bond0 inet static
address 10.0.200.2
netmask 255.255.255.0
broadcast 10.0.200.255
up /extra/work/ifenslave bond0 wlan0 wlan1
down /extra/work/ifenslave -d bond0 wlan0 wlan1
down ifdown wlan0
down ifdown wlan1
down ifup wlan0
down ifup wlan1
For status:
$ cat /proc/net/bonding/bond0 $ ifenslave bond0
Round-robin policy: Transmit packets in sequential order from the first available slave through the last. This mode provides load balancing and fault tolerance.
XOR policy: Transmit based on the selected transmit hash policy. The default policy is a simple
(source MAC address \oplus destination MAC address) % n_{slaves}
Alternate transmit policies may be selected via the xmit_hash_policy option. This mode provides load balancing and fault tolerance.
Adaptive load balancing: includes balance-tlb plus receive load balancing (rlb) for IPV4 traffic, and does not require any special switch support.
Bonding mode for this type is balance-rr. Usual caveats about out of order packet delivery are mitigated by the use of network adapters that do not do any kind of packet coalescing
+-----------+
| Host A |
+-+---+---+-+
| | |
| | |
+-+---+---+-+
| Host B |
+-----------+
bond0 Link encap:Ethernet HWaddr 00:00:24:C3:DF:44
inet addr:10.0.200.2 Bcast:10.255.255.255 Mask:255.255.255.0
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
eth3 Link encap:Ethernet HWaddr 00:00:24:C3:DF:44
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
eth4 Link encap:Ethernet HWaddr 00:00:24:C3:DF:44
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
Ethernet Channel Bonding Driver: v2.6.0 (January 14, 2004)
Bonding Mode: load balancing (round-robin) MII Status: up MII Polling Interval (ms): 0 Up Delay (ms): 0 Down Delay (ms): 0
Slave Interface: eth3 MII Status: up Link Failure Count: 0 Permanent HW addr: 00:00:24:c3:df:44
Slave Interface: eth4 MII Status: up Link Failure Count: 0 Permanent HW addr: 00:00:24:c3:df:45
Recent comments
1 week 4 days ago
5 weeks 8 hours ago
5 weeks 1 day ago
6 weeks 4 days ago
7 weeks 6 days ago
8 weeks 2 days ago
8 weeks 4 days ago
9 weeks 2 days ago
9 weeks 4 days ago
10 weeks 1 day ago