Bridge two ports#
You will end up with two physical ports in one layer-2 segment, sharing one address. The usual reasons are a router with more ports than segments, and a spare port used as a one-device switch.
Before you start#
- The operator role and a licence.
- Console access, or a session that does not arrive on either port. Moving an address onto a bridge takes the address off the port it was on, which ends any session using it.
Step 1 — Create the bridge with its first member#
Network → Interfaces → + Add interface, type Bridge.
set interfaces bridge br0 member interface eth2
set interfaces bridge br0 address 192.0.2.1/24
set interfaces bridge br0 description 'lan'The panel names it br0 by default and takes one member. Add the rest afterwards, one line
each:
set interfaces bridge br0 member interface eth3Step 2 — Move the address#
If one of the members already carries the address the segment uses, delete it from the port in the same commit as adding it to the bridge. An address on a bridge member and on the bridge is a configuration the router will accept and the network will not enjoy.
delete interfaces ethernet eth2 address 192.0.2.1/24The interface panel removes addresses one at a time and
stages the delete.
Step 3 — Move everything that named the port#
Anything that referenced the member interface by name now needs to reference br0.
| Names an interface | Where |
|---|---|
| Firewall rules | inbound-interface name, outbound-interface name — the Firewall page |
| DHCP | The shared network's subnet has to match the bridge's subnet |
| The DNS forwarder | service dns forwarding listen-address |
| Source NAT | outbound-interface name on the masquerade rule, if the bridge is on the outside |
| The IDS | service suricata interface |
Missing one of these is the usual reason a bridge "does not work": the segment is fine and one rule still names a port that no longer has an address.
Check it worked#
show interfaces bridge br0
bridge link showThe Interfaces page shows the bridge with its live link state and counters. A member with no traffic on it is usually a cable, and a bridge with no address is usually the step above that was skipped.
Then, from a client on each port:
ping -c 3 192.0.2.1Both ports should reach the router, and each other.
Undoing it#
delete interfaces bridge br0
set interfaces ethernet eth2 address 192.0.2.1/24Put the address back where it was in the same commit, and put back everything from step 3.
See also#
Checked against ui/src/pages/Interfaces.tsx ·
agent/main.go