LLDP Configuration
LLDP (Link Layer Discovery Protocol) is a data link layer protocol that allows network devices to advertise their identity, capabilities, and neighbor relationships within the local subnet. LLDP operates at the data link layer and is independent of network layer protocols, thus supporting multiple network layer protocols.
The LLDP protocol organizes information such as the main capabilities, management addresses, device identifiers, and interface identifiers of the local device into different TLV (Type/Length/Value) in a standard manner, and encapsulates them in LLDPDUs (Link Layer Discovery Protocol Data Units) to be sent to directly connected neighbors. After receiving this information, the neighbors store it in the form of a standard MIB for the network management system to query and judge the communication status of the link.
LLDP Working Principle
Section titled “LLDP Working Principle”Transmission of LLDPDU
Devices with the LLDP function enabled will periodically send LLDPDUs to neighboring devices to announce local state changes. An LLDPDU is a message encapsulated in an Ethernet frame, and there are two encapsulation methods:
- The destination MAC address is the fixed multicast MAC address 01-80-C2-00-00-0E
- The Ethertype field is 0x88CC
Reception of LLDPDU
Devices receive LLDPDUs sent by neighboring devices by listening to the multicast address 01-80-C2-00-00-0E. After receiving an LLDPDU, the device stores the neighbor’s information locally for the network management system to query in real-time and judge the communication status of the link.
LLDP Configuration
Section titled “LLDP Configuration”LLDP Default Configuration
Section titled “LLDP Default Configuration”| Parameter | Default Value |
|---|---|
| LLDP function status | Global enable, interface enable |
| LLDP management address | By default, it is the IP address of the management network port. If the management network port address is not configured, it will be the internal address of the docker container. |
| LLDP port ID type | ifname (interface name) |
Enable LLDP
Section titled “Enable LLDP”| Operation | Command | Description |
|---|---|---|
| Enter the system configuration view | configure terminal | - |
| Enable LLDP | lldp enable | By default, the LLDP function is enabled. |
| Disable LLDP | no lldp enable | Disable LLDP function |
Configure the LLDP Management Address
Section titled “Configure the LLDP Management Address”| Operation | Command | Description |
|---|---|---|
| Enter the system configuration view | configure terminal | - |
| Configure the LLDP management address | lldp mgmt-ip A.B.C.D | The management address is used to uniquely identify a device, and by default, it is the IP address of the management network port or the internal address of the docker container. |
Configure the LLDP Port ID Type
Section titled “Configure the LLDP Port ID Type”| Operation | Command | Description |
|---|---|---|
| Enter the system configuration view | configure terminal | - |
| Configure the LLDP port ID type as MAC address | lldp port-id-subtype* mac-address* | Use the MAC address as the port ID |
| Configure the LLDP port ID type as the interface name | lldp port-id-subtype* ifname* | Use the interface name as the port ID, defaulting to ifname |
Configure LLDP Power Supply Negotiation
Section titled “Configure LLDP Power Supply Negotiation”Asterfusion PoE switches (acting as PSE) support the LLDP-based power negotiation mechanism. When the connected PD (Powered Device) also supports LLDP-MED Power or Dot3 Power, both parties will prioritize using this protocol for refined power supply capability negotiation. If the PD does not support it, the switch will automatically fall back to the physical layer classification mechanism based on the IEEE 802.3af/at/bt standards for power supply negotiation (default state).
LLDP-MED Power and Dot3 Power are two standard protocols related to power supply for network devices, mainly used for power management in PoE (Power over Ethernet) environments. The following is a detailed introduction and distinction between them:
1. Dot3 Power(IEEE 802.3af/at/bt)
Standard basis: Based on the IEEE 802.3 series of standards (such as 802.3af, 802.3at, 802.3bt), it belongs to the traditional PoE protocol.
Functions: Defines specifications for powering devices (IP phones, APs, cameras, etc.) via Ethernet cables (such as Cat5e/Cat6). Supports different power levels:
- 802.3af (PoE): Maximum 15.4W (port output).
- 802.3at (PoE+): Maximum 30W.
- 802.3bt (PoE++): Maximum 60W (Type 3) or 90W (Type 4).
Negotiates power requirements through LLDP (Link Layer Discovery Protocol), but only for basic power parameters (such as power level, priority).
2. LLDP-MED Power
Standard basis: Based on the ANSI/TIA-1057 standard, it is an extension of the LLDP protocol, optimized specifically for multimedia terminals (such as VoIP phones, video terminals).
Functions: Extends the MED (Media Endpoint Discovery) field on the basis of the LLDP protocol, supporting more refined power management:
- Device type identification (e.g., VoIP phones, video conference terminals).
- Dynamic power negotiation (adjusting power based on actual needs).
- Priority policies (e.g., prioritizing power supply for emergency communication devices).
- Compatible with IEEE 802.3af/at/bt, but with added optimizations for multimedia devices.
3. Configuration Method
| Operation | Command | Description |
|---|---|---|
| Enter the system configuration view | configure terminal | - |
| Configure the device power supply negotiation mechanism as Dot3 Power | lldp dot3 power enable | - |
| Configure the device power supply negotiation mechanism as MED Power | lldp med power enable | - |
Display and Maintenance
Section titled “Display and Maintenance”| Operation | Command | Description |
|---|---|---|
| View LLDP neighbor information | **show lldp neighbors *[ interface-name *] | Display global or specified interface’s LLDP neighbor information |
| View the LLDP neighbor table | show lldp table | Display LLDP neighbor information in table form |
Configuration Example
Section titled “Configuration Example”Networking Requirements

- The device is connected to the neighboring device via the Ethernet47 interface.
- Enable the LLDP function and configure the management address as 10.1.0.15.
Configuration Steps
1. Enable LLDP (enabled by default, can be omitted)
sonic(config)# lldp enable2. Configure the LLDP management address
sonic(config)# lldp mgmt-ip 10.1.0.15Verification
1. View LLDP neighbor information
sonic# show lldp neighbors Ethernet47-------------------------------------------------------------------------------LLDP neighbors:-------------------------------------------------------------------------------Interface: Ethernet47, via: LLDP, RID: 7, Time: 3 days, 02:20:45 Chassis: ChassisID: local 60:eb:5a:01:10:ac SysName: spine1 SysDescr: CX308P-48Y-M Debian GNU/Linux 9 (stretch) 5.10.0-8-2-amd64 x86_64 MgmtIP: 192.168.15.80 MgmtIface: 2 Capability: Bridge, on Capability: Router, on Port: PortID: ifname Ethernet47 PortDescr: Y47 TTL: 120 MFS: 9216 PMD autoneg: supported: no, enabled: no MAU oper type:10BaseTFD - UTP MAU, full duplex mode-------------------------------------------------------------------------------2. View the LLDP neighbor table
sonic# show lldp tableCapability codes: (R) Router, (B) Bridge, (O) OtherLocalPort RemoteDevice RemotePortID Capability RemotePortDescr----------- -------------- --------------------- ------------ -------------------Ethernet47 spine1 Ethernet47 BR Y47-------------------------------------------------------------------------------