Link Layer Discovery Protocol (LLDP)

    Link Layer Discovery Protocol (LLDP)


    Link Layer Discovery Protocol (LLDP) is a vendor independent link layer protocol used by network devices for advertising their identity, capabilities to neighbors on a LAN segment. LACP specified in IEEE 802.1AB. One-way protocol with periodic retransmissions out each port (30 sec default).

     

    LLDP Frame Format

    In LLDP information’s are sent by devices from each of their interfaces at a fixed interval, in the form of an Ethernet frame. Each frame contains one LLDP Data Unit (LLDPDU). Each LLDPDU is a sequence of type-length-value (TLV) structures.

    • EtherType field is set to 0x88cc.
    • Each LLDP frame starts with the following mandatory TLVs and must intact in LLDP implementations.
      • Chassis ID
      • Port ID, and
      • Time-to-Live (TTL).
    • Any numbers of optional TLVs are followed by mandatory TLVs.
    • The frame ends with a special TLV named end of LLDPDU in which both the type and length fields are 0.
    • The LLDP specification allows for various organizations to define and encode their own TLVs. These are called Organizationally Specific TLVs. All Organizationally Specific TLVs start with an LLDP TLV Type value of 127.

     

     

    2.1.b (i) --LLDP.jpg

    Click here for CDP packet capture.

    Click here for LLDP TLV (mandatory and Optional type field format, part of IEEE 802.1AB 2009 document).

    Ref - https://wiki.wireshark.org/LinkLayerDiscoveryProtocol

     

     

    TLV type Types

    TLV type Value

    TLV name

    Usage in LLDPDU

    0

    End Of LLDPDU

    Mandatory

    1

    Chassis ID

    Mandatory

    2

    Port ID

    Mandatory

    3

    Time To Live

    Mandatory

    4

    Port Description

    Optional

    5

    System Name

    Optional

    6

    System Description

    Optional

    7

    System Capabilities

    Optional

    8

    Management Address

    Optional

    9 -126

    Reserved

    Undefined

    127

    Organizationally Specific TLVs

    Optional

     

     

    LLDPDU types

    The following two types of LLDPDUs are defined:

    1. Normal LLDPDUs that provide management information about the local station to that station’s neighbors. This is the normal condition and transmitting mandatory and optional TLVs.
    2. Shutdown advisory LLDPDU indicating that any information about the local station that is maintained in a neighbor LLDP agents is now invalid and is to be discarded. A special procedure exists for the case in which a LLDP agent knows an associated port is about to become non-operational (for example, port admin status is transitioning to ‘disabled’). In the event a port, currently configured with LLDP frame transmission enabled, either becomes disabled for LLDP activity, or the interface is administratively disabled, the transmit state machine attempts to send a final LLDP shutdown LLDPDU with: mandatory TLV’s and TTL TLV value set to 0. The shutdown LLDPDU does not include any optional TLVs and, if possible, should be transmitted before the interface is disabled.

     

    LLDP Operating modes:

    LLDP support three different operating modes:

    1. Transmit only – Transmits LLDP packets, do not process received packets and discards them.
    2. Receive only – Processes received LLDP packets but do not sends LLDP packets.
    3. Both transmit and receive – Perform both transmit and receive LLDP packet processing.

     

     

    LLDP Media Endpoint Devices (LLDP-MED):

    LLDP for Media Endpoint Devices (LLDP-MED) is an enhancement to LLDP that operates between endpoint devices such as IP phones and network devices such as switches. It specifically provides support for voice over IP (VoIP) applications and provides additional TLVs. LLDP-MED supports below TLVs:

    • LLDP-MED capabilities TLV
    • Network policy TLV
    • Power management TLV
    • Inventory management TLV
    • Location TLV


    LLDP-MED operates between several classes of network equipment such as IP phones, conference bridges, and network connectivity devices such as routers and switches. By default, a network connectivity device sends out only LLDP packets until it receives LLDP-MED packets from an endpoint device. The network device then sends out LLDP-MED packets until the remote device to which it is connected ceases to be LLDP-MED capable.

     

     

    LLDP Timers:

    • Hold time: - Is the duration that a receiving device should maintain LLDP neighbor information before aging it. If this timer expires and no LLDP packet being received the neighbor information is wiped. Default is 120 seconds.
    • LLDP Packet Frequency timer: - An interval at which the device sends LLDP updates to neighbor. Default is 30 seconds.
    • Reinit time: - The delay time in seconds for LLDP to initialize on any interface. Default is 2 seconds.

     

     

    LLDP Configuration:

    LLDP is disabled globally by default (May vary platform wise), and need to be activated with command lldp run.


    (config)# lldp run

    Enables LLDP globally on device.

    (config)# no lldp run

    Disables LLDP globally on device.

    (config-if)# lldp {med-tlv-select tlv | receive | transmit}

    Enables an LLDP-MED TLV or LLDP packet transmit/receive on an interface. Enabled all default.

    (config-if)# no lldp {med-tlv-select tlv | receive | transmit}

    Disables an LLDP-MED TLV or LLDP packet transmit/receive on an interface.

    (config-if)# lldp med-tlv-select <med-tlv-name>

    Enables specific LLDP-MED TLV on an interface

     

    (config)# lldp holdtime <seconds>

    Specifies the hold time, device level; range is 0 to 65535 seconds.

    (config)# lldp timer <seconds>

    Specifies the rate at which LLDP packets are sent; range is 5 to 65535 seconds.

    (config)# lldp reinit <seconds>

    Specify the initialization time on any interface; range is 2 to 5 seconds.




    LLDP Monitoring and Maintenance Commands


    Command

    Description

    clear lldp counters

    Reset the traffic counters to zero

    clear lldp table

    Delete LLDP information about neighbors.

    show lldp

    LLDP global configuration information

    show lldp entry <* | entry-name>

    Information about a specific neighbor. Asterisk (*) to display all neighbors.

    show lldp interface [interface-id]

    Information about interfaces where LLDP is enabled.

    show lldp neighbors [interface-id] [detail]

    Display information about neighbors / specific interface or more detailed information.

    show lldp traffic

    Display LLDP counters, including the number of packets sent and received, number of packets discarded, and number of unrecognized TLVs.

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    ~~~~~ ***** ~~~~~

     

    Any suggestions to improve the content of this document are most most welcome ...

     

    Regard

    Deben Bhattarai

    BenStdyNet - The Quick PICK | Network All the Way