Skip to content

Add leaves for common org-defined TLVs to LLDP neighbor state - #1478

Merged
navaneethyv merged 16 commits into
openconfig:masterfrom
yogeshg-arista:master
Sep 3, 2026
Merged

Add leaves for common org-defined TLVs to LLDP neighbor state#1478
navaneethyv merged 16 commits into
openconfig:masterfrom
yogeshg-arista:master

Conversation

@yogeshg-arista

@yogeshg-arista yogeshg-arista commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

Resolves Issue #1471

  • (M) release/models/lldp/openconfig-lldp.yang
  • (M) release/models/vlan/openconfig-vlan-types.yang

Change Scope

  • Add the following new read-only leaves under /lldp/interfaces/interface/neighbors/neighbor/state for widely implemented, standards-based LLDP TLVs:

    • med-inventory-serial-number (string) — LLDP-MED Inventory Serial Number TLV (OUI 00-12-BB, subtype 8)
    • port-vlan-id (oc-vlan-types:vlan-id-or-none) — IEEE 802.1 Port VLAN ID TLV (OUI 00-80-C2, subtype 1)
    • max-frame-size (uint16) — IEEE 802.3 Maximum Frame Size (OUI 00-12-0F, subtype 4)
  • Add a new container for link aggregation leaves in /lldp/interfaces/interface/neighbors/neighbor/

    • link-aggregation (container) — IEEE 802.3 Link Aggregation TLV (OUI 00-12-0F, subtype 3), containing:
      • capable (boolean)
      • enabled (boolean)
      • port-id (uint32)
  • Add vlan-id-or-none typedef in openconfig-vlan-types.yang to support VLAN ID values that include 0 to indicate that the system either does not know the PVID or does not support Port-based VLAN operation. Use this type in port-vlan-id neighbor leaf in LLDP.

  • These TLVs are defined in IEEE 802.1, IEEE 802.3, and ANSI/TIA-1057 and are broadly supported across network platforms. They are essential for network automation use cases including inventory management.

  • This change is backward compatible (minor version bump 1.1.0 → 1.2.0).

Platform Implementations

  • Arista: These TLVs are supported in EOS CLI via show lldp neighbors detail. See LLDP EOS User Manual and sample CLI output below.

    Interface Ethernet36/1 detected 1 LLDP neighbors:
    
      Neighbor 3838.a6a5.5d04/"Ethernet36/1", age 7 seconds
      - IEEE802.1 Port VLAN ID: 0
      - IEEE802.3 Link Aggregation
        Link Aggregation Status: Capable, Enabled (0x03)
        Port ID                : 1000002
      - IEEE802.3 Maximum Frame Size: 10240 bytes
      - LLDP-MED Inventory Serial Number TLV: "FGN234408B7"
    

Tree View

 module: openconfig-lldp
 path: /lldp/interfaces/interface/neighbors/neighbor
   +--ro state
      +--ro system-name?                   string
      +--ro system-description?            string
      +--ro chassis-id?                    string
      +--ro chassis-id-type?               oc-lldp-types:chassis-id-type
      +--ro management-interface?          oc-if:interface-id
      +--ro id?                            string
      +--ro age?                           uint64
      +--ro last-update?                   int64
      +--ro ttl?                           uint16
      +--ro port-id?                       string
      +--ro port-id-type?                  oc-lldp-types:port-id-type
      +--ro port-description?              string
      x--ro management-address?            string
      x--ro management-address-type?       string
+     +--ro med-inventory-serial-number?   string
+     +--ro port-vlan-id?                  oc-vlan-types:vlan-id-or-none
+     +--ro max-frame-size?                uint16
+  +--ro link-aggregation
+    +--ro state
+      +--ro capable?                      boolean
+      +--ro enabled?                      boolean
+      +--ro port-id?                      uint32

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request updates the LLDP model to version 1.1.0, introducing new neighbor state leaves for LLDP-MED inventory serial numbers, IEEE 802.1 port VLAN IDs, and IEEE 802.3 link aggregation and maximum frame size. The review feedback highlights that the port-vlan-id should be adjusted to allow a value of 0 for non-VLAN-aware ports and suggests replacing the uint8 bitfield for link aggregation with explicit boolean leaves to follow OpenConfig conventions for telemetry usability.

