01-Access Volume

06-LLDP Configuration

Chapters Download  (157.59 KB)

06-LLDP Configuration


When configuring LLDP, go to these sections for information you are interested in:

l          Overview

l          LLDP Configuration Task List

l          Performing Basic LLDP Configuration

l          Configuring LLDP Trapping

l          Displaying and Maintaining LLDP

l          LLDP Configuration Examples

Overview

Background

In a heterogeneous network, it is important that different types of network devices from different vendors can discover one other and exchange configuration for interoperability and management sake. This calls for a standard configuration exchange platform.

To address the needs, the IETF drafted the Link Layer Discovery Protocol (LLDP) 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 (including its major functions, management IP address, device ID, and port ID) as TLV (type, length, and value) triplets in LLDPDUs to the directly connected devices, and at the same time, stores the device information received in LLDPDUs sent from the LLDP neighbors in a standard management information base (MIB). It allows a network management system to fast detect Layer-2 network topology change and identify what the change is.

 

For more information about MIBs, refer to SNMP Configuration in the System Volume.

 

Basic Concepts

LLDP frames

LLDP sends device information in LLDP data units (LLDPDUs). LLDPDUs are encapsulated in Ethernet II or SNAP frames.

1)        Ethernet II-encapsulated LLDP frame format

Figure 1-1 Ethernet II-encapsulated LLDP frame format

 

The fields in the frame are described in Table 1-1:

Table 1-1 Description of the fields in an Ethernet II-encapsulated LLDP frame

Field

Description

Destination MAC address

The MAC address to which the LLDPDU is advertised. It is fixed to 0x0180-C200-000E, a multicast MAC address.

Source MAC address

The MAC address of the sending port. If the port does not have a MAC address, the MAC address of the sending bridge is used.

Type

The Ethernet type for the upper layer protocol. It is 0x88CC for LLDP.

Data

LLDP data unit (LLDPDU).

FCS

Frame check sequence, a 32-bit CRC value used to determine the validity of the received Ethernet frame.

 

2)        SNAP-encapsulated LLDP frame format

Figure 1-2 SNAP-encapsulated LLDP frame format

 

The fields in the frame are described in Table 1-2:

Table 1-2 Description of the fields in a SNAP-encapsulated LLDP frame

Field

Description

Destination MAC address

The MAC address to which the LLDPDU is advertised. It is fixed to 0x0180-C200-000E, a multicast MAC address.

Source MAC address

The MAC address of the sending port. If the port does not have a MAC address, the MAC address of the sending bridge is used.

Type

The SNAP type for the upper layer protocol. It 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 type, length, and value (TLV) sequences, each carrying a type of device information, as shown in Figure 1-3.

Figure 1-3 An LLDPDU

 

An LLDPDU can carry up to 28 types of TLVs, of which the chassis ID TLV, port ID TLV, TTL TLV, and end of LLDPDU TLV (end TLV in the figure) are mandatory TLVs that must be carried and other TLVs are optional.

TLVs

TLVs are type, length, and value sequences that carry information elements, where the type field identifies the type of information, the length field indicates the length of the information field in octets, and the value field contains the information itself.

LLDPDU TLVs fall into these categories: basic management TLVs, organizationally (IEEE 802.1 and IEEE 802.3) specific TLVs, and 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 thus are optional to LLDPDUs.

1)        Basic management TLVs

Table 1-1 lists the basic management TLV types currently in use. Some of them are mandatory to LLDPDUs, that is, must be included in every LLDPDU.

Table 1-3 Basic LLDP TLVs

Type

Description

Remarks

Chassis ID

Bridge MAC address of the sending device.

Mandatory

Port ID

ID of the sending port.

If MED TLVs are included in the LLDPDU, the port ID TLV carries the MAC address of the sending port or the bridge MAC in case the port does not have a MAC address. If no MED TLVs are included, the port ID TLV carries the port name.

Time To Live

Life of the transmitted information on the receiving device.

End of LLDPDU

Marks the end of the TLV sequence in the LLDPDU.

Port Description

Port description of the sending port.

Optional

System Name

Assigned name of the sending device.

System Description

Description of the sending device.

System Capabilities

Identifies the primary functions of the sending device and the primary functions that have been enabled.

Management Address

Management address used to reach higher level entities to assist discovery by network management, and the interface number and OID (object identifier) associated with the address.

 

2)        IEEE 802.1 organizationally specific TLVs

Table 1-4 IEEE 802.1 organizationally specific TLVs

