Skip to content
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

vlan aware bridge configuration somewhat constraining w.r.t. bridge as a port (self) #243

Open
msoltyspl opened this issue Jul 8, 2022 · 0 comments

Comments

@msoltyspl
Copy link

This is more of a question / enhancement suggestion than a bug report, probably. Consider following scenario:

# ip li add name br0 type bridge vlan_default_pvid 17 vlan_filtering 1
# bridge vlan add vid 20-30 dev br0 tagged self
# bridge -compress vlan show
port              vlan-id  
br0               17 PVID Egress Untagged
                  20-30

The configuration above will make every new port (including bridge itself) added to the bridge defaulting to 17 for its native and egress vlans. This includes (!) the bridge itself (br0) - as it's a perfectly functional port as well.

br0's pvid and untagged can be easily changed as desired afterwards:

# bridge vlan add vid 11 dev br0 self untagged pvid
# bridge vlan del vid 17 dev br0 self
# bridge -compress vlan show
port              vlan-id  
br0               11 PVID Egress Untagged
                  20-30

In context of trying to do the above configuration via ifupdown2 - it seems to be impossible to change default_pvid - even with bridge-vid 17 the default_pvid option remains set to 1. This wouldn't be a problem if br0 was configurable (as a port) - as all other ports respect bridge-vid setting - but alas it's not possible to treat br0 as a port and configure it separately.

Subsequently, any addresses/routes added to such a bridge will be forcibly sitting in vlan 1. On top of that, it might not always be desirable to have br0 (port) sitting in vlan1.

This can be corrected with post-up statements:

        post-up bridge vlan add vid 17 dev br0 pvid untagged self
        post-up bridge vlan del vid 1 dev br0 self

But it would be nice to be able to do that without custom commands.

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

No branches or pull requests

1 participant