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.
450 a slave after a link failure has been detected. This option
458 Specifies whether active-backup mode should set all slaves to
468 bonding to set all slaves of an active-backup bond to
476 address of the currently active slave. The MAC
504 the MAC address of the first slave added to the bond).
507 slave is programmed with the bond's MAC address at
508 failover time (and the formerly active slave receives
509 the newly active slave's MAC address).
517 The default policy is none, unless the first slave cannot
564 This determines how often the link state of each slave is
574 asserting carrier. It is similar to the Cisco EtherChannel min-links
576 must be up (link-up state) before marking the bond device as up
591 balance-rr (round robin). Possible values are:
593 balance-rr or 0
595 Round-robin policy: Transmit packets in sequential
596 order from the first available slave through the
600 active-backup or 1
602 Active-backup policy: Only one slave in the bond is
603 active. A different slave becomes active if, and only
604 if, the active slave fails. The bond's MAC address is
609 occurs in active-backup mode, bonding will issue one
610 or more gratuitous ARPs on the newly active slave.
621 balance-xor or 2
626 packet type ID) modulo slave count]. Alternate transmit
634 Broadcast policy: transmits everything on all slave
644 Slave selection for outgoing traffic is done according
649 regards to the packet mis-ordering requirements of
657 the speed and duplex of each slave.
665 balance-tlb or 5
672 relative to the speed) on each slave.
678 Incoming traffic is received by the current slave.
679 If the receiving slave fails, another slave takes over
680 the MAC address of the failed receiving slave.
685 speed of each slave.
687 balance-alb or 6
689 Adaptive load balancing: includes balance-tlb plus
712 collapses to the current slave. This is handled by
716 redistributed when a new slave is added to the bond
717 and when an inactive slave is re-activated. The
721 When a link is reconnected or a new slave joins the
733 the speed of each slave.
737 required so that there will always be one slave in the
740 address for each slave in the bond. If the
750 failover event. As soon as the link is up on the new slave
752 bonding device and each VLAN sub-device. This is repeated at
756 The valid range is 0 - 255; the default value is 1. These options
757 affect only the active-backup mode. These options were added for
766 Specify the number of packets to transmit through a slave before
767 moving to the next one. When set to 0 then a slave is chosen at
770 The valid range is 0 - 65535; the default value is 1. This option
771 has effect only in balance-rr mode.
784 Slave priority. A higher number means higher priority.
785 The primary slave has the highest priority. This option also
789 for active-backup(1), balance-tlb (5) and balance-alb (6) mode.
796 A string (eth0, eth2, etc) specifying which slave is the
798 active slave while it is available. Only when the primary is
799 off-line will alternate devices be used. This is useful when
800 one slave is preferred over another, e.g., when one slave has
803 The primary option is only valid for active-backup(1),
804 balance-tlb (5) and balance-alb (6) mode.
808 Specifies the reselection policy for the primary slave. This
809 affects how the primary slave is chosen to become the active slave
810 when failure of the active slave or recovery of the primary slave
811 occurs. This option is designed to prevent flip-flopping between
812 the primary slave and other slaves. Possible values are:
816 The primary slave becomes the active slave whenever it
821 The primary slave becomes the active slave when it comes
822 back up, if the speed and duplex of the primary slave is
824 slave.
828 The primary slave becomes the active slave only if the
829 current active slave fails and the primary slave is up.
833 If no slaves are active, the first slave to recover is
834 made the active slave.
836 When initially enslaved, the primary slave is always made
837 the active slave.
840 immediate selection of the best active slave according to the new
842 slave, depending upon the circumstances.
853 characteristics but can cause packet reordering. If re-ordering is
856 xmit-hash-policy can be used to select the appropriate hashing for
871 slave after a link recovery has been detected. This option is
881 utilize a deprecated calling sequence within the kernel. The
900 Selects the transmit hash policy to use for slave selection in
901 balance-xor, 802.3ad, and tlb modes. Possible values are:
909 slave number = hash modulo slave count
912 network peer on the same slave.
928 And then hash is reduced modulo slave count.
934 network peer on the same slave. For non-IP traffic,
959 And then hash is reduced modulo slave count.
966 information is omitted. For non-IP traffic, the
1003 hash to load-balance traffic per-vlan, with failover
1006 use their own vlan, to give lacp-like functionality
1007 without requiring lacp-capable switching hardware.
1024 The valid range is 0 - 255; the default value is 1. A value of 0
1028 This option is useful for bonding modes balance-rr (0), active-backup
1029 (1), balance-tlb (5) and balance-alb (6), in which a failover can
1030 switch the IGMP traffic from one slave to another. Therefore a fresh
1032 IGMP traffic over the newly selected slave.
1041 The valid range is 1 - 0x7fffffff; the default value is 1. This Option
1042 has effect only in balance-tlb and balance-alb modes.
1070 $ rpm -qf /sbin/ifup
1085 ----------------------------------------
1096 slave devices. On SLES 9, this is most easily done by running the
1098 ifcfg-id file for each slave device. The simplest way to accomplish
1100 file ifcfg-id file created; see below for some issues with DHCP). The
1103 ifcfg-id-xx:xx:xx:xx:xx:xx
1108 Once the set of ifcfg-id-xx:xx:xx:xx:xx:xx files has been
1109 created, it is necessary to edit the configuration files for the slave
1110 devices (the MAC addresses correspond to those of the slave devices).
1118 _nm_name='bus-pci-0001:61:01.0'
1128 Once the ifcfg-id-xx:xx:xx:xx:xx:xx files have been modified,
1130 itself. This file is named ifcfg-bondX, where X is the number of the
1132 ifcfg-bond0, the second is ifcfg-bond1, and so on. The sysconfig
1136 The contents of the ifcfg-bondX file is as follows::
1146 BONDING_MODULE_OPTS="mode=active-backup miimon=100"
1148 BONDING_SLAVE1="bus-pci-0000:06:08.1"
1181 Finally, supply one BONDING_SLAVEn="slave device" for each
1182 slave. where "n" is an increasing value, one for each slave. The
1183 "slave device" is either an interface name, e.g., "eth0", or a device
1187 (bus-pci-0000:06:08.1 in the example above) specify the physical
1191 configurations will choose one or the other for all slave devices.
1218 -------------------------------
1224 the slave devices. Without active slaves, the DHCP requests are not
1228 -----------------------------------------------
1232 bonding instance to have an appropriately configured ifcfg-bondX file
1236 ifcfg-bondX files.
1239 options in the ifcfg-bondX file, it is not necessary to add them to
1243 ------------------------------------------
1256 network-script file for all physical adapters that will be members of
1259 /etc/sysconfig/network-scripts
1261 The file name must be prefixed with "ifcfg-eth" and suffixed
1263 for eth0 would be named /etc/sysconfig/network-scripts/ifcfg-eth0.
1270 SLAVE=yes
1274 must correspond with the name of the file, i.e., ifcfg-eth1 must have
1282 script will be /etc/sysconfig/network-scripts/ifcfg-bondX where X is
1283 the number of the bond. For bond0 the file is named "ifcfg-bond0",
1284 for bond1 it is named "ifcfg-bond1", and so on. Within that file,
1301 and, indeed, preferable, to specify the bonding options in the ifcfg-bond0
1304 BONDING_OPTS="mode=active-backup arp_interval=60 arp_ip_target=192.168.1.254"
1327 options bond0 mode=balance-alb miimon=100
1337 ---------------------------------
1350 -------------------------------------------------
1354 specifying the appropriate BONDING_OPTS= in ifcfg-bondX where X is the
1355 number of the bond. This support requires sysfs support in the kernel,
1362 -----------------------------------------------
1381 modprobe bonding mode=balance-alb miimon=100
1404 enabled without re-running the entire global init script.
1420 -----------------------------------------
1449 options bond0 -o bond0 mode=balance-rr miimon=100
1452 options bond1 -o bond1 mode=balance-alb miimon=50
1455 named "bond0" and creates the bond0 device in balance-rr mode with an
1457 bond1 device in balance-alb mode with an miimon of 50.
1464 install bond1 /sbin/modprobe --ignore-install bonding -o bond1 \
1465 mode=balance-alb miimon=50
1471 to rename modules at load time (the "-o bond1" part). Attempts to pass
1479 ------------------------------------------
1490 bonding is compiled into the kernel.
1499 -----------------------------
1506 # echo -bar > /sys/class/net/bonding_masters
1519 --------------------------
1529 To free slave eth0 from bond bond0::
1531 # echo -eth0 > /sys/class/net/bond0/bonding/slaves
1540 # echo -eth0 > /sys/class/net/eth0/master/bonding/slaves
1545 -------------------------------
1549 The names of these files correspond directly with the command-
1558 To configure bond0 for balance-alb mode::
1562 - or -
1563 # echo balance-alb > /sys/class/net/bond0/bonding/mode
1576 monitoring is enabled, and vice-versa.
1589 # echo -192.168.0.100 > /sys/class/net/bond0/bonding/arp_ip_target
1602 ---------------------
1613 echo balance-alb > /sys/class/net/bond0/bonding/mode
1620 active-backup mode, using ARP monitoring, add the following lines to
1625 echo active-backup > /sys/class/net/bond1/bonding/mode
1633 -----------------------------------------
1640 the box. The ifenslave-2.6 package should be installed to provide bonding
1641 support. Once installed, this package will provide ``bond-*`` options
1644 Note that ifenslave-2.6 package will load the bonding module and use
1648 ----------------------
1651 active-backup mode, with eth0 and eth1 as slaves::
1655 bond-slaves eth0 eth1
1656 bond-mode active-backup
1657 bond-miimon 100
1658 bond-primary eth0 eth1
1667 bond-slaves none
1668 bond-mode active-backup
1669 bond-miimon 100
1673 bond-master bond0
1674 bond-primary eth0 eth1
1678 bond-master bond0
1679 bond-primary eth0 eth1
1681 For a full list of ``bond-*`` supported options in /etc/network/interfaces and
1683 /usr/share/doc/ifenslave-2.6.
1686 ----------------------------------------------
1707 ID is now printed for each slave::
1709 Bonding Mode: fault-tolerance (active-backup)
1710 Primary Slave: None
1711 Currently Active Slave: eth0
1717 Slave Interface: eth0
1721 Slave queue ID: 0
1723 Slave Interface: eth1
1727 Slave queue ID: 2
1729 The queue_id for a slave can be set using the command::
1736 arguments can be added to BONDING_OPTS to set all needed slave queues.
1740 slave devices. For instance, say we wanted, in the above configuration to
1749 These commands tell the kernel to attach a multiqueue queue discipline to the
1757 leaving the qid for a slave to 0 is the multiqueue awareness in the bonding
1759 slave devices as well as bond devices and the bonding driver will simply act as
1760 a pass-through for selecting output queues on the slave device rather than
1764 output slave selection was limited to round-robin and active-backup modes.
1767 ----------------------------------------------------------
1783 (a) ad_actor_system : You can set a random mac-address that can be used for
1785 Also it's preferable to set the local-admin bit. Following shell code
1786 generates a random mac-address as described above::
1798 is 65535, but system can take the value from 1 - 65535. Following shell
1804 (c) ad_user_port_key : Use the user portion of the port-key. The default
1805 keeps this empty. These are the upper 10 bits of the port-key and value
1806 ranges from 0 - 1023. Following shell code generates these 10 bits and
1817 -------------------------
1819 Each bonding device has a read-only file residing in the
1821 about the bonding configuration, options and state of each slave.
1828 Bonding Mode: load balancing (round-robin)
1829 Currently Active Slave: eth0
1835 Slave Interface: eth1
1839 Slave Interface: eth0
1847 -------------------------
1850 command. Bonding devices will have the MASTER flag set; Bonding slave
1851 devices will have the SLAVE flag set. The ifconfig output does not
1855 (MASTER) while eth0 and eth1 are slaves (SLAVE). Notice all slaves of
1857 TLB and ALB that require a unique MAC address for each slave::
1868 UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
1875 UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
1890 The active-backup, balance-tlb and balance-alb modes do not
1901 The balance-rr, balance-xor and broadcast modes generally
1933 "un-accelerated" by the bonding driver so the VLAN tag sits in the
1937 only after enslaving at least one slave. The bonding interface has a
1938 hardware address of 00:00:00:00:00:00 until the first slave is added.
1940 would pick up the all-zeroes hardware address. Once the first slave
1942 slave's hardware address, which is then available for the VLAN device.
1946 top of it. When a new slave is added, the bonding interface will
1947 obtain its hardware address from the first slave, which might not
1949 ultimately copied from an earlier slave).
1961 underlying device -- i.e. the bonding interface -- to promiscuous
1969 monitoring a slave device's link state: the ARP monitor and the MII
1977 -------------------------
1986 ------------------------------------
2009 -------------------------
2038 -------------------------
2040 When bonding is configured, it is important that the slave
2046 Kernel IP routing table
2073 ----------------------------
2084 options bond0 mode=some-mode miimon=50
2092 happens because bonding is loaded first, then its slave device's
2117 ---------------------------------------------------------
2199 master device (e.g., bond0), and propagates the setting to the slave
2202 For the balance-rr, balance-xor, broadcast, and 802.3ad modes,
2205 For the active-backup, balance-tlb and balance-alb modes, the
2206 promiscuous mode setting is propagated only to the active slave.
2208 For balance-tlb mode, the active slave is the slave currently
2211 For balance-alb mode, the active slave is the slave used as a
2212 "primary." This slave is used for mode-specific control traffic, for
2215 For the active-backup, balance-tlb and balance-alb modes, when
2216 the active slave changes (e.g., due to a link failure), the
2217 promiscuous setting will be propagated to the new active slave.
2230 --------------------------------------------------
2244 ----------------------------------------------------
2255 +-----+----+ +-----+----+
2257 | switch A +--------------------------+ switch B |
2259 +-----+----+ +-----++---+
2261 | +-------+ |
2262 +-------------+ host1 +---------------+
2263 eth0 +-------+ eth1
2271 -------------------------------------------------------------
2273 In a topology such as the example above, the active-backup and
2278 active-backup:
2291 necessary for some specific one-way traffic to reach both
2295 ----------------------------------------------------------------
2328 ------------------------------------------------------
2344 +----------+ +----------+
2346 | Host A +---------------------+ router +------------------->
2347 | +---------------------+ | Hosts B and C are out
2349 +----------+ +----------+
2371 +----------+ +----------+ +--------+
2372 | |eth0 port1| +-------+ Host B |
2373 | Host A +------------+ switch |port3 +--------+
2374 | +------------+ | +--------+
2375 | |eth1 port2| +------------------+ Host C |
2376 +----------+ +----------+port4 +--------+
2399 -----------------------------------------------------------
2405 balance-rr:
2432 through the switch to a balance-rr bond will not utilize greater
2444 active-backup:
2446 the active-backup mode, as the inactive backup devices are all
2450 available bandwidth. On the plus side, active-backup mode
2455 balance-xor:
2465 As with balance-rr, the switch ports need to be configured for
2469 Like active-backup, there is not much advantage to this
2485 balance modes other than balance-rr, no single connection will
2501 balance-tlb:
2502 The balance-tlb mode balances outgoing traffic by peer.
2508 manner (not a simple XOR as in balance-xor or 802.3ad mode),
2517 network device driver of the slave interfaces, and the ARP
2520 balance-alb:
2521 This mode is everything that balance-tlb is, and more.
2522 It has all of the features (and restrictions) of balance-tlb,
2532 ----------------------------------------------------
2541 -----------------------------------------------------
2547 +-----------+
2549 +-+---+---+-+
2551 +--------+ | +---------+
2553 +------+---+ +-----+----+ +-----+----+
2555 +------+---+ +-----+----+ +-----+----+
2557 +--------+ | +---------+
2559 +-+---+---+-+
2561 +-----------+
2576 -------------------------------------------------------------
2579 configurations of this type is balance-rr. Historically, in this
2584 packets has arrived). When employed in this fashion, the balance-rr
2589 ------------------------------------------------------
2602 -------------------------------------------
2624 case). If there are slave interfaces waiting for the updelay timeout
2637 --------------------------------
2647 output from ping flags duplicates (typically one per slave).
2649 For example, on a bond in active-backup mode with five slaves
2652 # ping -n 10.0.4.2
2671 (one per slave device).
2676 most Cisco switches, the privileged command "clear mac address-table
2687 --------------------
2692 balance-rr, active-backup, balance-tlb and balance-alb modes. This is
2697 --------------------------------
2700 integrated on the planar (that's "motherboard" in IBM-speak). In the
2703 An add-on Broadcom daughter card can be installed on a JS20 to provide
2712 Additional BladeCenter-specific networking information can be
2715 - "IBM eServer BladeCenter Networking Options"
2716 - "IBM eServer BladeCenter Layer 2-7 Network Switching"
2719 ------------------------------------
2744 -------------------------------
2746 The balance-rr mode requires the use of passthrough modules
2749 appropriate ports, as is usual for balance-rr.
2751 The balance-alb and balance-tlb modes will function with
2758 The active-backup mode has no additional requirements.
2761 ----------------------
2776 --------------
2786 avoid fail-over delay issues when using bonding.
2793 -------------------
2799 -----------------------------------------
2801 Any Ethernet type cards (you can even mix cards - a Intel
2806 slaves in active-backup mode.
2809 ----------------------------------------
2814 ----------------------------------------------
2820 5. What happens when a slave link dies?
2821 ----------------------------------------
2824 disabled. The active-backup mode will fail over to a backup link, and
2844 ----------------------------------------------
2849 ---------------------------------------------
2853 In the basic balance modes (balance-rr and balance-xor), it
2858 The advanced balance modes (balance-tlb and balance-alb) do
2867 The active-backup mode should work with any Layer-II switch.
2870 ---------------------------------------------------------
2872 When using slave devices that have fixed MAC addresses, or when
2874 the MAC address of the active slave.
2878 its first slave device. This MAC address is then passed to all following
2879 slaves and remains persistent (even if the first slave is removed) until
2892 # ifconfig bond0 down ; modprobe -r bonding
2897 slave that is added.
2900 from the bond (``ifenslave -d bond0 eth0``). The bonding driver will
2908 version of the linux kernel, found on http://kernel.org
2910 The latest version of this document can be found in the latest kernel
2914 on the main Linux network mailing list, hosted at vger.kernel.org. The list
2917 netdev@vger.kernel.org
2922 http://vger.kernel.org/vger-lists.html#netdev