---
title: LLDP
slug: aidc/huyw-lldp
createdAt: 2025-12-29T10:28:23.157Z
---

Link Layer Discovery Protocol.

## <font color="#1d50a2">URLs Summary</font>

| **URL**                                   | **GET** | **POST** | **PATCH** | **PUT** | **DELETE** |
| ----------------------------------------- | ------- | -------- | --------- | ------- | ---------- |
| /rest/v1/running/lldp-global              | Y       | N        | Y         | N       | N          |
| /rest/v1/running/lldp-ports/&#x7B;ifname} | Y       | Y        | Y         | N       | Y          |
| /rest/v1/rpc/show-lldp-local-interface    | N       | Y        | N         | N       | N          |
| /rest/v1/rpc/show-lldp-local-summary      | N       | Y        | N         | N       | N          |
| /rest/v1/rpc/show-lldp-neighbor-interface | N       | Y        | N         | N       | N          |
| /rest/v1/rpc/show-lldp-neighbor-summary   | N       | Y        | N         | N       | N          |

## <font color="#1d50a2">Examples</font>

### <font color="#1d50a2">Show lldp local interface</font>

```json
POST HTTPS://{switch IP}/rest/v1/rpc/show-lldp-local-interface
{
    "port": "Ethernet1"
}
```

**response:**

```json
{
    "lldp-local-interface": [
        {
            "local-port": "Ethernet1",
            "via": "unknown",
            "age": "20565 days, 07:38:58",
            "device": "Leaf-174",
            "device-id": "00:01:02:03:04:05",
            "device-descr": "SONiC Software Version: SONiC.V3.1R0500P01T10 - HwSku: CX308P-48Y-N - Distribution: Debian 11.11 - Kernel: 5.10.0-8-2-amd64",
            "device-mgmt-ip": "10.250.0.174",
            "device-mgmt-iface": "2",
            "port-id": "Ethernet1",
            "port-id-type": "local",
            "port-descr": "Y1",
            "port-ttl": "120",
            "capability": [
                {
                    "type": "Bridge",
                    "enabled": true
                },
                {
                    "type": "Router",
                    "enabled": true
                },
                {
                    "type": "Wlan",
                    "enabled": false
                },
                {
                    "type": "Station",
                    "enabled": false
                }
            ]
        }
    ]
}
```

### <font color="#1d50a2">Show lldp local summary</font>

```json
POST HTTPS://{switch IP}/rest/v1/rpc/show-lldp-local-summary
```

**response:**

```json
{
    "lldp-local-summary": {
        "tx-delay": "30",
        "tx-delay-ms": "30000",
        "tx-hold": "4",
        "max-neighbors": "32",
        "rx-only": "no",
        "mgmt-pattern": "10.250.0.174",
        "iface-pattern": "Ethernet*,eth0",
        "perm-iface-pattern": "(none)",
        "cid-pattern": "eth0",
        "cid-string": "00:01:02:03:04:05",
        "description": "SONiC Software Version: SONiC.V3.1R0500P01T10 - HwSku: CX308P-48Y-N - Distribution: Debian 11.11 - Kernel: 5.10.0-8-2-amd64",
        "platform": "Linux",
        "hostname": "Leaf-174",
        "advertise-version": "yes",
        "ifdescr-update": "no",
        "iface-promisc": "no",
        "lldpmed-no-inventory": "yes",
        "lldpmed-faststart": "yes",
        "lldpmed-faststart-interval": "1",
        "bond-slave-src-mac-type": "local",
        "lldp-portid-type": "ifname",
        "lldp-agent-type": "unknown"
    }
}
```

### <font color="#1d50a2">Show lldp neighbor interface</font>

```json
POST HTTPS://{switch IP}/rest/v1/rpc/show-lldp-neighbor-interface
{
    "port": "Ethernet13"
}
```

**response:**