Comment thread release/models/lldp/openconfig-lldp.yang
Comment thread release/models/lldp/openconfig-lldp.yang Outdated
@yogeshg-arista
yogeshg-arista marked this pull request as ready for review April 22, 2026 09:56
@yogeshg-arista
yogeshg-arista requested a review from a team as a code owner April 22, 2026 09:56
yogeshg-arista and others added 3 commits April 22, 2026 03:18
…nto booleans

  - Replace oc-vlan-types:vlan-id with uint16 range 0..4094 to allow
    PVID value 0 (port not VLAN-aware per IEEE 802.1Q)
  - Remove unused openconfig-vlan-types import
  - Replace link-aggregation-status uint8 bitfield with two explicit
    boolean leaves: link-aggregation-capable and link-aggregation-enabled
@dplore

dplore commented May 5, 2026

Copy link
Copy Markdown
Member

/gcbrun

@dplore dplore moved this to Ready to discuss in OC Operator Review May 5, 2026
@OpenConfigBot

OpenConfigBot commented May 5, 2026

Copy link
Copy Markdown

No major YANG version changes in commit a1e2e49

@rgwilton

rgwilton commented May 7, 2026

Copy link
Copy Markdown
Contributor

Re:

+     +--ro med-inventory-serial-number?   string
+     +--ro port-vlan-id?                  uint16
+     +--ro link-aggregation-capable?      boolean
+     +--ro link-aggregation-enabled?      boolean
+     +--ro link-aggregation-port-id?      uint32
+     +--ro max-frame-size?                uint16

I would suggest putting the three link-aggregation fields into a link-aggregation container, and then naming the fields capable, enabled, port-id.

@ElodinLaarz

Copy link
Copy Markdown
Contributor

Reviewed at the OC Community Meeting May 7th, 2026:

Could we get another vendor to review / comment if they already implement this behavior?

@ElodinLaarz

Copy link
Copy Markdown
Contributor

/gcbrun

1. Group link-aggregation-capable, link-aggregation-enabled, and link-aggregation-port-id into a link-aggregation container with shortened leaf names (capable, enabled, port-id)

- Fix trailing whitespace and reference indentation in revision block
@yogeshg-arista

Copy link
Copy Markdown
Contributor Author

Re:

+     +--ro med-inventory-serial-number?   string
+     +--ro port-vlan-id?                  uint16
+     +--ro link-aggregation-capable?      boolean
+     +--ro link-aggregation-enabled?      boolean
+     +--ro link-aggregation-port-id?      uint32
+     +--ro max-frame-size?                uint16

I would suggest putting the three link-aggregation fields into a link-aggregation container, and then naming the fields capable, enabled, port-id.

I have created the container link-aggregation with leaves capable, enabled and port-id.

@dplore

dplore commented May 26, 2026

Copy link
Copy Markdown
Member

Re:

+     +--ro med-inventory-serial-number?   string
+     +--ro port-vlan-id?                  uint16
+     +--ro link-aggregation-capable?      boolean
+     +--ro link-aggregation-enabled?      boolean
+     +--ro link-aggregation-port-id?      uint32
+     +--ro max-frame-size?                uint16

I would suggest putting the three link-aggregation fields into a link-aggregation container, and then naming the fields capable, enabled, port-id.

Hi, @rgwilton does Cisco implement support for this data? Can you provide a link for the benefit of this PR?

@dplore

dplore commented May 26, 2026

Copy link
Copy Markdown
Member

/gcbrun

@navaneethyv

Copy link
Copy Markdown
Contributor

Hello @rgwilton , bumping it up.

@yogeshg-arista can you please help getting the reference implementations from other vendors, we will be able to merge this PR in once we have that.

@rgwilton

rgwilton commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

@dplore, I think that we support some of these TLVs (e.g., IEEE 802.1 Port VLAN ID TLV), but not the other TLVs that are being proposed, as least in IOS XR.

@earies earies left a comment

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.

Suggest adding reference statements to each leaf proposed here to clarify which governing specs (IEEE/ANSI), OUIs + sections each correspond to

Comment thread release/models/lldp/openconfig-lldp.yang Outdated
@earies

earies commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

@yogeshg-arista can you please help getting the reference implementations from other vendors

From JUNOS/EVO perspective, these are all supportable

1. Add references for common org-defined TLVs in LLDP neighbor state
2. Do not create a new container for link-aggregation in LLDP neighbor
   state
@yogeshg-arista

Copy link
Copy Markdown
Contributor Author

Suggest adding reference statements to each leaf proposed here to clarify which governing specs (IEEE/ANSI), OUIs + sections each correspond to

I have added references for all the new leaves.

@yogeshg-arista

Copy link
Copy Markdown
Contributor Author

Re:

+     +--ro med-inventory-serial-number?   string
+     +--ro port-vlan-id?                  uint16
+     +--ro link-aggregation-capable?      boolean
+     +--ro link-aggregation-enabled?      boolean
+     +--ro link-aggregation-port-id?      uint32
+     +--ro max-frame-size?                uint16

I would suggest putting the three link-aggregation fields into a link-aggregation container, and then naming the fields capable, enabled, port-id.

I have created the container link-aggregation with leaves capable, enabled and port-id.

As per the discussion in the community meeting dated June 4, 2026, it was discussed that a new container here is against the common OC state pattern.

Reverting back to the original change with separate leaves link-aggregation-capable, link-aggregation-enabled and link-aggregation-port-id directly in the neighbor state container.

@earies

earies commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Re:

+     +--ro med-inventory-serial-number?   string
+     +--ro port-vlan-id?                  uint16
+     +--ro link-aggregation-capable?      boolean
+     +--ro link-aggregation-enabled?      boolean
+     +--ro link-aggregation-port-id?      uint32
+     +--ro max-frame-size?                uint16

I would suggest putting the three link-aggregation fields into a link-aggregation container, and then naming the fields capable, enabled, port-id.

I have created the container link-aggregation with leaves capable, enabled and port-id.

As per the discussion in the community meeting dated June 4, 2026, it was discussed that a new container here is against the common OC state pattern.

Reverting back to the original change with separate leaves link-aggregation-capable, link-aggregation-enabled and link-aggregation-port-id directly in the neighbor state container.

I assume this is just in relation to nesting another container as a child of ./state - in that case, categorizing appropriately as a sibling should suffice?

@yogeshg-arista

Copy link
Copy Markdown
Contributor Author

Re:

+     +--ro med-inventory-serial-number?   string
+     +--ro port-vlan-id?                  uint16
+     +--ro link-aggregation-capable?      boolean
+     +--ro link-aggregation-enabled?      boolean
+     +--ro link-aggregation-port-id?      uint32
+     +--ro max-frame-size?                uint16

I would suggest putting the three link-aggregation fields into a link-aggregation container, and then naming the fields capable, enabled, port-id.

I have created the container link-aggregation with leaves capable, enabled and port-id.

As per the discussion in the community meeting dated June 4, 2026, it was discussed that a new container here is against the common OC state pattern.
Reverting back to the original change with separate leaves link-aggregation-capable, link-aggregation-enabled and link-aggregation-port-id directly in the neighbor state container.

I assume this is just in relation to nesting another container as a child of ./state - in that case, categorizing appropriately as a sibling should suffice?

Yes, the concern from the community meeting was specifically about nesting a container inside ./state. I have restructured link-aggregation as a sibling container alongside state under neighbor/, following the same pattern as mgmt-addresses, custom-tlvs, and capabilities.

Introduce a new vlan-id-or-none typedef in openconfig-vlan-types
(range 0..4094) where 0 indicates the system either does not know
the PVID or does not support Port-based VLAN operation. Use it for
the port-vlan-id leaf in openconfig-lldp instead of an inline uint16.

Bumps openconfig-vlan-types from 3.2.0 to 3.3.0.
@yogeshg-arista

Copy link
Copy Markdown
Contributor Author

@yogeshg-arista can you please help getting the reference implementations from other vendors

From JUNOS/EVO perspective, these are all supportable

@dplore @navaneethyv

We have reference vendor implementation from @earies, and I have addressed all the comments on this PR.

Can this be merged now ?

@navaneethyv

Copy link
Copy Markdown
Contributor

OC operator review 4th: As discussed in the call it is already supported by Arista and Juniper EOS , we can go ahead for the further steps.

@navaneethyv navaneethyv moved this from Ready to discuss to last-call in OC Operator Review Aug 4, 2026
@navaneethyv

Copy link
Copy Markdown
Contributor

/gcbrun

@navaneethyv

Copy link
Copy Markdown
Contributor

/gcbrun

@navaneethyv

Copy link
Copy Markdown
Contributor

/gcbrun

@navaneethyv

Copy link
Copy Markdown
Contributor

/gcbrun

@navaneethyv
navaneethyv merged commit 6039bd7 into openconfig:master Sep 3, 2026
20 checks passed
@navaneethyv navaneethyv moved this from last-call to Done in OC Operator Review Sep 3, 2026
@github-project-automation github-project-automation Bot moved this from Done to last-call in OC Operator Review Sep 3, 2026
@navaneethyv navaneethyv moved this from last-call to Done in OC Operator Review Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

7 participants