OcNOS SP : Layer 2 Guide : Layer 2 Command Reference : Link Layer Discovery Protocol Commands
Link Layer Discovery Protocol Commands
This chapter describes the Link Layer Discovery Protocol (LLDP) commands.
lldp debug
Use this command to set the debugging functions for LLDP.
Use the no form of this command to turn off LLDP debugging functions
Command Syntax
lldp debug (event|rx|tx|message)
no lldp debug (event|rx|tx|message)
Parameters
event
Enable or disable event debugging
message
Enable or disable NSM message debugging
rx
Enable or disable RX debugging
tx
Enable or disable TX debugging
Command Mode
Exec mode and Privileged Exec mode
Examples
#lldp debug event
#lldp debug messages
lldp (disable|enable) default-agent
Use this command to exclude interface when LLDP enabled globally
Command Syntax
lldp (disable|enable) default-agent
Parameters
disable
Disables default LLDP agent
enable
Enables default LLDP agent
Command Mode
Interface mode
 
Applicability
This command is introduced from OcNOS version 5.0
 
Example
#configure terminal
(config)#interface xe1
(config-if)#lldp disable default-agent
(config-if)#lldp enable default-agent
 
lldp ip
Use this command to set the Link Layer Discovery Protocol with an IP address to be used as a chassis and management ID.
Use the no form of this command to remove this value.
Command Syntax
lldp ip address A.B.C.D
no lldp ip address
Parameters
A.B.C.D
Enter the IP address value
Command Mode
Configure mode
Examples
#configure terminal
(config)#lldp ip address 1.1.1.1
(config)#no lldp ip address
lldp tlv
Use this command to set the TLVs enabled for transmission on a port. Make sure that the complete set of Type Length Values (TLVs) is specified when giving this command, because TLVs not specified are disabled.
Command Syntax
lldp tlv {chassis-id|port-id|ttl|port-description|system-name|system-description|system-capabilities|management-address|ieee-8021-org-specific|ieee-8023-org-specific}
Parameters
chassis-id
Chassis ID type length values (TLV)
port-id
Port ID TLV
ttl
Time to live TLV
port-description
 
Port description TLV
system-name
System name TLV
system-description
 
System Description
system-capabilities
 
System capabilities TLV
management-address
 
Management address TLV
ieee-8021-org-specific
 
IEEE 802.1 organizationally-specific TLV
ieee-8023-org-specific
 
IEEE 802.3 organizationally-specific TLV
Command Mode
Interface mode
Example
#configure terminal
(config)#interface eth0
(config-if)#lldp tlv chassis-id ieee-8021-org-specific ieee-8023-org-specific management-address port-description port-id system-capabilities system-description system-name ttl
set lldp chassis-id-tlv
Use this command to set the chassis ID subtype for the LLDP agent on a port.
Command Syntax
set lldp chassis-id-tlv (mac-address | ip-address)
Parameters
mac-address
Use the MAC address as the chassis ID
ip-address
Use the management IP address as the chassis ID
Command Mode
Interface mode
Examples
#configure terminal
(config)#interface eth0
(config-if)#set lldp chassis-id-tlv ip-address
set lldp disable
Use this command to disable the LLDP agent on a port.
Command Syntax
set lldp disable
Parameters
None
Command Mode
Interface mode
Examples
#configure terminal
(config)#interface eth0
(config-if)#set lldp disable
set lldp enable
Use this command to enables an LLDP agent on a port and specifies its type.
Command Syntax
set lldp enable (txonly|txrx|rxonly)
Parameters
rxonly
Receive-only
txonly
Transmit-only
txrx
Transmit and receive
Default
By default, no LLDP agent is enabled for a port.
Command Mode
Interface mode
Examples
#configure terminal
(config)#interface eth 0
(config-if)#set lldp enable txrx
set lldp locally-assigned
Use this command to locally assign the LLDP Port ID and the Chassis ID TLV parameters.
Command Syntax
set lldp locally-assigned NAME
Parameters
NAME
Name assigned to the port.
Command Mode
Interface mode
Examples
#configure terminal
(config)#interface eth 0
(config-if)#set lldp locally-assigned port1
set lldp management-address-tlv
Use this command to set the management address subtype for the LLDP agent on a port.
Command Syntax
set lldp management-address-tlv (mac-address | ip-address)
Parameters
mac-address
Use the MAC address as the chassis ID
ip-address
Use the management IP address as the chassis ID
Command Mode
Interface mode
Examples
#configure terminal
(config)#interface eth 0
(config-if)#set lldp management-address-tlv ip-address
set lldp msg-tx-hold
Use this command to set the msg-tx-hold parameter that determines the Time To Live (TTL) value for LLDPDUs to be transmitted by the port. The value set with this command is multiplied by the lldp timer msg-tx-interval value, which determines the final TTL value.
Command Syntax
set lldp msg-tx-hold VALUE
Parameters
VALUE
Time in seconds of LLDP msg-tx-hold
Default
The default value of the lldp msg-tx-hold parameter is 4 seconds.
Command Mode
Interface mode
Examples
#configure terminal
(config)#interface eth0
(config)#set lldp msg-tx-hold 3
set lldp system-description
Use this command to identify the string that describes the LLDP system.
Command Syntax
set lldp system-description LINE
Parameters
LINE
Set the description of the LLDP system.
Default
The default status of Ethernet OAM is disabled.
Command Mode
Configure mode
Example
#configure terminal
(config)#set lldp system-description LLDP agent on B1
set lldp system-name
Use this command to identify the system name of the LLDP function.
Command Syntax
set lldp system-name NAME
Parameters
NAME
Name of the LLDP system.
Command Mode
Configure mode
Example
#configure terminal
(config)#set lldp system-name LLDP1
set lldp timer
Use this command to set the interval at which LLDP frames are transmitted.
Command Syntax
set lldp timer msg-tx-interval <5-32768>
set lldp timer reinitDelay VALUE
set lldp timer tx-delay <1-8192>
Parameters
msg-tx-interval
 
