LinuxCommandLibrary

brctl

TLDR

Show all bridges

$ sudo brctl show
copy
Create bridge
$ sudo brctl add bridge_name
copy
Delete bridge
$ sudo brctl del bridge_name
copy
Add interface to bridge
$ sudo brctl addif bridge_name eth0
copy
Remove interface
$ sudo brctl delif bridge_name eth0
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.

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)

Copied to clipboard