• Home
  • Raw
  • Download

Lines Matching +full:switch +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
65 5. Switch Configuration
81 10. Promiscuous mode
84 11.1 High Availability in a Single Switch Topology
85 11.2 High Availability in a Multiple Switch Topology
86 11.2.1 HA Bonding Mode Selection for Multiple Switch Topology
87 11.2.2 HA Link Monitoring for Multiple Switch Topology
90 12.1 Maximum Throughput in a Single Switch Topology
91 12.1.1 MT Bonding Mode Selection for Single Switch Topology
92 12.1.2 MT Link Monitoring for Single Switch Topology
93 12.2 Maximum Throughput in a Multiple Switch Topology
94 12.2.1 MT Bonding Mode Selection for Multiple Switch Topology
95 12.2.2 MT Link Monitoring for Multiple Switch Topology
97 13. Switch Behavior Issues
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.
173 (active-backup, balance-alb and balance-tlb). Possible values
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 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
206 This parameter has effect only in 802.3ad mode and is available through
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.
266 This parameter has effect only in 802.3ad mode and is available through
288 bonding mode, and the state of the slave). Regular traffic is
295 If ARP monitoring is used in an etherchannel compatible mode
296 (modes 0 and 2), the switch should be configured in a mode
298 switch is configured to distribute the packets in an XOR
319 validated in any mode that supports arp monitoring, or whether
320 non-ARP traffic should be filtered (disregarded) for link
366 active slave. It is possible that some switch or network
378 beyond a common switch. Should the link between the switch and
379 target fail (but not the switch itself), the probe traffic
410 This option affects only active-backup mode for slaves with
436 Specifies whether active-backup mode should set all slaves to
446 bonding to set all slaves of an active-backup bond to
465 vs. just updating a switch or set of switches (which
467 traffic, if the switch snoops incoming traffic to
508 to transmit LACPDU packets in 802.3ad mode. Possible values
540 asserting carrier. It is similar to the Cisco EtherChannel min-links
542 must be up (link-up state) before marking the bond device as up
546 mode.
549 802.3ad mode) whenever there is an active aggregator, regardless of the
554 mode
557 balance-rr (round robin). Possible values are:
559 balance-rr or 0
561 Round-robin policy: Transmit packets in sequential
563 last. This mode provides load balancing and fault
566 active-backup or 1
568 Active-backup policy: Only one slave in the bond is
572 to avoid confusing the switch.
575 occurs in active-backup mode, bonding will issue one
583 This mode provides fault tolerance. The primary
585 mode.
587 balance-xor or 2
596 This mode provides load balancing and fault tolerance.
601 interfaces. This mode provides fault tolerance.
615 regards to the packet mis-ordering requirements of
625 2. A switch that supports IEEE 802.3ad Dynamic link
629 to enable 802.3ad mode.
631 balance-tlb or 5
634 does not require any special switch support.
636 In tlb_dynamic_lb=1 mode; the outgoing traffic is
640 In tlb_dynamic_lb=0 mode; the load balancing based on
653 balance-alb or 6
655 Adaptive load balancing: includes balance-tlb plus
657 does not require any special switch support. The
683 and when an inactive slave is re-activated. The
692 be set to a value equal or greater than the switch's
694 peers will not be blocked by the switch.
718 bonding device and each VLAN sub-device. This is repeated at
722 The valid range is 0 - 255; the default value is 1. These options
723 affect only the active-backup mode. These options were added for
736 The valid range is 0 - 65535; the default value is 1. This option
737 has effect only in balance-rr mode.
754 off-line will alternate devices be used. This is useful when
758 The primary option is only valid for active-backup(1),
759 balance-tlb (5) and balance-alb (6) mode.
766 occurs. This option is designed to prevent flip-flopping between
804 mode. The value has no effect on any other modes.
806 The default behavior of tlb mode is to shuffle active flows across
808 characteristics but can cause packet reordering. If re-ordering is
811 xmit-hash-policy can be used to select the appropriate hashing for
856 balance-xor, 802.3ad, and tlb modes. Possible values are:
889 network peer on the same slave. For non-IP traffic,
921 information is omitted. For non-IP traffic, the
966 The valid range is 0 - 255; the default value is 1. A value of 0
970 This option is useful for bonding modes balance-rr (0), active-backup
971 (1), balance-tlb (5) and balance-alb (6), in which a failover can
972 switch the IGMP traffic from one slave to another. Therefore a fresh
973 IGMP report must be issued to cause the switch to forward the incoming
981 driver sends learning packets to each slaves peer switch.
983 The valid range is 1 - 0x7fffffff; the default value is 1. This Option
984 has effect only in balance-tlb and balance-alb modes.
1012 $ rpm -qf /sbin/ifup
1027 ----------------------------------------
1040 ifcfg-id file for each slave device. The simplest way to accomplish
1042 file ifcfg-id file created; see below for some issues with DHCP). The
1045 ifcfg-id-xx:xx:xx:xx:xx:xx
1050 Once the set of ifcfg-id-xx:xx:xx:xx:xx:xx files has been
1060 _nm_name='bus-pci-0001:61:01.0'
1070 Once the ifcfg-id-xx:xx:xx:xx:xx:xx files have been modified,
1072 itself. This file is named ifcfg-bondX, where X is the number of the
1074 ifcfg-bond0, the second is ifcfg-bond1, and so on. The sysconfig
1078 The contents of the ifcfg-bondX file is as follows::
1088 BONDING_MODULE_OPTS="mode=active-backup miimon=100"
1090 BONDING_SLAVE1="bus-pci-0000:06:08.1"
1119 for the bonding mode, link monitoring, and so on here. Do not include
1129 (bus-pci-0000:06:08.1 in the example above) specify the physical
1160 -------------------------------
1170 -----------------------------------------------
1174 bonding instance to have an appropriately configured ifcfg-bondX file
1178 ifcfg-bondX files.
1181 options in the ifcfg-bondX file, it is not necessary to add them to
1185 ------------------------------------------
1198 network-script file for all physical adapters that will be members of
1201 /etc/sysconfig/network-scripts
1203 The file name must be prefixed with "ifcfg-eth" and suffixed
1205 for eth0 would be named /etc/sysconfig/network-scripts/ifcfg-eth0.
1216 must correspond with the name of the file, i.e., ifcfg-eth1 must have
1224 script will be /etc/sysconfig/network-scripts/ifcfg-bondX where X is
1225 the number of the bond. For bond0 the file is named "ifcfg-bond0",
1226 for bond1 it is named "ifcfg-bond1", and so on. Within that file,
1243 and, indeed, preferable, to specify the bonding options in the ifcfg-bond0
1246 BONDING_OPTS="mode=active-backup arp_interval=60 arp_ip_target=192.168.1.254"
1269 options bond0 mode=balance-alb miimon=100
1279 ---------------------------------
1292 -------------------------------------------------
1296 specifying the appropriate BONDING_OPTS= in ifcfg-bondX where X is the
1304 -----------------------------------------------
1323 modprobe bonding mode=balance-alb miimon=100
1346 enabled without re-running the entire global init script.
1362 -----------------------------------------
1391 options bond0 -o bond0 mode=balance-rr miimon=100
1394 options bond1 -o bond1 mode=balance-alb miimon=50
1397 named "bond0" and creates the bond0 device in balance-rr mode with an
1399 bond1 device in balance-alb mode with an miimon of 50.
1406 install bond1 /sbin/modprobe --ignore-install bonding -o bond1 \
1407 mode=balance-alb miimon=50
1413 to rename modules at load time (the "-o bond1" part). Attempts to pass
1421 ------------------------------------------
1441 -----------------------------
1448 # echo -bar > /sys/class/net/bonding_masters
1461 --------------------------
1473 # echo -eth0 > /sys/class/net/bond0/bonding/slaves
1482 # echo -eth0 > /sys/class/net/eth0/master/bonding/slaves
1487 -------------------------------
1491 The names of these files correspond directly with the command-
1500 To configure bond0 for balance-alb mode::
1503 # echo 6 > /sys/class/net/bond0/bonding/mode
1504 - or -
1505 # echo balance-alb > /sys/class/net/bond0/bonding/mode
1509 The bond interface must be down before the mode can be changed.
1518 monitoring is enabled, and vice-versa.
1531 # echo -192.168.0.100 > /sys/class/net/bond0/bonding/arp_ip_target
1540 the bonding driver sends learning packets to each slaves peer switch. The
1544 ---------------------
1555 echo balance-alb > /sys/class/net/bond0/bonding/mode
1562 active-backup mode, using ARP monitoring, add the following lines to
1567 echo active-backup > /sys/class/net/bond1/bonding/mode
1575 -----------------------------------------
1582 the box. The ifenslave-2.6 package should be installed to provide bonding
1583 support. Once installed, this package will provide ``bond-*`` options
1586 Note that ifenslave-2.6 package will load the bonding module and use
1590 ----------------------
1593 active-backup mode, with eth0 and eth1 as slaves::
1597 bond-slaves eth0 eth1
1598 bond-mode active-backup
1599 bond-miimon 100
1600 bond-primary eth0 eth1
1609 bond-slaves none
1610 bond-mode active-backup
1611 bond-miimon 100
1615 bond-master bond0
1616 bond-primary eth0 eth1
1620 bond-master bond0
1621 bond-primary eth0 eth1
1623 For a full list of ``bond-*`` supported options in /etc/network/interfaces and
1625 /usr/share/doc/ifenslave-2.6.
1628 ----------------------------------------------
1633 the selected bonding mode. On occasion however, it is helpful to direct certain
1651 Bonding Mode: fault-tolerance (active-backup)
1702 a pass-through for selecting output queues on the slave device rather than
1706 output slave selection was limited to round-robin and active-backup modes.
1708 3.7 Configuring LACP for 802.3ad mode in a more secure way
1709 ----------------------------------------------------------
1711 When using 802.3ad bonding mode, the Actor (host) and Partner (switch)
1717 domain can spoof LACPDU packets from other hosts to the switch and potentially
1718 cause mayhem by joining (from the point of view of the switch) another
1725 (a) ad_actor_system : You can set a random mac-address that can be used for
1727 Also it's preferable to set the local-admin bit. Following shell code
1728 generates a random mac-address as described above::
1740 is 65535, but system can take the value from 1 - 65535. Following shell
1746 (c) ad_user_port_key : Use the user portion of the port-key. The default
1747 keeps this empty. These are the upper 10 bits of the port-key and value
1748 ranges from 0 - 1023. Following shell code generates these 10 bits and
1759 -------------------------
1761 Each bonding device has a read-only file residing in the
1766 driver is loaded with parameters of mode=0 and miimon=1000 is
1770 Bonding Mode: load balancing (round-robin)
1789 -------------------------
1823 5. Switch Configuration
1826 For this section, "switch" refers to whatever system the
1828 the cable plugs into). This may be an actual dedicated switch device,
1832 The active-backup, balance-tlb and balance-alb modes do not
1833 require any specific configuration of the switch.
1835 The 802.3ad mode requires that the switch have the appropriate
1837 to configure this varies from switch to switch, but, for example, a
1838 Cisco 3550 series switch requires that the appropriate ports first be
1840 etherchannel is set to mode "lacp" to enable 802.3ad (instead of
1843 The balance-rr, balance-xor and broadcast modes generally
1844 require that the switch have the appropriate ports grouped together.
1847 group" or some other similar variation. For these modes, each switch
1848 will also have its own configuration options for the switch's transmit
1851 match. For these three modes, the bonding mode really selects a
1863 packets generated by either ALB mode or the ARP monitor mechanism, are
1875 "un-accelerated" by the bonding driver so the VLAN tag sits in the
1882 would pick up the all-zeroes hardware address. Once the first slave
1903 underlying device -- i.e. the bonding interface -- to promiscuous
1904 mode, which might not be what you want.
1919 -------------------------
1929 date the last receive time, dev->last_rx. Drivers that use NETIF_F_LLTX
1930 flag must also update netdev_queue->trans_start. If they do not, then the
1937 ------------------------------------
1960 -------------------------
1989 -------------------------
2024 ----------------------------
2035 options bond0 mode=some-mode miimon=50
2068 ---------------------------------------------------------
2092 beyond other ports of a switch, or if a switch is refusing to pass
2143 10. Promiscuous mode
2147 common to enable promiscuous mode on the device, so that all traffic
2149 The bonding driver handles promiscuous mode changes to the bonding
2153 For the balance-rr, balance-xor, broadcast, and 802.3ad modes,
2154 the promiscuous mode setting is propagated to all slaves.
2156 For the active-backup, balance-tlb and balance-alb modes, the
2157 promiscuous mode setting is propagated only to the active slave.
2159 For balance-tlb mode, the active slave is the slave currently
2162 For balance-alb mode, the active slave is the slave used as a
2163 "primary." This slave is used for mode-specific control traffic, for
2166 For the active-backup, balance-tlb and balance-alb modes, when
2180 11.1 High Availability in a Single Switch Topology
2181 --------------------------------------------------
2183 If two hosts (or a host and a single switch) are directly
2186 only one switch (or peer), so if it fails, there is no alternative
2194 11.2 High Availability in a Multiple Switch Topology
2195 ----------------------------------------------------
2198 network changes dramatically. In multiple switch topologies, there is
2206 +-----+----+ +-----+----+
2208 | switch A +--------------------------+ switch B |
2210 +-----+----+ +-----++---+
2212 | +-------+ |
2213 +-------------+ host1 +---------------+
2214 eth0 +-------+ eth1
2217 switches (ISL, or inter switch link), and multiple ports connecting to
2218 the outside world ("port3" on each switch). There is no technical
2219 reason that this could not be extended to a third switch.
2221 11.2.1 HA Bonding Mode Selection for Multiple Switch Topology
2222 -------------------------------------------------------------
2224 In a topology such as the example above, the active-backup and
2229 active-backup:
2230 This is generally the preferred mode, particularly if
2232 network configuration is such that one switch is specifically
2233 a backup switch (e.g., has lower capacity, higher cost, etc),
2238 This mode is really a special purpose mode, and is suitable
2242 necessary for some specific one-way traffic to reach both
2243 independent networks, then the broadcast mode may be suitable.
2245 11.2.2 HA Link Monitoring Selection for Multiple Switch Topology
2246 ----------------------------------------------------------------
2249 switch. If the switch can reliably fail ports in response to other
2254 thus detecting that failure without switch support.
2256 In general, however, in a multiple switch topology, the ARP
2261 one for each switch in the network). This will insure that,
2262 regardless of which switch is active, the ARP monitor has a suitable
2267 switch that causes the link state of a particular switch port to be set
2268 down (or up) when the state of another switch port goes down (or up).
2272 switch, but this can be a viable alternative to the ARP monitor when using
2278 12.1 Maximizing Throughput in a Single Switch Topology
2279 ------------------------------------------------------
2281 In a single switch configuration, the best method to maximize
2290 In a gatewayed configuration, the "switch" is acting primarily
2295 +----------+ +----------+
2297 | Host A +---------------------+ router +------------------->
2298 | +---------------------+ | Hosts B and C are out
2300 +----------+ +----------+
2317 In a local configuration, the "switch" is acting primarily as
2318 a switch, and the majority of traffic passes through this switch to
2322 +----------+ +----------+ +--------+
2323 | |eth0 port1| +-------+ Host B |
2324 | Host A +------------+ switch |port3 +--------+
2325 | +------------+ | +--------+
2326 | |eth1 port2| +------------------+ Host C |
2327 +----------+ +----------+port4 +--------+
2330 Again, the switch may be a dedicated switch device, or another
2346 mode is described below.
2349 12.1.1 MT Bonding Mode Selection for Single Switch Topology
2350 -----------------------------------------------------------
2353 although you will have to decide which bonding mode best suits your
2354 needs. The trade offs for each mode are detailed below:
2356 balance-rr:
2357 This mode is the only mode that will permit a single
2359 interfaces. It is therefore the only mode that will allow a
2374 networking interfaces, the switch, and the topology of the
2383 through the switch to a balance-rr bond will not utilize greater
2388 delivery, then this mode can allow for single stream datagram
2392 This mode requires the switch to have the appropriate ports
2395 active-backup:
2397 the active-backup mode, as the inactive backup devices are all
2399 load balancing mode (with link monitoring) will provide the
2401 available bandwidth. On the plus side, active-backup mode
2402 does not require any configuration of the switch, so it may
2406 balance-xor:
2407 This mode will limit traffic such that packets destined
2410 addresses involved, this mode works best in a "local" network
2412 the same local network. This mode is likely to be suboptimal
2416 As with balance-rr, the switch ports need to be configured for
2420 Like active-backup, there is not much advantage to this
2421 mode in this type of network topology.
2424 This mode can be a good choice for this type of network
2425 topology. The 802.3ad mode is an IEEE standard, so all peers
2428 so minimal manual configuration of the switch is needed
2433 packets. The 802.3ad mode does have some drawbacks: the
2436 balance modes other than balance-rr, no single connection will
2449 Finally, the 802.3ad mode mandates the use of the MII monitor,
2450 therefore, the ARP monitor is not available in this mode.
2452 balance-tlb:
2453 The balance-tlb mode balances outgoing traffic by peer.
2455 "gatewayed" configuration (as described above), this mode will
2457 "local" network configuration, this mode balances multiple
2459 manner (not a simple XOR as in balance-xor or 802.3ad mode),
2465 special switch configuration is required. On the down side,
2466 in this mode all incoming traffic arrives over a single
2467 interface, this mode requires certain ethtool support in the
2471 balance-alb:
2472 This mode is everything that balance-tlb is, and more.
2473 It has all of the features (and restrictions) of balance-tlb,
2478 The only additional down side to this mode is that the network
2482 12.1.2 MT Link Monitoring for Single Switch Topology
2483 ----------------------------------------------------
2486 mode you choose to use. The more advanced load balancing modes do not
2491 12.2 Maximum Throughput in a Multiple Switch Topology
2492 -----------------------------------------------------
2498 +-----------+
2500 +-+---+---+-+
2502 +--------+ | +---------+
2504 +------+---+ +-----+----+ +-----+----+
2505 | Switch A | | Switch B | | Switch C |
2506 +------+---+ +-----+----+ +-----+----+
2508 +--------+ | +---------+
2510 +-+---+---+-+
2512 +-----------+
2518 cost effective than a single larger switch, e.g., on a network with 24
2520 a single 72 port switch.
2526 12.2.1 MT Bonding Mode Selection for Multiple Switch Topology
2527 -------------------------------------------------------------
2529 In actual practice, the bonding mode typically employed in
2530 configurations of this type is balance-rr. Historically, in this
2535 packets has arrived). When employed in this fashion, the balance-rr
2536 mode allows individual connections between two hosts to effectively
2539 12.2.2 MT Link Monitoring for Multiple Switch Topology
2540 ------------------------------------------------------
2549 13. Switch Behavior Issues
2553 -------------------------------------------
2556 timing of link up and down reporting by the switch.
2562 during switch initialization (e.g., during recovery after a switch
2569 the switch is initializing. Again, an appropriate updelay value may
2582 In addition to the concerns about switch timings, if your
2583 switches take a long time to go into backup mode, it may be desirable
2588 --------------------------------
2600 For example, on a bond in active-backup mode with five slaves
2601 all connected to one switch, the output may appear as follows::
2603 # ping -n 10.0.4.2
2616 tables. Initially, the switch does not associate the MAC address in
2617 the packet with a particular switch port, and so it may send the
2620 single switch, when the switch (temporarily) floods the traffic to all
2624 The duplicated packet behavior is switch dependent, some
2627 most Cisco switches, the privileged command "clear mac address-table
2638 --------------------
2643 balance-rr, active-backup, balance-tlb and balance-alb modes. This is
2648 --------------------------------
2651 integrated on the planar (that's "motherboard" in IBM-speak). In the
2654 An add-on Broadcom daughter card can be installed on a JS20 to provide
2658 Each I/O Module may contain either a switch or a passthrough
2660 switch). Some bonding modes require a specific BladeCenter internal
2663 Additional BladeCenter-specific networking information can be
2666 - "IBM eServer BladeCenter Networking Options"
2667 - "IBM eServer BladeCenter Layer 2-7 Network Switching"
2670 ------------------------------------
2676 Normally, Ethernet Switch Modules (ESMs) are used in I/O
2683 switch. By using PMs in I/O module #1 and #2, the eth0 and eth1
2685 connected to a common external switch.
2688 appear to bonding as either a single switch topology (all PMs) or as a
2689 multiple switch topology (one or more ESMs, zero or more PMs). It is
2691 much like the example in "High Availability in a Multiple Switch
2695 -------------------------------
2697 The balance-rr mode requires the use of passthrough modules
2698 for devices in the bond, all connected to an common external switch.
2699 That switch must be configured for "etherchannel" or "trunking" on the
2700 appropriate ports, as is usual for balance-rr.
2702 The balance-alb and balance-tlb modes will function with
2703 either switch modules or passthrough modules (or a mix). The only
2709 The active-backup mode has no additional requirements.
2712 ----------------------
2714 When an Ethernet Switch Module is in place, only the ARP
2715 monitor will reliably detect link loss to an external switch. This is
2718 the system, when it fact there is a switch between these "external"
2727 --------------
2735 It may be desirable to disable spanning tree on the switch
2736 (either the internal Ethernet Switch Module, or an external switch) to
2737 avoid fail-over delay issues when using bonding.
2744 -------------------
2750 -----------------------------------------
2752 Any Ethernet type cards (you can even mix cards - a Intel
2757 slaves in active-backup mode.
2760 ----------------------------------------
2765 ----------------------------------------------
2772 ----------------------------------------
2775 disabled. The active-backup mode will fail over to a backup link, and
2778 manner is appropriate for the mode). See the sections on High
2779 Availability and the documentation for each mode for additional
2792 depends upon the bonding mode and network configuration.
2795 ----------------------------------------------
2800 ---------------------------------------------
2802 The full answer to this depends upon the desired mode.
2804 In the basic balance modes (balance-rr and balance-xor), it
2809 The advanced balance modes (balance-tlb and balance-alb) do
2810 not have special switch requirements, but do need device drivers that
2814 In 802.3ad mode, it works with systems that support IEEE
2818 The active-backup mode should work with any Layer-II switch.
2821 ---------------------------------------------------------
2843 # ifconfig bond0 down ; modprobe -r bonding
2851 from the bond (``ifenslave -d bond0 eth0``). The bonding driver will
2873 http://vger.kernel.org/vger-lists.html#netdev