cat /proc/net/bonding/bond0NIC Bonding and VLAN Tagging, Start to Finish: Bonds, 802.1Q, and Where the Bond Actually Lives
Two NICs, one logical interface, and tagged VLANs on top — the setup every serious server needs, and the three places it goes wrong: the wrong layer does the bonding, the VLAN lands on a slave instead of the bond, and the MTU is set after the slaves are already in. RHEL 9 and 10 are the main path here, through nmcli; Ubuntu 24.04 and 26.04 get the same stack in netplan, and the declarative version gets a short nmstate section. # = run as root. Interface names below are examples — use your own.
# ip -br link # every interface, state at a glance
# cat /proc/net/bonding/bond0 # mode, active slave, MII state per slave
# nmcli device status # which devices NM manages, which are unmanaged
# nmcli con show --active # which connections are actually up
# ip -d link show bond0 # bond mode, MTU, hash policy, LACP rate
# ip -d link show bond0.100 # VLAN tag, parent, MTU
# ethtool enp1s0 | grep -i 'link detected' # the physical link itself, below the bond
| Where the server runs | Bond here | Why |
|---|---|---|
| Bare metal | In the OS, on the physical NICs | The OS owns the links; nothing else can see them |
| VM on VMware | On the ESXi host (vSwitch teaming or vDS LAG) | The guest sees virtual links, not the physical ones |
| VM on KVM / libvirt | On the host, then bridge the bond or its VLANs to guests | Same reason — the host owns the physical path |
| Guest, exceptionally | In the guest, only with a real reason (below) | SR-IOV passthrough, or the guest genuinely needs two separate networks |
VMware: LACP lives on the distributed switch, and the guest must not do it
VMware: the guest VLAN question is VST or VGT, and the security policy can break a guest bond
KVM: bond on the host, then decide who tags
bond0.10 into vmbr10, bond0.11 into vmbr11 — and guests attach to the bridge for their VLAN. Only the management bridge carries a host IP; the guest bridges have none. The alternative is to let libvirt tag: a port group with a <vlan> tag on the guest interface, so the host tags and the guest sees untagged frames. The third option is the trunk straight through: bridge the trunk interface itself and let the guest create its own VLAN subinterfaces, the KVM equivalent of VGT. All three are the same rule applied at the host layer — the guest never bonds two vNICs to get redundancy it does not have.teamd, libteam) was deprecated in RHEL 9 and removed entirely in RHEL 10 — the packages do not exist in the RHEL 10 or AlmaLinux 10 repos at all, and the 10.0 and 10.1 release notes say so outright. Bonding is the replacement, and it is the only option on RHEL 10. On RHEL 9, team2bond converts an existing team to a bond before you upgrade — it prints the equivalent nmcli commands in dry-run mode, and you still configure addresses and DNS on the bond yourself afterwards. The same release notes record one more removal in the same breath: the ifcfg files under /etc/sysconfig/network-scripts/ are gone in RHEL 10, so the bond lives in NetworkManager profiles, not in ifcfg files. Nothing in this post uses teamd, and nothing should.| Mode | Name | Switch config | Use |
|---|---|---|---|
| 0 | balance-rr | Ports grouped | Round-robin; one flow can use both links, packets can arrive out of order |
| 1 | active-backup | None | Failover only; the safe default |
| 2 | balance-xor | Ports grouped | Hash-based transmit; one flow, one slave |
| 3 | broadcast | Ports grouped | Everything out of every slave; almost never what you want |
| 4 | 802.3ad | LACP on the switch | Failover plus bandwidth, per flow |
| 5 | balance-tlb | None | Transmit load balancing by load; receive on one slave |
| 6 | balance-alb | None | tlb plus receive balancing via ARP; needs a driver that allows MAC changes while up |
Watching the link: miimon, and when it is not enough
miimon watches the link state through the driver — miimon=100 checks every 100 ms, which is the usual value and the one used in this post. It catches a pulled cable or a dead switch port. It does not catch the case where the link stays up but the far end is dead — a switch port that is up with nothing behind it. For that, arp_interval sends ARP probes to a target address (arp_ip_target) and fails over when the probes stop answering. miimon first, arp_interval when you have been bitten by a link that lies about being up. For LACP, two more knobs: lacp_rate=fast sends LACP messages every second instead of every 30 (the slow default), so a dead partner is noticed sooner, and xmit_hash_policy=layer3+4 spreads flows by source and destination IP and port instead of the layer2 default — the default hashes on MAC addresses, which on a server talking to one gateway puts nearly everything on one slave.# nmcli con add type bond con-name bond0 ifname bond0 mode active-backup miimon 100 ipv4.method manual ipv4.addresses 192.168.200.10/24 ipv4.gateway 192.168.200.1 ipv4.dns 192.168.200.53
# nmcli con add type ethernet slave-type bond master bond0 ifname enp1s0 con-name bond0-port1
# nmcli con add type ethernet slave-type bond master bond0 ifname enp2s0 con-name bond0-port2
# nmcli con mod bond0 connection.autoconnect-ports 1 # ports come up with the bond
# nmcli con up bond0
autoconnect-ports 1 line is the one people miss, and it is the difference between a bond that works and a bond that comes up with no slaves. By default NetworkManager does not activate the port connections when the controller comes up: nmcli con up bond0 reports “controller waiting for ports” and /proc/net/bonding/bond0 shows no slave sections at all. Setting connection.autoconnect-ports 1 makes the bond bring its ports with it. Both behaviours were verified live on this box — the bond stayed empty until the ports were activated, and with the setting on, a single con up bond0 enslaved both. If you inherit a bond that is up with no slaves, that setting is the first thing to check, and the fallback is to bring each port up by hand: nmcli con up bond0-port1.Prove it before you trust it
# cat /proc/net/bonding/bond0
# ip -br link
# ip -d link show bond0
# nmcli con show --active
Expected output (trimmed): Bonding Mode: fault-tolerance (active-backup) Currently Active Slave: enp1s0 MII Status: up MII Polling Interval (ms): 100 Slave Interface: enp1s0 MII Status: up Speed: 10000 Mbps Link Failure Count: 0 Slave Interface: enp2s0 MII Status: up Speed: 10000 Mbps Link Failure Count: 0
MII Status: up, and one slave is the active one. Link Failure Count: 0 on both is the baseline — if it climbs later, something is flapping. ip -d link show bond0 shows the same state from the kernel side, including the MTU and the hash policy.Test the failover while you still can
# ip link set enp1s0 down # DISRUPTIVE: drops the active slave; traffic moves to enp2s0
# sleep 3
# grep -E 'Currently Active Slave|MII Status' /proc/net/bonding/bond0
# ip link set enp1s0 up
Expected output (trimmed, after the drop): Currently Active Slave: enp2s0 MII Status: up MII Status: down MII Status: up
primary=enp1s0 in the bond options, and the default primary_reselect=always fails back to it when it recovers. Do this test on a maintenance window with a console or an out-of-band path — if the bond is your only way in and the failover does not work, you have just locked yourself out.Switching to LACP
# nmcli con down bond0
# nmcli con mod bond0 bond.options "mode=802.3ad,miimon=100,lacp_rate=fast,xmit_hash_policy=layer3+4"
# nmcli con up bond0
# grep -E 'Bonding Mode|Transmit Hash Policy|LACP rate' /proc/net/bonding/bond0
Expected output (trimmed): Bonding Mode: IEEE 802.3ad Dynamic link aggregation Transmit Hash Policy: layer3+4 (1) LACP rate: fast
802.3ad info section of /proc/net/bonding/bond0 shows the aggregator and the partner’s system ID; with no partner, as in this lab, the bond still comes up and the mode, hash policy and rate read back exactly as set — the negotiation simply has nobody to negotiate with. If LACP never comes up against a real switch, the switch ports are the first suspect, not the server.# nmcli con add type vlan con-name bond0.100 ifname bond0.100 vlan.parent bond0 vlan.id 100 ipv4.method manual ipv4.addresses 192.168.100.10/24
# nmcli con up bond0.100
# ip -d link show bond0.100
Expected output (trimmed):
19: bond0.100@bond0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
link/ether 66:98:a8:39:d1:17 brd ff:ff:ff:ff:ff:ff
vlan protocol 802.1Q id 100 <REORDER_HDR>
ip -d link output confirms the tag from the kernel side: vlan protocol 802.1Q id 100, parent bond0. The switch port facing the bond must be a trunk carrying VLAN 100, or the tagged frames go nowhere — the server side can be perfect and the VLAN still silent if the switch never allowed the tag. More VLANs are more of the same: bond0.200, bond0.300, each with its own address, all riding the one bond.MTU: set it before the slaves go in
ip -o link show bond0, ip -o link show enp1s0 and ip -o link show bond0.100 — never assume the slaves moved. The switch ports need the same MTU, or the large frames die at the first hop.interfaces:
- name: bond0
type: bond
state: up
ipv4:
enabled: true
dhcp: false
address:
- ip: 192.168.200.10
prefix-length: 24
link-aggregation:
mode: active-backup
options:
miimon: 100
port:
- enp1s0
- enp2s0
- name: bond0.100
type: vlan
state: up
ipv4:
enabled: true
dhcp: false
address:
- ip: 192.168.100.10
prefix-length: 24
vlan:
base-iface: bond0
id: 100
# dnf install -y nmstate
# nmstatectl apply bond-vlan.yml
# nmstatectl show bond0
nmstatectl show bond0 prints the current state back as YAML, so the running config and the file stay comparable. The package is in AppStream on RHEL 10 (nmstate 2.2.61 at the time of writing); the schema above is the one in Red Hat’s and the nmstate docs. This example was verified against those docs, not applied live on this box — the nmcli build above is the live-tested one.network:
version: 2
renderer: networkd
ethernets:
enp0s3:
dhcp4: false
enp0s8:
dhcp4: false
bonds:
bond0:
interfaces:
- enp0s3
- enp0s8
parameters:
mode: 802.3ad
mii-monitor-interval: 100
lacp-rate: fast
transmit-hash-policy: layer3+4
vlans:
bond0.100:
id: 100
link: bond0
addresses:
- 192.168.100.10/24
routes:
- to: default
via: 192.168.100.1
# chmod 600 /etc/netplan/99-bond-vlan.yaml
# netplan generate # validates the YAML, writes backend config, touches nothing live
# netplan try # applies with automatic rollback if you do not confirm
# netplan status
# ip -d link show bond0
renderer: — .network and .netdev files for networkd, .nmconnection files for NetworkManager. Ubuntu Server defaults to the networkd renderer; Desktop defaults to NetworkManager, where the same file works with renderer: NetworkManager. The YAML above was validated with netplan generate on Ubuntu 24.04: it produces a bond netdev with Mode=802.3ad, LACPTransmitRate=fast, MIIMonitorSec=100ms and TransmitHashPolicy=layer3+4, a VLAN netdev with Id=100, and the address and default route on the VLAN — exactly the intended stack, without applying anything. Two details that catch people: gateway4 has been deprecated since netplan 0.103 — routes are the way to set a gateway now — and the file must be root-only (600), which netplan itself warns about if you get it wrong. netplan try is the safe form for remote work: it applies, waits, and rolls back on its own if you do not confirm. The bond modes, the VLAN-on-bond rule and the MTU ordering are identical to the RHEL build — only the config surface changes.Bond is up with no slaves
grep -c 'Slave Interface' /proc/net/bonding/bond0 — zero means the ports never activated. Either set connection.autoconnect-ports 1 on the bond and bring it up again, or activate each port by hand. Virtual interfaces you create yourself show as unmanaged in nmcli device status until a connection activates on them, which is why this bites hardest in labs.A slave shows MII Status: down
# ethtool enp1s0 | grep -i 'link detected'
Expected output (trimmed):
Link detected: no
ethtool enp1s0 tells you what the NIC itself sees — Link detected: no means stop looking at the bond and look at the physical path. With miimon at 100 ms the bond notices in a tenth of a second; the fix is never in the bond config.LACP never negotiates
802.3ad info section of /proc/net/bonding/bond0 stays empty — no partner. The switch ports are not in an LACP port channel, or they are in a static channel without the protocol. Both sides must agree: server mode 802.3ad and switch LACP active, same speed and duplex on both ports. A bond in 802.3ad against a switch that is not speaking LACP behaves like a bond with one dead slave and one live one, and it will not tell you why.The VLAN is silent
ip -d link show bond0.100 confirms the tag and the parent; then check the switch — the port facing the bond must be a trunk carrying that VLAN, and the VLAN must exist on the switch at all. The other classic cause is the VLAN built on a slave instead of the bond, which works until the first failover and then dies. In a guest, check whether the port group tags (VST) or the guest tags (VGT, VLAN 4095) — if both tag, the frame is double-tagged and nothing matches it.Large frames vanish, or one flow is slow
ip -o link show on the bond, each slave and the VLAN. One flow slow on an LACP bond is not a fault at all: LACP spreads per flow, so a single TCP connection uses one slave by design, and xmit_hash_policy=layer3+4 is the best you can do for spreading many flows. If one flow needs more than one link, the answer is a faster link, not a different bond mode.| I need to… | Command |
|---|---|
| See every interface and its state | ip -br link |
| See the bond’s mode, slaves, MII state | cat /proc/net/bonding/bond0 |
| See which devices NM manages | nmcli device status |
| See which connections are up | nmcli con show --active |
| Create an active-backup bond | nmcli con add type bond con-name bond0 ifname bond0 mode active-backup miimon 100 ipv4.method manual ipv4.addresses 192.168.200.10/24 ipv4.gateway 192.168.200.1 |
| Add a slave to the bond | nmcli con add type ethernet slave-type bond master bond0 ifname enp1s0 con-name bond0-port1 |
| Make the bond bring its ports up | nmcli con mod bond0 connection.autoconnect-ports 1 |
| Bring a port up by hand | nmcli con up bond0-port1 |
| Switch a bond to LACP | nmcli con mod bond0 bond.options "mode=802.3ad,miimon=100,lacp_rate=fast,xmit_hash_policy=layer3+4" |
| See the LACP state | grep -E 'Bonding Mode|LACP rate' /proc/net/bonding/bond0 |
| Create a VLAN on the bond | nmcli con add type vlan con-name bond0.100 ifname bond0.100 vlan.parent bond0 vlan.id 100 ipv4.method manual ipv4.addresses 192.168.100.10/24 |
| See the VLAN tag and parent | ip -d link show bond0.100 |
| Set the MTU before enslaving | nmcli con add type bond con-name bond0 ifname bond0 mode active-backup miimon 100 802-3-ethernet.mtu 9000 |
| Check every MTU in the stack | ip -o link show bond0; ip -o link show enp1s0; ip -o link show bond0.100 |
| Test failover | ip link set enp1s0 down |
| Apply the same stack declaratively | nmstatectl apply bond-vlan.yml |
| See current state as YAML | nmstatectl show bond0 |
| Validate Ubuntu YAML without applying | netplan generate |
| Apply Ubuntu YAML with rollback | netplan try |
teamd is dead; bonding is the only path on RHEL 10.
active-backup for failover, 802.3ad for failover plus bandwidth; nothing else without a reason.
VLANs go on the bond, never on the slaves.
MTU goes on the bond before the slaves go in; the VLAN follows the bond.
If the bond comes up with no slaves, the ports never activated — autoconnect-ports 1, or bring them up by hand.
Sources: bond creation, mode switch to 802.3ad, VLAN on the bond, MTU behaviour in both directions, failover, autoconnect-ports 1 and MTU-before-enslavement were all verified live on AlmaLinux 10.3 (kernel 6.12.0-264.16.1, NetworkManager 1.58) with dummy and veth interfaces, 19 Nov 2026 — including the empty-bond failure and the explicit port activation that fixed it. The netplan YAML was validated with netplan generate on Ubuntu 24.04, which produced the intended bond, VLAN and route backend files. teamd’s removal, team2bond and autoconnect-ports are from Red Hat’s RHEL 9 and 10 documentation; the bonding modes from the kernel bonding documentation; VMware LACP, VGT 4095 and the security policy from Broadcom’s vSphere docs; the KVM host patterns from libvirt community documentation; the nmstate schema from Red Hat’s and the nmstate docs. Not tested here: LACP against a real switch partner (mode, rate and hash verified; negotiation was not), nmstatectl apply on a live host, the netplan file applied on a live Ubuntu host, and any VMware or KVM host — there is none in this lab.
