openconfig / public

Repository for publishing OpenConfig models, documentation, and other material for the community.
Apache License 2.0
895 stars 655 forks source link

What is the expected way to configure a port-based VPWS service? #389

Closed kreeger-arrcus closed 3 months ago

kreeger-arrcus commented 3 years ago

Does someone understand how I would use the openconfig model to configure a physical interface for a port-based L2 service, such as VPWS, in which all frames should be passed through, regardless of whether or not they have a VLAN tag?

First, I thought that using a match on VLAN range 0-4094 would be the answer, however the vlan-id type only allows a range of 1-4094. This does not allow for untagged packets on a subinterface.

Should a simpler mode be added to simply say "port-based" or similar to indicate any frame is passed through, or does the vlan-id range need to be loosened to allow 0 as a value for untagged frames?

Loosening the range to allow 0 allows matching untagged packets and then perhaps pushing on a tag if desired...

chrisy commented 3 years ago

Do you have a vendor equivalent? In my head this should be as simple as just specifying the parent port in the endpoint, but I suspect vendor configurations do need some active encouragement to also include tagged frames.

kreeger-arrcus commented 3 years ago

@chrisy This Cisco documentation shows how they decide to match packets for subinterfaces. https://www.cisco.com/c/en/us/support/docs/routers/asr-9000-series-aggregation-services-routers/116453-technote-ios-xr-l2vpn-00.html#anc4 They use the keywords "encapsulation untagged" to match only untagged packets for a subinterface, or the keywords "encapsulation default" to match all packets to a subinterface.

Today in openconfig, my interpretation is that subinterface 0 would only match untagged frames. If we want to change this for subinterface 0 in an L2 service case, like VPWS, how about if an attribute named something like "match-any-vlan" was added to the subinterface? It would only make sense on subinterface 0.

chrisy commented 3 years ago

Ah yes. Locally we added an augment for one vendor, I believe it was something like /interfaces/interface/config/encapsulation-method and one value of this would infer whatever was needed in our backend. I think there is room to come up with a standard approach for this; I didn't previously simply because, at the time, I had difficulty wading through vendorese working out what the equivalent functionality for this and adjacent items really was.

github-actions[bot] commented 5 months ago

This issue is stale because it has been open 180 days with no activity. If you wish to keep this issue active, please remove the stale label or add a comment, otherwise will be closed in 14 days.