Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 36 additions & 2 deletions release/models/lldp/openconfig-lldp-types.yang
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ module openconfig-lldp-types {
description
"This module defines types related to the LLDP protocol model.";

oc-ext:openconfig-version "0.1.1";
oc-ext:openconfig-version "0.2.0";

revision "2025-12-09" {
description
"Add Management interface numbering subtype typedef.";
reference "0.2.0";
}

revision "2018-11-21" {
description
Expand Down Expand Up @@ -302,5 +308,33 @@ module openconfig-lldp-types {
"IEEE 802.1AB LLDP MIB";
}

typedef mgmt-interface-number-subtype {
type enumeration {
enum UNKNOWN {
value 1;
description
"Represents the case where the interface is not known. In this
case, the corresponding interface number is of zero length.";
}
enum IFINDEX {
value 2;
description
"Represents interface identifier based on the ifIndex MIB
object.";
}
enum SYSTEM_PORT_NUMBER {
value 3;
description
"Represents interface identifier based on the system port
numbering convention.";
}
}
description
"The Management address interface numbering subtype field
indicating the numbering method used for defining the interface
number.";
reference
"Sec 8.5.9.5 of IEEE Std 802.1AB-2016";
}

}
}
133 changes: 110 additions & 23 deletions release/models/lldp/openconfig-lldp.yang
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ module openconfig-lldp {

import openconfig-lldp-types { prefix oc-lldp-types; }
import openconfig-interfaces { prefix oc-if; }
import ietf-yang-types { prefix yang; }
import openconfig-yang-types { prefix oc-yang; }
import openconfig-inet-types { prefix oc-inet; }
import openconfig-extensions { prefix oc-ext; }


Expand All @@ -24,7 +25,16 @@ module openconfig-lldp {
"This module defines configuration and operational state data
for the LLDP protocol.";

oc-ext:openconfig-version "0.2.1";
oc-ext:openconfig-version "1.0.0";

revision "2026-01-14" {
description
"Refactor LLDP management addresses to accomodate 802.1AB defined
TLV. Add configurable management interface. Switch from IETF to
OC YANG types. Deprecate management-address-type and
management-address leafs. Cleanup unused/empty groupings.";
reference "1.0.0";
}

revision "2018-11-21" {
description
Expand Down Expand Up @@ -59,43 +69,43 @@ module openconfig-lldp {
"Definition of global and per-interface counters";

leaf frame-in {
type yang:counter64;
type oc-yang:counter64;
description
"The number of lldp frames received.";
}

leaf frame-out {
type yang:counter64;
type oc-yang:counter64;
description
"The number of frames transmitted out.";
}

leaf frame-error-in {
type yang:counter64;
type oc-yang:counter64;
description
"The number of LLDP frames received with errors.";
}

leaf frame-discard {
type yang:counter64;
type oc-yang:counter64;
description
"The number of LLDP frames received and discarded.";
}

leaf tlv-discard {
type yang:counter64;
type oc-yang:counter64;
description
"The number of TLV frames received and discarded.";
}

leaf tlv-unknown {
type yang:counter64;
type oc-yang:counter64;
description
"The number of frames received with unknown TLV.";
}

leaf last-clear {
type yang:date-and-time;
type oc-yang:date-and-time;
description
"Indicates the last time the counters were
cleared.";
Expand All @@ -109,13 +119,13 @@ module openconfig-lldp {
uses lldp-common-counters;

leaf tlv-accepted {
type yang:counter64;
type oc-yang:counter64;
description
"The number of valid TLVs received.";
}

leaf entries-aged-out {
type yang:counter64;
type oc-yang:counter64;
description
"The number of entries aged out due to timeout.";
}
Expand All @@ -129,7 +139,7 @@ module openconfig-lldp {
uses lldp-common-counters;

leaf frame-error-out {
type yang:counter64;
type oc-yang:counter64;
description
"The number of frame transmit errors on the
interface.";
Expand Down Expand Up @@ -182,19 +192,86 @@ module openconfig-lldp {
identifier string. It is an enumerator defined by the
LldpChassisIdSubtype object from IEEE 802.1AB MIB.";
}

leaf management-interface {
type oc-if:interface-id;
description
"The interface in which to derive the population of Management
Address TLV parameters. If unspecified, the implementation may
choose which interface is utilized.";
}
}

grouping lldp-system-info-state {
grouping lldp-management-addresses {
description
"Operational state data reported for the local and remote
systems";
"Operational state data to represent local or remote Management
Address TLV parameters.";

container mgmt-addresses {
config false;

description
"Encapsulating container for management addresses";

list mgmt-address {
description
"List of management addresses in use by the local/remote
system";

key "address";

leaf address {
type leafref {
path "../state/address";
}
description
"Reference to the management address key";
}

container state {
description
"Operational state data for management addresses";

uses lldp-management-address-state;
}
}
}
}

grouping lldp-neighbor-config {
grouping lldp-management-address-state {
description
"Configuration data for LLDP neighbors";
"Local or remote management address state data.";

leaf address {
type union {
type oc-inet:ip-address;
type oc-yang:mac-address;
}
description
"Management address associated with the Management Address
TLV.";
reference
"Sec 8.5.9.4 of IEEE Std 802.1AB-2016";
}

leaf interface-number {
type uint32;
description
"Interface number that identifies the specific interface
associated with this management address.";
reference
"Sec 8.5.9.6 of IEEE Std 802.1AB-2016";
}

leaf interface-number-subtype {
type oc-lldp-types:mgmt-interface-number-subtype;
description
"The Management address interface numbering subtype field
indicating the numbering method used for defining the
interface-number.";
reference
"Sec 8.5.9.5 of IEEE Std 802.1AB-2016";
}
}

grouping lldp-neighbor-state {
Expand Down Expand Up @@ -258,20 +335,32 @@ module openconfig-lldp {

leaf management-address {
type string;
status deprecated;
description
"The Management Address is a mandatory TLV which identifies a
network address associated with the local LLDP agent, which
can be used to reach the agent on the port identified in the
Port ID TLV.";
Port ID TLV.

This leaf has been deprecated in favor of the management-address
list structure to accomodate multiple addresses and distinct
typing to pair up with the 802.1AB Management Address TLV
specification.";
}

leaf management-address-type {
type string;
status deprecated;
description
"The enumerated value for the network address type
identified in this TLV. This enumeration is defined in the
'Assigned Numbers' RFC [RFC3232] and the
ianaAddressFamilyNumbers object.";
ianaAddressFamilyNumbers object.

This leaf has been deprecated in favor of the management-address
list structure to accomodate multiple addresses and distinct
typing to pair up with the 802.1AB Management Address TLV
specification.";
}
}

Expand Down Expand Up @@ -479,7 +568,6 @@ module openconfig-lldp {
description
"Configuration data ";

uses lldp-neighbor-config;
}

container state {
Expand All @@ -490,11 +578,10 @@ module openconfig-lldp {
"Operational state data ";

uses lldp-system-info-config;
uses lldp-system-info-state;
uses lldp-neighbor-config;
uses lldp-neighbor-state;
}

uses lldp-management-addresses;
uses lldp-custom-tlv-top;
uses lldp-capabilities-top;
}
Expand Down Expand Up @@ -644,10 +731,10 @@ module openconfig-lldp {

uses lldp-config;
uses lldp-system-info-config;
uses lldp-system-info-state;
uses lldp-state;
}

uses lldp-management-addresses;
uses lldp-interface-top;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,13 @@ module openconfig-terminal-device {
ports per linecard, separate linecards for client and line ports,
etc.).";

oc-ext:openconfig-version "1.11.0";
oc-ext:openconfig-version "1.12.0";

revision "2026-01-14" {
description
"Removal of references to unused/removed LLDP groupings";
reference "1.12.0";
}

revision "2025-12-11" {
description
Expand Down Expand Up @@ -691,8 +697,6 @@ module openconfig-terminal-device {
"Operational state data ";

uses oc-lldp:lldp-system-info-config;
uses oc-lldp:lldp-system-info-state;
uses oc-lldp:lldp-neighbor-config;
uses oc-lldp:lldp-neighbor-state;
}

Expand Down
Loading