Set the message transmit interval value
<5-32768>
Set the message transmit interval value
reinitDelay
Set the reinit delay value
VALUE
Set the reinit delay value
tx-delay
Set the transmit delay value
<1-8192>
Set the transmit delay value in range of:
(1 <= tx-delay <= ((0.25)* msg-tx-interval)
Default Values
The default value for msg-tx-interval is 30 seconds.
The default value for reinitDelay is 2 seconds.
The default value of the tx-delay is 2 seconds.
Command Mode
Interface mode
Examples
#configure terminal
(config)#interface eth0
(config-if)#set lldp timer msg-tx-interval 40
 
#configure terminal
(config)#interface eth0
(config-if)#set lldp timer reinitDelay 3
 
#configure terminal
(config)#interface eth0
(config-if)#set lldp timer tx-delay 3
 
set lldp too-many-neighbors
Use this command to set the action to take when the remote table is full.
Command Syntax
set lldp too-many-neighbors limit <1-65535> discard received-info timer <1-65535>
set lldp too-many-neighbors limit <1-65535> discard existing-info MAC
timer <1-65535>
Parameters
limit
The limit on the number of LLDP neighbors.
<1-65535>
The limit on the number of LLDP neighbors.
received-info
The information received for this neighbor.
timer
The period after which received information is discarded.
<1-65535>
 
The period in seconds after which received information is discarded.
existing-info
The information for this neighbor.
MAC
Identifies the remote LLDP Agent for which information is discarded.
timer
The period in seconds after which existing information is discarded.
<1-65535>
 
The period in seconds after which existing information is discarded.
Default Value
No upper limit is enforced for the number of remote LLDP agents.
Command Mode
Interface mode
Examples
#configure terminal
(config)#interface eth1
(config-if)#set lldp too-many-neighbors limit 20 disc existing-info 1.1.1.1.1 timer 1
 
(config)#interface eth1
(config-if)#set lldp too-many-neighbors limit 1 discard received-info timer 1
show lldp
Use this command to display LLDP port information.
Command Syntax
show lldp port IFNAME
show lldp port IFNAME statistics
Parameters
IFNAME
The name of the interface
statistics
Display LLDP port statistics
Command Mode
Exec mode and Privileged Exec mode
Example
The following sample output from this command displays detailed information about an LLDP-enabled port.
#show lldp port eth0
Remote LLDP
MAC Address: 01:06:29:CF:79:A1
TTL: 60
Network Address: 192.168.1.0
Interface Name: eth1
Interface Locally Assigned String: Port-a
Interface Description: bridge
Interface Number: 2
Port Vlan ID: 1
Protocol ID: 274242030202
AutoNego Support: Supported
AutoNego Capability: 1
Operational MAU Type: 3
Link Aggregation Status: Capable
Link Aggregation Port ID: 0
Max Frame Size: 128
System name:
System Description: bridge
System Capabilities: 4
System Capabilities Enabled: 4
 
The following sample output from this command displays all LLDP statistics for a selected port.
#show lldp port eth0 statistics
LLDP Port statistics for eth0
Frames transmitted: 22
Frames Aged out: 0
Frames Discarded: 0
Frames with Error: 0
Frames Received: 5
TLVs discarded: 0
TLVs unrecognized 0
snmp restart lldp
Use this command to restart SNMP in Link Layer Discovery Protocol (LLDP)
Command Syntax
snmp restart lldp
Parameters
None
Command Mode
Configure mode
Examples
#snmp restart lldp