```json
{
    "lldp-neighbor-interface": [
        {
            "local-port": "Ethernet13",
            "via": "LLDP",
            "rid": "1121",
            "age": "1 day, 01:06:10",
            "remote-device": "sonic-172",
            "remote-device-id": "60:EB:5A:01:10:83",
            "remote-device-descr": "SONiC Software Version: SONiC.V3.1R0409P00 - HwSku: CX308P-48Y-N - Distribution: Debian 12.13 - Kernel: 6.1.0-29-2-amd64",
            "remote-device-mgmt-ip": "10.250.0.172",
            "remote-device-mgmt-iface": "",
            "remote-port-id": "Ethernet12",
            "remote-port-id-type": "ifname",
            "remote-port-descr": "Y13",
            "remote-port-ttl": "120",
            "capability": [
                {
                    "type": "Bridge",
                    "enabled": true
                },
                {
                    "type": "Router",
                    "enabled": true
                },
                {
                    "type": "Wlan",
                    "enabled": false
                },
                {
                    "type": "Station",
                    "enabled": false
                }
            ],
            "vlan-list": [
                {
                    "vlan-id": "",
                    "value": "",
                    "pvid": false
                }
            ]
        }
    ]
}
```

### <font color="#1d50a2">Show lldp neighbor summary</font>

```json
POST HTTPS://{switch IP}/rest/v1/rpc/show-lldp-neighbor-summary
```

**response:**

```json
{
    "lldp-neighbor-summary": [
        {
            "local-port": "Ethernet1",
            "remote-device": "sonic-172",
            "remote-port-id": "Ethernet12",
            "capability": "BR",
            "remote-port-descr": "Y13"
        },
        {
            "local-port": "Ethernet25",
            "remote-device": "sonic",
            "remote-port-id": "Ethernet14",
            "capability": "BR",
            "remote-port-descr": "Y14"
        },
        {
            "local-port": "Ethernet26",
            "remote-device": "sonic",
            "remote-port-id": "Ethernet15",
            "capability": "BR",
            "remote-port-descr": "Y15"
        }
    ]
}
```

### <font color="#1d50a2">Modify lldp global</font>

```json
PATCH HTTPS://{switch IP}/rest/v1/running/lldp-global
{
    "include-vlan": "false",
    "global-portid-subtype": "local",
    "message-tx-interval": 7,
    "message-tx-hold-multiplier": 8,
    "management-address-advertisement": "false",         
    "capabilities-advertisement": "false",
    "admin-status": "false"
}
```

### <font color="#1d50a2">Create a lldp port</font>

```json
POST HTTPS://{switch IP}/rest/v1/running/lldp-ports/Ethernet1
{"status": "rx-only"}
```

### <font color="#1d50a2">Modify a lldp port</font>

```json
PATCH HTTPS://{switch IP}/rest/v1/running/lldp-ports/Ethernet1 
{"status": "rx-and-tx"}
```

## <font color="#1d50a2">Properties Descriptions</font>

### <font color="#1d50a2">LLDP ports</font>

**Tree Diagrams**

```plaintext
  +--rw lldp-ports
  |  +--rw lldp-port* [ifname]
  |     +--rw ifname
  |     +--ro local-portid?
  |     +--rw status?
  |     +--ro portid-subtype?
```

**Table of Properties**

| **Name**       | **Required** | **Type/Range**                                            | **Description**                                                                                                  |
| -------------- | ------------ | --------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| lldp-ports     | M            |                                                           | Path-only node, has no configurable value.<br />LLDP parameters.                                                 |
| ifname         | M            | Ethernet name<br />"Mgmt0"                                | (sub-property of lldp-ports)<br />Port name of current port.                                                     |
| local-portid   | RO           | string                                                    | (sub-property of lldp-ports)<br />Alias of current port.                                                         |
| status         | O            | "tx-only"<br />"rx-only"<br />"rx-and-tx"<br />"disabled" | (sub-property of lldp-ports)<br />Administrative status of the local LLDP agent.<br />Default value: "rx-and-tx" |
| portid-subtype | RO           | "ifname"<br />"macaddress"<br />"local"                   | (sub-property of lldp-ports)<br />Type of portid.                                                                |

### <font color="#1d50a2">LLDP global</font>

**Tree Diagrams**

```plaintext
  +--rw lldp-global
     +--rw include-vlan?
     +--rw global-portid-subtype?
     +--rw message-tx-interval?
     +--rw message-tx-hold-multiplier?
     +--rw management-address-advertisement?
     +--rw capabilities-advertisement?
     +--rw admin-status?
```

