Skip to content
75 changes: 74 additions & 1 deletion release/models/lldp/openconfig-lldp.yang
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,15 @@ module openconfig-lldp {
"This module defines configuration and operational state data
for the LLDP protocol.";

oc-ext:openconfig-version "1.1.0";
oc-ext:openconfig-version "1.2.0";

revision "2026-04-14" {
description
"Add LLDP neighbor state leaves for LLDP-MED inventory serial
number, IEEE 802.1 port VLAN ID, and IEEE 802.3 link aggregation
and max frame size.";
reference "1.2.0";
}

revision "2026-04-06" {
description
Expand Down Expand Up @@ -386,6 +394,71 @@ module openconfig-lldp {
typing to pair up with the 802.1AB Management Address TLV
specification.";
}

leaf med-inventory-serial-number {
type string;
description
"The serial number of the remote device as advertised in
the LLDP-MED Inventory - Serial Number TLV.";
reference
"ANSI/TIA-1057, Sec 10.2.6.4 - Inventory - Serial Number
TLV (OUI 00-12-BB, subtype 8)";
}

leaf port-vlan-id {
type uint16 {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say we're at the point where there should be a proper reusable typedef for this - the closest current one sits in openconfig-vlan-types but restricts to 1..4094 - maybe something directly in openconfig-types or adjustment within that model is warranted

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion @earies. We see two options here:

Option 1: New typedef (e.g. vlan-id-or-none) in openconfig-vlan-types

A new typedef with range 0..4094 that explicitly documents the semantics of 0 (the system either does not know the PVID or does not support Port-based VLAN operation). This keeps the existing vlan-id (range 1..4094) untouched, so no risk to current consumers. The downside is introducing a second VLAN ID typedef that is very similar to the existing one.

Option 2: Widen existing vlan-id typedef from 1..4094 to 0..4094

One typedef covers both cases. But this changes the contract for all existing users of vlan-id across OpenConfig models. Config leaves that use this typedef would suddenly accept 0, which may not be meaningful in those contexts, and implementations might mishandle the value 0.

Given the risks of Option 2, we lean toward Option 1 but would appreciate the community's input. Also open to keeping the inline uint16 { range "0..4094"; } as-is if a new typedef isn't warranted for a single use.

@dplore @earies @rgwilton and the community, please let us know your thoughts on this.

range "0..4094";
}
description
"The port VLAN identifier advertised by the
neighbor in the IEEE 802.1 Port VLAN ID TLV. A value of 0
indicates that the port is not VLAN-aware.";
reference
"Annex D of IEEE Std 802.1Q - Port VLAN ID TLV
(OUI 00-80-C2, subtype 1)";
}

leaf link-aggregation-capable {
type boolean;
description
"Indicates whether the neighbor port is capable of being
aggregated, as advertised in the IEEE 802.3 Link Aggregation
TLV.";
reference
"Sec 79.3.3 of IEEE Std 802.3 - Link Aggregation TLV
(OUI 00-12-0F, subtype 3)";
}

leaf link-aggregation-enabled {
type boolean;
description
"Indicates whether the neighbor port is currently aggregated,
as advertised in the IEEE 802.3 Link Aggregation TLV.";
reference
"Sec 79.3.3 of IEEE Std 802.3 - Link Aggregation TLV
(OUI 00-12-0F, subtype 3)";
}

leaf link-aggregation-port-id {
type uint32;
description
"The aggregated port identifier of the neighbor port as
advertised in the IEEE 802.3 Link Aggregation TLV.";
reference
"Sec 79.3.3 of IEEE Std 802.3 - Link Aggregation TLV
(OUI 00-12-0F, subtype 3)";
}

leaf max-frame-size {
type uint16;
description
"The maximum frame size in octets supported by the
neighbor port as advertised in the IEEE 802.3 Maximum
Frame Size TLV.";
reference
"Sec 79.3.4 of IEEE Std 802.3 - Maximum Frame Size TLV
(OUI 00-12-0F, subtype 4)";
}
}

grouping lldp-capabilities-config {
Expand Down