-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
QinQ - Basic initial functionality (no vlan translation) #13428
Comments
This is something that I've definitely struggled with documenting in our network. In order to support properly modeling an EPL service, we would also need something like Double Tagged (All) to allow for associating all CVLANs with that SVLAN. Unfortunately, for EVPLs, we would also need the ability to map the CVLANs on an interface to multiple SVLANs, i.e. CVLAN 1 to SVLAN 1001 and CVLANs 2, 3 to SVLAN 1002. IMHO, there really needs to be a larger effort to support proper MEF modeling for Ethernet services to accurately document UNIs, ENNIs, EVCs, and OVCs. This FR could help on the ENNI side, but just ends up a bit confusing on the UNI or INNI side. |
From my pov getting basic svlan models in will allow iteration of features as people use it and better describe their additional needs Vlan translation is something thats needed but that will affect multiple areas (vxlan, vlans, svlan) and possibly new style of ui/forms. I would honnestly think that we would a new m2m relationship model to track translations and mappings (which should then make it possible to document all way way upto EVPLs. Hence trying to get the basic svlan concept in first and then figure out a translation model + all of the additional ui complexity for translations |
@sleepinggenius2 im on the netdev slack instance if you want to discuss alternatives directly or even work together on an alternative proposal that would cover more usecases |
I've never used Slack before, so it will take me a little bit to get that set up and up to speed on it. I would suggest getting @jsenecal involved in the discussion as well though, as this FR has a direct relation to #10558 and #13086. IMHO, I would like to see full modeling for all the MEF models, especially EVC/OVC, L1VC, and IPVC, in addition to the various UNI and NNI models. That's the only place I've really seen QinQ in practice in our network. |
@sleepinggenius2 This specific issue is aimed towards supporting the documentation of QinQ which on its own is not a small task. I'm not sure how to tackle this but this issue could serve as a ground for discussing the implementation if any. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide. |
This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary. |
Reviving as a starting point for work of this kind proposed for a future version's roadmap. There's some good conversation captured here. This issue will need additional detailing and breaking down into smaller chunks. |
I do need this too, as we have it on multiple places in our network. |
We have used custom fields to rudimentarily capture this data on a per interface or sub-interface level. It isn't ideal but works. A data model in netbox that supports TPID, Q-in-Q, and rewrite options would be ideal. |
Upon review of the initial proposal and discussion above, this is how I see the data model taking form:
Additionally, we need to give some thought to how this arrangement will interact with VLAN translation (FR #7336). My (possibly incorrect) assumption is that translation would apply to whatever is the "outer" VLAN: The CVLAN on a regular 802.1Q interface, or the SVLAN on a Q-in-Q interface. Have I missed anything with regard to the data model? |
I don't know that a new ServiceVLAN model is completely necessary, as it should be sufficient just to add a TPID field to the existing model to indicate 0x8100 for 802.1Q (C-TAG) or 0x88a8 for 802.1ad (S-TAG).
I can see a use case where you might have a VLANGroup to track VLAN utilization on an ENNI, in which case being able to restrict VLANs to only 802.1ad/TPID=0x88a8 would be nice. I agree that could just be a field on the existing model, maybe just a nullable choice (default null) with 802.1Q and 802.1ad as choices to indicate no restriction (null) or only VLANs with a specific TPID can be added.
I don't know of any examples of stacking S-TAGs, but it can certainly be done with C-TAGs, so the data model should support pushing both a 0x8100 and a 0x88a8 TPID on top of a 0x8100 TPID. My concern with this model is that it implies a given C-TAG is only associated with one S-TAG. I know in our network when delivering EVPL or EVP-LAN services (thus handing off a specific C-TAG on each UNI), sometimes only a portion of the path utilizes an S-TAG, or it's even possible that different S-TAGs are used on different rings. So, we would need at a very minimum a many-to-many relationship between a C-TAG and an S-TAG.
I can absolutely confirm that mixed tags are possible on an interface. In fact, we have that quite often where we have both a C-TAG for our management traffic and one or more S-TAGs for customer traffic that exist on a given INNI. As with my suggestion about VLANGroups above, I could see where adding a new choice to
VLAN tags are generally thought of as a stack, where your only operations are effectively push and pop, which would limit your interaction to the top/outermost tag in the stack. A translation/rewrite is equivalent to a pop + push, but often given its own action from a configuration standpoint. What technically happens at an interface is a set of ingress and egress actions. For example, at an access port, the ingress action is to allow untagged frames and push a tag on them, then the egress action is the opposite, pop the given tag from each frame, thus transmitting only untagged ones. At a trunk, the untagged/native VLAN is treated just like on an access port and tagged VLANs that match are allowed on ingress and the action is effectively a noop, similarly on egress. In addition to these basic actions, you can have things like translation/rewrite, which is a rewrite (pop + push) on ingress, and the same on egress, but with the opposite tag values. Then Q-in-Q would just be a push action on ingress and a pop action on egress. An ideal model to cover all scenarios would be the following, but would be a fundamental change from the existing model and might be a little more cumbersome to work with, though I believe the existing UX could be retained by automatically translating it to and from the new model. Add new model
Alternatively, there could be a many-to-many relationship between A new choice could be added to |
Thank you for some additional configurations that I hadn't seen before!
You could potentially turn that field into a choice instead, since 'all' and 'default' would be mutually exclusive. I'm thinking change to field name to
I'm thinking that you could still accomplish that with this model by adding the 'exact' choice above, using the I think it would still all boil down to having N nullable |
It looks like we need to define discrete interface modes for S-UNI and NNI, but I'm not clear on the nuances of C-UNI configuration. It would seem that the configuration of a C-UNI is no different from a typical untagged or 802.1Q-encapsulated interface (one of the three modes which are already defined in NetBox). But at least some Cisco platforms appear to support explicit C-UNI configuration:
Do we need to declare a separate mode for C-UNI as well? |
Cisco 7600 series routers run plain old IOS and have been EoL for some time now, so I haven't had to look at that configuration in a while. I don't have a lot of experience with IOS-XE, but on IOS-XR the encapsulation options are:
Any of the
If you're talking about UNI and ENNI, then you're getting into the MEF Carrier Ethernet Service space, which would require EVC and OVC models and rules for mapping specific tags into specific VCs through their respective endpoints, which is certainly a use case for this kind of tag manipulation, but likely outside the scope of this FR. |
I agree with @sleepinggenius2. MEF Services and models are great for providers when defining the end-to-end services they are offering, but we use the tools in the various platforms to create those services and models. What we need Netbox to model first is what is possible in the platforms. So we need the things mentioned above documented and tied to a specific interface. Usually a Sub-interface, sub-lag interface or a service instance. Most venders refer to it as an EFP. (Ethernet Flow Point) Below is a Cisco ASR9k product slide to describe what we are trying to document and how it is used. The EFP is the part in bubble 1 |
My use case would relate to Juniper specifically where we're trying to model QinQ. As an example.
I think the idea of a service vlan works, as long as that can then be tracked back to the associated L3 VRF that consumes it? |
I'd like to mention that VLAN QinQ/stacking (infinite depth) can be modelled today. I had raised #17046 to alter the VLAN model to include the tag protocol ID (TPID) field and the unique constraint. There is a need for custom fields where an existing model scope field choices can be expanded.
Including the tag protocol ID (TPID) field on the VLAN model is the correct approach (#17046).
The VLANGroup scope can be expanded to include Interfaces. VLANs can be locally significant (scoped) to an Interface (NetBox VLANs resemble a bridge/flow). It is then useful to create the outermost VLANGroup for a physical interface, enforcing uniqueness. The VLANGroup scope can be expanded to include VLANs. VLANs can be stacked to infinite depth (or defined max). It is then useful to create the inner VLANGroup for a VLAN, enforcing uniqueness. It's important that the recommendation in #17046 to modify the unique constraint is made otherwise VLAN's of equal VID but of unequal TPID cannot be contained in the same group. The final result is a tree that from tracing provides the VLAN stack. Child interfaces (subinterfaces) can be assigned available VLANs at a point in the tree, for example a child interface assigned a VLAN from the outermost VLANGroup is single tagged, whereas a child interface assigned a VLAN from an inner VLANGroup scoped to a VLAN in the outermost VLANGroup is double tagged, and so on. Whilst the relations may seem unconstrained, I've implemented validators that enforce the correct Interface to (assigned, available) VLAN (untagged, tagged) and prevent VLANGroup duplication.
Whilst I do not believe that it is the right approach. If you did choose it I'd name the field
The existing modes are sufficient. The form could benefit from better filters and an indicator of the TPID and stack when selecting a VLAN. |
I'm not convinced. The TPID is configured at the device or interface level; it may not make sense to define globally for a VLAN unless we explicitly accept that as an imposed constraint (which might be reasonable). I see two options for adding a field to the VLAN model:
We won't be modifying the VLANGroup scope as part of this work. All we're after here is the ability to associate a set of customer VLANs with a service VLAN. As @ITJamie points out above, our initial goal is to implement foundation support for modeling Q-in-Q topologies. This will likely not include all potential configurations, but rather serve as an initial model upon which we can iterate in future releases as needed. |
To give some input for my usecase for this. Our primary services with QinQ and Vlans include several layers of translation.
I am not expecting this to be able to handle all this, especially not just in this FR. From my view i see it as 3 parts.
For reference about the QinQ part i will mention the translation part. This would allow the QinQ relation to be simple and just needing to document which Inner-tags belong to which S-VLAN. |
NetBox version
v3.5.7
Feature type
Data model extension
Proposed functionality
There would be two new sections under IPAM, svlan + svlan groups
When editing an interface there would be an additional option under 802.1 mode (Double tagged)
When selected two additional fields would appear (svlan group + svlan)
When viewing an svlan object it should list any interfaces that have that svlan assigned
on the API the interface model should include the svlan object
Use case
This would allow for basic documentation of basic QinQ uses
NOTE: im excluding vlan translation for the initial feature request:
Documenting that svlan's exist and showing that an svlan exists on an interface would be a major improvement.
Database changes
new svlan + svlan groups model (an exact clone of vlan + vlan groups models)
Interfaces model:
External dependencies
N/A
The text was updated successfully, but these errors were encountered: