Skip to content

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

Open
yogeshg-arista wants to merge 9 commits into
openconfig:masterfrom
yogeshg-arista:master
Open

Add leaves for common org-defined TLVs to LLDP neighbor state#1478
yogeshg-arista wants to merge 9 commits into
openconfig:masterfrom
yogeshg-arista:master

Conversation

@yogeshg-arista
Copy link
Copy Markdown

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

Resolves Issue #1471

  • (M) release/models/lldp/openconfig-lldp.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 (uint16 { range 0..4094 }) — IEEE 802.1 Port VLAN ID TLV (OUI 00-80-C2, subtype 1)
    • link-aggregation (container) — IEEE 802.3 Link Aggregation TLV (OUI 00-12-0F, subtype 3), containing:
      • capable (boolean)
      • enabled (boolean)
      • port-id (uint32)
    • max-frame-size (uint16) — IEEE 802.3 Maximum Frame Size (OUI 00-12-0F, subtype 4)
  • 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/state
   +--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?                  uint16
+     +--ro link-aggregation-capable?      boolean
+     +--ro link-aggregation-enabled?      boolean
+     +--ro link-aggregation-port-id?      uint32
+     +--ro max-frame-size?                uint16
+     +--ro med-inventory-serial-number?   string
+     +--ro port-vlan-id?                  uint16
+     +--ro link-aggregation
+     |  +--ro capable?   boolean
+     |  +--ro enabled?   boolean
+     |  +--ro port-id?   uint32
+     +--ro max-frame-size?                uint16

Copy link
Copy Markdown
Contributor

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

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 Outdated
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
Copy link
Copy Markdown
Member

dplore commented May 5, 2026

/gcbrun

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

OpenConfigBot commented May 5, 2026

No major YANG version changes in commit cdbef70

@rgwilton
Copy link
Copy Markdown
Contributor

rgwilton commented May 7, 2026

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
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Ready to discuss

Development

Successfully merging this pull request may close these issues.

5 participants