**Table of Properties**

| **Name**                         | **Required** | **Type/Range**                          | **Description**                                                                                                                                                         |
| -------------------------------- | ------------ | --------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| lldp-global                      | M            |                                         | Path-only node, has no configurable value.                                                                                                                              |
| include-vlan                     | O            | "true"<br />"false"                     | (sub-property of lldp-global)<br />Carry the VLAN ID of the interface in the message.<br />Default value: "true"                                                        |
| global-portid-subtype            | O            | "local"<br />"ifname"<br />"macaddress" | (sub-property of lldp-global)<br />Type of portid.<br />Default value: "local"                                                                                          |
| message-tx-interval              | O            | 5..32768                                | (sub-property of lldp-global)<br />Time interval in timer ticks between transmissions during normal transmission periods (i.e., txFast is zero).<br />Default value: 30 |
| message-tx-hold-multiplier       | O            | 2..10                                   | (sub-property of lldp-global)<br />Multiplier of msg-tx-interval.<br />Default value: 4                                                                                 |
| management-address-advertisement | O            | "true"<br />"false"                     | (sub-property of lldp-global)<br />LLDP management address advertisement.<br />Default value: "true"                                                                    |
| capabilities-advertisement       | O            | "true"<br />"false"                     | (sub-property of lldp-global)<br />lldp capabilities advertisement.<br />Default value: "true"                                                                          |
| admin-status                     | O            | "true"<br />"false"                     | (sub-property of lldp-global)<br />Administrative status of all port.<br />Default value: "true"                                                                        |

### <font color="#1d50a2">Show lldp local summary</font>

**Tree Diagrams**

```plaintext
    +---x show-lldp-local-summary
    |  +--ro output
    |     +--ro lldp-local-summary
    |        +--ro tx-delay?
    |        +--ro tx-delay-ms?
    |        +--ro tx-hold?
    |        +--ro max-neighbors?
    |        +--ro rx-only?
    |        +--ro mgmt-pattern?
    |        +--ro iface-pattern?
    |        +--ro perm-iface-pattern?
    |        +--ro cid-pattern?
    |        +--ro cid-string?
    |        +--ro description?
    |        +--ro platform?
    |        +--ro hostname?
    |        +--ro advertise-version?
    |        +--ro ifdescr-update?
    |        +--ro iface-promisc?
    |        +--ro lldpmed-no-inventory?
    |        +--ro lldpmed-faststart?
    |        +--ro lldpmed-faststart-interval?
    |        +--ro bond-slave-src-mac-type?
    |        +--ro lldp-portid-type?
    |        +--ro lldp-agent-type?
```

**Table of Properties**

