Skip to content
Ask AI

LLDP

Link Layer Discovery Protocol.

URLGETPOSTPATCHPUTDELETE
/rest/v1/running/lldp-globalYNYNN
/rest/v1/running/lldp-ports/{ifname}YYYNY
/rest/v1/rpc/show-lldp-local-interfaceNYNNN
/rest/v1/rpc/show-lldp-local-summaryNYNNN
/rest/v1/rpc/show-lldp-neighbor-interfaceNYNNN
/rest/v1/rpc/show-lldp-neighbor-summaryNYNNN
POST HTTPS://{switch IP}/rest/v1/rpc/show-lldp-local-interface
{
"port": "Ethernet1"
}

response:

{
"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
}
]
}
]
}
POST HTTPS://{switch IP}/rest/v1/rpc/show-lldp-local-summary

response:

{
"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"
}
}
POST HTTPS://{switch IP}/rest/v1/rpc/show-lldp-neighbor-interface
{
"port": "Ethernet13"
}

response:

{
"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
}
]
}
]
}
POST HTTPS://{switch IP}/rest/v1/rpc/show-lldp-neighbor-summary

response:

{
"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"
}
]
}
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"
}
POST HTTPS://{switch IP}/rest/v1/running/lldp-ports/Ethernet1
{"status": "rx-only"}
PATCH HTTPS://{switch IP}/rest/v1/running/lldp-ports/Ethernet1
{"status": "rx-and-tx"}

Tree Diagrams

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

Table of Properties

NameRequiredType/RangeDescription
lldp-portsMPath-only node, has no configurable value.
LLDP parameters.
ifnameMEthernet name
”Mgmt0”(sub-property of lldp-ports)
Port name of current port.
local-portidROstring(sub-property of lldp-ports)
Alias of current port.
statusO”tx-only"
"rx-only"
"rx-and-tx"
"disabled”(sub-property of lldp-ports)
Administrative status of the local LLDP agent.
Default value: “rx-and-tx”
portid-subtypeRO”ifname"
"macaddress"
"local”(sub-property of lldp-ports)
Type of portid.

Tree Diagrams

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

NameRequiredType/RangeDescription
lldp-globalMPath-only node, has no configurable value.
include-vlanO”true"
"false”(sub-property of lldp-global)
Carry the VLAN ID of the interface in the message.
Default value: “true”
global-portid-subtypeO”local"
"ifname"
"macaddress”(sub-property of lldp-global)
Type of portid.
Default value: “local”
message-tx-intervalO5..32768(sub-property of lldp-global)
Time interval in timer ticks between transmissions during normal transmission periods (i.e., txFast is zero).
Default value: 30
message-tx-hold-multiplierO2..10(sub-property of lldp-global)
Multiplier of msg-tx-interval.
Default value: 4
management-address-advertisementO”true"
"false”(sub-property of lldp-global)
LLDP management address advertisement.
Default value: “true”
capabilities-advertisementO”true"
"false”(sub-property of lldp-global)
lldp capabilities advertisement.
Default value: “true”
admin-statusO”true"
"false”(sub-property of lldp-global)
Administrative status of all port.
Default value: “true”

Tree Diagrams

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

NameRequiredType/RangeDescription
show-lldp-local-summaryMPath-only node, has no configurable value.
Show LLDP summary configuration.
lldp-local-summaryRO(sub-property of output)
Path-only node, has no configurable value.
LLDP local summary configuration information.
tx-delayROstring(sub-property of lldp-local-summary)
Transmit delay in seconds.
tx-delay-msROstring(sub-property of lldp-local-summary)
Transmit delay in milliseconds.
tx-holdROstring(sub-property of lldp-local-summary)
Transmit hold multiplier.
max-neighborsROstring(sub-property of lldp-local-summary)
Maximum number of neighbors to store.
rx-onlyROstring(sub-property of lldp-local-summary)
Whether receive-only mode is enabled.
mgmt-patternROstring(sub-property of lldp-local-summary)
Pattern for management addresses.
iface-patternROstring(sub-property of lldp-local-summary)
Interface pattern for LLDP enabled ports.
perm-iface-patternROstring(sub-property of lldp-local-summary)
Permanent interface pattern.
cid-patternROstring(sub-property of lldp-local-summary)
Interface pattern for chassis ID.
cid-stringROstring(sub-property of lldp-local-summary)
Override chassis ID value.
descriptionROstring(sub-property of lldp-local-summary)
Override system description.
platformROstring(sub-property of lldp-local-summary)
Override platform information.
hostnameROstring(sub-property of lldp-local-summary)
Override system name (hostname).
advertise-versionROstring(sub-property of lldp-local-summary)
Whether to advertise software version.
ifdescr-updateROstring(sub-property of lldp-local-summary)
Whether to update interface descriptions.
iface-promiscROstring(sub-property of lldp-local-summary)
Whether promiscuous mode is enabled on managed interfaces.
lldpmed-no-inventoryROstring(sub-property of lldp-local-summary)
Whether LLDP-MED inventory is disabled.
lldpmed-faststartROstring(sub-property of lldp-local-summary)
Whether LLDP-MED fast start mechanism is enabled.
lldpmed-faststart-intervalROstring(sub-property of lldp-local-summary)
LLDP-MED fast start interval.
bond-slave-src-mac-typeROstring(sub-property of lldp-local-summary)
Source MAC type for LLDP frames on bond slaves.
lldp-portid-typeROstring(sub-property of lldp-local-summary)
Port ID TLV subtype for LLDP frames.
lldp-agent-typeROstring(sub-property of lldp-local-summary)
LLDP agent type.