Type

Description

Port VLAN ID

PVID of the sending port

Port And Protocol VLAN ID

Port and protocol VLAN IDs

VLAN Name

A specific VLAN name on the port

Protocol Identity

Protocols supported on the port

 

Currently, H3C devices support receiving but not sending protocol identity TLVs.

 

3)        IEEE 802.3 organizationally specific TLVs

Table 1-5 IEEE 802.3 organizationally specific TLVs

Type

Description

MAC/PHY Configuration/Status

Contains the rate and duplex capabilities of the sending port, support for auto negotiation, enabling status of auto negotiation, and the current rate and duplex mode.

Power Via MDI

Contains Power supply capability of the port.

Link Aggregation

Indicates the support of the port for link aggregation, the aggregation capability of the port, and the aggregation status (that is, whether the link is in an aggregation).

Maximum Frame Size

Indicates the supported maximum frame size. It is now the MTU of the port.

 

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 satisfy the voice device vendors’ requirements for cost effectiveness, ease of deployment, and ease of management. In addition, LLDP-MED TLVs make deploying voice devices in Ethernet easier. LLDP-MED TLVs are shown in Table 1-6:

Table 1-6 LLDP-MED TLVs

Type

Description

LLDP-MED Capabilities

Allows a MED endpoint to advertise the supported LLDP-MED TLVs and its device type.

Network Policy

Allows a network device or MED endpoint to advertise LAN type and VLAN ID of the specific port, and the Layer 2 and Layer 3 priorities for a specific set of applications.

Extended Power-via-MDI

Allows a network device or MED endpoint to advertise power-related information (according to IEEE 802.3AF).

Hardware Revision

Allows a MED endpoint device to advertise its hardware version.

Firmware Revision

Allows a MED endpoint to advertise its firmware version.

Software Revision

Allows a MED endpoint to advertise its software version.

Serial Number

Allows an LLDP-MED endpoint device to advertise its serial number.

Manufacturer Name

Allows a MED endpoint to advertise its vendor name.

Model Name

Allows a MED endpoint to advertise its model name.

Asset ID

Allows a MED endpoint 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 an endpoint to use in the context of location-based applications.

 

Management address

The management address of a device is used by the network management system to identify and manage the device for topology maintenance and network management. The management address is encapsulated in the management address TLV.

Operating Modes of LLDP

LLDP can operate in one of the following modes:

l          TxRx mode. A port in this mode sends and receives LLDP frames.

l          Tx mode. A port in this mode only sends LLDP frames.

l          Rx mode. A port in this mode only receives LLDP frames.

l          Disable mode. A port in this mode does not send or receive LLDP frames.

Each time the LLDP operating mode of a port changes, its LLDP protocol state machine re-initializes. To prevent LLDP from being initialized too frequently at times of frequent operating mode change, an initialization delay, which is user configurable, is introduced. With this delay mechanism, a port must wait for the specified interval before it can initialize LLDP after the LLDP operating mode changes.

How LLDP Works

Transmitting LLDP frames

An LLDP-enabled port 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 the network from being overwhelmed by LLDP frames at times of frequent local device information change, an interval is introduced between two successive LLDP frames.

This interval is shortened to 1 second in either of the following two cases:

l          A new neighbor is discovered, that is, a new LLDP frame is received carrying device information new to the local device.

l          The LLDP operating mode of the port changes from Disable/Rx to TxRx or Tx.

This is the fast sending mechanism of LLDP. With this mechanism, a specific number of LLDP frames are sent successively at the 1-second interval to help LLDP neighbors discover the local device as soon as possible. Then, the normal LLDP frame transmit interval resumes.

Receiving LLDP frames

An LLDP-enabled port operating in TxRx mode or Rx mode checks the TLVs carried in every LLDP frame it receives for validity violation. If valid, the information is saved and an aging timer is set for it based on the time to live (TTL) TLV carried in the LLDPDU. If the TTL TLV is zero, the information is aged out immediately.

Protocols and Standards

The protocols and standards related to LLDP include:

l          IEEE 802.1AB-2005, Station and Media Access Control Connectivity Discovery

l          ANSI/TIA-1057, Link Layer Discovery Protocol for Media Endpoint Devices

LLDP Configuration Task List

Complete these tasks to configure LLDP:

Task

Remarks

Performing Basic LLDP Configuration

Enabling LLDP

Required

Setting LLDP Operating Mode

Optional

