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

Update vlan-id type to support range 0 to 4094 plus wildcard (*) for single and double tagged VLAN IDs #1180

Open
crcampos612 opened this issue Sep 10, 2024 · 0 comments

Comments

@crcampos612
Copy link
Contributor

VLAN identifier for single-tagged 802.1q packets as well as Inner and Outer VLAN identifiers for double-tagged 802.1ad 'Q-in-Q' packets are of type uint16 according to module "openconfig-vlan-types.yang", as included in "openconfig-vlan.yang" module:

  • "openconfig-vlan.yang"

leaf vlan-id {
type oc-vlan-types:vlan-id;
description
"VLAN identifier for single-tagged packets.";
}

leaf inner-vlan-id {
type oc-vlan-types:vlan-id;
description
"Inner VLAN identifier for double-tagged packets.";
}

leaf outer-vlan-id {
type oc-vlan-types:vlan-id;
description
"Outer VLAN identifier for double-tagged packets.";
}

  • "openconfig-vlan-types.yang"

typedef vlan-id {
type uint16 {
range 1..4094;
}
description
"Type definition representing a single-tagged VLAN";
}

However, for some vendors like Nokia wildcard (*) could be used for vlan-id both single and double tagged scenarios. Further, apart from classic range 1 <= vlan-id <= 4094, a value of 0 for vlan-id is also supported in Nokia devices. Hence, vlan-id type should be modified to allow values as the union of, on one hand "uint16" type in the range of 0 to 4094, and on the other hand "string" but restricted to permit only entering a single "*" carácter.

Specifically, **the proposal would be to update within "openconfig-vlan-types.yang" the type definition for vlan-id ** in that way:

typedef vlan-id {
type union {
type uint16 {
range 0..4094;
}
type string {
length "1";
pattern "*";
}
description
"Type definition representing a VLAN Identifier for single or double tagged packets";
}
}

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

No branches or pull requests

1 participant