Tree Diagrams

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

NameRequiredType/RangeDescription
show-lldp-local-interfaceMPath-only node, has no configurable value.
Show LLDP configuration of specific interface.
portMEthernet name or Mgmt0(sub-property of input)
The name of the port.
lldp-local-interfaceROstring(sub-property of output)
Path-only node, has no configurable value.
Local port LLDP interface information.
local-portROstring(sub-property of lldp-local-interface)
Local interface name.
viaROstring(sub-property of lldp-local-interface)
Protocol via which information was learned (e.g., LLDP).
ageROstring(sub-property of lldp-local-interface)
Age of the connection information.
deviceROstring(sub-property of lldp-local-interface)
Device system name.
device-idROstring(sub-property of lldp-local-interface)
Device chassis ID.
device-descrROstring(sub-property of lldp-local-interface)
Device system description.
device-mgmt-ipROstring(sub-property of lldp-local-interface)
Device management IP address.
device-mgmt-ifaceROstring(sub-property of lldp-local-interface)
Device management interface index.
port-idROstring(sub-property of lldp-local-interface)
Port ID or name.
port-id-typeROstring(sub-property of lldp-local-interface)
Type of port ID (e.g., ifname, local).
port-descrROstring(sub-property of lldp-local-interface)
Port description.
port-ttlROstring(sub-property of lldp-local-interface)
Port time-to-live.
capabilityROstring(sub-property of lldp-local-interface)
Path-only node, has no configurable value.
List of device capabilities with their enabled status.
typeROstring(sub-property of capability)
Capability type (e.g., Bridge, Router, Wlan, Station).
enabledRO”true"
"false”(sub-property of capability)
Whether this capability is enabled

Show lldp neighbor summary** Tree Diagrams **

Section titled “Show lldp neighbor summary** Tree Diagrams **”
+---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

NameRequiredType/RangeDescription
show-lldp-neighbor-summaryMPath-only node, has no configurable value.
Show LLDP neighbor summary information.
lldp-neighbor-summaryRO(sub-property of output)
Path-only node, has no configurable value.
Local port for learning LLDP information.
local-portROstring(sub-property of lldp-neighbor-summary)
Local interface name depends on port-id-subtype.
remote-deviceROstring(sub-property of lldp-neighbor-summary)
Remote device system name.
remote-port-idROstring(sub-property of lldp-neighbor-summary)
Remote port ID or name.
capabilityRO’B’ or ‘R’ or ‘BR’(sub-property of lldp-neighbor-summary)
‘B’ for Bridge, ‘R’ for Router
remote-port-descrROstring(sub-property of lldp-neighbor-summary)
Remote port description.

Show lldp neighbor interface ethernet** Tree Diagrams **

Section titled “Show lldp neighbor interface ethernet** Tree Diagrams **”
+---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

NameRequiredType/RangeDescription
show-lldp-neighbor-interfaceMPath-only node, has no configurable value.
Show LLDP neighbor information of specific interface.
portMEthernet name or Mgmt0(sub-property of input)
The name of the port.
lldp-neighbor-interfaceRO(sub-property of output)
Path-only node, has no configurable value.
Local port for learning LLDP neighbor information.
local-portROstring(sub-property of lldp-neighbor-interface)
Local interface name depends on port-id-subtype.
viaROstring(sub-property of lldp-neighbor-interface)
Protocol via which information was learned (e.g., LLDP).
ridROstring(sub-property of lldp-neighbor-interface)
Remote identifier.
ageROstring(sub-property of lldp-neighbor-interface)
Age of the connection information.
remote-deviceROstring(sub-property of lldp-neighbor-interface)
Remote device system name.
remote-device-idROstring(sub-property of lldp-neighbor-interface)
Remote device chassis ID.
remote-device-descrROstring(sub-property of lldp-neighbor-interface)
Remote device system description.
remote-device-mgmt-ipROstring(sub-property of lldp-neighbor-interface)
Remote device management IP address.
remote-device-mgmt-ifaceROstring(sub-property of lldp-neighbor-interface)
Remote device management interface index.
remote-port-idROstring(sub-property of lldp-neighbor-interface)
Remote port ID or name.
remote-port-id-typeROstring(sub-property of lldp-neighbor-interface)
Type of remote port ID (e.g., ifname, local).
remote-port-descrROstring(sub-property of lldp-neighbor-interface)
Remote port description.
remote-port-ttlROstring(sub-property of lldp-neighbor-interface)
Remote port time-to-live.
capabilityRO(sub-property of lldp-neighbor-interface)
Path-only node, has no configurable value.
List of device capabilities with their enabled status.
typeROstring(sub-property of capability)
Capability type (e.g., Bridge, Router, Wlan, Station).
enabledRO”true"
"false”(sub-property of capability)
Whether this capability is enabled.
vlan-listRO(sub-property of lldp-neighbor-interface)
Path-only node, has no configurable value.
List of VLANs advertised by remote device. Can be a single VLAN or multiple VLANs.
vlan-idROstring(sub-property of vlan-list)
VLAN ID advertised by remote device.
valueROstring(sub-property of vlan-list)
VLAN name advertised by remote device.
pvidRO”true"
"false”(sub-property of vlan-list)
Whether this is the PVID (Primary VLAN ID).