- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
06-LLDP configuration | 199.19 KB |
Feature and hardware compatibility
Performing basic LLDP configurations
Setting the LLDP operating mode
Setting the LLDP reinitialization delay
Configuring the advertisable TLVs
Configuring the management address and its encoding format
Setting an encapsulation format for LLDP frames
Disabling LLDP PVID inconsistency check
Configuring LLDP trapping and LLDP-MED trapping
Enabling the device to generate ARP or ND entries for received management address LLDP TLVs·
Displaying and maintaining LLDP
Basic LLDP configuration example
Configuring LLDP
Overview
In a heterogeneous network, a standard configuration exchange platform ensures that different types of network devices from different vendors can discover one another and exchange configuration.
The Link Layer Discovery Protocol (LLDP) is specified in IEEE 802.1AB. The protocol operates on the data link layer to exchange device information between directly connected devices. With LLDP, a device sends local device information as TLV (type, length, and value) triplets in LLDP Data Units (LLDPDUs) to the directly connected devices. Local device information includes its system capabilities, management IP address, device ID, port ID, and so on. The device stores the device information in LLDPDUs from the LLDP neighbors in a standard MIB. For more information about MIBs, see Network Management and Monitoring Configuration Guide. LLDP enables a network management system to quickly detect and identify Layer 2 network topology changes.
Basic concepts
LLDP agent
An LLDP agent is a mapping of an entity where LLDP runs. Multiple LLDP agents can run on the same interface.
LLDP agents are divided into the following types:
· Nearest bridge agent.
· Nearest customer bridge agent.
· Nearest non-TPMR bridge agent.
A Two-port MAC Relay (TPMR) is a type of bridge that has only two externally-accessible bridge ports. It supports a subset of the features of a MAC bridge. A TPMR is transparent to all frame-based media-independent protocols except for the following protocols:
· Protocols destined to it.
· Protocols destined to reserved MAC addresses that the relay feature of the TPMR is configured not to forward.
LLDP exchanges packets between neighbor agents and creates and maintains neighbor information for them. Figure 1 shows the neighbor relationships for these LLDP agents. LLDP has two bridge modes: customer bridge (CB) and service bridge (SB).
Figure 1 LLDP neighbor relationships
LLDP frame formats
LLDP sends device information in LLDP frames. LLDP frames are encapsulated in Ethernet II or Subnetwork Access Protocol (SNAP) frames.
· LLDP frame encapsulated in Ethernet II
Figure 2 Ethernet II-encapsulated LLDP frame
Table 1 Fields in an Ethernet II-encapsulated LLDP frame
Field |
Description |
Destination MAC address |
MAC address to which the LLDP frame is advertised. LLDP specifies different multicast MAC addresses as destination MAC addresses for LLDP frames destined for agents of different types. This helps distinguish between LLDP frames sent and received by different agent types on the same interface. The destination MAC address is fixed to one of the following multicast MAC addresses: · 0x0180-C200-000E for LLDP frames destined for nearest bridge agents. · 0x0180-C200-0000 for LLDP frames destined for nearest customer bridge agents. · 0x0180-C200-0003 for LLDP frames destined for nearest non-TPMR bridge agents. |
Source MAC address |
MAC address of the sending port. |
Type |
Ethernet type for the upper-layer protocol. This field is 0x88CC for LLDP. |
Data |
LLDPDU. |
FCS |
Frame check sequence, a 32-bit CRC value used to determine the validity of the received Ethernet frame. |
· LLDP frame encapsulated in SNAP
Figure 3 SNAP-encapsulated LLDP frame
Table 2 Fields in a SNAP-encapsulated LLDP frame
Field |
Description |
Destination MAC address |
MAC address to which the LLDP frame is advertised. It is the same as that for Ethernet II-encapsulated LLDP frames. |
Source MAC address |
MAC address of the sending port. |
Type |
SNAP type for the upper-layer protocol. This field is 0xAAAA-0300-0000-88CC for LLDP. |
Data |
LLDPDU. |
FCS |
Frame check sequence, a 32-bit CRC value used to determine the validity of the received Ethernet frame. |
LLDPDUs
LLDP uses LLDPDUs to exchange information. An LLDPDU comprises multiple TLVs. Each TLV carries a type of device information, as shown in Figure 4.
Figure 4 LLDPDU encapsulation format
An LLDPDU can carry up to 32 types of TLVs. Mandatory TLVs include Chassis ID TLV, Port ID TLV, and Time to Live TLV. Other TLVs are optional.
TLVs
A TLV is an information element that contains the type, length, and value fields.
LLDPDU TLVs include the following categories:
· Basic management TLVs
· Organizationally (IEEE 802.1 and IEEE 802.3) specific TLVs
· LLDP-MED (media endpoint discovery) TLVs
Basic management TLVs are essential to device management.
Organizationally specific TLVs and LLDP-MED TLVs are used for enhanced device management. They are defined by standardization or other organizations and are optional for LLDPDUs.
· Basic management TLVs
Table 3 lists the basic management TLV types. Some of them are mandatory for LLDPDUs.
Type |
Description |
Remarks |
Chassis ID |
Specifies the bridge MAC address of the sending device. |
Mandatory. |
Port ID |
Specifies the ID of the sending port: · If the LLDPDU carries LLDP-MED TLVs, the port ID TLV carries the MAC address of the sending port. · Otherwise, the port ID TLV carries the port name. |
|
Time to Live |
Specifies the life of the transmitted information on the receiving device. |
|
End of LLDPDU |
Marks the end of the TLV sequence in the LLDPDU. |
Optional. |
Port Description |
Specifies the description for the sending port. |
|
System Name |
Specifies the assigned name of the sending device. |
|
System Description |
Specifies the description for the sending device. |
|
System Capabilities |
Identifies the primary features of the sending device and the enabled primary features. |
|
Management Address |
Specifies the following elements: · The management address of the local device. · The interface number and object identifier (OID) associated with the address. |
· IEEE 802.1 organizationally specific TLVs
Table 4 IEEE 802.1 organizationally specific TLVs
Type |
Description |
Port VLAN ID (PVID) |
Specifies the port VLAN identifier. |
Port And Protocol VLAN ID (PPVID) |
Indicates whether the device supports protocol VLANs and, if so, what VLAN IDs these protocols will be associated with. |
VLAN Name |
Specifies the textual name of any VLAN to which the port belongs. |
Protocol Identity |
Indicates protocols supported on the port. |
Link Aggregation |
Indicates whether the port supports link aggregation, and if yes, whether link aggregation is enabled. |
Management VID |
Management VLAN ID. |
VID Usage Digest |
VLAN ID usage digest. |
ETS Configuration |
Enhanced Transmission Selection configuration. |
ETS Recommendation |
ETS recommendation. |
PFC |
Priority-based Flow Control. |
APP |
Application protocol. |
|
NOTE: · H3C devices support only receiving protocol identity TLVs and VID usage digest TLVs. · Layer 3 Ethernet ports support only link aggregation TLVs. |
· IEEE 802.3 organizationally specific TLVs
Table 5 IEEE 802.3 organizationally specific TLVs
Type |
Description |
MAC/PHY Configuration/Status |
Contains the bit-rate and duplex capabilities of the port, support for autonegotiation, enabling status of autonegotiation, and the current rate and duplex mode. |
Power Via MDI |
Contains the power supply capabilities of the port: · Port class (PSE or PD). · Power supply mode. · Whether PSE power supply is supported. · Whether PSE power supply is enabled. · Whether pair selection can be controlled. · Power supply type. · Power source. · Power priority. · PD requested power. · PSE allocated power. |
Maximum Frame Size |
Indicates the supported maximum frame size. |
Power Stateful Control |
Indicates the power state control configured on the sending port, including the following: · Power supply mode of the PSE/PD. · PSE/PD priority. · PSE/PD power. |
Energy-Efficient Ethernet |
Indicates Energy Efficient Ethernet (EEE). |
|
NOTE: The Power Stateful Control TLV is defined in IEEE P802.3at D1.0 and is not supported in later versions. H3C devices send this type of TLVs only after receiving them. |
· LLDP-MED TLVs
LLDP-MED TLVs provide multiple advanced applications for voice over IP (VoIP), such as basic configuration, network policy configuration, and address and directory management. LLDP-MED TLVs provide a cost-effective and easy-to-use solution for deploying voice devices in Ethernet. LLDP-MED TLVs are shown in Table 6.
Type |
Description |
LLDP-MED Capabilities |
Allows a network device to advertise the LLDP-MED TLVs that it supports. |
Network Policy |
Allows a network device or terminal device to advertise the VLAN ID of a port, the VLAN type, and the Layer 2 and Layer 3 priorities for specific applications. |
Extended Power-via-MDI |
Allows a network device or terminal device to advertise power supply capability. This TLV is an extension of the Power Via MDI TLV. |
Hardware Revision |
Allows a terminal device to advertise its hardware version. |
Firmware Revision |
Allows a terminal device to advertise its firmware version. |
Software Revision |
Allows a terminal device to advertise its software version. |
Serial Number |
Allows a terminal device to advertise its serial number. |
Manufacturer Name |
Allows a terminal device to advertise its vendor name. |
Model Name |
Allows a terminal device to advertise its model name. |
Asset ID |
Allows a terminal device to advertise its asset ID. The typical case is that the user specifies the asset ID for the endpoint to facilitate directory management and asset tracking. |
Location Identification |
Allows a network device to advertise the appropriate location identifier information for a terminal device to use in the context of location-based applications. |
|
NOTE: · If the MAC/PHY configuration/status TLV is not advertisable, none of the LLDP-MED TLVs will be advertised even if they are advertisable. · If the LLDP-MED capabilities TLV is not advertisable, the other LLDP-MED TLVs will not be advertised even if they are advertisable. |
Management address
The network management system uses the management address of a device to identify and manage the device for topology maintenance and network management. The management address is encapsulated in the management address TLV.
Working mechanism
LLDP operating modes
An LLDP agent can operate in one of the following modes:
· TxRx mode—An LLDP agent in this mode can send and receive LLDP frames.
· Tx mode—An LLDP agent in this mode can only send LLDP frames.
· Rx mode—An LLDP agent in this mode can only receive LLDP frames.
· Disable mode—An LLDP agent in this mode cannot send or receive LLDP frames.
Each time the LLDP operating mode of an LLDP agent changes, its LLDP protocol state machine reinitializes. A configurable reinitialization delay prevents frequent initializations caused by frequent changes to the operating mode. If you configure the reinitialization delay, an LLDP agent must wait the specified amount of time to initialize LLDP after the LLDP operating mode changes.
Transmitting LLDP frames
An LLDP agent operating in TxRx mode or Tx mode sends LLDP frames to its directly connected devices both periodically and when the local configuration changes. To prevent LLDP frames from overwhelming the network during times of frequent changes to local device information, LLDP uses the token bucket mechanism to rate limit LLDP frames. For more information about the token bucket mechanism, see ACL and QoS Configuration Guide.
LLDP automatically enables the fast LLDP frame transmission mechanism in either of the following cases:
· A new LLDP frame is received and carries device information new to the local device.
· The LLDP operating mode of the LLDP agent changes from Disable or Rx to TxRx or Tx.
The fast LLDP frame transmission mechanism successively sends the specified number of LLDP frames at a configurable fast LLDP frame transmission interval. The mechanism helps LLDP neighbors discover the local device as soon as possible. Then, the normal LLDP frame transmission interval resumes.
Receiving LLDP frames
An LLDP agent operating in TxRx mode or Rx mode confirms the validity of TLVs carried in every received LLDP frame. If the TLVs are valid, the LLDP agent saves the information and starts an aging timer. The initial value of the aging timer is equal to the TTL value in the Time To Live TLV carried in the LLDP frame. When the LLDP agent receives a new LLDP frame, the aging timer restarts. When the aging timer decreases to zero, all saved information ages out.
Protocols and standards
· 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
· DCB Capability Exchange Protocol Specification Rev 1.00
· DCB Capability Exchange Protocol Base Specification Rev 1.01
· 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
Feature and hardware compatibility
LLDP configuration task list
Tasks at a glance |
Performing basic LLDP configurations: · (Required.) Enabling LLDP · (Optional.) Setting the LLDP bridge mode · (Optional.) Setting the LLDP operating mode · (Optional.) Setting the LLDP reinitialization delay · (Optional.) Enabling LLDP polling · (Optional.) Configuring the advertisable TLVs · (Optional.) Configuring the management address and its encoding format · (Optional.) Setting other LLDP parameters · (Optional.) Setting an encapsulation format for LLDP frames · (Optional.) Disabling LLDP PVID inconsistency check |
(Optional.) Enabling the device to generate ARP or ND entries for received management address LLDP TLVs |
Performing basic LLDP configurations
Enabling LLDP
To make LLDP take effect on specific ports, you must enable LLDP both globally and on these ports.
To use LLDP together with OpenFlow, you must enable LLDP globally on OpenFlow switches. As a best practice to prevent LLDP from affecting topology discovery of OpenFlow controllers, disable LLDP on ports of OpenFlow instances. For more information about OpenFlow, see OpenFlow Configuration Guide.
To enable LLDP:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enable LLDP globally. |
lldp global enable |
By default, LLDP is disabled globally. |
3. Enter Layer 2/Layer 3 Ethernet interface view, management Ethernet interface view, Layer 2/Layer 3 aggregate interface view, synchronous/asynchronous serial interface view, standard POS interface view, or POS channel interface view. |
interface interface-type interface-number |
N/A |
4. Enable LLDP. |
lldp enable |
By default, LLDP is enabled on a port. |
Setting the LLDP bridge mode
The following LLDP bridge modes are available:
· Customer bridge mode—LLDP supports nearest bridge agents, nearest non-TPMR bridge agents, and nearest customer bridge agents. LLDP processes the LLDP frames with destination MAC addresses for these agents and transparently transmits the LLDP frames with other destination MAC addresses in the VLAN.
· Service bridge mode—LLDP supports nearest bridge agents and nearest non-TPMR bridge agents. LLDP processes the LLDP frames with destination MAC addresses for these agents and transparently transmits the LLDP frames with other destination MAC addresses in the VLAN.
To set the LLDP bridge mode:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Set the LLDP bridge mode to service bridge. |
lldp mode service-bridge |
By default, LLDP operates in customer bridge mode. |
Setting the LLDP operating mode
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enter Layer 2/Layer 3 Ethernet interface view, management Ethernet interface view, Layer 2/Layer 3 aggregate interface view, synchronous/asynchronous serial interface view, standard POS interface view, or POS channel interface view. |
interface interface-type interface-number |
N/A |
3. Set the LLDP operating mode. |
· In Layer 2/Layer 3 Ethernet interface
view or management Ethernet interface view: · In Layer 2/Layer 3 aggregate interface view: · In synchronous/asynchronous serial interface
view, standard POS interface view, or POS channel interface view: |
By default: · The nearest bridge agent operates in txrx mode. · The nearest customer bridge agent and nearest non-TPMR bridge agent operate in disable mode. In Ethernet interface view, if you do not specify an agent type, the command sets the operating mode for nearest bridge agents. In aggregate interface view, you can set the operating mode only for nearest customer bridge agents and nearest non-TPMR bridge agents. In synchronous/asynchronous serial interface view, standard POS interface view, or POS channel interface view, you can set the operating mode only for nearest bridge agents. |
Setting the LLDP reinitialization delay
When the LLDP operating mode changes on a port, the port initializes the protocol state machines after an LLDP reinitialization delay. By adjusting the delay, you can avoid frequent initializations caused by frequent changes to the LLDP operating mode on a port.
To set the LLDP reinitialization delay for ports:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Set the LLDP reinitialization delay. |
lldp timer reinit-delay delay |
The default setting is 2 seconds. |
Enabling LLDP polling
With LLDP polling enabled, a device periodically searches for local configuration changes. When the device detects a configuration change, it sends LLDP frames to inform neighboring devices of the change.
To enable LLDP polling:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enter Layer 2/Layer 3 Ethernet interface view, management Ethernet interface view, Layer 2/Layer 3 aggregate interface view, synchronous/asynchronous serial interface view, standard POS interface view, or POS channel interface view. |
interface interface-type interface-number |
N/A |
3. Enable LLDP polling and set the polling interval. |
· In Layer 2/Layer 3 Ethernet interface
view or management Ethernet interface view: · In Layer 2/Layer 3 aggregate interface view: · In synchronous/asynchronous serial
interface view, standard POS interface view, or POS channel interface view: |
By default, LLDP polling is disabled. |
Configuring the advertisable TLVs
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enter Layer 2/Layer 3 Ethernet interface view, management Ethernet interface view, Layer 2/Layer 3 aggregate interface view, synchronous/asynchronous serial interface view, standard POS interface view, or POS channel interface view. |
interface interface-type interface-number |
N/A |
3. Configure the advertisable TLVs (in Layer 2 Ethernet interface view). |
· lldp tlv-enable { basic-tlv { all | port-description | system-capability | system-description | system-name | management-address-tlv [ ipv6 ] [ ip-address ] } | dot1-tlv { all | port-vlan-id | link-aggregation | protocol-vlan-id [ vlan-id ] | vlan-name [ vlan-id ] | management-vid [ mvlan-id ] } | dot3-tlv { all | mac-physic | max-frame-size | power } | med-tlv { all | capability | inventory | network-policy [ vlan-id ] | power-over-ethernet | location-id { civic-address device-type country-code { ca-type ca-value }&<1-10> | elin-address tel-number } } } · lldp agent nearest-nontpmr tlv-enable { basic-tlv { all | port-description | system-capability | system-description | system-name | management-address-tlv [ ipv6 ] [ ip-address ] } | dot1-tlv { all | port-vlan-id | link-aggregation } } · lldp agent nearest-customer tlv-enable { basic-tlv { all | port-description | system-capability | system-description | system-name | management-address-tlv [ ipv6 ] [ ip-address ] } | dot1-tlv { all | port-vlan-id | link-aggregation } } |
By default: · Nearest bridge agents can advertise all LLDP TLVs except the DCBX, location identification, port and protocol VLAN ID, VLAN name, and management VLAN ID TLVs. · Nearest non-TPMR bridge agents do not advertise TLVs. · Nearest customer bridge agents can advertise basic TLVs and the following IEEE 802.1 organizationally specific TLVs: ? Port VLAN ID TLVs. ? Link Aggregation TLVs. |
4. Configure the advertisable TLVs (in Layer 3 Ethernet interface view). |
· lldp tlv-enable { basic-tlv { all | port-description | system-capability | system-description | system-name | management-address-tlv [ ipv6 ] [ ip-address | interface loopback interface-number ] } | dot1-tlv { all | link-aggregation } | dot3-tlv { all | link-aggregation | mac-physic | max-frame-size | power } | med-tlv { all | capability | inventory | power-over-ethernet | location-id { civic-address device-type country-code { ca-type ca-value }&<1-10> | elin-address tel-number } } } · lldp agent { nearest-nontpmr | nearest-customer } tlv-enable { basic-tlv { all | port-description | system-capability | system-description | system-name | management-address-tlv [ ipv6 ] [ ip-address ] } | dot1-tlv { all | link-aggregation } } |
By default: · Nearest bridge agents can advertise all types of LLDP TLVs (only link aggregation TLV is supported in 802.1 organizationally specific TLVs) except network policy and location identification TLVs. · Nearest non-TPMR bridge agents do not advertise TLVs. · Nearest customer bridge agents can advertise basic TLVs and IEEE 802.1 organizationally specific TLVs (only link aggregation TLV is supported). |
5. Configure the advertisable TLVs (in management Ethernet interface view). |
· lldp tlv-enable { basic-tlv { all | port-description | system-capability | system-description | system-name | management-address-tlv [ ipv6 ] [ ip-address ] } | dot1-tlv { all | link-aggregation } | dot3-tlv { all | mac-physic | max-frame-size | power } | med-tlv { all | capability | inventory | power-over-ethernet | location-id { civic-address device-type country-code { ca-type ca-value }&<1-10> | elin-address tel-number } } } · lldp agent { nearest-nontpmr | nearest-customer } tlv-enable { basic-tlv { all | port-description | system-capability | system-description | system-name | management-address-tlv [ ipv6 ] [ ip-address ] } | dot1-tlv { all | link-aggregation } } |
By default: · Nearest bridge agents can advertise all types of LLDP TLVs (only link aggregation TLV is supported in 802.1 organizationally specific TLVs) except network policy and Location Identification TLVs. · Nearest non-TPMR bridge agents do not advertise TLVs. · Nearest customer bridge agents can advertise basic TLVs and IEEE 802.1 organizationally specific TLVs (only link aggregation TLV is supported). |
6. Configure the advertisable TLVs (in Layer 2 aggregate interface view). |
· lldp agent nearest-nontpmr tlv-enable { basic-tlv { all | management-address-tlv [ ipv6 ] [ ip-address ] | port-description | system-capability | system-description | system-name } | dot1-tlv { all | port-vlan-id } } · lldp agent nearest-customer tlv-enable { basic-tlv { all | management-address-tlv [ ipv6 ] [ ip-address ] | port-description | system-capability | system-description | system-name } | dot1-tlv { all | port-vlan-id } } · lldp tlv-enable dot1-tlv { protocol-vlan-id [ vlan-id ] | vlan-name [ vlan-id ] | management-vid [ mvlan-id ] } |
By default: · Nearest non-TPMR bridge agents do not advertise TLVs. · Nearest customer bridge agents can advertise basic TLVs and IEEE 802.1 organizationally specific TLVs (only the port VLAN ID TLVs are supported). Nearest bridge agents are not supported on Layer 2 aggregate interfaces. |
7. Configure the advertisable TLVs (in Layer 3 aggregate interface view). |
lldp agent { nearest-nontpmr | nearest-customer } tlv-enable basic-tlv { all | management-address-tlv [ ipv6 ] [ ip-address ] | port-description | system-capability | system-description | system-name } |
By default: · Nearest non-TPMR bridge agents do not advertise TLVs. · Nearest customer bridge agents can advertise only basic TLVs. Nearest bridge agents are not supported on Layer 3 aggregate interfaces. |
8. Configure the advertisable TLVs (in synchronous/asynchronous serial interface view, standard POS interface view, or POS channel interface view). |
By default, nearest bridge agents can advertise all types of LLDP TLVs. Nearest customer bridge agents and nearest non-TPMR bridge agents are not supported. |
Configuring the management address and its encoding format
LLDP encodes management addresses in numeric or string format in management address TLVs.
If a neighbor encodes its management address in string format, set the encoding format of the management address to string on the connecting port. This guarantees normal communication with the neighbor.
To configure a management address to be advertised and its encoding format on a port:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enter Layer 2/Layer 3 Ethernet interface view, management Ethernet interface view, Layer 2/Layer 3 aggregate interface view, synchronous/asynchronous serial interface view, standard POS interface view, or POS channel interface view. |
interface interface-type interface-number |
N/A |
3. Allow LLDP to advertise the management address in LLDP frames and configure the advertised management address. |
· In Layer 2 Ethernet interface view or management
Ethernet interface view: · In Layer 3 Ethernet interface view: · In Layer 2/Layer 3 aggregate interface view: · In synchronous/asynchronous serial interface
view, standard POS interface view, or POS channel interface view: |
By default: · Nearest bridge agents and nearest customer bridge agents can advertise the management address in LLDP frames. · Nearest non-TPMR bridge agents cannot advertise the management address in LLDP frames. |
4. Set the encoding format of the management address to string. |
· In Layer 2/Layer 3 Ethernet interface
view or management Ethernet interface view: · In Layer 2/Layer 3 aggregate interface
view: · In synchronous/asynchronous serial
interface view, standard POS interface view, or POS channel interface view: |
By default, the encoding format of the management address is numeric. |
Setting other LLDP parameters
The Time to Live TLV carried in an LLDPDU determines how long the device information carried in the LLDPDU can be saved on a recipient device.
By setting the TTL multiplier, you can configure the TTL of locally sent LLDPDUs. The TTL is expressed by using the following formula:
TTL = Min (65535, (TTL multiplier × LLDP frame transmission interval + 1))
As the expression shows, the TTL can be up to 65535 seconds. TTLs greater than 65535 will be rounded down to 65535 seconds.
To set LLDP parameters:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Set the TTL multiplier. |
lldp hold-multiplier value |
The default setting is 4. |
3. Set the LLDP frame transmission interval. |
lldp timer tx-interval interval |
The default setting is 30 seconds. |
4. Set the token bucket size for sending LLDP frames. |
lldp max-credit credit-value |
The default setting is 5. |
5. Set the number of LLDP frames sent each time fast LLDP frame transmission is triggered. |
lldp fast-count count |
The default setting is 4. |
6. Set the fast LLDP frame transmission interval. |
lldp timer fast-interval interval |
The default setting is 1 second. |
Setting an encapsulation format for LLDP frames
LLDP frames can be encapsulated in the following formats:
· Ethernet II—With Ethernet II encapsulation configured, an LLDP port sends LLDP frames in Ethernet II frames.
· SNAP—With SNAP encapsulation configured, an LLDP port sends LLDP frames in SNAP frames.
Earlier versions of LLDP require the same encapsulation format on both ends to process LLDP frames. To successfully communicate with a neighboring device running an earlier version of LLDP, the local device must be set with the same encapsulation format.
To set the encapsulation format for LLDP frames to SNAP:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enter Layer 2/Layer 3 Ethernet interface view, management Ethernet interface view, Layer 2/Layer 3 aggregate interface view, synchronous/asynchronous serial interface view, standard POS interface view, or POS channel interface view. |
interface interface-type interface-number |
N/A |
3. Set the encapsulation format for LLDP frames to SNAP. |
· In Layer 2/Layer 3 Ethernet interface
view or management Ethernet interface view: · In Layer 2/Layer 3 aggregate interface view: · In synchronous/asynchronous serial interface
view, standard POS interface view, or POS channel interface view: |
By default, Ethernet II encapsulation format applies. |
Disabling LLDP PVID inconsistency check
By default, when the system receives an LLDP packet, it compares the PVID value contained in packet with the PVID configured on the receiving interface. If the two PVIDs do not match, a log message will be printed to notify the user.
You can disable PVID inconsistency check if different PVIDs are required on a link.
To disable LLDP PVID inconsistency check:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Disable LLDP PVID inconsistency check. |
lldp ignore-pvid-inconsistency |
By default, LLDP PVID inconsistency check is enabled. |
Configuring LLDP trapping and LLDP-MED trapping
LLDP trapping or LLDP-MED trapping notifies the network management system of events such as newly detected neighboring devices and link failures.
To prevent excessive LLDP traps from being sent when the topology is unstable, set a trap transmission interval for LLDP.
To configure LLDP trapping and LLDP-MED trapping:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enter Layer 2/Layer 3 Ethernet interface view, management Ethernet interface view, Layer 2/Layer 3 aggregate interface view, synchronous/asynchronous serial interface view, standard POS interface view, or POS channel interface view. |
interface interface-type interface-number |
N/A |
3. Enable LLDP trapping. |
· In Layer 2/Layer 3 Ethernet interface
view or management Ethernet interface view: · In Layer 2/Layer 3 aggregate interface
view: · In synchronous/asynchronous serial interface
view, standard POS interface view, or POS channel interface view: |
By default, LLDP trapping is disabled. |
4. Enable LLDP-MED trapping (in Layer 2/Layer 3 Ethernet interface view or management Ethernet interface view). |
lldp notification med-topology-change enable |
By default, LLDP-MED trapping is disabled. |
5. Return to system view. |
quit |
N/A |
6. (Optional.) Set the LLDP trap transmission interval. |
lldp timer notification-interval interval |
The default setting is 30 seconds. |
Setting the source MAC address of LLDP frames to the MAC address of the subinterface associated with the specified VLAN
This feature allows you to configure the source MAC address of LLDP frames as the MAC address of the Layer 3 Ethernet subinterface associated with the specified VLAN in Dot1q termination. For more information about Dot1q termination, see "Configuring VLAN termination."
To set the source MAC address of LLDP frames to the MAC address of the Layer 3 Ethernet subinterface associated with the specified VLAN:
Command |
Remarks |
|
1. Enter system view. |
N/A |
|
N/A |
||
3. Set the source MAC address of LLDP frames to the MAC address of the Layer 3 Ethernet subinterface associated with the specified VLAN. |
By default, the source MAC address of LLDP frames is the MAC address of the port. vlan-id specifies the VLAN ID associated with a Layer 3 Ethernet subinterface in Dot1q termination. |
Enabling the device to generate ARP or ND entries for received management address LLDP TLVs
This feature enables the device to generate an ARP or ND entry for a received LLDP frame that carries a a management address TLV. The ARP or ND entry contains the management address and the source MAC address of the frame.
You can enable the device to generate both ARP and ND entries. If the management address TLV contains an IPv4 address, the device generates an ARP entry. If the management address TLV contains an IPv6 address, the device generates an ND entry.
To enable the device to generate an ARP or ND entry for a received management address LLDP TLV:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enter Layer 3 Ethernet interface view. |
interface interface-type interface-number |
N/A |
3. Enable the device to generate an ARP or ND entry for a management address LLDP TLV received on the interface. |
lldp management-address { arp-learning | nd-learning } [ vlan vlan-id ] |
By default, the device does not generate an ARP or ND entry when receiving a management address LLDP TLV. Include the vlan vlan-id option to generate the ARP or ND entry for the Layer 3 Ethernet subinterface associated with the specified VLAN ID in Dot1q termination. |
Displaying and maintaining LLDP
Execute display commands in any view.
Command |
|
Display local LLDP information. |
display lldp local-information [ global | interface interface-type interface-number ] |
Display the information contained in the LLDP TLVs sent from neighboring devices. |
display lldp neighbor-information [ [ [ interface interface-type interface-number ] [ agent { nearest-bridge | nearest-customer | nearest-nontpmr } ] [ verbose ] ] | list [ system-name system-name ] ] |
Display LLDP statistics. |
display lldp statistics [ global | [ interface interface-type interface-number ] [ agent { nearest-bridge | nearest-customer | nearest-nontpmr } ] ] |
Display LLDP status of a port. |
display lldp status [ interface interface-type interface-number ] [ agent { nearest-bridge | nearest-customer | nearest-nontpmr } ] |
Display types of advertisable optional LLDP TLVs. |
display lldp tlv-config [ interface interface-type interface-number ] [ agent { nearest-bridge | nearest-customer | nearest-nontpmr } ] |
LLDP configuration examples
Basic LLDP configuration example
Network requirements
As shown in Figure 5, enable LLDP globally on Device A and Device B to perform the following tasks:
· Monitor the link between Device A and Device B on the NMS.
· Monitor the link between Device A and the MED device on the NMS.
Configuration procedure
1. Configure Device A:
# Enable LLDP globally.
<DeviceA> system-view
[DeviceA] lldp global enable
# Enable LLDP on GigabitEthernet 2/1/1. By default, LLDP is enabled on ports.
[DeviceA] interface gigabitethernet 2/1/1
[DeviceA-GigabitEthernet2/1/1] lldp enable
# Set the LLDP operating mode to Rx on GigabitEthernet 2/1/1.
[DeviceA-GigabitEthernet2/1/1] lldp admin-status rx
[DeviceA-GigabitEthernet2/1/1] quit
# Enable LLDP on GigabitEthernet 2/1/2. By default, LLDP is enabled on ports.
[DeviceA] interface gigabitethernet2/1/2
[DeviceA-GigabitEthernet2/1/2] lldp enable
# Set the LLDP operating mode to Rx on GigabitEthernet 2/1/2.
[DeviceA-GigabitEthernet2/1/2] lldp admin-status rx
[DeviceA-GigabitEthernet2/1/2] quit
2. Configure Device B:
# Enable LLDP globally.
<DeviceB> system-view
[DeviceB] lldp global enable
# Enable LLDP on GigabitEthernet 2/1/1. By default, LLDP is enabled on ports.
[DeviceB] interface gigabitethernet 2/1/1
[DeviceB-GigabitEthernet2/1/1] lldp enable
# Set the LLDP operating mode to Tx on GigabitEthernet 2/1/1.
[DeviceB-GigabitEthernet2/1/1] lldp admin-status tx
[DeviceB-GigabitEthernet2/1/1] quit
Verifying the configuration
# Verify the following items:
· GigabitEthernet 2/1/1 of Device A connects to a MED device.
· GigabitEthernet 2/1/2 of Device A connects to a non-MED device.
· Both ports operate in Rx mode, and they can receive LLDP frames but cannot send LLDP frames.
[DeviceA] display lldp status
Global status of LLDP: Enable
Bridge mode of LLDP: customer-bridge
The current number of LLDP neighbors: 2
The current number of CDP neighbors: 0
LLDP neighbor information last changed time: 0 days, 0 hours, 4 minutes, 40 seconds
Transmit interval : 30s
Fast transmit interval : 1s
Transmit credit max : 5
Hold multiplier : 4
Reinit delay : 2s
Trap interval : 30s
Fast start times : 4
LLDP status information of port 1 [GigabitEthernet2/1/1]:
LLDP agent nearest-bridge:
Port status of LLDP : Enable
Admin status : Rx_Only
Trap flag : No
MED trap flag : No
Polling interval : 0s
Number of LLDP neighbors : 1
Number of MED neighbors : 1
Number of CDP neighbors : 0
Number of sent optional TLV : 21
Number of received unknown TLV : 0
LLDP agent nearest-customer:
Port status of LLDP : Enable
Admin status : Disable
Trap flag : No
MED trap flag : No
Polling interval : 0s
Number of LLDP neighbors : 0
Number of MED neighbors : 0
Number of CDP neighbors : 0
Number of sent optional TLV : 16
Number of received unknown TLV : 0
LLDP status information of port 2 [GigabitEthernet2/1/2]:
LLDP agent nearest-bridge:
Port status of LLDP : Enable
Admin status : Rx_Only
Trap flag : No
MED trap flag : No
Polling interval : 0s
Number of LLDP neighbors : 1
Number of MED neighbors : 0
Number of CDP neighbors : 0
Number of sent optional TLV : 21
Number of received unknown TLV : 3
LLDP agent nearest-nontpmr:
Port status of LLDP : Enable
Admin status : Disable
Trap flag : No
MED trap flag : No
Polling interval : 0s
Number of LLDP neighbors : 0
Number of MED neighbors : 0
Number of CDP neighbors : 0
Number of sent optional TLV : 1
Number of received unknown TLV : 0
LLDP agent nearest-customer:
Port status of LLDP : Enable
Admin status : Disable
Trap flag : No
MED trap flag : No
Polling interval : 0s
Number of LLDP neighbors : 0
Number of MED neighbors : 0
Number of CDP neighbors : 0
Number of sent optional TLV : 16
Number of received unknown TLV : 0
# Remove the link between Device A and Device B.
# Verify that GigabitEthernet 2/1/2 of Device A does not connect to any neighboring devices.
[DeviceA] display lldp status
Global status of LLDP: Enable
The current number of LLDP neighbors: 1
The current number of CDP neighbors: 0
LLDP neighbor information last changed time: 0 days, 0 hours, 5 minutes, 20 seconds
Transmit interval : 30s
Fast transmit interval : 1s
Transmit credit max : 5
Hold multiplier : 4
Reinit delay : 2s
Trap interval : 30s
Fast start times : 4
LLDP status information of port 1 [GigabitEthernet2/1/1]:
LLDP agent nearest-bridge:
Port status of LLDP : Enable
Admin status : Rx_Only
Trap flag : No
MED trap flag : No
Polling interval : 0s
Number of LLDP neighbors : 1
Number of MED neighbors : 1
Number of CDP neighbors : 0
Number of sent optional TLV : 0
Number of received unknown TLV : 5
LLDP agent nearest-nontpmr:
Port status of LLDP : Enable
Admin status : Disable
Trap flag : No
MED trap flag : No
Polling interval : 0s
Number of LLDP neighbors : 0
Number of MED neighbors : 0
Number of CDP neighbors : 0
Number of sent optional TLV : 1
Number of received unknown TLV : 0
LLDP status information of port 2 [GigabitEthernet2/1/2]:
LLDP agent nearest-bridge:
Port status of LLDP : Enable
Admin status : Rx_Only
Trap flag : No
MED trap flag : No
Polling interval : 0s
Number of LLDP neighbors : 0
Number of MED neighbors : 0
Number of CDP neighbors : 0
Number of sent optional TLV : 0
Number of received unknown TLV : 0
LLDP agent nearest-nontpmr:
Port status of LLDP : Enable
Admin status : Disable
Trap flag : No
MED trap flag : No
Polling interval : 0s
Number of LLDP neighbors : 0
Number of MED neighbors : 0
Number of CDP neighbors : 0
Number of sent optional TLV : 1
Number of received unknown TLV : 0
LLDP agent nearest-customer:
Port status of LLDP : Enable
Admin status : Disable
Trap flag : No
MED trap flag : No
Polling interval : 0s
Number of LLDP neighbors : 0
Number of MED neighbors : 0
Number of CDP neighbors : 0
Number of sent optional TLV : 16
Number of received unknown TLV : 0