| **Name**                   | **Required** | **Type/Range** | **Description**                                                                                                             |
| -------------------------- | ------------ | -------------- | --------------------------------------------------------------------------------------------------------------------------- |
| show-lldp-local-summary    | M            |                | Path-only node, has no configurable value.<br />Show LLDP summary configuration.                                            |
| lldp-local-summary         | RO           |                | (sub-property of output)<br />Path-only node, has no configurable value.<br />LLDP local summary configuration information. |
| tx-delay                   | RO           | string         | (sub-property of lldp-local-summary)<br />Transmit delay in seconds.                                                        |
| tx-delay-ms                | RO           | string         | (sub-property of lldp-local-summary)<br />Transmit delay in milliseconds.                                                   |
| tx-hold                    | RO           | string         | (sub-property of lldp-local-summary)<br />Transmit hold multiplier.                                                         |
| max-neighbors              | RO           | string         | (sub-property of lldp-local-summary)<br />Maximum number of neighbors to store.                                             |
| rx-only                    | RO           | string         | (sub-property of lldp-local-summary)<br />Whether receive-only mode is enabled.                                             |
| mgmt-pattern               | RO           | string         | (sub-property of lldp-local-summary)<br />Pattern for management addresses.                                                 |
| iface-pattern              | RO           | string         | (sub-property of lldp-local-summary)<br />Interface pattern for LLDP enabled ports.                                         |
| perm-iface-pattern         | RO           | string         | (sub-property of lldp-local-summary)<br />Permanent interface pattern.                                                      |
| cid-pattern                | RO           | string         | (sub-property of lldp-local-summary)<br />Interface pattern for chassis ID.                                                 |
| cid-string                 | RO           | string         | (sub-property of lldp-local-summary)<br />Override chassis ID value.                                                        |
| description                | RO           | string         | (sub-property of lldp-local-summary)<br />Override system description.                                                      |
| platform                   | RO           | string         | (sub-property of lldp-local-summary)<br />Override platform information.                                                    |
| hostname                   | RO           | string         | (sub-property of lldp-local-summary)<br />Override system name (hostname).                                                  |
| advertise-version          | RO           | string         | (sub-property of lldp-local-summary)<br />Whether to advertise software version.                                            |
| ifdescr-update             | RO           | string         | (sub-property of lldp-local-summary)<br />Whether to update interface descriptions.                                         |
| iface-promisc              | RO           | string         | (sub-property of lldp-local-summary)<br />Whether promiscuous mode is enabled on managed interfaces.                        |
| lldpmed-no-inventory       | RO           | string         | (sub-property of lldp-local-summary)<br />Whether LLDP-MED inventory is disabled.                                           |
| lldpmed-faststart          | RO           | string         | (sub-property of lldp-local-summary)<br />Whether LLDP-MED fast start mechanism is enabled.                                 |
| lldpmed-faststart-interval | RO           | string         | (sub-property of lldp-local-summary)<br />LLDP-MED fast start interval.                                                     |
| bond-slave-src-mac-type    | RO           | string         | (sub-property of lldp-local-summary)<br />Source MAC type for LLDP frames on bond slaves.                                   |
| lldp-portid-type           | RO           | string         | (sub-property of lldp-local-summary)<br />Port ID TLV subtype for LLDP frames.                                              |
| lldp-agent-type            | RO           | string         | (sub-property of lldp-local-summary)<br />LLDP agent type.                                                                  |

### <font color="#1d50a2">Show lldp local interface ethernet</font>

**Tree Diagrams**

```plaintext
    +---x show-lldp-local-interface
    |  +---w input
    |  |  +---w port?
    |  +--ro output
    |     +--ro lldp-local-interface* [local-port]
    |        +--ro local-port
    |        +--ro via?
    |        +--ro age?
    |        +--ro device?
    |        +--ro device-id?
    |        +--ro device-descr?
    |        +--ro device-mgmt-ip?
    |        +--ro device-mgmt-iface?
    |        +--ro port-id?
    |        +--ro port-id-type?
    |        +--ro port-descr?
    |        +--ro port-ttl?
    |        +--ro capability* [type]
    |           +--ro type
    |           +--ro enabled?
```

**Table of Properties**

