Skip to content
Ask AI

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.

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.

ParameterDefault Value
LLDP function statusGlobal enable, interface enable
LLDP management addressBy 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 typeifname (interface name)
OperationCommandDescription
Enter the system configuration viewconfigure terminal-
Enable LLDPlldp enableBy default, the LLDP function is enabled.
Disable LLDPno lldp enableDisable LLDP function
OperationCommandDescription
Enter the system configuration viewconfigure terminal-
Configure the LLDP management addresslldp mgmt-ip A.B.C.DThe 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.
OperationCommandDescription
Enter the system configuration viewconfigure terminal-
Configure the LLDP port ID type as MAC addresslldp port-id-subtype* mac-address*Use the MAC address as the port ID
Configure the LLDP port ID type as the interface namelldp port-id-subtype* ifname*Use the interface name as the port ID, defaulting to ifname

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

OperationCommandDescription
Enter the system configuration viewconfigure terminal-
Configure the device power supply negotiation mechanism as Dot3 Powerlldp dot3 power enable-
Configure the device power supply negotiation mechanism as MED Powerlldp med power enable-
OperationCommandDescription
View LLDP neighbor information**show lldp neighbors *[ interface-name *]Display global or specified interface’s LLDP neighbor information
View the LLDP neighbor tableshow lldp tableDisplay LLDP neighbor information in table form

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)

Terminal window
sonic(config)# lldp enable

2. Configure the LLDP management address

Terminal window
sonic(config)# lldp mgmt-ip 10.1.0.15

Verification

1. View LLDP neighbor information

Terminal window
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

Terminal window
sonic# show lldp table
Capability codes: (R) Router, (B) Bridge, (O) Other
LocalPort RemoteDevice RemotePortID Capability RemotePortDescr
----------- -------------- --------------------- ------------ -------------------
Ethernet47 spine1 Ethernet47 BR Y47
-------------------------------------------------------------------------------