< Home

Overview of LLDP

LLDP is the neighbor discovery protocol defined in IEEE 802.1ab. Using the LLDP technology, the Network Management System (NMS) can rapidly learn the current network topology and topology changes when the network scale increases rapidly.

LLDP provides a standard link-layer discovery mode, which organizes the main capabilities, management address, device identifier, and interface identifier of the local device into different Type/Length/Value (TLVs), constructs a Link Layer Discovery Protocol Data Units (LLDPDU) with several TLVs, and encapsulates the LLDPDU in the data field of an LLDP frame, and then advertises LLDP frame to the directly connected neighbors. After receiving the LLDP frame, the neighbors store them as the standard Management Information Base (MIB) for the NMS to check and analyze the communication status along the links.

Working Mechanism

LLDP working modes

The LLDP working modes are categorized into:

  • txrx: The interface sends and receives LLDP packets.
  • tx: The interface only sends LLDP packets.
  • rx: The interface only receives LLDP packets.
  • disable: The interface does not send or receive LLDP packets.
Principles for sending LLDP packets
  • After LLDP is enabled on a device, the device periodically sends LLDP packets to neighboring devices. If the configuration of the local device changes, the device immediately sends LLDP packets to neighboring devices to advertise the changes. If information changes frequently, you can set a delay for an interface to send LLDP packets to reduce the number of LLDP packets to be sent. After an interface sends an LLDP packet, the interface does not send another LLDP packet until the configured delay interval elapses.

  • The fast sending mechanism allows the device to override pre-configured delay interval and quickly advertise local information to other devices in the following situations:

    • A device receives an LLDP packet sent by a transmitting device, whereas the device has no information about the transmitting device.
    • LLDP is enabled on a device that previously has LLDP disabled.
    • An interface on the device goes Up.

    The fast sending mechanism shortens the interval at which LLDP packets are sent to 1 second. After a specified number of LLDP packets are sent, the pre-configured delay interval is restored.

Principles for receiving LLDP packets

A device checks whether TLVs carried in LLDP packets it receives are valid. If the TLVs are valid, the device saves information about neighboring devices and uses the TTL value carried in the LLDPDU to set an aging time for the information.

Frame Format

LLDP frame

Figure 1 shows the LLDP frame format.

Figure 1 LLDP frame format

An LLDP frame contains the following fields:

  • DA: destination MAC address, a fixed multicast MAC address 0x0180-C200-000E.
  • SA: source MAC address, the MAC address of the sender.
  • Type: packet type, 0x88CC in LLDP frames.
  • LLDPDU: LLDP data unit, body of an LLDP frame.
  • FCS: frame check sequence.

LLDPDU

An LLDPDU is a data unit encapsulated in the data field in an LLDP packet.

A device encapsulates local device information in Type/Length/Value (TLV) format and combines several TLVs in an LLDPDU for transmission. You can combine various TLVs to form an LLDPDU as required. TLVs allow a device to advertise its own status and learn the status of neighboring devices.

Figure 2 shows the LLDPDU format.

Figure 2 LLDPDU format

Each LLDPDU starts with the Chassis ID TLV, Port ID TLV, and Time to Live TLV, and ends with the End of LLDPDU TLV. Other TLVs are optional, and you can determine whether to encapsulate them in an LLDPDU.

When LLDP is disabled on an interface or an interface is shut down, the interface sends a shutdown LLDPDU to the neighbors. In the shutdown LLDPDU, the value of the Time to Live TLV is 0. A shutdown LLDPDU contains no optional TLVs.

TLV

A TLV is the smallest unit of an LLDPDU. It gives type, length, and other information for a device object.

LLDPDUs can encapsulate basic TLVs, TLVs defined by IEEE 802.1 working groups, and TLVs defined by IEEE 802.3 working groups:

  • Basic TLVs are used for basic device management. Four basic TLVs are mandatory in LLDP implementation and must be encapsulated in an LLDPDU. For details, see Table 1.
  • The TLVs defined by IEEE 802.1 and IEEE 802.3 working groups are used for enhanced device management functions. You can determine whether to encapsulate organizationally specific TLVs. For details, see Table 2 and Table 3.
Table 1 Basic TLVs
TLV Description Mandatory
Chassis ID TLV MAC address of the GE0/0/0 of the device sending an LLDPDU. Yes
Port ID TLV

Port from which an LLDPDU is sent.

Yes
Time To Live TLV Time to live (TTL) of the local device information stored on the neighbor device. Yes
End of LLDPDU TLV End of an LLDPDU. Yes
Port Description TLV Character string that describes the port sending an LLDPDU. No
System Name TLV System name. No
System Description TLV Character string that describes the system. No
System Capabilities TLV Main functions of the system and the functions that have been enabled. No
Management Address TLV Address used by the NMS to identify and manage the local device. Management IP addresses uniquely identify network devices, facilitating layout of the network topology and network management. No
Table 2 TLVs defined by the IEEE 802.1 working group
TLV Description
Port VLAN ID TLV VLAN ID of a port.
Port And Protocol VLAN ID TLV Protocol VLAN ID of a port.
VLAN Name TLV Name of the VLAN on a port.
Protocol Identity TLV Protocol types that a port supports.
Table 3 TLVs defined by the IEEE 802.3 working group
TLV Description
Link Aggregation TLV Whether a port supports link aggregation and has link aggregation enabled.
MAC/PHY Configuration/Status TLV

Rate and duplex mode of a port, whether the port supports auto-negotiation, and whether auto-negotiation is enabled on the port.

Maximum Frame Size TLV

Maximum frame length that a port supports. The value is the maximum transmission unit (MTU) of the port.

Power Via MDI TLV

Power capabilities of a port, for example, whether a port supplies or demands power.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
Next topic >