---
title: LLDP Configuration
slug: routing/lldp-configuration
createdAt: 2025-12-04T04:27:17.178Z
---

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

### <font color="#1d50a2">show lldp neighbors</font>

**\[Command]**
**show lldp neighbors *interface-name***
**show lldp table**

**\[Purpose]**
Show LLDP neighbors

**\[Parameter]**

| **Parameter**    | **Description** |
| ---------------- | --------------- |
| *interface-name* | Interface name  |

**\[View]**
System view

**\[Use Cases]**

```plaintext
sonic# show lldp neighbors
-------------------------------------------------------------------------------
LLDP neighbors:
-------------------------------------------------------------------------------
Interface: Ethernet1, via: LLDP, RID: 78, Time: 0 day, 08:17:51
Chassis:
ChassisID: local 60:eb:5a:01:1c:eb
SysName: Leaf-4-SZ
SysDescr: CX204Y-48GT-M-AC Debian GNU/Linux 9 (stretch) 5.10.34-103 aarch64
MgmtIP: 172.18.0.1
MgmtIface: 10
MgmtIP: fe80::9013:e0ff:fe83:e51e
MgmtIface: 6
Capability: Bridge, on
Capability: Router, on
Port:
PortID: ifname Ethernet16
PortDescr: Ethernet16
TTL: 8
MFS: 9216
PMD autoneg: supported: no, enabled: no
MAU oper type: 10BaseTFD - UTP MAU, full duplex mode
VLAN: 202, pvid: yes vlan202
VLAN: 4094, pvid: no vlan4094
-------------------------------------------------------------------------------
```

### <font color="#1d50a2">show lldp ports med-policy</font>

**\[Command]**
**show lldp ports med-policy**

**\[Purpose]**
Display interface LLDP MED configuration policy

**\[View]**
System view

**\[Use Cases]**

```plaintext
sonic# show lldp ports med-policy
+------------+---------------+--------+----------+------------+--------+
| Ports | application | vlan | tagged | priority | dscp |
+============+===============+========+==========+============+========+
| Ethernet20 | voice | 20 | NA | NA | NA |
+------------+---------------+--------+----------+------------+--------+
```

### <font color="#1d50a2">lldp enable</font>

**\[Command]**
**lldp enable**
**no lldp enable**

**\[Purpose]**
Enable LLDP

**\[View]**
System configuration view

**\[Use Cases]**

```plaintext
sonic(config)# lldp enable
```

### <font color="#1d50a2">lldp mgmt-ip *A.B.C.D*</font>

**\[Command]**
**lldp mgmt-ip *A.B.C.D***

**\[Purpose]**
Configure the management IP address of LLDP

**\[View]**
System configuration view

**\[Usage Scenario]**
Configuring a management address is useful for clearly identifying a device, aiding in network topology mapping, and facilitating network management. When there's a need to advertise a specific management address to neighbors, this command is used for configuration.

**\[Notes]**
The management address is carried in the Management Address TLV field of LLDP packets, uniquely identifying a device. By default, it is set to the IP address of the management interface. If the management interface address is not configured, it will default to the Docker container's internal address.

**\[Use Cases]**

```plaintext
sonic(config)# lldp mgmt-ip 10.1.0.15
```

### <font color="#1d50a2">lldp port-id-subtype</font>

**\[Command]**
**lldp port-id-subtype \{macaddress|ifname}**

**\[Purpose]**
Configure the interface ID type of LLDP

**\[Parameter]**

| **Parameter** | **Description** |
| ------------- | --------------- |
| *macaddress*  | MAC Address     |
| ifname        | Interface Name  |

**\[View]**
System configuration view

**\[Usage Scenario]**
In the LLDP table, the interface IP used in the mode is the device's interface name. To clearly identify interconnected devices, you can configure the interface ID type as a MAC address.

By default, the interface ID type is set to "ifname.".

**\[Use Cases]**

```plaintext
sonic(config)# lldp port-id-subtype macaddress
```

