LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

brctl

Manage Ethernet bridge interfaces

TLDR

Show all bridges
$ sudo brctl show
copy
Create a bridge
$ sudo brctl addbr [bridge]
copy
Delete a bridge
$ sudo brctl delbr [bridge]
copy
Add an interface to a bridge
$ sudo brctl addif [bridge] [eth0]
copy
Remove an interface from a bridge
$ sudo brctl delif [bridge] [eth0]
copy
Enable Spanning Tree Protocol on a bridge
$ sudo brctl stp [bridge] on
copy

SYNOPSIS

brctl command [bridge] [interface]

DESCRIPTION

brctl manages Ethernet bridge interfaces on Linux. Bridges connect multiple network segments at Layer 2, allowing them to act as a single network. This is commonly used for virtualization, containers, and network infrastructure.It is part of the legacy bridge-utils package. No new features are added to it; modern setups should use ip link and the bridge command from iproute2 instead. For example, brctl addbr br0 is equivalent to ip link add br0 type bridge, and brctl addif br0 eth0 to ip link set eth0 master br0.

PARAMETERS

show

Display information about existing bridges
addbr bridge
Create a new bridge
delbr bridge
Delete a bridge
addif bridge interface
Add an interface to a bridge
delif bridge interface
Remove an interface from a bridge
stp bridge on|off
Enable/disable Spanning Tree Protocol
setageing bridge time
Set MAC address ageing time
setfd bridge time
Set forwarding delay

CAVEATS

brctl is deprecated in favor of the ip and bridge commands from iproute2. Interfaces must be up to participate in bridging. STP should be enabled in complex topologies to prevent loops.

HISTORY

brctl is part of the bridge-utils package, being replaced by the iproute2 bridge command.

SEE ALSO

bridge(8), ip(8), ifconfig(8), iptables(8)

RESOURCES

Copied to clipboard
Kai