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.

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.

Note:

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

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 ge-2/1/1 interface:

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:

Configuring LLDP (J-Web Procedure)

Note:

This topic applies only to the J-Web Application package.

Use the LLDP Configuration page to configure LLDP global and port settings for an EX Series switch on the J-Web interface.

To configure LLDP:

  1. Select Configure > Switching > LLDP.

    The LLDP Configuration page displays LLDP Global Settings and Port Settings.

    The second half of the screen displays operational details for the selected port.

    Note:

    After you make changes to the configuration on this page, you must commit the changes for them to take effect. To commit all changes to the active configuration, select Commit Options > Commit. See Using the Commit Options to Commit Configuration Changes for details about all commit options.

  2. For an EX8200 Virtual Chassis configuration, select the member and the slot (FPC) from the list.
  3. To modify LLDP Global Settings, click Global Settings.

    Enter information as described in Table 1.

  4. To modify Port Settings, click Edit in the Port Settings section.

    Enter information as described in Table 2.

Table 1: Global Settings

Field

Function

Your Action

Advertising interval

Specifies the frequency of outbound LLDP advertisements. You can increase or decrease this interval.

Type the number of seconds.

Hold multiplier

Specifies the multiplier factor to be used by an LLDP-enabled switch to calculate the time-to-live (TTL) value for the LLDP advertisements it generates and transmits to LLDP neighbors.

Type the required number in the field.

Fast start count

Specifies the number of LLDP advertisements sent in the first second after the device connects. The default is 3. Increasing this number results in the port initially advertising LLDP–MED at a faster rate for a limited time.

Type the Fast start count.

Table 2: Edit Port Settings

Field

Function

Your Action

LLDP Status

Specifies whether LLDP has been enabled on the port.

Select one: Enabled, Disabled, or None.

LLDP-MED Status

Specifies whether LLDP–MED has been enabled on the port.

Select Enable from the list.

Understanding LLDP and LLDP-MED on EX Series Switches

EX Series Ethernet Switches 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 switch to quickly identify a variety of devices, resulting in a LAN that interoperates smoothly and efficiently.

Benefits of LLDP and LLDP-MED

  • Enables the switch to quickly identify a variety of devices.

  • Provides PoE power management capabilities.

  • Ensures that voice traffic gets tagged and prioritized with the correct values at the source itself.

LLDP and LLDP-MED Overview

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

LLDP-MED goes one step further than LLDP, exchanging IP-telephony messages between the switch and the IP telephone.

Note:

If your IP telephone is configured for VoIP (VoIP), the switch automatically detects the configuration and assigns the telephone to the voice VLAN. The implementation of a voice VLAN on an IP telephone is vendor-specific. Consult the documentation that came with your IP telephone for instructions on configuring a voice VLAN. For example, on an Avaya phone, you can ensure that the phone gets the correct VoIP VLAN ID even in the absence of LLDP-MED by enabling DHCP option 176.

LLDP and LLDP-MED also provide PoE power management capabilities. LLDP power negotiation allows the switch to manage PoE power by negotiating with LLDP-enabled powered devices to dynamically allocate PoE power as needed. LLDP power priority allows an LLDP-enabled powered device to set the PoE power priority on the switch interface to which it connects.

The switch also uses these protocols to ensure that voice traffic gets tagged and prioritized with the correct values at the source itself. For example, 802.1p CoS and 802.1Q tag information can be sent to the IP telephone.

Supported LLDP TLVs

EX Series switches and QFX5100 switches support the following basic management TLVs:

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

    Note:

    The Chassis ID TLV has a subtype for the network address family. LLDP frames are validated only if this subtype has a value of 1 (IPv4) or 2 (IPv6). For any other value, the transmitting device is detected by LLDP as a neighbor and displayed in the output of the show lldp neighbors command, but is not assigned to the VLAN.

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

  • Time to Live—The length of time that the received information should remain valid.

  • Port Description—Textual description of the interface or the logical unit. The description for the logical unit is used, if available; otherwise, the Port Description TLV contains the description configured on the physical interface. For example, LAG member interfaces do not contain a logical unit; therefore, only the description configured on the physical interface can be used.

  • System Name—The user-configured name of the local system. The system name can be a maximum of 256 characters. The system name field contains the host name and the domain name in the following format: host-name.domain-name.

  • System Description—The system description that contains information about the software and current image running on the system. This information is not configurable, but taken from the software.

  • System Capabilities—The primary function performed by the system. The capabilities that the system supports—for example, bridge or router. This information is not configurable, but based on the model of the product.

  • Management Address—The IPv4 or IPv6 management address of the local system.

