AlmaLinux 9: verifying bonding and VLANs at the kernel level
Test scope
Section titled “Test scope”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.
Two layers: bond and VLAN
Section titled “Two layers: bond and VLAN”- 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”.
Verify bonding with dummy devices
Section titled “Verify bonding with dummy devices”sudo ip link add dummy0 type dummysudo ip link add dummy1 type dummysudo ip link add bond0 type bond mode active-backup miimon 100sudo ip link set dummy0 down && sudo ip link set dummy1 downsudo ip link set dummy0 master bond0sudo ip link set dummy1 master bond0sudo ip link set bond0 upcat /proc/net/bonding/bond0Ethernet Channel Bonding Driver: v5.14.0-687.54.1.el9_8.x86_64Bonding Mode: fault-tolerance (active-backup)Currently Active Slave: dummy0MII Status: upMII Polling Interval (ms): 100Currently Active Slave is the link carrying traffic right now; MII Polling Interval is the link-check period (miimon).
Tag a VLAN on the bond
Section titled “Tag a VLAN on the bond”sudo ip link add link bond0 name bond0.100 type vlan id 100ip -d link show bond0.100 | head -2bond0.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.
nmcli configuration (not tested here)
Section titled “nmcli configuration (not tested here)”With NetworkManager the usual path is nmcli (no NM daemon on this host, so these commands were not run):
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 bond0sudo nmcli con add type ethernet con-name bond0-slave2 ifname eno2 master bond0sudo nmcli con add type vlan con-name bond0.100 ifname bond0.100 dev bond0 id 100Key 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 mode | Switch 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.
Common traps
Section titled “Common traps”- 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.
Practice: build bond + VLAN and verify
Section titled “Practice: build bond + VLAN and verify”sudo ip link add dummy0 type dummy && sudo ip link add dummy1 type dummysudo ip link add bond0 type bond mode active-backup miimon 100sudo ip link set dummy0 master bond0 && sudo ip link set dummy1 master bond0sudo ip link set bond0 upcat /proc/net/bonding/bond0 | grep -E "Bonding Mode|Active Slave"sudo ip link add link bond0 name bond0.100 type vlan id 100ip -d link show bond0.100 | grep 802.1QChecks:
/proc/net/bonding/bond0showsactive-backupand an active slaveip -d link show bond0.100containsvlan protocol 802.1Q id 100ip -br link showmarksdummy0/dummy1asSLAVE- 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.
Next steps
Section titled “Next steps”- Network triage: Five layers of network troubleshooting
- Static IP: nmcli static IP
- Firewall: firewall-cmd rules