| ****<font color="#0C121D">**Name**</font>**** | ****<font color="#0C121D">**Required**</font>**** | ****<font color="#0C121D">**Type/Range**</font>**** | ****<font color="#0C121D">**Description**</font>****                                                                                               |
| --------------------------------------------- | ------------------------------------------------- | --------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| show-lldp-local-interface                     | M                                                 |                                                     | Path-only node, has no configurable value.<br />Show LLDP configuration of specific interface.                                                     |
| port                                          | M                                                 | Ethernet name or Mgmt0                              | (sub-property of input)<br />The name of the port.                                                                                                 |
| lldp-local-interface                          | RO                                                | string                                              | (sub-property of output)<br />Path-only node, has no configurable value.<br />Local port LLDP interface information.                               |
| local-port                                    | RO                                                | string                                              | (sub-property of lldp-local-interface)<br />Local interface name.                                                                                  |
| via                                           | RO                                                | string                                              | (sub-property of lldp-local-interface)<br />Protocol via which information was learned (e.g., LLDP).                                               |
| age                                           | RO                                                | string                                              | (sub-property of lldp-local-interface)<br />Age of the connection information.                                                                     |
| device                                        | RO                                                | string                                              | (sub-property of lldp-local-interface)<br />Device system name.                                                                                    |
| device-id                                     | RO                                                | string                                              | (sub-property of lldp-local-interface)<br />Device chassis ID.                                                                                     |
| device-descr                                  | RO                                                | string                                              | (sub-property of lldp-local-interface)<br />Device system description.                                                                             |
| device-mgmt-ip                                | RO                                                | string                                              | (sub-property of lldp-local-interface)<br />Device management IP address.                                                                          |
| device-mgmt-iface                             | RO                                                | string                                              | (sub-property of lldp-local-interface)<br />Device management interface index.                                                                     |
| port-id                                       | RO                                                | string                                              | (sub-property of lldp-local-interface)<br />Port ID or name.                                                                                       |
| port-id-type                                  | RO                                                | string                                              | (sub-property of lldp-local-interface)<br />Type of port ID (e.g., ifname, local).                                                                 |
| port-descr                                    | RO                                                | string                                              | (sub-property of lldp-local-interface)<br />Port description.                                                                                      |
| port-ttl                                      | RO                                                | string                                              | (sub-property of lldp-local-interface)<br />Port time-to-live.                                                                                     |
| capability                                    | RO                                                | string                                              | (sub-property of lldp-local-interface)<br />Path-only node, has no configurable value.<br />List of device capabilities with their enabled status. |
| type                                          | RO                                                | string                                              | (sub-property of capability)<br />Capability type (e.g., Bridge, Router, Wlan, Station).                                                           |
| enabled                                       | RO                                                | "true"<br />"false"                                 | (sub-property of capability)<br />Whether this capability is enabled                                                                               |

### <font color="#1d50a2">Show lldp neighbor summary</font>

**Tree Diagrams**

```plaintext
    +---x show-lldp-neighbor-summary
    |  +--ro output
    |     +--ro lldp-neighbor-summary* [local-port]
    |        +--ro local-port
    |        +--ro remote-device?
    |        +--ro remote-port-id?
    |        +--ro capability?
    |        +--ro remote-port-descr?
```

**Table of Properties**

| ****<font color="#0C121D">**Name**</font>**** | ****<font color="#0C121D">**Required**</font>**** | ****<font color="#0C121D">**Type/Range**</font>**** | ****<font color="#0C121D">**Description**</font>****                                                                    |
| --------------------------------------------- | ------------------------------------------------- | --------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| show-lldp-neighbor-summary                    | M                                                 |                                                     | Path-only node, has no configurable value.<br />Show LLDP neighbor summary information.                                 |
| lldp-neighbor-summary                         | RO                                                |                                                     | (sub-property of output)<br />Path-only node, has no configurable value.<br />Local port for learning LLDP information. |
| local-port                                    | RO                                                | string                                              | (sub-property of lldp-neighbor-summary)<br />Local interface name depends on port-id-subtype.                           |
| remote-device                                 | RO                                                | string                                              | (sub-property of lldp-neighbor-summary)<br />Remote device system name.                                                 |
| remote-port-id                                | RO                                                | string                                              | (sub-property of lldp-neighbor-summary)<br />Remote port ID or name.                                                    |
| capability                                    | RO                                                | 'B' or 'R' or 'BR'                                  | (sub-property of lldp-neighbor-summary)<br />'B' for Bridge, 'R' for Router                                             |
| remote-port-descr                             | RO                                                | string                                              | (sub-property of lldp-neighbor-summary)<br />Remote port description.                                                   |

### <font color="#1d50a2">Show lldp neighbor interface ethernet</font>

**Tree Diagrams**

```plaintext
    +---x show-lldp-neighbor-interface
       +---w input
       |  +---w port?
       +--ro output
          +--ro lldp-neighbor-interface* [local-port]
             +--ro local-port
             +--ro via?
             +--ro rid?
             +--ro age?
             +--ro remote-device?
             +--ro remote-device-id?
             +--ro remote-device-descr?
             +--ro remote-device-mgmt-ip?
             +--ro remote-device-mgmt-iface?
             +--ro remote-port-id?
             +--ro remote-port-id-type?
             +--ro remote-port-descr?
             +--ro remote-port-ttl?
             +--ro capability* [type]
             |  +--ro type
             |  +--ro enabled?
             +--ro vlan-list* []
                +--ro vlan-id?
                +--ro value?
                +--ro pvid?
```

