Bond two ports#
You will end up with two ports acting as one logical interface. The reasons are redundancy — a cable can fail without the link going down — and, on some traffic mixes, throughput.
Before you start#
- The operator role and a licence.
- For LACP, a switch configured for it on the matching ports, first. A bond whose partner is not running LACP does not fall back gracefully; it produces a link that appears up and loses traffic. Active backup needs nothing from the switch.
- A session that does not arrive on either port, or a console.
Step 1 — Free the ports#
A port that has an address, or already belongs to a bridge or a bond, cannot join a bond, and the page does not offer it. Remove the address from the port on Network → Interfaces first, and do not apply yet.
Step 2 — Create the bond#
Network → Interfaces → Add interface, type Bond.
- Name is filled in with the next free one,
bond0. - Member ports: pick each port from the list. A bond takes Ethernet ports.
Mode:
Mode What it does LACP (802.3ad) both ports carry traffic, negotiated with the switch; the default Active backup one port carries traffic and the other takes over when it fails; no switch support needed Balance by hash both ports carry traffic, chosen by a hash, with a static switch port-channel Round robin, Transmit load balancing, Adaptive load balancing, Broadcast the router's other modes, for the switch setups that call for them - Address: the address that was on the port, such as
192.0.2.1/24.
Press Add interface, then Apply with auto-revert in the Commit Bar.
Step 3 — Move everything that named the port#
Exactly as for a bridge: update every rule, scope and service that named the physical port. Bridge two ports has the list.
Changing it later#
Open the bond on Interfaces. Under Bond, change the Mode; for LACP and balance by hash, Balance by chooses what picks the port for each flow — MAC addresses (the default), MAC and IP addresses, or IP addresses and ports. Member ports adds and removes ports.
Check it worked#
The bond is up. Interfaces shows it with its link state, and its ports under Member ports.
The switch agrees. Diagnostics → Neighbours shows what LLDP neighbours announce on each port — See what the switch says it is. Two ports announcing the same switch and the same aggregation group is what you want to see.
Traffic survives a cable. Unplug one port and watch the bond's counters on Interfaces keep moving. Do this before you rely on it, not afterwards.
Undoing it#
Open the bond and press Delete interface twice, put the address back on the port from its own panel, and apply. Take the switch out of LACP at the same time, or the ports on that side stay in a state nothing is answering.