Lines Matching +full:slave +full:- +full:kernel

1 .. SPDX-License-Identifier: GPL-2.0
11 Corrections, HA extensions: 2000/10/03-15:
13 - Willy Tarreau <willy at meta-x.org>
14 - Constantine Gavrilov <const-g at xpert.com>
15 - Chad N. Tindel <ctindel at ieee dot org>
16 - Janice Girouard <girouard at us dot ibm dot com>
17 - Jay Vosburgh <fubar at us dot ibm dot com>
22 - Mitch Williams <mitch.a.williams at intel.com>
34 beowulf patches for kernel 2.0. It has changed quite a bit since, and
35 the original tools from extreme-linux and beowulf sites will not work
115 installing a mainline kernel from kernel.org), you'll need to perform
118 1.1 Configure and build the kernel with bonding
119 -----------------------------------------------
122 drivers/net/bonding subdirectory of the most recent kernel source
123 (which is available on http://kernel.org). Most users "rolling their
124 own" will want to use the most recent kernel from kernel.org.
126 Configure kernel with "make menuconfig" (or "make xconfig" or
132 Build and install the new kernel and modules.
135 ---------------------------
148 ``/etc/modprobe.d/*.conf`` configuration files, or in a distro-specific
156 configuring a bond, it is recommended "tail -f /var/log/messages" be
172 Specifies the new active slave for modes that support it
173 (active-backup, balance-alb and balance-tlb). Possible values
175 string. If a name is given, the slave and its link must be up in order
176 to be selected as the new active slave. If an empty string is
177 specified, the current active slave is cleared, and a new active
178 slave is selected automatically.
184 active slave, or the empty string if there is no active slave or
185 the current mode does not use an active slave.
190 is 1 - 65535. If the value is not specified, it takes 65535 as the
198 In an AD system, this specifies the mac-address for the actor in
200 address. If the all-zeroes MAC is specified, bonding will internally
202 local-admin bit set for this mac but driver does not enforce it. If
230 - A slave is added to or removed from the bond
232 - Any slave's link state changes
234 - Any slave's 802.3ad association state changes
236 - The bond's administrative state changes to up
253 In an AD system, the port-key has three parts as shown below -
259 01-05 Speed
260 06-15 User-defined
264 from 0 - 1023. If not given, the system defaults to 0.
285 The ARP monitor works by periodically checking the slave
288 bonding mode, and the state of the slave). Regular traffic is
331 non-ARP traffic should be filtered (disregarded) for link
342 Validation is performed only for the active slave.
360 only for the active slave.
370 ARP requests and replies, and only consider a slave to be up if it
373 For an active slave, the validation checks ARP replies to confirm
377 active slave. It is possible that some switch or network
384 the active slave failure, it doesn't really guarantee that the
385 backup slave will work if it's selected as the next active slave.
402 if a slave is available.
406 determining if a slave has received traffic for link availability
420 in order for the ARP monitor to consider a slave as being up.
421 This option affects only active-backup mode for slaves with
428 consider the slave up only when any of the arp_ip_targets
433 consider the slave up only when all of the arp_ip_targets
445 The default value is 2, and the allowable range is 1 - 255.
453 IEEE 802.1AX-2008 5.4.15 in addition to the existing coupled control
462 a slave after a link failure has been detected. This option
470 Specifies whether active-backup mode should set all slaves to
480 bonding to set all slaves of an active-backup bond to
488 address of the currently active slave. The MAC
516 the MAC address of the first slave added to the bond).
519 slave is programmed with the bond's MAC address at
520 failover time (and the formerly active slave receives
521 the newly active slave's MAC address).
529 The default policy is none, unless the first slave cannot
576 This determines how often the link state of each slave is
587 asserting carrier. It is similar to the Cisco EtherChannel min-links
589 must be up (link-up state) before marking the bond device as up
604 balance-rr (round robin). Possible values are:
606 balance-rr or 0
608 Round-robin policy: Transmit packets in sequential
609 order from the first available slave through the
613 active-backup or 1
615 Active-backup policy: Only one slave in the bond is
616 active. A different slave becomes active if, and only
617 if, the active slave fails. The bond's MAC address is
622 occurs in active-backup mode, bonding will issue one
623 or more gratuitous ARPs on the newly active slave.
634 balance-xor or 2
639 packet type ID) modulo slave count]. Alternate transmit
647 Broadcast policy: transmits everything on all slave
657 Slave selection for outgoing traffic is done according
662 regards to the packet mis-ordering requirements of
670 the speed and duplex of each slave.
678 balance-tlb or 5
685 relative to the speed) on each slave.
691 Incoming traffic is received by the current slave.
692 If the receiving slave fails, another slave takes over
693 the MAC address of the failed receiving slave.
698 speed of each slave.
700 balance-alb or 6
702 Adaptive load balancing: includes balance-tlb plus
725 collapses to the current slave. This is handled by
729 redistributed when a new slave is added to the bond
730 and when an inactive slave is re-activated. The
734 When a link is reconnected or a new slave joins the
746 the speed of each slave.
750 required so that there will always be one slave in the
753 address for each slave in the bond. If the
763 failover event. As soon as the link is up on the new slave
765 bonding device and each VLAN sub-device. This is repeated at
769 The valid range is 0 - 255; the default value is 1. These options
770 affect only the active-backup mode. These options were added for
779 Specify the number of packets to transmit through a slave before
780 moving to the next one. When set to 0 then a slave is chosen at
783 The valid range is 0 - 65535; the default value is 1. This option
784 has effect only in balance-rr mode.
794 The valid range is 0 - 300000. The default value is 0, which means
798 Slave priority. A higher number means higher priority.
799 The primary slave has the highest priority. This option also
803 for active-backup(1), balance-tlb (5) and balance-alb (6) mode.
810 A string (eth0, eth2, etc) specifying which slave is the
812 active slave while it is available. Only when the primary is
813 off-line will alternate devices be used. This is useful when
814 one slave is preferred over another, e.g., when one slave has
817 The primary option is only valid for active-backup(1),
818 balance-tlb (5) and balance-alb (6) mode.
822 Specifies the reselection policy for the primary slave. This
823 affects how the primary slave is chosen to become the active slave
824 when failure of the active slave or recovery of the primary slave
825 occurs. This option is designed to prevent flip-flopping between
826 the primary slave and other slaves. Possible values are:
830 The primary slave becomes the active slave whenever it
835 The primary slave becomes the active slave when it comes
836 back up, if the speed and duplex of the primary slave is
838 slave.
842 The primary slave becomes the active slave only if the
843 current active slave fails and the primary slave is up.
847 If no slaves are active, the first slave to recover is
848 made the active slave.
850 When initially enslaved, the primary slave is always made
851 the active slave.
854 immediate selection of the best active slave according to the new
856 slave, depending upon the circumstances.
867 characteristics but can cause packet reordering. If re-ordering is
870 xmit-hash-policy can be used to select the appropriate hashing for
885 slave after a link recovery has been detected. This option is
895 utilize a deprecated calling sequence within the kernel. The
914 Selects the transmit hash policy to use for slave selection in
915 balance-xor, 802.3ad, and tlb modes. Possible values are:
923 slave number = hash modulo slave count
926 network peer on the same slave.
942 And then hash is reduced modulo slave count.
948 network peer on the same slave. For non-IP traffic,
974 And then hash is reduced modulo slave count.
981 information is omitted. For non-IP traffic, the
1018 hash to load-balance traffic per-vlan, with failover
1021 use their own vlan, to give lacp-like functionality
1022 without requiring lacp-capable switching hardware.
1039 The valid range is 0 - 255; the default value is 1. A value of 0
1043 This option is useful for bonding modes balance-rr (0), active-backup
1044 (1), balance-tlb (5) and balance-alb (6), in which a failover can
1045 switch the IGMP traffic from one slave to another. Therefore a fresh
1047 IGMP traffic over the newly selected slave.
1056 The valid range is 1 - 0x7fffffff; the default value is 1. This Option
1057 has effect only in balance-tlb and balance-alb modes.
1085 $ rpm -qf /sbin/ifup
1100 ----------------------------------------
1111 slave devices. On SLES 9, this is most easily done by running the
1113 ifcfg-id file for each slave device. The simplest way to accomplish
1115 file ifcfg-id file created; see below for some issues with DHCP). The
1118 ifcfg-id-xx:xx:xx:xx:xx:xx
1123 Once the set of ifcfg-id-xx:xx:xx:xx:xx:xx files has been
1124 created, it is necessary to edit the configuration files for the slave
1125 devices (the MAC addresses correspond to those of the slave devices).
1133 _nm_name='bus-pci-0001:61:01.0'
1143 Once the ifcfg-id-xx:xx:xx:xx:xx:xx files have been modified,
1145 itself. This file is named ifcfg-bondX, where X is the number of the
1147 ifcfg-bond0, the second is ifcfg-bond1, and so on. The sysconfig
1151 The contents of the ifcfg-bondX file is as follows::
1161 BONDING_MODULE_OPTS="mode=active-backup miimon=100"
1163 BONDING_SLAVE1="bus-pci-0000:06:08.1"
1196 Finally, supply one BONDING_SLAVEn="slave device" for each
1197 slave. where "n" is an increasing value, one for each slave. The
1198 "slave device" is either an interface name, e.g., "eth0", or a device
1202 (bus-pci-0000:06:08.1 in the example above) specify the physical
1206 configurations will choose one or the other for all slave devices.
1233 -------------------------------
1239 the slave devices. Without active slaves, the DHCP requests are not
1243 -----------------------------------------------
1247 bonding instance to have an appropriately configured ifcfg-bondX file
1251 ifcfg-bondX files.
1254 options in the ifcfg-bondX file, it is not necessary to add them to
1258 ------------------------------------------
1271 network-script file for all physical adapters that will be members of
1274 /etc/sysconfig/network-scripts
1276 The file name must be prefixed with "ifcfg-eth" and suffixed
1278 for eth0 would be named /etc/sysconfig/network-scripts/ifcfg-eth0.
1285 SLAVE=yes
1289 must correspond with the name of the file, i.e., ifcfg-eth1 must have
1297 script will be /etc/sysconfig/network-scripts/ifcfg-bondX where X is
1298 the number of the bond. For bond0 the file is named "ifcfg-bond0",
1299 for bond1 it is named "ifcfg-bond1", and so on. Within that file,
1316 and, indeed, preferable, to specify the bonding options in the ifcfg-bond0
1319 BONDING_OPTS="mode=active-backup arp_interval=60 arp_ip_target=192.168.1.254"
1342 options bond0 mode=balance-alb miimon=100
1352 ---------------------------------
1365 -------------------------------------------------
1369 specifying the appropriate BONDING_OPTS= in ifcfg-bondX where X is the
1370 number of the bond. This support requires sysfs support in the kernel,
1377 -----------------------------------------------
1396 modprobe bonding mode=balance-alb miimon=100
1419 enabled without re-running the entire global init script.
1435 -----------------------------------------
1464 options bond0 -o bond0 mode=balance-rr miimon=100
1467 options bond1 -o bond1 mode=balance-alb miimon=50
1470 named "bond0" and creates the bond0 device in balance-rr mode with an
1472 bond1 device in balance-alb mode with an miimon of 50.
1479 install bond1 /sbin/modprobe --ignore-install bonding -o bond1 \
1480 mode=balance-alb miimon=50
1486 to rename modules at load time (the "-o bond1" part). Attempts to pass
1494 ------------------------------------------
1505 bonding is compiled into the kernel.
1514 -----------------------------
1521 # echo -bar > /sys/class/net/bonding_masters
1534 --------------------------
1544 To free slave eth0 from bond bond0::
1546 # echo -eth0 > /sys/class/net/bond0/bonding/slaves
1555 # echo -eth0 > /sys/class/net/eth0/master/bonding/slaves
1560 -------------------------------
1564 The names of these files correspond directly with the command-
1573 To configure bond0 for balance-alb mode::
1577 - or -
1578 # echo balance-alb > /sys/class/net/bond0/bonding/mode
1591 monitoring is enabled, and vice-versa.
1604 # echo -192.168.0.100 > /sys/class/net/bond0/bonding/arp_ip_target
1617 ---------------------
1628 echo balance-alb > /sys/class/net/bond0/bonding/mode
1635 active-backup mode, using ARP monitoring, add the following lines to
1640 echo active-backup > /sys/class/net/bond1/bonding/mode
1648 -----------------------------------------
1655 the box. The ifenslave-2.6 package should be installed to provide bonding
1656 support. Once installed, this package will provide ``bond-*`` options
1659 Note that ifenslave-2.6 package will load the bonding module and use
1663 ----------------------
1666 active-backup mode, with eth0 and eth1 as slaves::
1670 bond-slaves eth0 eth1
1671 bond-mode active-backup
1672 bond-miimon 100
1673 bond-primary eth0 eth1
1682 bond-slaves none
1683 bond-mode active-backup
1684 bond-miimon 100
1688 bond-master bond0
1689 bond-primary eth0 eth1
1693 bond-master bond0
1694 bond-primary eth0 eth1
1696 For a full list of ``bond-*`` supported options in /etc/network/interfaces and
1698 /usr/share/doc/ifenslave-2.6.
1701 ----------------------------------------------
1722 ID is now printed for each slave::
1724 Bonding Mode: fault-tolerance (active-backup)
1725 Primary Slave: None
1726 Currently Active Slave: eth0
1732 Slave Interface: eth0
1736 Slave queue ID: 0
1738 Slave Interface: eth1
1742 Slave queue ID: 2
1744 The queue_id for a slave can be set using the command::
1751 arguments can be added to BONDING_OPTS to set all needed slave queues.
1755 slave devices. For instance, say we wanted, in the above configuration to
1764 These commands tell the kernel to attach a multiqueue queue discipline to the
1772 leaving the qid for a slave to 0 is the multiqueue awareness in the bonding
1774 slave devices as well as bond devices and the bonding driver will simply act as
1775 a pass-through for selecting output queues on the slave device rather than
1779 output slave selection was limited to round-robin and active-backup modes.
1782 ----------------------------------------------------------
1798 (a) ad_actor_system : You can set a random mac-address that can be used for
1800 Also it's preferable to set the local-admin bit. Following shell code
1801 generates a random mac-address as described above::
1813 is 65535, but system can take the value from 1 - 65535. Following shell
1819 (c) ad_user_port_key : Use the user portion of the port-key. The default
1820 keeps this empty. These are the upper 10 bits of the port-key and value
1821 ranges from 0 - 1023. Following shell code generates these 10 bits and
1832 -------------------------
1834 Each bonding device has a read-only file residing in the
1836 about the bonding configuration, options and state of each slave.
1843 Bonding Mode: load balancing (round-robin)
1844 Currently Active Slave: eth0
1850 Slave Interface: eth1
1854 Slave Interface: eth0
1862 -------------------------
1865 command. Bonding devices will have the MASTER flag set; Bonding slave
1866 devices will have the SLAVE flag set. The ifconfig output does not
1870 (MASTER) while eth0 and eth1 are slaves (SLAVE). Notice all slaves of
1872 TLB and ALB that require a unique MAC address for each slave::
1883 UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
1890 UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
1905 The active-backup, balance-tlb and balance-alb modes do not
1916 The balance-rr, balance-xor and broadcast modes generally
1948 "un-accelerated" by the bonding driver so the VLAN tag sits in the
1952 only after enslaving at least one slave. The bonding interface has a
1953 hardware address of 00:00:00:00:00:00 until the first slave is added.
1955 would pick up the all-zeroes hardware address. Once the first slave
1957 slave's hardware address, which is then available for the VLAN device.
1961 top of it. When a new slave is added, the bonding interface will
1962 obtain its hardware address from the first slave, which might not
1964 ultimately copied from an earlier slave).
1976 underlying device -- i.e. the bonding interface -- to promiscuous
1984 monitoring a slave device's link state: the ARP monitor and the MII
1992 -------------------------
2001 ------------------------------------
2024 -------------------------
2053 -------------------------
2055 When bonding is configured, it is important that the slave
2061 Kernel IP routing table
2088 ----------------------------
2099 options bond0 mode=some-mode miimon=50
2107 happens because bonding is loaded first, then its slave device's
2132 ---------------------------------------------------------
2214 master device (e.g., bond0), and propagates the setting to the slave
2217 For the balance-rr, balance-xor, broadcast, and 802.3ad modes,
2220 For the active-backup, balance-tlb and balance-alb modes, the
2221 promiscuous mode setting is propagated only to the active slave.
2223 For balance-tlb mode, the active slave is the slave currently
2226 For balance-alb mode, the active slave is the slave used as a
2227 "primary." This slave is used for mode-specific control traffic, for
2230 For the active-backup, balance-tlb and balance-alb modes, when
2231 the active slave changes (e.g., due to a link failure), the
2232 promiscuous setting will be propagated to the new active slave.
2245 --------------------------------------------------
2259 ----------------------------------------------------
2270 +-----+----+ +-----+----+
2272 | switch A +--------------------------+ switch B |
2274 +-----+----+ +-----++---+
2276 | +-------+ |
2277 +-------------+ host1 +---------------+
2278 eth0 +-------+ eth1
2286 -------------------------------------------------------------
2288 In a topology such as the example above, the active-backup and
2293 active-backup:
2306 necessary for some specific one-way traffic to reach both
2310 ----------------------------------------------------------------
2343 ------------------------------------------------------
2359 +----------+ +----------+
2361 | Host A +---------------------+ router +------------------->
2362 | +---------------------+ | Hosts B and C are out
2364 +----------+ +----------+
2386 +----------+ +----------+ +--------+
2387 | |eth0 port1| +-------+ Host B |
2388 | Host A +------------+ switch |port3 +--------+
2389 | +------------+ | +--------+
2390 | |eth1 port2| +------------------+ Host C |
2391 +----------+ +----------+port4 +--------+
2414 -----------------------------------------------------------
2420 balance-rr:
2447 through the switch to a balance-rr bond will not utilize greater
2459 active-backup:
2461 the active-backup mode, as the inactive backup devices are all
2465 available bandwidth. On the plus side, active-backup mode
2470 balance-xor:
2480 As with balance-rr, the switch ports need to be configured for
2484 Like active-backup, there is not much advantage to this
2500 balance modes other than balance-rr, no single connection will
2516 balance-tlb:
2517 The balance-tlb mode balances outgoing traffic by peer.
2523 manner (not a simple XOR as in balance-xor or 802.3ad mode),
2532 network device driver of the slave interfaces, and the ARP
2535 balance-alb:
2536 This mode is everything that balance-tlb is, and more.
2537 It has all of the features (and restrictions) of balance-tlb,
2547 ----------------------------------------------------
2556 -----------------------------------------------------
2562 +-----------+
2564 +-+---+---+-+
2566 +--------+ | +---------+
2568 +------+---+ +-----+----+ +-----+----+
2570 +------+---+ +-----+----+ +-----+----+
2572 +--------+ | +---------+
2574 +-+---+---+-+
2576 +-----------+
2591 -------------------------------------------------------------
2594 configurations of this type is balance-rr. Historically, in this
2599 packets has arrived). When employed in this fashion, the balance-rr
2604 ------------------------------------------------------
2617 -------------------------------------------
2639 case). If there are slave interfaces waiting for the updelay timeout
2652 --------------------------------
2662 output from ping flags duplicates (typically one per slave).
2664 For example, on a bond in active-backup mode with five slaves
2667 # ping -n 10.0.4.2
2686 (one per slave device).
2691 most Cisco switches, the privileged command "clear mac address-table
2702 --------------------
2707 balance-rr, active-backup, balance-tlb and balance-alb modes. This is
2712 --------------------------------
2715 integrated on the planar (that's "motherboard" in IBM-speak). In the
2718 An add-on Broadcom daughter card can be installed on a JS20 to provide
2727 Additional BladeCenter-specific networking information can be
2730 - "IBM eServer BladeCenter Networking Options"
2731 - "IBM eServer BladeCenter Layer 2-7 Network Switching"
2734 ------------------------------------
2759 -------------------------------
2761 The balance-rr mode requires the use of passthrough modules
2764 appropriate ports, as is usual for balance-rr.
2766 The balance-alb and balance-tlb modes will function with
2773 The active-backup mode has no additional requirements.
2776 ----------------------
2791 --------------
2801 avoid fail-over delay issues when using bonding.
2808 -------------------
2814 -----------------------------------------
2816 Any Ethernet type cards (you can even mix cards - a Intel
2821 slaves in active-backup mode.
2824 ----------------------------------------
2829 ----------------------------------------------
2835 5. What happens when a slave link dies?
2836 ----------------------------------------
2839 disabled. The active-backup mode will fail over to a backup link, and
2859 ----------------------------------------------
2864 ---------------------------------------------
2868 In the basic balance modes (balance-rr and balance-xor), it
2873 The advanced balance modes (balance-tlb and balance-alb) do
2882 The active-backup mode should work with any Layer-II switch.
2885 ---------------------------------------------------------
2887 When using slave devices that have fixed MAC addresses, or when
2889 the MAC address of the active slave.
2893 its first slave device. This MAC address is then passed to all following
2894 slaves and remains persistent (even if the first slave is removed) until
2907 # ifconfig bond0 down ; modprobe -r bonding
2912 slave that is added.
2915 from the bond (``ifenslave -d bond0 eth0``). The bonding driver will
2920 ------------------------------------------
2922 * balance-rr (0)
2923 * active-backup (1)
2924 * balance-xor (2)
2934 version of the linux kernel, found on http://kernel.org
2936 The latest version of this document can be found in the latest kernel
2940 on the main Linux network mailing list, hosted at vger.kernel.org. The list
2943 netdev@vger.kernel.org
2948 http://vger.kernel.org/vger-lists.html#netdev