netplan: bonds: mode active-backup|802.3ad ; vlans: id + link
sudo netplan tryapply with a rollback
Overview
Two common tricks on servers:
VLAN — several logical networks over one cable (802.1Q tags). An
interface like eth0.100.
Bond — combining several physical NICs into one logical interface
bond0, for fault tolerance or throughput.
On Ubuntu, all of this is configured through netplan.
Bonding modes solve different problems. active-backup is simple fault
tolerance: one NIC is active, the other waits in reserve, and no extra
switch configuration is needed. 802.3ad (LACP) aggregates the
throughput of several NICs, but only works if the switch port is
configured into the same LACP aggregate (port-channel/EtherChannel) —
without that, traffic simply won't flow, or will be unstable.
sudo netplan try # apply with a rollback (see netplan)
Checking
bash
ip -br link # interfaces and their state
cat /proc/net/bonding/bond0 # bond status: active slave, mode, links
ip -d link show vlan100 # VLAN details (the tag)
ip -br a # addresses (see ip)
Troubleshooting
5
SymptomCause and fix
There's a bond, but traffic goes over one NIC only
That's normal for active-backup (the second is a spare). Aggregation
needs 802.3ad (LACP) mode AND switch-side support (a configured
port-channel).
The VLAN doesn't work
The id tag must match the switch port's configuration (a trunk with
this VLAN). Check ip -d link show and the switch port.
The network went down after netplan apply
A typo or wrong link. Use netplan try (see netplan) — it rolls
back. Check interface names against ip -br link.
A link keeps "flapping" in the bond
cat /proc/net/bonding/bond0 shows which slave is dropping; check the
cable/port (ethtool).
Changed the bond mode, and the network went down completely
The switch port is still set for the old mode. Switching
active-backup → 802.3ad (or back) on the server without also
updating the switch port's configuration is a common cause of total
connectivity loss, not partial degradation.
See also
netplan — Persistent network configuration on Ubuntu — YAML, static IP and DHCP, safe application.
ip — Managing interfaces, addresses, and routes (iproute2) — the ifconfig/route replacement.
ethtool — Link speed and duplex, error statistics, cable type — NIC diagnostics.