Configure Link Layer Discovery Protocol

Table 1. Feature History

Feature Name

Release Information

Description

Link Layer Discovery Protocol (LLDP) on NCS4K-4H-OPW-QC2 line card

Cisco IOS XR Release 6.5.33

In addition to the existing support on packet interfaces, Link Layer Discovery Protocol (LLDP) is now enabled on the client ports of the NCS4K-4H-OPW-QC2 card that carry Ethernet-over-OTN traffic. This feature allows NCS 4000 to discover peer devices connected either on the OTN ports or the packet interfaces. As a result, it reduces the need to use multiple protocols for network management, especially in a multi-vendor network.

Commands added:

This chapter describes the procedures to configure Link Layer Discovery Protocol on Cisco NCS 4000 Series routers using CLI.

Link Layer Discovery Protocol (LLDP) - Overview

To support non-Cisco devices and to allow for interoperability between other devices, the Cisco NCS 4000 Series Router supports the IEEE 802.1AB LLDP. LLDP is a neighbor discovery protocol that is used for network devices to advertise information about themselves to other devices on the network. This protocol also allows NCS 4000 devices to discover information about its peer devices connected through the OTN ports and the packet interfaces. This protocol runs over the Data Link Layer, which allows two systems running different network layer protocols to learn about each other. The feature is supported on client ports of the NCS4K-4H-OPW-QC2 card that support Ethernet-over-OTN configuration and the packet interfaces.

LLDP supports a set of attributes that it uses to learn information about neighbor devices. These attributes have a defined format known as a Type-Length-Value (TLV). LLDP supported devices can use TLVs to receive and send information to their neighbors. Details such as configuration information, device capabilities, and device identity can be advertised using this protocol.

In addition to the mandatory TLVs (Chassis ID, Port ID, and Time-to-Live), the router also supports the following basic management TLVs, which are optional:

  • Port Description

  • System Name

  • System Description

  • System Capabilities

  • Management Address

These optional TLVs are automatically sent when LLDP is active, but you can disable them as needed using the lldp tlv-select disable command.

LLDP Frame Format

LLDP frames use the IEEE 802.3 format, which consists of the following fields:

  • Destination address (6 bytes)—Uses a multicast address of 01-80-C2-00-00-0E.

  • Source address (6 bytes)—MAC address of the sending device or port.

  • LLDP Ethertype (2 bytes)—Uses 88-CC.

  • LLDP PDU (1500 bytes)—LLDP payload consisting of TLVs.

  • FCS (4 bytes)—Cyclic Redundancy Check (CRC) for error checking.

LLDP TLV Format

LLDP TLVs carry the information about neighboring devices within the LLDP PDU using the following basic format:

  • TLV Header (16 bits), which includes the following fields:
    • TLV Type (7 bits)

    • TLV Information String Length (9 bits)

  • TLV Information String (0 to 511 bytes)

LLDP Operation

LLDP is a one-way protocol. The basic operation of LLDP consists of a device enabled for transmit of LLDP information sending periodic advertisements of information in LLDP frames to a receiving device.

Devices are identified using a combination of the Chassis ID and Port ID TLVs to create an MSAP (MAC Service Access Point). The receiving device saves the information about a neighbor for a certain amount time specified in the TTL TLV, before aging and removing the information.

LLDP supports the following additional operational characteristics:

  • LLDP can operate independently in transmit or receive modes.

  • LLDP operates as a slow protocol using only untagged frames, with transmission speeds of less than 5 frames per second.

  • LLDP packets are sent when the following occurs:

    • The packet update frequency specified by the lldp timer command is reached. The default is 30 seconds.

    • When a change in the values of the managed objects occurs from the local system's LLDP MIB.

    • When LLDP is activated on an interface (3 frames are sent upon activation).

  • When an LLDP frame is received, the LLDP remote services and PTOPO MIBs are updated with the information in the TLVs.

  • LLDP supports the following actions on these TLV characteristics:

    • Interprets a TTL value of 0 as a request to automatically purge the information of the transmitting device. These shutdown LLDPDUs are typically sent prior to a port becoming inoperable.

    • An LLDP frame with a malformed mandatory TLV is dropped.

    • A TLV with an invalid value is ignored.

    • A copy of an unknown organizationally-specific TLV is maintained if the TTL is non-zero, for later access through network management.

Supported LLDP Functions

