Enabling and Disabling a Bridge Port
A bridge port is enabled and disabled with br_stp_enable_port and br_stp_disable_port, respectively.
For a bridge port to be enabled, all of the following conditions must be met:
The associated enslaved device is administratively UP.
The associated enslaved device has the carrier status. See the section "Link State Change Detection" in Chapter 8 for how Linux detects changes in the carrier signal status.
The associated bridge device is administratively UP.
Note that there is no carrier status on the bridge device, because bridges are virtual devices and therefore have no carrier status.
When a bridge port is created with a user-space command and the preceding three conditions are met, the bridge port is enabled right away. See the section "Adding Ports to a Bridge."
Let's suppose that when the port was created, it could not be enabled because at least one of the three required conditions was not met. Here is where the port is enabled when each condition eventually is met:
When a bridge device that was shut down is activated, all of its disabled ports are enabled.
When an enslaved device detects the carrier status, the bridging code is notified with a
NETDEV_CHANGEnotification. See the section "netdevice Notification Chain."When an enslaved device that was shut down is activated, the bridging code is notified with a
NETDEV_UPnotification. See the section "netdevice Notification Chain."
A bridge port is disabled when any of the three conditions listed ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access