Configuring LLDP
You configure LLDP by including the lldp
statement and associated
parameters at the [edit protocols]
hierarchy level. The complete
set of LLDP statements follows:
lldp { advertisement-interval seconds; (disable | enable); hold-multiplier number; chassis-id { chassis-id-type (chassis-component | interface-alias | interface-name | locally-assigned | mac-address | network-address | port-component); chassis-id-value chassis-id-value; } interface (all | [interface-name]) { dest-mac-type; (disable | enable); power-negotiation <(disable | enable)>; tlv-filter; tlv-select; trap-notification (disable | enable); } dest-mac-type destination-mac-address; lldp-configuration-notification-interval seconds; lldp-tx-fast-init; management-address ip-management-address; | management-interface interface-name; mau-type; neighbour-port-info-display (port-description | port-id); port-description-type (interface-alias | interface-description); port-id-subtype (interface-name | locally-assigned); ptopo-configuration-maximum-hold-time seconds; ptopo-configuration-trap-interval seconds; tlv-filter; tlv-select; traceoptions { file filename <files number> <size maximum-file-size> <world-readable | no-world-readable>; flag flag <disable>; } transmit-delay seconds; vlan-name-tlv-option (name | vlan-id); }
The following statements have default values:
-
advertisement-interval
—The default value is 30 seconds. The allowable range is from 5 through 32768 seconds. -
chassis-id-type
—The default value is MAC address. -
chassis-id-value
—The default value is system-mac. -
hold-multiplier
—The default values is 4. The allowable range is from 2 through 10. -
ptopo-configuration-maximum-hold-time
—The default value is 300 seconds. The allowable range is from 1 through 2147483647 seconds. -
transmit-delay
—The default values is 2 seconds. The allowable range is from 1 through 8192 seconds.
The following statements must be explicitly configured:
-
lldp-configuration-notification-interval
—The allowable range is from 5 through 3600 seconds. The default value is 5. -
ptopo-configuration-trap-interval
—The allowable range is from 0 through 3600 seconds. The default value is 0.
By default, LLDP is disabled, and user must configure it using [set protocols
lldp interface (all | interface-name)]
to use the
LLDP services. If it is enabled for all interfaces, you can disable LLDP on specific
interfaces.
The interface-name
must be the physical interface (for example,
ge-1/0/0
) and not a logical interface (unit).
Starting in Junos OS Release
19.4R2, you can configure
the LLDP on redundant Ethernet (reth) interfaces. Use the set protocol lldp
interface <reth-interface>
command to
configure LLDP on reth interface.
Starting in Junos OS Release 22.1R1, you can configure alternate LLDP destination mac
addresses. If no configuration is provided, then the packets are sent to the
nearest-bridge mac-address, which is 01:80:c2:00:00:0e. Use the set
protocols lldp dest-mac-type <mac-type>
statement to configure packets sent out of all interfaces. And use the set
protocols lldp interface <intf-name> dest-mac-type
<mac-type>
statement for packets sent out
of a specific interface.
-
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
To disable LLDP, include the disable
option:
-
To disable LLDP on all interfaces:
[edit protocols lldp] user@switch# set interface all disable
-
To disable LLDP on a specific interface:
[edit protocols lldp] user@switch# set interface interface-name disable
Starting with
Junos OS Release 14.2, you can configure management interfaces, such as fxp0 or me0,
on MX Series routers to send LLDP frames to and receive LLDP frames from neighboring
LLDP interfaces. To configure the management interfaces, include the
interface interface-name
statement at the
[edit protocols lldp]
and [edit routing-instances
routing-instance-name protocols lldp]
hierarchy
levels. By default, the functionality to send LLDP frames is enabled. You can also
specify a management interface with the show lldp neighbors interface
interface-name
command to view configuration
details about LLDP neighbors for the corresponding management interface.
Starting with Junos OS Release 14.2, LLDP is supported on extended ports in the Junos Fusion technology.For information about interface names in the Junos Fusion technology, see Understanding Junos Fusion Ports .
The advertisement interval determines the frequency that an LLDP interface sends LLDP
advertisement frames. The default value is 30 seconds. The allowable range is from 5
through 32768 seconds. You adjust this parameter by including the
advertisement-interval
statement at the [edit protocols
lldp]
hierarchy level.
The hold multiplier determines the multiplier to apply to the advertisement interval.
The resulting value in seconds is used to cache learned LLDP information before
discard. The default value is 4. When used with the default advertisement interval
value of 30 seconds, this makes the default cache lifetime 120 seconds. The
allowable range of the hold multiplier is from 2 through 10. You adjust this
parameter by including the hold-multiplier
statement at the
[edit protocols lldp]
hierarchy level.
The transmit delay determines the delay between any two consecutive LLDP
advertisement frames. The default value is 2 seconds. The allowable range is from 1
through 8192 seconds. You adjust this parameter by including the
transmit-delay
statement at the [edit protocols
lldp]
hierarchy level.
The physical topology configuration maximum hold time determines the time interval
for which an agent device maintains physical topology database entries. The default
value is 300 seconds. The allowable range is from 1 through 2147483647 seconds. You
adjust this parameter by including the
ptopo-configuration-maximum-hold-time
statement at the
[edit protocols lldp]
hierarchy level.
The LLDP configuration notification interval determines the period for which trap
notifications are sent to the SNMP Master Agent when changes occur in the database
of LLDP information. The allowable range is from 5 through 3600 seconds.
You adjust this parameter by
including the lldp-configuration-notification-interval
statement at
the [edit protocols lldp]
hierarchy level.
The physical topology configuration trap interval determines the period for which
trap notifications are sent to the SNMP Master Agent when changes occur in the
global physical topology statistics. This capability is disabled by default. The
allowable range is from 0 (disabled) through 3600 seconds. The LLDP agent sends
traps to the SNMP Master Agent if this interval has a value greater than 0 and there
is any change during the lldp-configuration-notification-interval
trap interval. You adjust this parameter by including the
ptopo-configuration-trap-interval
statement at the
[edit protocols lldp]
hierarchy level.
You can specify the destination MAC address for LLDP. The options are
nearest-bridge
, nearest-customer-bridge
, and
nearest-non-tpmr-bridge
.
By default, the management interface of the device is used in the management address TLV of the LLDP PDU. You can configure the management address or the management interface for LLDP.
If you configure the management address, that address is sent in the management address TLV. If you configure the management interface, the IP address of the management interface is sent in the TLV. If the management interface does not have an IP address, the default IP address of the device's management interface is sent in the TLV. If the device's management interface does not have an IP address, the MAC address of the management interface is sent in the TLV.
Starting in Junos OS Release 15.1R7, you can enable or disable the Link Layer
Discovery Protocol (LLDP) and Physical Topology (PTOPO) MIB traps for a specific
interface or for all interfaces on EX3300, EX4200, EX4500, EX4550, EX6200, and
EX8200 switches by configuring the trap-notification statement at the [edit
protocols lldp interface interface-name]
hierarchy level.
By
default, LLDP generates the SNMP index of the interface for the port ID Type,
Length, and Value (TLV). Starting with Junos OS Release 12.3R1, you can generate the
interface name as the port ID TLV. To do so, include the
interface-name
statement at the [edit protocols lldp
port-id-subtype
] hierarchy level. When the
interface-name
statement is configured on the remote LLDP
neighbor, the show lldp neighbors
command output displays the
interface name in the Port ID
field rather than the SNMP index of
the interface, which is displayed by default. If you change the default behavior of
generating the SNMP index of the interface as the Port ID TLV, you can reenable the
default behavior by including the locally-assigned
statement at the
[edit protocols lldp port-id-subtype
] hierarchy level.
Starting with Junos OS Release 12.3, the value of the MIB variable
lldpLocPortId
depends on the SNMP MIB object entity that is
used to generate the port ID TLV. If the port ID TLV generation is configured to
use the interface name in the set port-id-subtype
interface-name
command, then the value of the MIB variable
lldpLocPortId
is the interface name and not the SNMP
index.
Change History Table
Feature support is determined by the platform and release you are using. Use Feature Explorer to determine if a feature is supported on your platform.
set
protocol lldp interface <reth-interface>
command to configure LLDP on reth interface.[edit protocols lldp interface interface-name]
hierarchy
level.lldpLocPortId
depends on the SNMP MIB object entity that is
used to generate the port ID TLV.