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

Refactor LLDP management addresses and deprecate previous management address leafs #1250

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

earies
Copy link
Contributor

@earies earies commented Feb 3, 2025

  • (M) release/models/lldp/openconfig-lldp-types.yang
    • Addition of management address related identities/typedef
  • (M) release/models/lldp/openconfig-lldp.yang
    • Addition of new management address hierarchy to match IEEE
      802.1ab-2016 definition
    • Deprecate flat singleton management-address leafs
    • Leverage OC types vs. previous IETF types

Change Scope

The previous definition of LLDP management addresses had the following design flaws

  • Singular management address (IPv4 or IPv6)
  • Only partial support of the Management Address TLV per IEEE 802.1AB-2016
  • Non-configurable management-address selection
  • Lack of support for conveying local management addresses

This change encompasses:

  • A new list structure to accomodate multiple management addresses
  • Expansion of the structure to support relevant Management Address TLV fields
  • Support to convey local system management addresses
  • Commencing deprecation of the previous 2 leafs representing a single management address
  • Removal of IETF types in favor of OC types (keeping same underlying types)

While openconfig-lldp has been bumped to 1.0.0 due to the import/type
changes from IETF -> OC, this change is mostly backwards compatible as we are
slowly deprecating the previous management-address related leafs.

This change better aligns Management Address TLV support to the IEEE
802.1AB-2016 spec.

Platform Implementations

For configurable management address interface derivation:

Remainder is for IEEE 802.1AB-2016 compliance

…address leafs

  * (M) release/models/lldp/openconfig-lldp-types.yang
    - Addition of management address related identities/typedef
  * (M) release/models/lldp/openconfig-lldp.yang
    - Addition of new management address hierarchy to match IEEE
      802.1ab-2016 definition
    - Deprecate flat singleton management-address leafs
    - Leverage OC types vs. previous IETF types
@earies earies requested a review from a team as a code owner February 3, 2025 21:16
@earies
Copy link
Contributor Author

earies commented Feb 3, 2025

New tree:

module: openconfig-lldp
  +--rw lldp
     +--rw config
     |  +--rw enabled?                      boolean
     |  +--rw hello-timer?                  uint64
     |  +--rw suppress-tlv-advertisement*   identityref
     |  +--rw system-name?                  string
     |  +--rw system-description?           string
     |  +--rw chassis-id?                   string
     |  +--rw chassis-id-type?              oc-lldp-types:chassis-id-type
     |  +--rw management-interface?         oc-if:interface-id
     +--ro state
     |  +--ro enabled?                      boolean
     |  +--ro hello-timer?                  uint64
     |  +--ro suppress-tlv-advertisement*   identityref
     |  +--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 management-addresses
     |  |  +--ro management-address* [address subtype]
     |  |     +--ro address                     union
     |  |     +--ro subtype                     identityref
     |  |     +--ro interface-number?           uint32
     |  |     +--ro interface-number-subtype?   oc-lldp-types:mgmt-interface-number-subtype
     |  |     +--ro oid?                        string
     |  +--ro counters
     |     +--ro frame-in?           oc-yang:counter64
     |     +--ro frame-out?          oc-yang:counter64
     |     +--ro frame-error-in?     oc-yang:counter64
     |     +--ro frame-discard?      oc-yang:counter64
     |     +--ro tlv-discard?        oc-yang:counter64
     |     +--ro tlv-unknown?        oc-yang:counter64
     |     +--ro last-clear?         oc-yang:date-and-time
     |     +--ro tlv-accepted?       oc-yang:counter64
     |     +--ro entries-aged-out?   oc-yang:counter64
     +--rw interfaces
        +--rw interface* [name]
           +--rw name         -> ../config/name
           +--rw config
           |  +--rw name?      oc-if:base-interface-ref
           |  +--rw enabled?   boolean
           +--ro state
           |  +--ro name?       oc-if:base-interface-ref
           |  +--ro enabled?    boolean
           |  +--ro counters
           |     +--ro frame-in?          oc-yang:counter64
           |     +--ro frame-out?         oc-yang:counter64
           |     +--ro frame-error-in?    oc-yang:counter64
           |     +--ro frame-discard?     oc-yang:counter64
           |     +--ro tlv-discard?       oc-yang:counter64
           |     +--ro tlv-unknown?       oc-yang:counter64
           |     +--ro last-clear?        oc-yang:date-and-time
           |     +--ro frame-error-out?   oc-yang:counter64
           +--ro neighbors
              +--ro neighbor* [id]
                 +--ro id              -> ../state/id
                 +--ro config
                 +--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-addresses
                 |  |  +--ro management-address* [address subtype]
                 |  |     +--ro address                     union
                 |  |     +--ro subtype                     identityref
                 |  |     +--ro interface-number?           uint32
                 |  |     +--ro interface-number-subtype?   oc-lldp-types:mgmt-interface-number-subtype
                 |  |     +--ro oid?                        string
                 |  +--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 custom-tlvs
                 |  +--ro tlv* [type oui oui-subtype]
                 |     +--ro type           -> ../state/type
                 |     +--ro oui            -> ../state/oui
                 |     +--ro oui-subtype    -> ../state/oui-subtype
                 |     +--ro config
                 |     +--ro state
                 |        +--ro type?          int32
                 |        +--ro oui?           string
                 |        +--ro oui-subtype?   string
                 |        +--ro value?         binary
                 +--ro capabilities
                    +--ro capability* [name]
                       +--ro name      -> ../state/name
                       +--ro config
                       +--ro state
                          +--ro name?      identityref
                          +--ro enabled?   boolean