The Cisco NCS 4000 Series Router supports the following LLDP functions:

  • IPv4 management addresses—In general, IPv4 addresses will be advertised if they are available, and preference is given to the address that is configured on the transmitting interface.

    If the transmitting interface does not have a configured address, then the TLV will be populated with an address from another interface. The advertised LLDP IP address is implemented according to the following priority order of IP addresses for interfaces on the Cisco NCS 4000 Series Router:
    • Locally configured address

    • MgmtEth0/RP0/CPU0/0

    • MgmtEth0/RP0/CPU0/1

    • MgmtEth0/RP1/CPU0/0

    • MgmtEth0/RP1/CPU0/1

    • Loopback interfaces

  • LLDP is supported for the nearest physically attached, non-tunneled neighbors.

  • Port ID TLVs are supported for Ethernet interfaces, subinterfaces, bundle interfaces, and bundle subinterfaces.

Unsupported LLDP Functions

The following LLDP functions are not supported on the Cisco NCS 4000 Series Router:

  • LLDP-MED organizationally unique extension—However, interoperability still exists between other devices that do support this extension.

  • Tunneled neighbors, or neighbors more than one hop away.

  • LLDP TLVs cannot be disabled on a per-interface basis; However, certain optional TLVs can be disabled globally.

  • LLDP SNMP trap lldpRemTablesChange.

Configuring LLDP

This section includes the procedures for configuring LLDP.

LLDP Default Configuration

Table below shows the values of the LLDP default configuration on the Cisco NCS 4000 Series Router. To change the default settings, use the LLDP global configuration and LLDP interface configuration commands.
Table 2. LLDP Default Configuration

LLDP global state

Disabled

LLDP holdtime (before discarding)

120 seconds

LLDP timer (packet update frequency)

30 seconds

LLDP reinitialization delay

2 seconds

LLDP TLV selection

All TLVs are enabled for sending and receiving.

LLDP interface state

Enabled for both transmit and receive operation when LLDP is globally enabled.

Enabling LLDP Globally

To run LLDP on the router, you must enable it globally. When you enable LLDP globally, all interfaces that support LLDP are automatically enabled for both transmit and receive operations.

You can override this default operation at the interface to disable receive or transmit operations. For more information about how to selectively disable LLDP receive or transmit operations for an interface, see the "Disabling LLDP Receive and Transmit Operation for an Interface" section.

To enable LLDP globally, complete the following steps:

Procedure


Step 1

configure

Example:

RP/0/RP0:hostname# configure

Enters the XR Config mode.

Step 2

lldp

Example:

RP/0/RP0:hostname(config)# lldp

Enables LLDP globally for both transmit and receive operation on the system.

Step 3

Use the commit or end command.

Example:

RP/0/RP0:hostname(config-lldp)# commit

commit - Saves the configuration changes and remains within the configuration session.

end - Prompts user to take one of these actions:

  • Yes - Saves configuration changes and exits the configuration session.
  • No - Exits the configuration session without committing the configuration changes.
  • Cancel - Remains in the configuration mode, without committing the configuration changes.

Configuring Global LLDP Operational Characteristics

The "LLDP Default Configuration" section describes the default operational characteristics for LLDP. When you enable LLDP globally on the router using the lldp command, these defaults are used for the protocol.

To modify the global LLDP operational characteristics such as the LLDP neighbor information holdtime, initialization delay, or packet rate, complete the following steps:

Procedure


Step 1

configure

Example:

RP/0/RP0:hostname# configure

Enters the XR Config mode.

Step 2

lldp holdtime time -in-seconds

Example:

RP/0/RP0:hostname(config)# lldp holdtime 60

(Optional) Specifies the length of time that information from an LLDP packet should be held by the receiving device before aging and removing it.

Step 3

lldp reinit time -in-seconds

Example:

RP/0/RP0:hostname(config)# lldp reinit 4

(Optional) Specifies the length of time to delay initialization of LLDP on an interface.

Step 4

lldp timer time -in-seconds

Example:

RP/0/RP0:hostname(config)# lldp timer 60

(Optional) Specifies the LLDP packet rate.

Step 5

Use the commit or end command.

Example:

RP/0/RP0:hostname(config)# commit

commit - Saves the configuration changes and remains within the configuration session.

end - Prompts user to take one of these actions:

  • Yes - Saves configuration changes and exits the configuration session.
  • No - Exits the configuration session without committing the configuration changes.
  • Cancel - Remains in the configuration mode, without committing the configuration changes.

Disabling Transmission of Optional LLDP TLVs

Certain TLVs are classified as mandatory in LLDP packets, such as the Chassis ID, Port ID, and Time to Live (TTL) TLVs. These TLVs must be present in every LLDP packet. You can suppress transmission of certain other optional TLVs in LLDP packets.

To disable transmission of optional LLDP TLVs, complete the following steps:

Procedure


Step 1

configure

Example:

RP/0/RP0:hostname# configure