**Table of Properties**

| ****<font color="#0C121D">**Name**</font>**** | ****<font color="#0C121D">**Required**</font>**** | ****<font color="#0C121D">**Type/Range**</font>**** | ****<font color="#0C121D">**Description**</font>****                                                                                                                              |
| --------------------------------------------- | ------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| show-lldp-neighbor-interface                  | M                                                 |                                                     | Path-only node, has no configurable value.<br />Show LLDP neighbor information of specific interface.                                                                             |
| port                                          | M                                                 | Ethernet name or Mgmt0                              | (sub-property of input)<br />The name of the port.                                                                                                                                |
| lldp-neighbor-interface                       | RO                                                |                                                     | (sub-property of output)<br />Path-only node, has no configurable value.<br />Local port for learning LLDP neighbor information.                                                  |
| local-port                                    | RO                                                | string                                              | (sub-property of lldp-neighbor-interface)<br />Local interface name depends on port-id-subtype.                                                                                   |
| via                                           | RO                                                | string                                              | (sub-property of lldp-neighbor-interface)<br />Protocol via which information was learned (e.g., LLDP).                                                                           |
| rid                                           | RO                                                | string                                              | (sub-property of lldp-neighbor-interface)<br />Remote identifier.                                                                                                                 |
| age                                           | RO                                                | string                                              | (sub-property of lldp-neighbor-interface)<br />Age of the connection information.                                                                                                 |
| remote-device                                 | RO                                                | string                                              | (sub-property of lldp-neighbor-interface)<br />Remote device system name.                                                                                                         |
| remote-device-id                              | RO                                                | string                                              | (sub-property of lldp-neighbor-interface)<br />Remote device chassis ID.                                                                                                          |
| remote-device-descr                           | RO                                                | string                                              | (sub-property of lldp-neighbor-interface)<br />Remote device system description.                                                                                                  |
| remote-device-mgmt-ip                         | RO                                                | string                                              | (sub-property of lldp-neighbor-interface)<br />Remote device management IP address.                                                                                               |
| remote-device-mgmt-iface                      | RO                                                | string                                              | (sub-property of lldp-neighbor-interface)<br />Remote device management interface index.                                                                                          |
| remote-port-id                                | RO                                                | string                                              | (sub-property of lldp-neighbor-interface)<br />Remote port ID or name.                                                                                                            |
| remote-port-id-type                           | RO                                                | string                                              | (sub-property of lldp-neighbor-interface)<br />Type of remote port ID (e.g., ifname, local).                                                                                      |
| remote-port-descr                             | RO                                                | string                                              | (sub-property of lldp-neighbor-interface)<br />Remote port description.                                                                                                           |
| remote-port-ttl                               | RO                                                | string                                              | (sub-property of lldp-neighbor-interface)<br />Remote port time-to-live.                                                                                                          |
| capability                                    | RO                                                |                                                     | (sub-property of lldp-neighbor-interface)<br />Path-only node, has no configurable value.<br />List of device capabilities with their enabled status.                             |
| type                                          | RO                                                | string                                              | (sub-property of capability)<br />Capability type (e.g., Bridge, Router, Wlan, Station).                                                                                          |
| enabled                                       | RO                                                | "true"<br />"false"                                 | (sub-property of capability)<br />Whether this capability is enabled.                                                                                                             |
| vlan-list                                     | RO                                                |                                                     | (sub-property of lldp-neighbor-interface)<br />Path-only node, has no configurable value.<br />List of VLANs advertised by remote device. Can be a single VLAN or multiple VLANs. |
| vlan-id                                       | RO                                                | string                                              | (sub-property of vlan-list)<br />VLAN ID advertised by remote device.                                                                                                             |
| value                                         | RO                                                | string                                              | (sub-property of vlan-list)<br />VLAN name advertised by remote device.                                                                                                           |
| pvid                                          | RO                                                | "true"<br />"false"                                 | (sub-property of vlan-list)<br />Whether this is the PVID (Primary VLAN ID).                                                                                                      |

