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

Interfaces: Other Types: VLAN - Add stacked VLAN support (IEEE 802.1ad / QinQ) #5560

Closed
2 tasks done
AdSchellevis opened this issue Feb 10, 2022 · 1 comment
Closed
2 tasks done
Assignees
Labels
feature Adding new functionality roadmap Major roadmap item
Milestone

Comments

@AdSchellevis
Copy link
Member

Important notices

Before you add a new report, we ask you kindly to acknowledge the following:

Is your feature request related to a problem? Please describe.

Since FreeBSD 13 its possible to stack vlans on top of vlans (IEEE 802.1ad), although in the past it should have been possible to build a QinQ using netgraph, it didn't work reliable forcing us to remove it back in 2018 (#2274).

Given the new functionality it seems like a good idea to give this another try as the interface is much cleaner now.

Describe the solution you like

Ideally the possibility to select a vlan in the vlan configuration, maybe refactor the current frontend while there.

Additional context

@AdSchellevis AdSchellevis added the roadmap Major roadmap item label Feb 10, 2022
@AdSchellevis AdSchellevis added this to the 22.7 milestone Feb 10, 2022
@AdSchellevis AdSchellevis self-assigned this Feb 10, 2022
@mimugmail
Copy link
Member

Setting a Vlan as parent interface might also make sense from a user perspective

@fichtner fichtner added the feature Adding new functionality label Feb 14, 2022
AdSchellevis added a commit that referenced this issue Feb 22, 2022
…onfiguration using configd while. In preparation for #5560
AdSchellevis added a commit that referenced this issue Feb 23, 2022
…ion for #5560

o wrap vlan set pcp in new function legacy_vlan_pcp()
o add legacy_vlan_remove_tag() to detach our vlan
o use legacy_vlan_remove_tag() + legacy_vlan_tag() to update vlan interfaces, in which case configuration remains as it was which would make future modifications which don't rely on "logical" names easier.
AdSchellevis added a commit that referenced this issue Feb 27, 2022
…d / QinQ) for #5560

This commit adds QinQ to the new VLAN MVC implementation.

o Implement new interface nameing, vlan_XXX for vlans and qinq_XXX for QinQ interfaces, to keep the names static its much easier to cope with changes.
o For backwards compatibilty keep existing interface naming for old entries.
o interfaces_vlan_configure() is only called during bootup and should enforce proper ordering in device creation (vlans first stacked later)
o interface_vlan_configure() remove pcp tricker around 0 as the model will enforce zero's anyway

todo:

o Probably needs a couple of additional validation to prevent QinQ parent from being removed.
AdSchellevis added a commit that referenced this issue Mar 1, 2022
…d / QinQ) for #5560

o lock vlan when being used in QinQ interfaces
AdSchellevis added a commit that referenced this issue Mar 2, 2022
…d / QinQ) (#5607)

* Interfaces: Other Types: VLAN - Add stacked VLAN support (IEEE 802.1ad / QinQ) for #5560

This commit adds QinQ to the new VLAN MVC implementation.

o Implement new interface nameing, vlan_XXX for vlans and qinq_XXX for QinQ interfaces, to keep the names static its much easier to cope with changes.
o For backwards compatibilty keep existing interface naming for old entries.
o interfaces_vlan_configure() is only called during bootup and should enforce proper ordering in device creation (vlans first stacked later)
o interface_vlan_configure() remove pcp tricker around 0 as the model will enforce zero's anyway
o lock vlan when being used in QinQ interfaces
fichtner added a commit that referenced this issue Mar 23, 2022
Since we also change the vlan names here for new devices to eventually
avoid overlong vlan interface names (#3222) we need to make sure the
rest of the system knows the new prefixes.

Some related style changes in code and text.
fichtner added a commit that referenced this issue Mar 23, 2022
Since we also change the vlan names here for new devices to eventually
avoid overlong vlan interface names (#3222) we need to make sure the
rest of the system knows the new prefixes.

Some related style changes in code and text.

(cherry picked from commit 2637e6e)
AdSchellevis added a commit that referenced this issue Mar 23, 2022
…collisions on vlans.(#5560)

Although the prepended 0 might look less intuitive it prevents overlaps when creating new vlans using "ifconfig vlan create" (https://github.com/opnsense/core/blob/2637e6ebca1a7d26daa4ec28f6bfcc7f15a340eb/src/etc/inc/interfaces.lib.inc#L77), to keep qinq and vlan's consistent prepend on both types.

ref 2637e6e
fichtner pushed a commit that referenced this issue Mar 24, 2022
…collisions on vlans #5560

(cherry picked from commit d17e9c7)
(cherry picked from commit 8db4f8c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Adding new functionality roadmap Major roadmap item
Development

No branches or pull requests

3 participants