IFCFG-BONDING(5)

πŸ“¦ version 0.6.80, in opensuse-leap 16.0

πŸŽ€ NAME πŸŽ€

ifcfg-bonding β€” bonding interface configuration, aka the file that makes several network cards hold hands and act like one πŸ’…


πŸ’– SYNOPSIS πŸ’–

/etc/sysconfig/network/ifcfg-*

✨ Bonding Interfaces ✨

okay so bestie, to set up a bonding interface you need a config file ifcfg- with these bond-specific variables in it. that's the whole vibe. πŸ¦‹

  • BONDING_MASTER β€” this one's gotta be set to yes so the system can tell "yes this config is for a bonding interface." it's literally how it identifies itself. main character energy only. πŸ‘‘
  • BONDING_SLAVE_<X> β€” here you put the interface name of each port network interface. Ethernet or Infiniband(-Child) interfaces are supported. 🫢

the bonding master takes over control of these port interfaces, and once it does, they're not usable for anything else β€” especially not for an L3 (IP) setup. it propagates several settings down to the ports, e.g. it sets the MAC address (not on Infiniband) and the MTU. also, if there's a vlan sitting on top of the bond, it offloads the vlan setup to the ports. 😭

without a dedicated ifcfg-<port> configuration file, the auto-generated port config is:

STARTMODE=hotplug
BOOTPROTO=none

using STARTMODE=hotplug for the ports is what ensures wicked does not wait for the ports during setup β€” it only waits for the bonding master. the master calculates its own carrier state from the carrier on the ports using its own (configurable) logic, and it signals its carrier when a sufficient number of ports is available (default: min_links=1). slay. ✨

Note: it's strongly recommended you change the udev rule to match the ports by Bus-ID (KERNELS=="...") so you can assign a persistent name via /etc/udev/rules.d/70-persistent-net.rules (you can do this in YaST2) β€” because the bonding master usually sets the same MAC address on all its ports. ngl this is the part people forget and then cry about. πŸ™ˆ

using BOOTPROTO=none disables IPv6 on the port interfaces via sysctl (and IPv4 in wicked) to ensure that no L3 / IP setup (from ifcfg-<port> config) gets applied to the ports. periodt. πŸ’…

  • BONDING_MODULE_OPTS β€” holds the bonding options that configure the aggregation mode, port link monitoring, and other options. 🌸

note that these options are not passed as parameters to the bonding kernel module any more β€” they're configured by wicked via the rtnetlink interface. glow-up fr fr.

bonding of Infiniband(-Child) port interfaces requires mode=active-backup mode along with the fail_over_mac=active option. πŸ‘‘

the following options are currently implemented in wicked:

  • Link aggregation operation mode:
    • mode=[balance-rr(0) | active-backup(1) | balance-xor(2) | broadcast(3) | 802.3ad(4) | balance-tlb(5) | balance-alb(6)]

the active-backup, balance-tlb and balance-alb modes do not require any special switch support. the 802.3ad mode requires dynamic (lacp), and the balance-xor, balance-rr, broadcast modes require a static link aggregation group/LAG switch configuration. πŸ’€

  • Port monitoring:

it is critical to configure link monitoring by specifying either the miimon or the arp_interval and arp_ip_target options. ARP monitoring should not be used in conjunction with miimon. otherwise serious network degradation will occur during link failures, and wicked rejects such configuration as insufficient and unsupported. (like, don't do it. it will not eat. 😭)

  • Netif Carrier/MII link monitoring (all modes):
    • miimon=[msec]: enables the monitoring using specified interval
    • use_carrier=[1|0]: 0 reverts from netif-carrier to MII/ethtool
    • updelay=[msec]: link-up detection delay
    • downdelay=[msec]: link-down detection delay
  • ARP link monitoring (active-backup, balance-rr, balance-xor, broadcast):
    • arp_interval=[msec]: enables the monitoring using specified interval
    • arp_ip_target=[x.x.x.x[,...]]: comma-separated IPv4 address to monitor
    • arp_validate=[none | active | backup | all | filter | filter_active | filter_backup]: reply validation and filtering (active-backup)
      • arp_all_targets=[any | all] link-up consideration (active-backup)
  • Primary port configuration (active-backup, balance-alb, balance-tlb):
    • primary=[ifname]: interface name of the primary/preferred port
    • primary_reselect=[always|better|failure]: primary reselection policy
    • active_slave=[ifname]: volatile runtime option enforcing active port change
  • active-backup mode specific settings:
    • fail_over_mac=[none | active | follow]: MAC address on failover
    • num_grat_arp,num_unsol_na=[0..255]: peer notification count
  • Transmit balancing settings:
    • xmit_hash_policy=[layer2 | layer2+3 | layer3+4 | encap2+3 | encap3+4]: XOR hash type (802.3ad, balance-xor, balance-tlb, balance-alb)
    • tlb_dynamic_lb=[0|1]: enable flow shuffling in favor of hash distribution
    • lp_interval=[sec]: learning packets to port peer switch sending interval
  • 802.3ad mode specific settings:
    • lacp_rate=[slow|fast]: LACPDU packet transmission rate
    • ad_select=[stable | bandwidth | count]: aggregation selection logic
    • ad_user_port_key=[1..1023]: custom port-key
    • ad_actor_sys_prio=[1..65535]: custom system priority
    • ad_actor_system=[hwaddr]: actor mac address for LACPDU exchanges.
    • min_links=[uint]: number of required port links
  • Other options:
    • resend_igmp=[0..255]: membership reports after failover, default 1 (balance-rr, active-backup, balance-tlb and balance-alb)
    • packets_per_slave=[0..65535]: packets to transmit before move (balance-rr)
    • all_slaves_active=[0|1]: deliver duplicate frames on inactive ports (all modes)

🌈 Additional Information 🌈

for additional and more general info, take a peek at the kernel documentation at https://www.kernel.org/doc/Documentation/networking/bonding.rst. iykyk 🧚


πŸ”₯ EXAMPLE πŸ”₯

example for a bonding configuration on eth0 and eth1 ports using the active-backup mode:

ifcfg-bond0

STARTMODE='auto'
BOOTPROTO='static'
IPADDR='192.168.0.1/24'
BONDING_MASTER='yes'
BONDING_SLAVE_0='eth0'
BONDING_SLAVE_1='eth1'
BONDING_MODULE_OPTS='mode=active-backup miimon=100'
#MTU='9000'
#LLADDR='7a:b9:14:00:d6:ed'

the optional port configurations may set e.g. ethtool options:

ifcfg-eth0

STARTMODE='hotplug'
BOOTPROTO='none'
ETHTOOL_OPTIONS='wol g'

ifcfg-eth1

STARTMODE='hotplug'
BOOTPROTO='none'
ETHTOOL_OPTIONS='wol g'

Copyright (C) 2014-2024 SUSE LLC


πŸ‘‘ BUGS πŸ‘‘

please report bugs at https://bugs.opensuse.org β€” they wanna hear from you bestie 🫢


⭐ SEE ALSO ⭐

routes (5), ifcfg (5), wicked (8)

go read them, they're iconic. πŸ“š


πŸ“ AUTHORS πŸ“

Wilken Gottwalt (original bonding man page); Pawel Wieczorkiewicz; Marius Tomaschewski; Clemens Famulla-Conrad.


that's the whole page, bestie β€” this is from the wicked user manual, dated May 30, 2024. you're so welcome, go forth and bond responsibly πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from