Setting the LLDP Re-Initialization Delay

Optional

Enable LLDP Polling

Optional

Configuring the TLVs to Be Advertised

Optional

Configuring the Management Address and Its Encoding Format

Optional

Setting the TTL Multiplier

Optional

Configuring the Parameters Concerning LLDPDU Sending

Optional

Configuring the Encapsulation Format for LLDPDUs

Optional

Configuring LLDP Trapping

Optional

 

LLDP-related configurations made in Ethernet interface view takes effect only on the current port, and those made in port group view takes effect on all ports in the current port group.

 

Performing Basic LLDP Configuration

Enabling LLDP

To make LLDP take effect on certain ports, you need to enable LLDP both globally and on these ports.

Follow these steps to enable LLDP:

To do…

Use the command…

Remarks

Enter system view

system-view

Enable LLDP globally

lldp enable

Required

LLDP is disabled globally.

Enter Ethernet interface view or port group view

Enter Ethernet interface view

interface interface-type interface-number

Required

Use either command.

Enter port group view

port-group manual port-group-name

Enable LLDP

lldp enable

Optional

By default, LLDP is enabled on a port.

 

Setting LLDP Operating Mode

LLDP can operate in one of the following modes.

l          TxRx mode. A port in this mode sends and receives LLDPDUs.

l          Tx mode. A port in this mode only sends LLDPDUs.

l          Rx mode. A port in this mode only receives LLDPDUs.

l          Disable mode. A port in this mode does not send or receive LLDPDUs.

Follow these steps to set LLDP operating mode:

To do…

Use the command…

Remarks

Enter system view

system-view

Enter Ethernet interface view or port group view

Enter Ethernet interface view

interface interface-type interface-number

Required

Use either command.

Enter port group view

port-group manual port-group-name

Set the LLDP operating mode

lldp admin-status { disable | rx | tx | txrx }

Optional

TxRx by default.

 

Setting the LLDP Re-Initialization Delay

When LLDP operating mode changes on a port, the port initializes the protocol state machines after a certain delay. By adjusting the LLDP re-initialization delay, you can avoid frequent initializations caused by frequent LLDP operating mode changes on a port.

Follow these steps to set the LLDP re-initialization delay for ports:

To do…

Use the command…

Remarks

Enter system view

system-view

Set the LLDP re-initialization delay

lldp timer reinit-delay delay

Optional

2 seconds by default

 

Enable LLDP Polling

With LLDP polling enabled, a device checks for the local configuration changes periodically. Upon detecting a configuration change, the device sends LLDPDUs to inform the neighboring devices of the change.

Follow these steps to enable LLDP polling:

To do…

Use the command…

Remarks

Enter system view

system-view

Enter Ethernet interface view or port group view

Enter Ethernet interface view

interface interface-type interface-number

Required

Use either command.

Enter port group view

port-group manual port-group-name

Enable LLDP polling and set the polling interval

lldp check-change-interval interval

Required

Disabled by default

 

Configuring the TLVs to Be Advertised

Follow these steps to configure advertisable TLVs:

To do…

Use the command…

Remarks

Enter system view

system-view

Enter Ethernet interface view or port group view

Enter Ethernet interface view

interface interface-type interface-number

Required

Use either command.

Enter port group view

port-group manual port-group-name

Configure the advertisable TLVs

lldp tlv-enable { basic-tlv { all | port-description | system-capability | system-description | system-name } | dot1-tlv { all | port-vlan-id | protocol-vlan-id [ vlan-id ] | vlan-name [ vlan-id ] } | dot3-tlv { all | link-aggregation | mac-physic | max-frame-size | power } | med-tlv { all | capability | inventory | location-id { civic-address device-type country-code { ca-type ca-value }&<1–10> | elin-address tel-number } | network-policy | power-over-ethernet } }

Optional

By default, all types of LLDP TLVs except location identification TLV are advertisable.

 

Configuring the Management Address and Its Encoding Format

LLDP encodes management addresses in numeric or character string format in management address TLVs.

By default, management addresses are encoded in numeric format. If a neighbor encoded its management address in character string format, you can configure the encoding format of the management address as string on the connecting port to guarantee normal communication with the neighbor.

Follow these steps to configure a management address to be advertised and its encoding format on one or a group of ports:

To do

Use the command

Remarks

Enter system view

system-view

Enter Ethernet interface view or port group view

Enter Ethernet interface view

interface interface-type interface-number

Required

Use either command.

Enter port group view

