Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Device Discovery Using LLDP

The Link Layer Discovery Protocol (LLDP) is an industry-standard, vendor-neutral method to allow networked devices to advertise capabilities, identity, and other information onto a LAN. It also provides additional types, lengths, and values (TLVs) for capabilities discovery, network policy, Power over Ethernet (PoE), and inventory management. For more information, read this topic.

Understanding LLDP

The device uses LLDP to learn and to distribute device information on network links. The device uses this information to identify a variety of devices quickly. This quick identification results in a LAN that interoperates smoothly and efficiently.

LLDP-capable devices transmit information in type, length, and value (TLV) messages to neighbor devices. Device information can include specifics, such as the chassis identification, the port identification, the system name, and the system capabilities. The TLVs leverage this information from parameters that have already been configured in Junos OS Evolved.

The device supports the following basic TLVs:

  • Chassis Identifier—The MAC address associated with the local system.

  • Port Identifier—The port identification for the specified port in the local system.

  • Port Description—The user-configured port description. The port description can be a maximum of 256 characters.

  • System Name—The user-configured name of the local system. The system name can be a maximum of 256 characters.

  • System Description—The system description containing information about the software and current image running on the system. This information is taken from the software. You cannot configure this information.

  • System Capabilities—The primary function performed by the system, for example, bridge or router. This information cannot be configured, but is based on the model of the product.

  • Management Address—The IP management address of the local system.

The device supports the following 802.3 TLVs:

  • Power via MDI—A TLV that advertises media dependent interface (MDI) power support, power source equipment (PSE) power pair, and power class information.

  • MAC/PHY Configuration Status—A TLV that advertises information about the physical interface, such as autonegotiation status and support and MAU type. The information is based on the physical interface structure. You cannot configure this information.

  • Link Aggregation—A TLV that advertises whether the port is aggregated and its aggregated port ID.

  • Maximum Frame Size—A TLV that advertises the Maximum Transmission Unit (MTU) of the interface sending LLDP frames.

  • Port VLAN—A TLV that advertises the VLAN name configured on the interface.

Configuring LLDP (CLI Procedure)

Follow these steps to configure LLDP on your device.

Enable LLDP on Interfaces

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

  • To configure LLDP on all interfaces:

  • To configure LLDP on a specific interface:

Adjust LLDP Advertisement Settings

You can adjust the following settings for LLDP advertisements for troubleshooting or verification purposes. LLDP uses the default values when it 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):

    For example, using the default value of 30 seconds:

  • To specify the number of seconds that LLDP information is held before it is discarded:

    For example, using the default value of 4:

    The hold-multiplier value is used in combination with the advertisement-interval value. Using the default values means that the advertisement-interval value of 30 will be multiplied by the hold-multiplier value of 4. resulting in a LLDP hold time of 120 seconds.

  • Set the transmit delay to specify the number of seconds the device waits before sending advertisements to neighbors after a change is made in a TLV (element in LLDP or in the state of the local system). A change in state of the local system includes a change in hostname or management address. The transmit delay is enabled by default to reduce the delay in notifying neighbors of a change in the local system. The default transmit delay is 1 second if the advertisement-interval value is set to less than 8 seconds. The default value is 2 seconds if the advertisement-interval value is set to 8 seconds or more.

    For example:

    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.

Adjust 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.

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

    For example:

  • To configure how long SNMP trap notifications wait for topology changes (in seconds):

    For example:

  • To specify the holding time (used in combination with the ptopo-configuration-trap-interval value) to maintain dynamic topology entries (in seconds):

    For example:

Specify 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 TLV messages. An out-of-band management address must be used as the value for the management-address statement.

To configure the management 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.

Specify a Management Interface for the LLDP Management TLV

you can configure an interface to be used in the LLDP Management Address TLV messages.

Note:

You cannot configure management address and management interface at the same time.

To configure the management interface:

If the interface does not have an IP address, the IP address of the default management interfaces is used.

Configure LLDP Power Negotiation

LLDP power negotiation enables the device'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.

LLDP power negotiation is supported on devices running PoE controller software version 4.04 or later.

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

To disable LLDP power negotiation:

  • On all device interfaces:

  • On a specific interface:

Disable LLDP TLVs

LLDP sends TLV messages by default. You can configure LLDP to disable non-mandatory TLVs. The 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. Use this option if you want to filter only a few TLVs and allow everything else.

Note:

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

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

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

  • On all interfaces:

  • On a specific interface:

To filter TLVs that should not be advertised by LLDP:

  • On all interfaces:

  • On a specific interface:

The following example disables all TLVs except port-description:

The following example disables the system-description TLV on the et-1/0/1 interface:

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