Skip to content
Search AlmaLinux

    Browse this documentation

    AlmaLinux 9: verifying bonding and VLANs at the kernel level

    In an AlmaLinux 9.8 privileged container (host kernel 5.14.0-687.54.1.el9_8, single NIC) with dummy devices: ip link add bond0 type bond mode active-backup miimon 100, adding dummy0/dummy1 as slaves, cat /proc/net/bonding/bond0, creating bond0.100 on the bond, ip -d link show, then cleanup. Log: plans/content-expansion/evidence/logs/alma-bonding-vlan.log.

    There is no second physical NIC and no switch: this page verifies kernel-level bond/VLAN behaviour; nmcli configuration and switch-side requirements are marked as not tested here.

    • bond: combine several NICs into one logical interface for redundancy or throughput;
    • VLAN: tag frames with 802.1Q to create separate broadcast domains on one link.

    They stack: bond0.100 means “aggregate the links, then split VLANs on the aggregate”.

    Terminal window
    sudo ip link add dummy0 type dummy
    sudo ip link add dummy1 type dummy
    sudo ip link add bond0 type bond mode active-backup miimon 100
    sudo ip link set dummy0 down && sudo ip link set dummy1 down
    sudo ip link set dummy0 master bond0
    sudo ip link set dummy1 master bond0
    sudo ip link set bond0 up
    cat /proc/net/bonding/bond0
    Ethernet Channel Bonding Driver: v5.14.0-687.54.1.el9_8.x86_64
    Bonding Mode: fault-tolerance (active-backup)
    Currently Active Slave: dummy0
    MII Status: up
    MII Polling Interval (ms): 100

    Currently Active Slave is the link carrying traffic right now; MII Polling Interval is the link-check period (miimon).

    Terminal window
    sudo ip link add link bond0 name bond0.100 type vlan id 100
    ip -d link show bond0.100 | head -2
    bond0.100@bond0: <BROADCAST,MULTICAST> ... state DOWN ...
    vlan protocol 802.1Q id 100 <REORDER_HDR> ...

    vlan protocol 802.1Q id 100 confirms the tag; state DOWN means it has not been brought up — creating a VLAN interface is not the same as enabling it.

    With NetworkManager the usual path is nmcli (no NM daemon on this host, so these commands were not run):

    Terminal window
    sudo nmcli con add type bond con-name bond0 ifname bond0 \
    bond.options "mode=active-backup,miimon=100"
    sudo nmcli con add type ethernet con-name bond0-slave1 ifname eno1 master bond0
    sudo nmcli con add type ethernet con-name bond0-slave2 ifname eno2 master bond0
    sudo nmcli con add type vlan con-name bond0.100 ifname bond0.100 dev bond0 id 100

    Key parameters are mode and miimon; slaves attach through master bond0, and the VLAN names its parent with dev bond0.

    Switch-side requirements (confirm with the network team)

    Section titled “Switch-side requirements (confirm with the network team)”
    Bond modeSwitch side
    active-backup (1)Usually nothing; both ports in the same VLAN
    802.3ad / LACP (4)LACP port group required, matching rate/period on both sides
    balance-alb (6)Usually nothing, but relies on ARP negotiation

    VLAN side: the switch port must be a trunk allowing that VLAN ID; an access port carries only one VLAN.

    • Wrong mode: expecting throughput aggregation but configuring active-backup, so only one link works;
    • LACP mismatch: host in 802.3ad without LACP on the switch keeps the link down;
    • VLAN created but not up: no traffic until ip link set bond0.100 up.
    Terminal window
    sudo ip link add dummy0 type dummy && sudo ip link add dummy1 type dummy
    sudo ip link add bond0 type bond mode active-backup miimon 100
    sudo ip link set dummy0 master bond0 && sudo ip link set dummy1 master bond0
    sudo ip link set bond0 up
    cat /proc/net/bonding/bond0 | grep -E "Bonding Mode|Active Slave"
    sudo ip link add link bond0 name bond0.100 type vlan id 100
    ip -d link show bond0.100 | grep 802.1Q

    Checks:

    1. /proc/net/bonding/bond0 shows active-backup and an active slave
    2. ip -d link show bond0.100 contains vlan protocol 802.1Q id 100
    3. ip -br link show marks dummy0/dummy1 as SLAVE
    4. After cleanup the devices are gone

    常见问题

    active-backup or 802.3ad?

    For redundancy without touching the switch, active-backup; for throughput aggregation with LACP on the switch, 802.3ad. The former uses one link at a time, the latter needs matching configuration on both ends.

    Why does a VLAN interface not pass traffic?

    Check that the interface is UP, the parent is UP, and the switch port is a trunk allowing that VLAN. Any one missing breaks it.

    What miimon value is reasonable?

    100 ms is common; too small adds overhead, too large slows failover. With LACP, match the switch LACP rate too.