Validated related example instance-data

{
  "openconfig-interfaces:interfaces": {
    "interface": [
      {
        "name": "et-0/0/0",
        "config": {
          "name": "et-0/0/0",
          "type": "iana-if-type:ethernetCsmacd"
        },
        "state": {
          "name": "et-0/0/0",
          "type": "iana-if-type:ethernetCsmacd",
          "loopback-mode": "NONE",
          "enabled": true,
          "admin-status": "UP",
          "oper-status": "UP"
        },
        "hold-time": {
          "state": {
            "up": 0,
            "down": 0
          }
        },
        "penalty-based-aied": {
          "state": {
            "max-suppress-time": 0,
            "decay-half-life": 0,
            "suppress-threshold": 0,
            "reuse-threshold": 0,
            "flap-penalty": 0
          }
        }
      },
      {
        "name": "et-1/0/3",
        "config": {
          "name": "et-1/0/3",
          "type": "iana-if-type:ethernetCsmacd"
        },
        "state": {
          "name": "et-1/0/3",
          "type": "iana-if-type:ethernetCsmacd",
          "loopback-mode": "NONE",
          "enabled": true,
          "admin-status": "UP",
          "oper-status": "UP"
        },
        "hold-time": {
          "state": {
            "up": 0,
            "down": 0
          }
        },
        "penalty-based-aied": {
          "state": {
            "max-suppress-time": 0,
            "decay-half-life": 0,
            "suppress-threshold": 0,
            "reuse-threshold": 0,
            "flap-penalty": 0
          }
        }
      }
    ]
  },
  "openconfig-lldp:lldp": {
    "config": {
      "enabled": true,
      "management-interface": "vlan.100"
    },
    "state": {
      "enabled": true,
      "management-interface": "vlan.100",
      "management-addresses": {
        "management-address": [
          {
            "address": "10.100.1.1",
            "subtype": "openconfig-lldp-types:IPV4",
            "interface-number": 504,
            "interface-number-subtype": "IFINDEX"
          },
          {
            "address": "2001:db8:ffff::1",
            "subtype": "openconfig-lldp-types:IPV6",
            "interface-number": 504,
            "interface-number-subtype": "IFINDEX"
          }
        ]
      }
    },
    "interfaces": {
      "interface": [
        {
          "name": "et-0/0/0",
          "config": {
            "name": "et-0/0/0",
            "enabled": true
          },
          "state": {
            "name": "et-0/0/0",
            "enabled": true
          },
          "neighbors": {
            "neighbor": [
              {
                "id": "b8:ae:ed:7c:7c:a9-b8:ae:ed:7c:7c:a9",
                "state": {
                  "management-addresses": {
                    "management-address": [
                      {
                        "address": "10.200.1.32",
                        "subtype": "openconfig-lldp-types:IPV4",
                        "interface-number": 512,
                        "interface-number-subtype": "IFINDEX"
                      },
                      {
                        "address": "2001:db8:f2dd::fe",
                        "subtype": "openconfig-lldp-types:IPV6",
                        "interface-number": 512,
                        "interface-number-subtype": "IFINDEX"
                      }
                    ]
                  },
                  "id": "b8:ae:ed:7c:7c:a9-b8:ae:ed:7c:7c:a9"
                }
              }
            ]
          }
        },
        {
          "name": "et-1/0/3",
          "config": {
            "name": "et-1/0/3",
            "enabled": true
          },
          "state": {
            "name": "et-1/0/3",
            "enabled": true
          },
          "neighbors": {
            "neighbor": [
              {
                "id": "64:87:88:a5:a1:00-ge-0/1/1",
                "state": {
                  "management-addresses": {
                    "management-address": [
                      {
                        "address": "83:b3:30:8f:21:00",
                        "subtype": "openconfig-lldp-types:ALL_802",
                        "interface-number": 603,
                        "interface-number-subtype": "IFINDEX",
                        "oid": ".1.3.6.1.2.1.31.1.1.1.1.603"
                      }
                    ]
                  },
                  "id": "64:87:88:a5:a1:00-ge-0/1/1"
                }
              }
            ]
          }
        }
      ]
    }
  }
}

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

Successfully merging this pull request may close these issues.

1 participant