port-group manual port-group-name

Enable management address advertisement in LLDPDUs, and optionally, configure a management IP address if needed.

lldp management-address-tlv [ ip-address ]

Optional

By default, the management address is sent through LLDPDUs, and the management address is the main IP address of the lowest-ID VLAN carried on the interface. If the VLAN is not assigned a main IP address, 127.0.0.1 is used.

Configure the encapsulation format of the management address in the string format

lldp management-address-format string

Required

By default, the management address is encapsulated in the numeric format.

 

Setting the TTL Multiplier

The TTL TLV carried in an LLDPDU determines how long the device information carried in the LLDPDU can be saved on a recipient device.

You can configure the TTL of locally sent LLDP frames to determine how long information about the local device can be saved on a neighbor device by setting the TTL multiplier. The TTL is expressed as follows:

TTL = Min (65535, (TTL multiplier × LLDPDU transmit interval))

As the expression shows, the TTL can be up to 65535 seconds. TTLs greater than it will be rounded down to 65535 seconds.

Follow these steps to change the TTL multiplier:

To do…

Use the command…

Remarks

Enter system view

system-view

Set the TTL multiplier

lldp hold-multiplier value

Optional

4 by default.

 

Configuring the Parameters Concerning LLDPDU Sending

Follow these steps to configure the parameters concerning LLDPDU sending:

To do…

Use the command…

Remarks

Enter system view

system-view

Set the interval to send LLDPDUs

lldp timer tx-interval interval

Optional

30 seconds by default

Set the delay to send LLDPDUs

lldp timer tx-delay delay

Optional

2 seconds by default

Set the number of fast sent LLDPDUs

lldp fast-count count

Optional

3 by default

 

Both the LLDPDU transmit interval and delay must be less than the TTL to ensure that the LLDP neighbors can receive LLDP frames to update information about the device you are configuring before it is aged out.

 

Configuring the Encapsulation Format for LLDPDUs

LLDPDUs can be encapsulated in Ethernet II or SNAP frames.

l          With Ethernet II encapsulation configured, an LLDP port sends LLDPDUs in Ethernet II frames and processes only Ethernet II encapsulated incoming LLDPDUs.

l          With SNAP encapsulation configured, an LLDP port sends LLDPDUs in SNAP frames and processes only SNAP encapsulated incoming LLDPDUs.

By default, LLDPDUs are encapsulated in Ethernet II frames. If the neighbor devices encapsulate LLDPDUs in SNAP frames, you can configure the encapsulation format for LLDPDUs as SNAP, thus guaranteeing communication with the other devices in the network.

Follow these steps to configure the encapsulation format for LLDPDUs:

To do

Use the command

Remarks

Enter system view

system-view

Enter Ethernet interface view or port group view

Enter Ethernet interface view

interface interface-type interface-number

Required

Use either command.

Enter port group view

port-group manual port-group-name

Configure the encapsulation format for LLDPDUs as SNAP

lldp encapsulation snap

Required

Ethernet II encapsulation format applies by default.

 

LLDP-CDP (CDP is short for the Cisco Discovery Protocol) packets use only SNAP encapsulation.

 

Configuring LLDP Trapping

LLDP trapping is used to notify the network management system (NMS) of events such as new neighboring devices detected and link malfunctions.

To prevent excessive LLDP traps from being sent when topology is unstable, you can set a minimum trap sending interval for LLDP.

Follow these steps to configure LLDP trap:

To do…

Use the command…

Remarks

Enter system view

system-view

Enter Ethernet interface view or port group view

Enter Ethernet interface view

interface interface-type interface-number

Required

Use either command.

Enter port group view

port-group manual port-group-name

Enable LLDP trap sending

lldp notification remote-change enable

Required

Disabled by default

Quit to system view

quit

Set the interval to send LLDP traps

lldp timer notification-interval interval

Optional

5 seconds by default

 

Displaying and Maintaining LLDP

To do…

Use the command…

Remarks

Display the global LLDP information or the information contained in the LLDP TLVs to be sent through a port

display lldp local-information [ global | interface interface-type interface-number ]

Available in any view

Display the information contained in the LLDP TLVs received through a port

display lldp neighbor-information [ interface interface-type interface-number ] [ brief ]

Available in any view

Display LLDP statistics

display lldp statistics [ global | interface interface-type interface-number ]

Available in any view

Display LLDP status of a port

display lldp status [ interface interface-type interface-number ]

Available in any view

Display types of advertisable optional LLDP TLVs

