Lines Matching +full:slave +full:- +full:mode
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>
29 The behavior of the bonded interfaces depends upon the mode; generally
35 the original tools from extreme-linux and beowulf sites will not work
59 3.7 Configuring LACP for 802.3ad mode in a more secure way
81 10. Promiscuous mode
86 11.2.1 HA Bonding Mode Selection for Multiple Switch Topology
91 12.1.1 MT Bonding Mode Selection for Single Switch Topology
94 12.2.1 MT Bonding Mode Selection for Multiple Switch Topology
119 -----------------------------------------------
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
166 "mode=802.3ad" and "mode=4" set the same mode.
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
193 This parameter has effect only in 802.3ad mode and is available through
198 In an AD system, this specifies the mac-address for the actor in
200 multicast. It is preferred to have the local-admin bit set for this
205 This parameter has effect only in 802.3ad mode and is available through
229 - A slave is added to or removed from the bond
231 - Any slave's link state changes
233 - Any slave's 802.3ad association state changes
235 - The bond's administrative state changes to up
252 In an AD system, the port-key has three parts as shown below -
258 01-05 Speed
259 06-15 User-defined
263 from 0 - 1023. If not given, the system defaults to 0.
265 This parameter has effect only in 802.3ad mode and is available through
284 The ARP monitor works by periodically checking the slave
287 bonding mode, and the state of the slave). Regular traffic is
294 If ARP monitoring is used in an etherchannel compatible mode
295 (modes 0 and 2), the switch should be configured in a mode
318 validated in any mode that supports arp monitoring, or whether
319 non-ARP traffic should be filtered (disregarded) for link
330 Validation is performed only for the active slave.
348 only for the active slave.
358 ARP requests and replies, and only consider a slave to be up if it
361 For an active slave, the validation checks ARP replies to confirm
365 active slave. It is possible that some switch or network
372 the active slave failure, it doesn't really guarantee that the
373 backup slave will work if it's selected as the next active slave.
390 if a slave is available.
394 determining if a slave has received traffic for link availability
408 in order for the ARP monitor to consider a slave as being up.
409 This option affects only active-backup mode for slaves with
416 consider the slave up only when any of the arp_ip_targets
421 consider the slave up only when all of the arp_ip_targets
427 a slave after a link failure has been detected. This option
435 Specifies whether active-backup mode should set all slaves to
445 bonding to set all slaves of an active-backup bond to
453 address of the currently active slave. The MAC
481 the MAC address of the first slave added to the bond).
484 slave is programmed with the bond's MAC address at
485 failover time (and the formerly active slave receives
486 the newly active slave's MAC address).
494 The default policy is none, unless the first slave cannot
519 to transmit LACPDU packets in 802.3ad mode. Possible values
541 This determines how often the link state of each slave is
551 asserting carrier. It is similar to the Cisco EtherChannel min-links
553 must be up (link-up state) before marking the bond device as up
557 mode.
560 802.3ad mode) whenever there is an active aggregator, regardless of the
565 mode
568 balance-rr (round robin). Possible values are:
570 balance-rr or 0
572 Round-robin policy: Transmit packets in sequential
573 order from the first available slave through the
574 last. This mode provides load balancing and fault
577 active-backup or 1
579 Active-backup policy: Only one slave in the bond is
580 active. A different slave becomes active if, and only
581 if, the active slave fails. The bond's MAC address is
586 occurs in active-backup mode, bonding will issue one
587 or more gratuitous ARPs on the newly active slave.
594 This mode provides fault tolerance. The primary
596 mode.
598 balance-xor or 2
603 packet type ID) modulo slave count]. Alternate transmit
607 This mode provides load balancing and fault tolerance.
611 Broadcast policy: transmits everything on all slave
612 interfaces. This mode provides fault tolerance.
621 Slave selection for outgoing traffic is done according
626 regards to the packet mis-ordering requirements of
634 the speed and duplex of each slave.
640 to enable 802.3ad mode.
642 balance-tlb or 5
647 In tlb_dynamic_lb=1 mode; the outgoing traffic is
649 relative to the speed) on each slave.
651 In tlb_dynamic_lb=0 mode; the load balancing based on
655 Incoming traffic is received by the current slave.
656 If the receiving slave fails, another slave takes over
657 the MAC address of the failed receiving slave.
662 speed of each slave.
664 balance-alb or 6
666 Adaptive load balancing: includes balance-tlb plus
689 collapses to the current slave. This is handled by
693 redistributed when a new slave is added to the bond
694 and when an inactive slave is re-activated. The
698 When a link is reconnected or a new slave joins the
710 the speed of each slave.
714 required so that there will always be one slave in the
717 address for each slave in the bond. If the
727 failover event. As soon as the link is up on the new slave
729 bonding device and each VLAN sub-device. This is repeated at
733 The valid range is 0 - 255; the default value is 1. These options
734 affect only the active-backup mode. These options were added for
743 Specify the number of packets to transmit through a slave before
744 moving to the next one. When set to 0 then a slave is chosen at
747 The valid range is 0 - 65535; the default value is 1. This option
748 has effect only in balance-rr mode.
762 A string (eth0, eth2, etc) specifying which slave is the
764 active slave while it is available. Only when the primary is
765 off-line will alternate devices be used. This is useful when
766 one slave is preferred over another, e.g., when one slave has
769 The primary option is only valid for active-backup(1),
770 balance-tlb (5) and balance-alb (6) mode.
774 Specifies the reselection policy for the primary slave. This
775 affects how the primary slave is chosen to become the active slave
776 when failure of the active slave or recovery of the primary slave
777 occurs. This option is designed to prevent flip-flopping between
778 the primary slave and other slaves. Possible values are:
782 The primary slave becomes the active slave whenever it
787 The primary slave becomes the active slave when it comes
788 back up, if the speed and duplex of the primary slave is
790 slave.
794 The primary slave becomes the active slave only if the
795 current active slave fails and the primary slave is up.
799 If no slaves are active, the first slave to recover is
800 made the active slave.
802 When initially enslaved, the primary slave is always made
803 the active slave.
806 immediate selection of the best active slave according to the new
808 slave, depending upon the circumstances.
815 mode. The value has no effect on any other modes.
817 The default behavior of tlb mode is to shuffle active flows across
819 characteristics but can cause packet reordering. If re-ordering is
822 xmit-hash-policy can be used to select the appropriate hashing for
837 slave after a link recovery has been detected. This option is
866 Selects the transmit hash policy to use for slave selection in
867 balance-xor, 802.3ad, and tlb modes. Possible values are:
875 slave number = hash modulo slave count
878 network peer on the same slave.
894 And then hash is reduced modulo slave count.
900 network peer on the same slave. For non-IP traffic,
925 And then hash is reduced modulo slave count.
932 information is omitted. For non-IP traffic, the
969 hash to load-balance traffic per-vlan, with failover
972 use their own vlan, to give lacp-like functionality
973 without requiring lacp-capable switching hardware.
990 The valid range is 0 - 255; the default value is 1. A value of 0
994 This option is useful for bonding modes balance-rr (0), active-backup
995 (1), balance-tlb (5) and balance-alb (6), in which a failover can
996 switch the IGMP traffic from one slave to another. Therefore a fresh
998 IGMP traffic over the newly selected slave.
1007 The valid range is 1 - 0x7fffffff; the default value is 1. This Option
1008 has effect only in balance-tlb and balance-alb modes.
1036 $ rpm -qf /sbin/ifup
1051 ----------------------------------------
1062 slave devices. On SLES 9, this is most easily done by running the
1064 ifcfg-id file for each slave device. The simplest way to accomplish
1066 file ifcfg-id file created; see below for some issues with DHCP). The
1069 ifcfg-id-xx:xx:xx:xx:xx:xx
1074 Once the set of ifcfg-id-xx:xx:xx:xx:xx:xx files has been
1075 created, it is necessary to edit the configuration files for the slave
1076 devices (the MAC addresses correspond to those of the slave devices).
1084 _nm_name='bus-pci-0001:61:01.0'
1094 Once the ifcfg-id-xx:xx:xx:xx:xx:xx files have been modified,
1096 itself. This file is named ifcfg-bondX, where X is the number of the
1098 ifcfg-bond0, the second is ifcfg-bond1, and so on. The sysconfig
1102 The contents of the ifcfg-bondX file is as follows::
1112 BONDING_MODULE_OPTS="mode=active-backup miimon=100"
1114 BONDING_SLAVE1="bus-pci-0000:06:08.1"
1143 for the bonding mode, link monitoring, and so on here. Do not include
1147 Finally, supply one BONDING_SLAVEn="slave device" for each
1148 slave. where "n" is an increasing value, one for each slave. The
1149 "slave device" is either an interface name, e.g., "eth0", or a device
1153 (bus-pci-0000:06:08.1 in the example above) specify the physical
1157 configurations will choose one or the other for all slave devices.
1184 -------------------------------
1190 the slave devices. Without active slaves, the DHCP requests are not
1194 -----------------------------------------------
1198 bonding instance to have an appropriately configured ifcfg-bondX file
1202 ifcfg-bondX files.
1205 options in the ifcfg-bondX file, it is not necessary to add them to
1209 ------------------------------------------
1222 network-script file for all physical adapters that will be members of
1225 /etc/sysconfig/network-scripts
1227 The file name must be prefixed with "ifcfg-eth" and suffixed
1229 for eth0 would be named /etc/sysconfig/network-scripts/ifcfg-eth0.
1236 SLAVE=yes
1240 must correspond with the name of the file, i.e., ifcfg-eth1 must have
1248 script will be /etc/sysconfig/network-scripts/ifcfg-bondX where X is
1249 the number of the bond. For bond0 the file is named "ifcfg-bond0",
1250 for bond1 it is named "ifcfg-bond1", and so on. Within that file,
1267 and, indeed, preferable, to specify the bonding options in the ifcfg-bond0
1270 BONDING_OPTS="mode=active-backup arp_interval=60 arp_ip_target=192.168.1.254"
1293 options bond0 mode=balance-alb miimon=100
1303 ---------------------------------
1316 -------------------------------------------------
1320 specifying the appropriate BONDING_OPTS= in ifcfg-bondX where X is the
1328 -----------------------------------------------
1347 modprobe bonding mode=balance-alb miimon=100
1370 enabled without re-running the entire global init script.
1386 -----------------------------------------
1415 options bond0 -o bond0 mode=balance-rr miimon=100
1418 options bond1 -o bond1 mode=balance-alb miimon=50
1421 named "bond0" and creates the bond0 device in balance-rr mode with an
1423 bond1 device in balance-alb mode with an miimon of 50.
1430 install bond1 /sbin/modprobe --ignore-install bonding -o bond1 \
1431 mode=balance-alb miimon=50
1437 to rename modules at load time (the "-o bond1" part). Attempts to pass
1445 ------------------------------------------
1465 -----------------------------
1472 # echo -bar > /sys/class/net/bonding_masters
1485 --------------------------
1495 To free slave eth0 from bond bond0::
1497 # echo -eth0 > /sys/class/net/bond0/bonding/slaves
1506 # echo -eth0 > /sys/class/net/eth0/master/bonding/slaves
1511 -------------------------------
1515 The names of these files correspond directly with the command-
1524 To configure bond0 for balance-alb mode::
1527 # echo 6 > /sys/class/net/bond0/bonding/mode
1528 - or -
1529 # echo balance-alb > /sys/class/net/bond0/bonding/mode
1533 The bond interface must be down before the mode can be changed.
1542 monitoring is enabled, and vice-versa.
1555 # echo -192.168.0.100 > /sys/class/net/bond0/bonding/arp_ip_target
1568 ---------------------
1579 echo balance-alb > /sys/class/net/bond0/bonding/mode
1586 active-backup mode, using ARP monitoring, add the following lines to
1591 echo active-backup > /sys/class/net/bond1/bonding/mode
1599 -----------------------------------------
1606 the box. The ifenslave-2.6 package should be installed to provide bonding
1607 support. Once installed, this package will provide ``bond-*`` options
1610 Note that ifenslave-2.6 package will load the bonding module and use
1614 ----------------------
1617 active-backup mode, with eth0 and eth1 as slaves::
1621 bond-slaves eth0 eth1
1622 bond-mode active-backup
1623 bond-miimon 100
1624 bond-primary eth0 eth1
1633 bond-slaves none
1634 bond-mode active-backup
1635 bond-miimon 100
1639 bond-master bond0
1640 bond-primary eth0 eth1
1644 bond-master bond0
1645 bond-primary eth0 eth1
1647 For a full list of ``bond-*`` supported options in /etc/network/interfaces and
1649 /usr/share/doc/ifenslave-2.6.
1652 ----------------------------------------------
1657 the selected bonding mode. On occasion however, it is helpful to direct certain
1673 ID is now printed for each slave::
1675 Bonding Mode: fault-tolerance (active-backup)
1676 Primary Slave: None
1677 Currently Active Slave: eth0
1683 Slave Interface: eth0
1687 Slave queue ID: 0
1689 Slave Interface: eth1
1693 Slave queue ID: 2
1695 The queue_id for a slave can be set using the command::
1702 arguments can be added to BONDING_OPTS to set all needed slave queues.
1706 slave devices. For instance, say we wanted, in the above configuration to
1723 leaving the qid for a slave to 0 is the multiqueue awareness in the bonding
1725 slave devices as well as bond devices and the bonding driver will simply act as
1726 a pass-through for selecting output queues on the slave device rather than
1730 output slave selection was limited to round-robin and active-backup modes.
1732 3.7 Configuring LACP for 802.3ad mode in a more secure way
1733 ----------------------------------------------------------
1735 When using 802.3ad bonding mode, the Actor (host) and Partner (switch)
1749 (a) ad_actor_system : You can set a random mac-address that can be used for
1751 Also it's preferable to set the local-admin bit. Following shell code
1752 generates a random mac-address as described above::
1764 is 65535, but system can take the value from 1 - 65535. Following shell
1770 (c) ad_user_port_key : Use the user portion of the port-key. The default
1771 keeps this empty. These are the upper 10 bits of the port-key and value
1772 ranges from 0 - 1023. Following shell code generates these 10 bits and
1783 -------------------------
1785 Each bonding device has a read-only file residing in the
1787 about the bonding configuration, options and state of each slave.
1790 driver is loaded with parameters of mode=0 and miimon=1000 is
1794 Bonding Mode: load balancing (round-robin)
1795 Currently Active Slave: eth0
1801 Slave Interface: eth1
1805 Slave Interface: eth0
1813 -------------------------
1816 command. Bonding devices will have the MASTER flag set; Bonding slave
1817 devices will have the SLAVE flag set. The ifconfig output does not
1821 (MASTER) while eth0 and eth1 are slaves (SLAVE). Notice all slaves of
1823 TLB and ALB that require a unique MAC address for each slave::
1834 UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
1841 UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
1856 The active-backup, balance-tlb and balance-alb modes do not
1859 The 802.3ad mode requires that the switch have the appropriate
1864 etherchannel is set to mode "lacp" to enable 802.3ad (instead of
1867 The balance-rr, balance-xor and broadcast modes generally
1875 match. For these three modes, the bonding mode really selects a
1887 packets generated by either ALB mode or the ARP monitor mechanism, are
1899 "un-accelerated" by the bonding driver so the VLAN tag sits in the
1903 only after enslaving at least one slave. The bonding interface has a
1904 hardware address of 00:00:00:00:00:00 until the first slave is added.
1906 would pick up the all-zeroes hardware address. Once the first slave
1908 slave's hardware address, which is then available for the VLAN device.
1912 top of it. When a new slave is added, the bonding interface will
1913 obtain its hardware address from the first slave, which might not
1915 ultimately copied from an earlier slave).
1927 underlying device -- i.e. the bonding interface -- to promiscuous
1928 mode, which might not be what you want.
1935 monitoring a slave device's link state: the ARP monitor and the MII
1943 -------------------------
1953 date the last receive time, dev->last_rx. Drivers that use NETIF_F_LLTX
1954 flag must also update netdev_queue->trans_start. If they do not, then the
1961 ------------------------------------
1984 -------------------------
2013 -------------------------
2015 When bonding is configured, it is important that the slave
2048 ----------------------------
2059 options bond0 mode=some-mode miimon=50
2067 happens because bonding is loaded first, then its slave device's
2092 ---------------------------------------------------------
2167 10. Promiscuous mode
2171 common to enable promiscuous mode on the device, so that all traffic
2173 The bonding driver handles promiscuous mode changes to the bonding
2174 master device (e.g., bond0), and propagates the setting to the slave
2177 For the balance-rr, balance-xor, broadcast, and 802.3ad modes,
2178 the promiscuous mode setting is propagated to all slaves.
2180 For the active-backup, balance-tlb and balance-alb modes, the
2181 promiscuous mode setting is propagated only to the active slave.
2183 For balance-tlb mode, the active slave is the slave currently
2186 For balance-alb mode, the active slave is the slave used as a
2187 "primary." This slave is used for mode-specific control traffic, for
2190 For the active-backup, balance-tlb and balance-alb modes, when
2191 the active slave changes (e.g., due to a link failure), the
2192 promiscuous setting will be propagated to the new active slave.
2205 --------------------------------------------------
2219 ----------------------------------------------------
2230 +-----+----+ +-----+----+
2232 | switch A +--------------------------+ switch B |
2234 +-----+----+ +-----++---+
2236 | +-------+ |
2237 +-------------+ host1 +---------------+
2238 eth0 +-------+ eth1
2245 11.2.1 HA Bonding Mode Selection for Multiple Switch Topology
2246 -------------------------------------------------------------
2248 In a topology such as the example above, the active-backup and
2253 active-backup:
2254 This is generally the preferred mode, particularly if
2262 This mode is really a special purpose mode, and is suitable
2266 necessary for some specific one-way traffic to reach both
2267 independent networks, then the broadcast mode may be suitable.
2270 ----------------------------------------------------------------
2303 ------------------------------------------------------
2319 +----------+ +----------+
2321 | Host A +---------------------+ router +------------------->
2322 | +---------------------+ | Hosts B and C are out
2324 +----------+ +----------+
2346 +----------+ +----------+ +--------+
2347 | |eth0 port1| +-------+ Host B |
2348 | Host A +------------+ switch |port3 +--------+
2349 | +------------+ | +--------+
2350 | |eth1 port2| +------------------+ Host C |
2351 +----------+ +----------+port4 +--------+
2370 mode is described below.
2373 12.1.1 MT Bonding Mode Selection for Single Switch Topology
2374 -----------------------------------------------------------
2377 although you will have to decide which bonding mode best suits your
2378 needs. The trade offs for each mode are detailed below:
2380 balance-rr:
2381 This mode is the only mode that will permit a single
2383 interfaces. It is therefore the only mode that will allow a
2407 through the switch to a balance-rr bond will not utilize greater
2412 delivery, then this mode can allow for single stream datagram
2416 This mode requires the switch to have the appropriate ports
2419 active-backup:
2421 the active-backup mode, as the inactive backup devices are all
2423 load balancing mode (with link monitoring) will provide the
2425 available bandwidth. On the plus side, active-backup mode
2430 balance-xor:
2431 This mode will limit traffic such that packets destined
2434 addresses involved, this mode works best in a "local" network
2436 the same local network. This mode is likely to be suboptimal
2440 As with balance-rr, the switch ports need to be configured for
2444 Like active-backup, there is not much advantage to this
2445 mode in this type of network topology.
2448 This mode can be a good choice for this type of network
2449 topology. The 802.3ad mode is an IEEE standard, so all peers
2457 packets. The 802.3ad mode does have some drawbacks: the
2460 balance modes other than balance-rr, no single connection will
2473 Finally, the 802.3ad mode mandates the use of the MII monitor,
2474 therefore, the ARP monitor is not available in this mode.
2476 balance-tlb:
2477 The balance-tlb mode balances outgoing traffic by peer.
2479 "gatewayed" configuration (as described above), this mode will
2481 "local" network configuration, this mode balances multiple
2483 manner (not a simple XOR as in balance-xor or 802.3ad mode),
2490 in this mode all incoming traffic arrives over a single
2491 interface, this mode requires certain ethtool support in the
2492 network device driver of the slave interfaces, and the ARP
2495 balance-alb:
2496 This mode is everything that balance-tlb is, and more.
2497 It has all of the features (and restrictions) of balance-tlb,
2502 The only additional down side to this mode is that the network
2507 ----------------------------------------------------
2510 mode you choose to use. The more advanced load balancing modes do not
2516 -----------------------------------------------------
2522 +-----------+
2524 +-+---+---+-+
2526 +--------+ | +---------+
2528 +------+---+ +-----+----+ +-----+----+
2530 +------+---+ +-----+----+ +-----+----+
2532 +--------+ | +---------+
2534 +-+---+---+-+
2536 +-----------+
2550 12.2.1 MT Bonding Mode Selection for Multiple Switch Topology
2551 -------------------------------------------------------------
2553 In actual practice, the bonding mode typically employed in
2554 configurations of this type is balance-rr. Historically, in this
2559 packets has arrived). When employed in this fashion, the balance-rr
2560 mode allows individual connections between two hosts to effectively
2564 ------------------------------------------------------
2577 -------------------------------------------
2599 case). If there are slave interfaces waiting for the updelay timeout
2607 switches take a long time to go into backup mode, it may be desirable
2612 --------------------------------
2622 output from ping flags duplicates (typically one per slave).
2624 For example, on a bond in active-backup mode with five slaves
2627 # ping -n 10.0.4.2
2646 (one per slave device).
2651 most Cisco switches, the privileged command "clear mac address-table
2662 --------------------
2667 balance-rr, active-backup, balance-tlb and balance-alb modes. This is
2672 --------------------------------
2675 integrated on the planar (that's "motherboard" in IBM-speak). In the
2678 An add-on Broadcom daughter card can be installed on a JS20 to provide
2687 Additional BladeCenter-specific networking information can be
2690 - "IBM eServer BladeCenter Networking Options"
2691 - "IBM eServer BladeCenter Layer 2-7 Network Switching"
2694 ------------------------------------
2719 -------------------------------
2721 The balance-rr mode requires the use of passthrough modules
2724 appropriate ports, as is usual for balance-rr.
2726 The balance-alb and balance-tlb modes will function with
2733 The active-backup mode has no additional requirements.
2736 ----------------------
2751 --------------
2761 avoid fail-over delay issues when using bonding.
2768 -------------------
2774 -----------------------------------------
2776 Any Ethernet type cards (you can even mix cards - a Intel
2781 slaves in active-backup mode.
2784 ----------------------------------------
2789 ----------------------------------------------
2795 5. What happens when a slave link dies?
2796 ----------------------------------------
2799 disabled. The active-backup mode will fail over to a backup link, and
2802 manner is appropriate for the mode). See the sections on High
2803 Availability and the documentation for each mode for additional
2816 depends upon the bonding mode and network configuration.
2819 ----------------------------------------------
2824 ---------------------------------------------
2826 The full answer to this depends upon the desired mode.
2828 In the basic balance modes (balance-rr and balance-xor), it
2833 The advanced balance modes (balance-tlb and balance-alb) do
2838 In 802.3ad mode, it works with systems that support IEEE
2842 The active-backup mode should work with any Layer-II switch.
2845 ---------------------------------------------------------
2847 When using slave devices that have fixed MAC addresses, or when
2849 the MAC address of the active slave.
2853 its first slave device. This MAC address is then passed to all following
2854 slaves and remains persistent (even if the first slave is removed) until
2867 # ifconfig bond0 down ; modprobe -r bonding
2872 slave that is added.
2875 from the bond (``ifenslave -d bond0 eth0``). The bonding driver will
2897 http://vger.kernel.org/vger-lists.html#netdev