Configuring LLDP (CLI Procedure)

 

Devices use Link Layer Discovery Protocol (LLDP) and Link Layer Discovery Protocol–Media Endpoint Discovery (LLDP-MED) to learn and distribute device information on network links. The information enables the device to quickly identify a variety of other devices, resulting in a LAN that interoperates smoothly and efficiently.

This topic describes:

Enabling LLDP on Interfaces

LLDP is enabled on all interfaces by default. If it is disabled, you can enable LLDP by configuring it on all interfaces or on specific interfaces.

  • To configure LLDP on all interfaces:

    [edit protocols lldp]

    user@switch# set interface all
  • To configure LLDP on a specific interface:

    [edit protocols lldp]

    user@switch# set interface interface-name
Note

On EX4300 and QFX5100 switches, LLDP cannot be configured on the me0 or vme interface. Issuing the set protocols lldp interface me0 command generates the following error message:

Issuing the set protocols lldp interface vme command generates the following error message:

Adjusting LLDP Advertisement Settings

You can adjust the following settings for LLDP advertisements for troubleshooting or verification purposes. The default values are applied when LLDP is enabled. For normal operations, we recommend that you do not change the default values.

  • To specify the frequency at which LLDP advertisements are sent (in seconds):

    [edit protocols lldp]

    user@switch# set advertisement-interval seconds

    For example, using the default value:

    [edit protocols lldp]

    user@switch# set advertisement-interval 45
  • To specify the number of seconds that LLDP information is held before it is discarded (the multiplier value is used in combination with the advertisement-interval value):

    [edit protocols lldp]

    user@switch# set hold-multiplier seconds

    For example, using the default value:

    [edit protocols lldp]

    user@switch# set hold-multiplier 5
  • To specify the number of seconds the device waits before sending advertisements to neighbors after a change is made in a TLV (type, length, or value) element in LLDP or in the state of the local system, such as a change in hostname or management address, set the transmit delay. The transmit delay is enabled by default on switches to reduce the delay in notifying neighbors of a change in the local system. The default value is 2 seconds (if the advertisement-interval value is set to 8 seconds or more) or 1 second (if the advertisement-interval value is set to less than 8 seconds).

    [edit protocols lldp]

    user@switch# set transmit-delay seconds

    For example:

    [edit protocols lldp]

    user@switch# set transmit-delay 2
    Note

    The advertisement-interval value must be greater than or equal to four times the transmit-delay value; otherwise, an error is returned when you attempt to commit the configuration.

Adjusting SNMP Notification Settings of LLDP Changes

You can adjust the following settings for SNMP notifications of LLDP changes. If the values are not specified or if the interval values are set to 0, the notifications are disabled.

Specifying a Management Address for the LLDP Management TLV

You can configure an IPv4 or IPv6 management address to be used in the LLDP Management Address type, length, and value (TLV) messages. Only an out-of-band management address must be used as the value for the management-address statement.

To configure the management address:

[edit protocols lldp]

user@switch# set management-address ip-address
Note

Ensure that the interface with the configured management address has LLDP enabled using the set protocols lldp interface command. If you configure a customized management address for LLDP on an interface that has LLDP disabled, the show lldp local-information command output does not display the correct interface information.

Configuring LLDP Power Negotiation

LLDP power negotiation enables the switch’s Power over Ethernet (PoE) controller to dynamically allocate PoE power to PoE interfaces, based on the needs of the powered device, by negotiating with LLDP-enabled powered devices.

Note

LLDP power negotiation is not supported on EX3200 or EX4200 switches (except for the EX4200-PX models).

LLDP power negotiation is supported on switches running PoE controller software version 4.04 or later. For information about upgrading the PoE controller software, see Upgrading the PoE Controller Software.

LLDP power negotiation is automatically enabled when the PoE management mode is set to class:

To disable LLDP power negotiation:

  • On switch interfaces:

    [edit protocols lldp interface all power-negotiation]

    user@switch# disable
  • On a specific switch interface:

    [edit protocols lldp interface interface-name power-negotiation]

    user@switch# disable

Disabling LLDP TLVs

LLDP sends TLV messages by default. You can configure LLDP to disable non-mandatory TLVs. Mandatory TLVs are: chassis-id, port-id, and time-to-live. In this procedure, any reference to disabling all TLVs means disabling all non-mandatory TLVs.

There are two options for disabling TLVs:

  • tlv-select—Select which TLVs are allowed to be advertised by LLDP. This approach is useful if you want to allow only a few TLVs and nothing else.

  • tlv-filter—Filter the TLVs that should not be advertised by LLDP. This approach is useful if you want to filter only few TLVs, and allow everything else.

Note

The tlv-select and tlv-filter are mutually exclusive and cannot be used on the same configuration stanza at the same time.

You can disable TLVs on a specific interfaces or on all interfaces. The configuration under the interface configuration stanza takes precedence over global the global configuration.

To select which TLVs are allowed to be advertised by LLDP:

  • On all interfaces:

    [edit protocols lldp]

    user@switch# set tlv-select tlv-name
  • On a specific interface:

    [edit protocols lldp]

    user@switch# set interface interface-name tlv-select tlv-name

To filter TLVs that should not be advertised by LLDP:

  • On all interfaces:

    [edit protocols lldp]

    user@switch# set tlv-filter tlv-name
  • On a specific interface:

    [edit protocols lldp]

    user@switch# set interface interface-name tlv-filter tlv-name

The following example disables all TLVs except port-description:

[edit protocols lldp]

user@switch# set tlv-select port-description

The following example disables the system-description TLV on ge-2/1/1 interface:

[edit protocols lldp]

user@switch# set interface ge-2/1/1 tlv-filter system-description

The following example disables all TLVs except port-description and system-description on all interfaces except on the ge-0/0/1 interface, where it disables only the system-name TLV:

[edit protocols lldp]

user@switch# set tlv-select [port-description system-description]

user@switch# set interface ge-0/0/1 tlv-filter system-name

You can also disable TLVs for the LLDP Media Endpoint Discovery (LLDP-MED) protocol. See Configuring LLDP-MED (CLI Procedure) for more information.