Skip to content

Bridge: T7430: Add BPDU Guard and Root Guard support #4496

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: current
Choose a base branch
from

Conversation

l0crian1
Copy link
Contributor

@l0crian1 l0crian1 commented May 5, 2025

Change summary

This will add support for BPDU Guard and Root Guard to the bridge interface.

Syntax:

set interfaces bridge br0 member interface eth0 bpdu-guard
set interfaces bridge br0 member interface eth2 root-guard

Verification will come from:
show bridge spanning-tree
show log spanning-tree

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

https://vyos.dev/T7430

Related PR(s)

How to test / Smoketest result

Configure a bridge with either root-guard or bpdu-guard:

set interfaces bridge br0 member interface eth0 root-guard
set interfaces bridge br0 stp

Verify op commands:

vyos@cli-dev# run show bridge spanning-tree
--------------------------------------------------------------------------------
Bridge interface br0 (DOWN):

Spanning Tree is Enabled
Bridge ID 96:ae:39:c4:52:05, Priority 32768
Root ID 96:ae:39:c4:52:05, Priority 32768 (This bridge is the root)
VLANs Disabled, Protocol 802.1Q

Interface    State      BPDU_Guard    Root_Guard    Learning
-----------  ---------  ------------  ------------  ----------
eth0         Listening  Disabled      Enabled       Enabled

View logs:

vyos@cli-dev# run show log spanning-tree
May 05 18:34:38 kernel: br0: BPDU received on blocked port 1(eth0)
May 05 18:35:25 kernel: br0: port 2(eth2) tried to become root port (blocked)

Smoketest:

test_bridge_root_bpdu_guard (main.BridgeInterfaceTest.test_bridge_root_bpdu_guard) ... ok

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • I have run the components SMOKETESTS if applicable
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

This will add support for BPDU Guard and Root Guard to the bridge interface.

Verification will come from:
show log spanning-tree
Copy link

github-actions bot commented May 5, 2025

👍
No issues in PR Title / Commit Title

Copy link

github-actions bot commented May 5, 2025

CI integration ❌ failed!

Details

CI logs

  • CLI Smoketests (no interfaces) 👍 passed
  • CLI Smoketests (interfaces only) ❌ failed
  • Config tests 👍 passed
  • RAID1 tests 👍 passed
  • TPM tests 👍 passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

1 participant