display lldp tlv-config [ interface interface-type interface-number ]

Available in any view

 

LLDP Configuration Examples

Basic LLDP Configuration Example

Network requirements

As shown in Figure 1-4:

l          The NMS (Network Management System) and Switch A are located in the same Ethernet. An MED device and Switch B are connected to GigabitEthernet 1/0/1 and GigabitEthernet 1/0/2 of Switch A.

l          Enable LLDP on the ports of Switch A and Switch B to monitor the link between Switch A and Switch B and the link between Switch A and the MED device on the NMS.

Figure 1-4 Network diagram for basic LLDP configuration

 

Configuration procedure

1)        Configure Switch A.

# Enable LLDP globally.

<SwitchA> system-view

[SwitchA] lldp enable

# Enable LLDP on GigabitEthernet 1/0/1 and GigabitEthernet 1/0/2, setting the LLDP operating mode to Rx.

[SwitchA] interface gigabitethernet1/0/1

[SwitchA-GigabitEthernet1/0/1] lldp enable

[SwitchA-GigabitEthernet1/0/1] lldp admin-status rx

[SwitchA-GigabitEthernet1/0/1] quit

[SwitchA] interface gigabitethernet1/0/2

[SwitchA-GigabitEthernet1/0/2] lldp enable

[SwitchA-GigabitEthernet1/0/2] lldp admin-status rx

[SwitchA-GigabitEthernet1/0/2] quit

2)        Configure Switch B.

# Enable LLDP globally.

<SwitchB> system-view

[SwitchB] lldp enable

# Enable LLDP on GigabitEthernet1/0/1, setting the LLDP operating mode to Tx.

[SwitchB] interface gigabitethernet1/0/1

[SwitchB-GigabitEthernet1/0/1] lldp enable

[SwitchB-GigabitEthernet1/0/1] lldp admin-status tx

[SwitchB-GigabitEthernet1/0/1] quit

3)        Verify the configuration.

# Display the global LLDP status and port LLDP status on Switch A.

[SwitchA] display lldp status

Global status of LLDP : Enable

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

Hold multiplier                 : 4

Reinit delay                    : 2s

Transmit delay                  : 2s

Trap interval                   : 5s

Fast start times                : 3

 

Port 1 [GigabitEthernet1/0/1]:

Port status of LLDP             : Enable

Admin status                    : Rx_Only

Trap flag                       : No

Roll time                       : 0s

 

Number of neighbors              : 1

Number of MED neighbors          : 1

Number of CDP neighbors          : 0

Number of sent optional TLV      : 0

Number of received unknown TLV   : 0

 

Port 2 [GigabitEthernet1/0/2]:

Port status of LLDP             : Enable

Admin status                    : Rx_Only

Trap flag                       : No

Roll time                       : 0s

 

Number of neighbors              : 1

Number of MED neighbors          : 0

Number of CDP neighbors          : 0

Number of sent optional TLV      : 0

Number of received unknown TLV   : 3

As the sample output shows, GigabitEthernet1/0/1 of Switch A connects a MED device, and GigabitEthernet1/0/2 of Switch A connects a non-MED device. Both ports operate in Rx mode, that is, they only receive LLDP frames.

# Tear down the link between Switch A and Switch B and then display the global LLDP status and port LLDP status on Switch A.

[SwitchA] 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

Hold multiplier                 : 4

Reinit delay                    : 2s

Transmit delay                  : 2s

Trap interval                   : 5s

Fast start times                : 3

 

Port 1 [GigabitEthernet1/0/1]:

Port status of LLDP             : Enable

Admin status                    : Rx_Only

Trap flag                       : No

Roll time                       : 0s

 

Number of neighbors              : 1

Number of MED neighbors          : 1

Number of CDP neighbors          : 0

Number of sent optional TLV      : 0

Number of received unknown TLV   : 5

 

Port 2 [GigabitEthernet1/0/2]:

Port status of LLDP             : Enable

Admin status                    : Rx_Only

Trap flag                       : No

Roll time                       : 0s

 

Number of neighbors              : 0

Number of MED neighbors          : 0

Number of CDP neighbors          : 0

Number of sent optional TLV      : 0

Number of received unknown TLV   : 0

As the sample output shows, GigabitEthernet1/0/2 of Switch A does not connect any neighboring devices.

H3C reserves the right to modify its collaterals without any prior notice. For the latest information of the collaterals, please consult H3C sales or call 400 hotline.