Configuring LLDP
Summary: Networking › Switching › Edge › Synapse
Overview of LLDP
LLDP (Link Layer Discovery Protocol) provides a standard link layer discovery method, enabling devices of different manufacturers to discover each other in the network and exchange their system and configuration information. LLDP encapsulates the information of the local device (including main capabilities, management address, device identification, interface identification, etc.) in LLDPDU (Link Layer Discovery Protocol Data Unit) It is released to the neighbors directly connected to itself. After receiving the information, the neighbors save it in the form of standard MIB up for the network management system to query and judge the communication status of the link.
LLDPDU
LLDPDU is a data unit encapsulated in the data part of an LLDP message. Before forming an LLDPDU, the device first encapsulates the local information into a TLV format, and then combines several TLVs into one LLDPDU and encapsulates it in the data part of the LLDP packet for transmission. Figure 1 LLDPDU encapsulation format As shown in Figure 1, the blue Chassis ID TLV, Port ID TLV, and Time To Live TLV must be carried by each LLDPDU, and the remaining TLVs are optional. Each LLDPDU can carry up to 32 TLVs.
TLV
TLV is the unit that makes up LLDPDU, and each TLV represents a piece of information. The TLVs that LLDP can encapsulate include basic TLVs, 802.1 organization-defined TLVs, 802.3 organization-defined TLVs, and LLDP-MED (Link Layer Discovery Protocol Media Endpoint Discovery, Link Layer Discovery Protocol Media Endpoint Discovery) TLVs.
Basic TLV
Basic TLVs are a set of TLVs that are the basis for network device management. 802.1 organization-defined TLVs, 802.3 organization-defined TLVs, and LLDP-MED TLVs are TLVs defined by standards organizations or other organizations to enhance the management of network devices. Need to choose whether to send in LLDPDU. Among the basic TLVs, there are several TLVs that are mandatory for implementing the LLDP function, that is, they must be published in the LLDPDU, as shown in Table 1. Table 1 Basic TLV
TLV name
instruction Must be published Chassis ID Bridge MAC address of the sending device Yes
Port ID
Identifies the port of the sender of the LLDPDU. If LLDP-MED TLV is carried in LLDPDU, its content is the MAC address of the port; otherwise, its content is the name of the port Yes Time To Live The survival time of this device information on the neighbor device Yes
End of LLDPDU
The end identifier of the LLDPDU, which is the last TLV of the LLDPDU no Port Description
Description of the port
no
System Name
the name of the device no
System Description
description of the system no System Capabilities The main functions of the system and the function items that have been turned on no Management
Address
Management address, as well as the interface number and OID (Object Identifier) corresponding to the address no 802.1 Organization-Defined TLV The content of TLV defined by IEEE 802.1 organization is shown in Table2. Currently, the devices do not support sending Protocol Identity TLV and VID Usage Digest TLV, but can receive these two types of TLVs. Layer 3 Ethernet interfaces only support Link Aggregation TLVs. Table2 IEEE 802.1Organization defined TLV
TLV name
instruction Port VLAN ID (PVID)
Port VLAN ID
Port and protocol VLAN ID (PPVID) Port Protocol VLAN ID VLAN Name The name of the VLAN to which the port belongs Protocol Identity The type of protocol supported by the port DCBX Data Center Bridging Exchange Protocol
EVB module
(Not currently supported) Edge Virtual Bridging module, including EVB TLV and CDCP (S-Channel Discovery and Configuration Protocol, S-Channel Discovery and Configuration Protocol) TLV. For the detailed introduction of these two TLVs, please refer to "EVB Configuration Guide" Link Aggregation Whether the port supports link aggregation and whether link aggregation is enabled
Management VID
management VLAN VID Usage Digest Data containing a summary of VLAN ID usage ETS Configuration Enhanced Transmission Selection configuration ETS Recommendations Enhanced transfer selection recommendation
PFC
Priority-based Flow Control APP Application Protocol
QCN
(Not currently supported) Quantized Congestion Notification 802.3 Organization-Defined TLV The content of TLV defined by Table3. The Power Stateful Control TLV was defined in the IEEE P802.3at D1.0 version, and later versions no longer support this TLV. The device will only send this type of TLV after receiving the Power Stateful Control TLV. Table3 IEEE 802.3Organization defined TLV
TLV name
instruction MAC/PHY Configuration/Status The rate and duplex status supported by the port, whether it supports port rate auto-negotiation, whether the auto-negotiation function is enabled, and the current rate and duplex status Link Aggregation Whether the port supports link aggregation and whether link aggregation is enabled
Power Via MDI
The power supply capability of the port, including the type of PoE (Power over Ethernet) (including PSE (Power Sourcing Equipment) and PD (Powered Device)), the remote power supply mode of the PoE port, Whether PSE power supply is supported, whether PSE power supply is enabled, whether the power supply mode is controllable, power supply type, power source, power priority, PD requested power value, and PSE allocated power value Maximum Frame Size Maximum frame length supported by the port
Power Stateful Control
Power status control of ports, including the type of power used by the PSE/PD, the priority of supplying/receiving power, and the power supplied/received Energy-Efficient Ethernet
Energy Efficient Ethernet
management address The management address is an address for the network management system to identify and manage network devices. The management address can clearly identify a device, which facilitates the drawing of network topology and facilitates network management. The management address is encapsulated in the Management Address TLV of the LLDP packet and advertised.
LLDP Mode
Under the specified type of LLDP proxy, LLDP has the following four working modes:
- TxRx: Both send and receive LLDP packets.
- Tx: Only sends and does not receive LLDP packets.
- Rx: only receives and does not send LLDP packets.
- Disable: Neither sends nor receives LLDP packets.
When the LLDP working mode of the port changes, the port will initialize the protocol state machine. To prevent the port from continuously performing initialization operations due to frequent changes in the working mode of the port, you can configure the port initialization delay time.
Protocol Specification
The protocol specifications related to LLDP are:
- IEEE 802.1AB-2005: Station and Media Access Control Connectivity Discovery.
- IEEE 802.1AB 2009: Station and Media Access Control Connectivity Discovery.
- ANSI/TIA-1057: Link Layer Discovery Protocol for Media Endpoint Devices.
- IEEE Std 802.1Qaz-2011: Media Access Control (MAC) Bridges and Virtual Bridged Local Area Networks-Amendment 18: Enhanced Transmission Selection for Bandwidth Sharing Between Traffic Classes.
Configuring
Configuring Switch and Operating Mode
- Enabling/disabling the LLDP Function Globally
SWITCH(config)# lldp run
SWITCH(config)# no lldp run
Global configuration mode. Enable/disable LLDP function. required.
SWITCH(config-if)# lldp -agent
SWITCH(lldp-agent)# exit
Interface configuration mode. Enter the LLDP interface proxy configuration mode. Optional.
SWITCH(lldp-agent)# lldp enable { rxonly | txonly | txrx }
SWITCH(lldp-agent)# lldp disable
LLDP interface proxy configuration mode. Configure the working mode of the LLDP interface. Optional.
Configuring Optional Basic Parameter
- Configuring System Name
SWITCH(config)# lldp system-name NAME
SWITCH(config)# no lldp system-name
Global configuration mode. Configure/reset the system name. Optional.
SWITCH(config)# lldp system-description LINE
SWITCH(config)# no lldp system-description
Global configuration mode. Configure /reset system descriptors. Optional.
SWITCH(config)# lldp chassis locally-assigned NAME
SWITCH(config)# no lldp chassis locally-assigned
Global configuration mode. Configure/reset the device locally-assigned . Optional.
SWITCH(config-if)# lldp locally-assigned NAME
SWITCH(config-if)# no lldp locally-assigned
Interface configuration mode. Configure/reset the interface locally-assigned . Optional.
SWITCH(config-if)# lldp agt-circuit-id VALUE
SWITCH(config-if)# no lldp agt-circuit-id
Interface configuration mode. Configuration/reset interfaceagt-circuit-id.can be used as a value for port-id-tlv. Optional.
SWITCH(config-if)# lldp port-description LINE
SWITCH(config-if)# no lldp port-description
Interface configuration mode. Configure/reset interface port descriptors. Optional.
SWITCH(lldp-agent)# lldp chassis-id-tlv { if-alias | if-name | ip-address | locally-assigned | mac-address }
SWITCH(lldp-agent)# no lldp chassis-id-tlv
LLDP interface proxy configuration mode. Configure the device identification type of the LLDP interface. Optional.
SWITCH(lldp-agent)# lldp management-address-tlv { ip-address | mac-address }
SWITCH(lldp-agent)# no lldp management-address-tlv
LLDP interface proxy configuration mode. Configure the management address type of the LLDP interface. Optional.
SWITCH(lldp-agent)# lldp port-id-tlv { agt-circuit-id | if-alias | if-name | ip-address | locally-assigned | mac-address }
SWITCH(lldp-agent)# no lldp port-id-tlv
LLDP interface proxy configuration mode. Configure the port ID type of the LLDP interface. Optional.
Configuring Optional State Machine Parameter
- Configuring the MsgTxHold Parameter of an LLDP Interface
SWITCH(lldp-agent)# lldp msg-tx-hold <1-100>
SWITCH(lldp-agent)# no lldp msg-tx-hold
LLDP interface proxy configuration mode. This variable is used as a multiplier for msgTxInterval to determine the value of txTTL carried in LLDP frames transmitted by the LLDP proxy.The default msgTxHold is 4. Administrators can change this value to any value in the range 1 to 100.TTL= msgTxInterval * msgTxHold + 1 . Optional.
SWITCH(lldp-agent)# lldp tx-fast-init <1-8>
SWITCH(lldp-agent)# no lldp tx-fast-init
LLDP interface proxy configuration mode. This variable is used as the initial value of the txFast variable. This value determines the number of LLDPDUs transmitted during the fast transmission period.The default value of txFastInit is 4. Administrators can change this value to any value between 1 and 8. Optional.
SWITCH(lldp-agent)# lldp tx-max-credit <1-8>
SWITCH(lldp-agent)# no lldp tx-max-credit
LLDP interface proxy configuration mode. Configure the maximum value of txCredit.The default value is 5. Administrators can change this value to any value in the range 1 to 10. Optional.
SWITCH(lldp-agent)# lldp timer msg-fast-tx <1-3600>
SWITCH(lldp-agent)# no lldp timer msg-fast-tx
LLDP interface proxy configuration mode. This variable defines the time interval of the timer interval between two transfers in a fast transfer period (i.e. txFast is not zero). The default value for msgFastTx is 1; administrators can change this value to any value between 1 and 3600. Optional.
SWITCH(lldp-agent)# lldp timer msg-tx-interval <5-3600>
SWITCH(lldp-agent)# no lldp timer msg-tx-interval
LLDP interface proxy configuration mode. This variable defines the timer interval between normal transfers (i.e. txFast is zero). The default value for msgTxInterval is 30 s; admin can change this value to any value between5and 300. Optional.
SWITCH(lldp-agent)# lldp timer reinit-delay <1-10>
SWITCH(lldp-agent)# no lldp timer reinit-delay
LLDP interface proxy configuration mode. This parameter represents the amount of delay between when adminStatus becomes "disabled" and when reinitialization is attempted. The default value of reinitDelay is 2 s. Optional.
Configuring Send Tlv List
- Configuring Tlv Selection for LLDP Interfaces
SWITCH(lldp-agent)# [ no ] lldp tlv-select basic-mgmt { management-address | port-description | system-capabilities | system-description | system-name}
SWITCH(lldp-agent)# [ no ] lldp tlv-select ieee-8021-org-specific { link-agg | mgmt-vid | port-ptcl-vlanid | port-vlanid | ptcl-identity | vid-digest | vlan-name }
SWITCH(lldp-agent)# [ no ] lldp tlv-select ieee-802 3 -org-specific { mac-phy | max-mtu-size }
LLDP interface proxy configuration mode. tlvs can be selected with multiple commands. Optional. Note: When there are many VLAN configurations on the device, the VLAN-related tlv may cause the packet length to exceed the MTU, resulting in packet sending errors. It is necessary to configure not to send this type of tlv.
Examples
LLDP Basic Function Configuration Example
Requirements
NMS (Network Management System, network management system) is connected to Switch A, and Switch A is connected to the Terminal device and Switch B respectively. By configuring the LLDP function on Switch A and Switch B, the NMS can judge the communication status of the link between Switch A and the terminal device, and between Switch A and Switch B.
Network diagram
Figure2 LLDP basic function configuration network diagram
Typical configuration example
Switch A/B: Lldp run
Display Information
- Display the Status of the LLDP Interface
#show lldp interface gigabitEthernet0/2 Agent Mode : Nearest bridge Enable (tx/rx): Y/Y Message fast transmit time:1 Message transmission interval: 30 Reinitialisation delay: 2 MED Enabled:Y Device Type: NOT_DEFINED LLDP Agent traffic statistics: Total frames transmitted: 4608 Total entries aged: 0 Total frames received: 150 Total frames received in error: 0 Total frames discarded: 0 Total discarded TLVs: 0 Total unrecognised TLVs: 0
- Show LLDP Interface Neighbors
#show lldp interface gigabitEthernet0/2 neighbor
Nearest bridge Neighbors
Interface Name : gigabitEthernet0/2 System Name : System Description : Port Description : TTL: 3601 System Capabilities : Routing Mandatory TLVs : CHASSIS ID TYPE : Chassis MAC Address: 000e.c6c1.3841 PORT ID TYPE : Port MAC Address: 000e.c6c1.3841 8021 ORIGIN SPECIFIC TLV Port Vlan id :0 PP Vlan id :0 Remote Protocols Advertised : Remote VID Usage Digest : 0 Remote Management Vlan : 0 Link Aggregation Status : Disabled Link Aggregation Port ID : 0 8023 ORIGIN SPECIFIC TLV AutoNego Support : Supported Enabled AutoNego Capability : 1 Operational MAU Type : 0 Max Frame Size : 0 MED Capabilities : Capabilities MED Capabilities Dev Type : End Point Class-1 MED Application Type : Reserved MED Vlan id : 0 MED Tag/Untag: Untagged MED L2 Priority : 0 MED DSCP Val : 0