Enters the XR Config mode.

Step 2

lldp tlv-select tlv-name disable

Example:

RP/0/RP0:hostname(config)# lldp tlv-select system-capabilities disable

(Optional) Specifies that transmission of the selected TLV in LLDP packets is disabled. The tlv-name can be one of the following LLDP TLV types:
  • management-address

  • port-description

  • system-capabilities

  • system-description

  • system-name

Step 3

Use the commit or end command.

Example:

RP/0/RP0:hostname(config)# commit

commit - Saves the configuration changes and remains within the configuration session.

end - Prompts user to take one of these actions:

  • Yes - Saves configuration changes and exits the configuration session.
  • No - Exits the configuration session without committing the configuration changes.
  • Cancel - Remains in the configuration mode, without committing the configuration changes.

Disabling LLDP Receive and Transmit Operation for an Interface

When you enable LLDP globally on the router, all supported interfaces are automatically enabled for LLDP receive and transmit operation. You can override this default by disabling these operations for a particular interface.

To disable LLDP receive and transmit operations for an interface, complete the following steps:

Procedure


Step 1

configure

Example:

RP/0/RP0:hostname# configure

Enters the XR Config mode.

Step 2

interface [ TenGigE | HundredGigE ] interface-path-id

Example:

RP/0/RP0:hostname(config)# interface TenGigE 0/6/0/2  

Enters interface configuration mode and specifies the Ethernet interface name and notation rack/slot/module/port. Possible interface types for this procedure are:
  • TenGigE

  • HundredGigE

Step 3

lldp

Example:

RP/0/RP0:hostname(config-if)# lldp 

(Optional) Enters LLDP configuration mode for the specified interface.

Step 4

receive disable

Example:

RP/0/RP0:hostname(config-if-lldp)# receive disable 

(Optional) Disables LLDP receive operations on the interface.

Step 5

transmit disable

Example:

RP/0/RP0:hostname(config-if-lldp)# transmit disable 

(Optional) Disables LLDP transmit operations on the interface.

Step 6

Use the commit or end command.

commit - Saves the configuration changes and remains within the configuration session.

end - Prompts user to take one of these actions:

  • Yes - Saves configuration changes and exits the configuration session.
  • No - Exits the configuration session without committing the configuration changes.
  • Cancel - Remains in the configuration mode, without committing the configuration changes.

Verifying the LLDP Configuration

This section describes how you can verify the LLDP configuration both globally and for a particular interface.

Procedure


Step 1

show lldp

Example:

RP/0/RP0:hostname# show lldp

Displays the LLDP global configuration status and operational characteristics.


Wed Dec 13 06:16:45.510 DST 
Global LLDP information: 
        Status: ACTIVE 
        LLDP advertisements are sent every 30 seconds 
        LLDP hold time advertised is 120 seconds 
        LLDP interface reinitialisation delay is 2 seconds

Step 2

show lldp interface [ TenGigE | HundredGigE ] interface-path-id

Example:

RP/0/RP0:hostname# show lldp interface TenGigE 0/1/0/7

Displays the LLDP interface status and configuration.


Wed Dec 13 13:22:30.501 DST 
TenGigE0/1/0/7: 
        Tx: enabled 
        Rx: enabled 
        Tx state: IDLE 
        Rx state: WAIT FOR FRAME


View the Neighbor Device Details Using CLI

You can view details of the neighbor devices connected to NCS 4000 using the show lldp neighbors and show lldp neighbors detail commands.

Procedure


Issue one of the following:

  1. show lldp neighbors

  2. show lldp neighbors detail

For more details about these commands, see the Link Layer Discovery Protocol (LLDP) Command Reference section of Command Reference for Cisco NCS 4000 Series guide.


Examples

The following example shows how to view the neighbor devices connected to NCS 4000:

RP/0/RP0:ios#show lldp neighbors
Capability codes:
(R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device
(W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other

Device ID Local Intf Hold-time Capability Port ID
[DISABLED] TenGigECtrlr0/5/0/4/1 17 N/A

Total entries displayed: 1

The following example shows how to view the neighbor device details connected to NCS 4000:

RP/0/RP0:ios#show lldp neighbors detail
Capability codes:
(R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device
(W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other

------------------------------------------------
Local Interface: TenGigECtrlr0/5/0/4/1
Chassis id: 22 33
Port id:
Port Description - not advertised
System Name - not advertised
System Description - not advertised

Time remaining: 16 seconds
Hold Time: 17 seconds
System Capabilities: N/A
Enabled Capabilities: N/A
Management Addresses - not advertised
Peer MAC Address: 10:02:03:04:05:06

Total entries displayed: 1