EX Series switches and QFX5100 switches support the following organizationally defined TLVs:

  • Power via MDI—A TLV that advertises MDI (media dependent interface) power support, PSE (power sourcing equipment) 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 (medium attachment unit) type. The information is not configurable, but based on the physical interface structure.

    Note:

    The MAC/PHY Configuration Status TLV has a subtype for the PMD Auto-Negotiation Advertised Capability field. This field contains a value of other or unknown if the LLDP packet is transmitted from a 10-gigabit SFP+ port.

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

Supported LLDP-MED TLVs

EX Series switches and QFX5100 switches support the following LLDP-MED TLVs:

  • LLDP-MED Capabilities—A TLV that advertises the primary function of the port. The values of capabilities range from 0 through 15:

    • 0—Capabilities

    • 1—Network Policy

    • 2—Location Identification

    • 3—Extended Power via MDI-PSE

    • 4—Inventory

    • 5-15—Reserved

  • LLDP-MED Device Class Values—Categorizes media endpoint devices into classes:

    • 0—Class not defined

    • 1—Class 1 (generic endpoints). This class definition is applicable to all endpoints that require the base LLDP discovery services.

    • 2—Class 2 (media endpoints). This class includes endpoints that have IP media capabilities.

    • 3—Class 3 (communication endpoints). Devices acting as end user communication applicances

    • 4—Network Connectivity Device

    • 5-255—Reserved

  • Network Policy—A TLV that advertises the port VLAN configuration and associated Layer 2 and Layer 3 attributes. Attributes include the policy identifier, application types, such as voice or streaming video, 802.1Q VLAN tagging, and 802.1p priority bits and Diffserv code points.

  • Endpoint Location— A TLV that advertises the physical location of the endpoint.

  • Extended Power via MDI— A TLV that advertises the power type, power source, power priority, and power value of the port. It is the responsibility of the PSE device (network connectivity device) to advertise the power priority on a port.

Disabling TLVs

In multi-vendor networks, it might not be desirable to send TLV messages because they can contain sensitive information about a network device. You can configure LLDP or LLDP-MED to disable any non-mandatory TLV message. Mandatory TLVs are: chassis-id, port-id, and time-to-live. All other TLVs can be disabled, either on specific interfaces or on a global basis. See Configuring LLDP (CLI Procedure) and Configuring LLDP-MED (CLI Procedure) for more information.

Configuring LLDP-MED (CLI Procedure)

Link Layer Discovery Protocol–Media Endpoint Discovery (LLDP-MED) is an extension of LLDP. The EX Series switch uses LLDP-MED to support device discovery of VoIP telephones and to create location databases for these telephone locations.

LLDP-MED is enabled by default on EX Series switches.

This topic describes:

Enabling LLDP-MED on Interfaces

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

Note:

On switches running Junos OS for EX Series switches with support for the Enhanced Layer 2 Software (ELS) configuration style, configure LLDP-MED on the physical interface–for example, on ge-0/0/2. For more about ELS, see Using the Enhanced Layer 2 Software CLI.

To configure LLDP-MED on all interfaces or on a specific interface:

Configuring Location Information Advertised by the Switch

You can configure the location information that is advertised from the switch to the LLDP-MED device. You can specify a civic-based location (geographic location) or a location based on an ELIN (Emergency Location Identification Number):

  • To specify a location by geography:

  • To specify a location by using an elin string:

Configuring a Fast Start for LLDP-MED

When the switch detects an LLDP-MED capable device, it begins to send LLDP advertisements from the port connected to the device. The fast start count indicates how many advertisements will be send in the first second after the switch detects the LLDP-MED device. The default is 3; to set it to another value:

For example:

Note:

If an interface is configured as a VoIP interface, then the switch does not wait for an attached phone to identify itself as an LLDP-MED device before it performs an LLDP-MED fast start after a graceful Routing Engine switchover (GRES) or a reboot. Instead, it immediately performs an LLDP-MED fast start after a GRES or reboot. This behavior prevents certain models of IP phones from resetting after a GRES.

Disabling LLDP-MED TLVs

LLDP-MED sends TLV messages by default. You can configure LLDP-MED 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-MED:

  • On all interfaces:

  • On a specific interface:

To filter TLVs that should not be advertised by LLDP-MED:

  • On all interfaces:

  • On a specific interface:

The following example disables all TLVs except location-id:

The following example disables the ext-power-via-mdi TLV on ge-2/1/1 interface:

The following example disables all TLVs except location-id and ext-power-via-mdi on all interfaces except on the ge-0/0/1 interface, where it disables only the network-policy TLV:

You can also disable TLVs for the LLDP protocol. See Configuring LLDP (CLI Procedure) for more information.