LLDP Configuration Commands I Table of Contents Chapter 1 LLDP Configuration Commands.................................................................................................1 1.1 LLDP Commands............................................................................................................................. 1 1.1.1 lldp run.................................................................................................................................1 1.1.2 lldp holdtime........................................................................................................................2 1.1.3 lldp timer..............................................................................................................................2 1.1.4 lldp reinit.............................................................................................................................. 3 1.1.5 lldp tlv-select.......................................................................................................................4 1.1.6 lldp dot1-tlv-select..............................................................................................................5 1.1.7 lldp dot3-tlv-select..............................................................................................................6 1.1.8 lldp med-tlv-select..............................................................................................................7 1.1.9 lldp transmit.........................................................................................................................8 1.1.10 lldp receive........................................................................................................................9 1.1.11 lldp management-ip....................................................................................................... 9 1.1.12 lldp trap-send................................................................................................................10 1.1.13 location elin identifier id WORD..........................................................................11 1.1.14 location civic identifier id.........................................................................................12 1.1.15 location elin/civic id.....................................................................................................14 1.1.16 show lldp errors...........................................................................................................15 1.1.17 show lldp interface......................................................................................................15 1.1.18 show lldp neighbors....................................................................................................16 1.1.19 show lldp neighbors detail......................................................................................17 1.1.20 show lldp traffic........................................................................................................... 19 1.1.21 show location elin....................................................................................................... 20 1.1.22 show location civic [identifier id]......................................................................... 20 1.1.23 clear lldp counters...................................................................................................... 21 1.1.24 clear lldp table.............................................................................................................22 II Table of Contents Chapter 1 LLDP Configuration Commands 1.1 LLDP Commands 1.1.1 lldp run Syntax To enable LLDP, run lldp run; to disable LLDP, run no lldp run. lldp run no lldp run Parameters None Default Value The debugging switch is disabled. Usage Guidelines The port will send lldp packets after the lldp function is enabled. Command Mode Global configuration mode Example The following command is used to enable LLDP. switch_config# lldp run 1 Table of Contents 1.1.2 lldp holdtime Syntax To configure the ttl value of LLDP, run lldp holdtime time. To resume the default transmission delay, run no lldp holdtime. lldp holdtime time no lldp holdtime Parameters Parameters Description time Holdtime of the to-be-transmitted packet Range: 0-65535 seconds Default Value 120s Usage Guidelines In normal condition, the remote information stored in MIB will update before aging. But the frame may loss in sending and causes the information ages. For avoiding this, you need to set the value of TTL and ensure the update LLDP frame is forwarded time after time. Command Mode Global configuration mode Example The following example shows how to set the ttl value of LLDP to 100 seconds. switch_config# lldp holdtime 100 switch_config# 1.1.3 lldp timer Syntax To configure the transmission delay of LLDP, run lldp timer time. To resume the default transmission delay, run no lldptimer. lldp timer time 2 Table of Contents no lldp timer Parameters Parameters Description time Interval for LLDP to transmit the packets Range: 5-65534 seconds Default Value 30s Usage Guidelines The transmission interval of the LLDP message must be shorter than its storage time, ensuring multiple updates in the storage time and preventing error which is led by packet loss. Command Mode Global configuration mode Example The following example shows how to configure the transmission interval of LLDP to 24 seconds. switch_config# lldp timer 24 switch_config# 1.1.4 lldp reinit Syntax To configure the transmission delay of LLDP, run lldp reinit time. To resume the default transmission delay, run no lldp reinit. lldp reinit time no lldp reinit Parameters Parameters Description time Transmission delay of LLDP, whose values range from two to five seconds Range: 2-5 seconds 3 Table of Contents Default Value 2 s Usage Guidelines LLDP information will be forwarded automatically in two conditions: first, the status or value of one or more information elements (management objects) change; second, the sending timer timeouts. A single information change cause the LLDP packet is forwarded and a series of information change may cause many LLDP frames forwarded, but a frame can only report one change. For avoiding this, the web management defines the interval of two continuous LLDP frames. Command Mode Global configuration mode Example The following example shows how to set the transmission delay of LLDP to five seconds. switch_config# lldp reinit 5 switch_config# 1.1.5 lldp tlv-select Syntax To add TLV which is transmitted by the LLDP message, run lldp med-tlv-select tlv-type. To delete TLV which is transmitted by the LLDP message, run no lldp med-tlv-select tlv-type. lldp tlv-select tlv-type no lldp tlv-select tlv-type Parameters Parameters Description tlv-type Stands for TLV that are available for selective transmission. Its values are: management-address management address TLV port-description port description TLV system-capabilities system-capabilities TLV system-description system description TLV 4 Table of Contents system-name system name TLV Default Value All TLVs are sent. Usage Guidelines Three mandatory TLVs must be sent. Command Mode Global configuration mode Example The following example shows how to enable the port description not to be transmitted in the message. switch_config#no lldp tlv-select port-description switch_config# 1.1.6 lldp dot1-tlv-select Syntax To add TLV which is transmitted by the LLDP message, run lldp med-tlv-select tlv-type. To delete TLV which is transmitted by the LLDP message, run no lldp med-tlv-select tlv-type. lldp dot1-tlv-select tlv-type no lldp dot1-tlv-select tlv-type Parameters Parameters Description tlv-type Stands for TLV that are available for selective transmission. Its values are: port-vlan-id port vlan address TLV protocol-vlan-id port and protocol VLAN ID TLV vlan-name vlan名TLV Default Value All TLVs are sent. 5 Table of Contents Usage Guidelines The TLV of the protocol identity does not support transmission but supports reception. Command Mode Port configuration mode Example The following example shows how to enable the TLV not to be transmitted by deletion of the VLAN address of a port in the transmitted packet. switch_config#int g0/1 switch_config_g0/1#no lldp dot1-tlv-select port-vlan-id switch_config_g0/1# 1.1.7 lldp dot3-tlv-select Syntax To add TLV which is transmitted by the LLDP message, run lldp med-tlv-select tlv-type. To delete TLV which is transmitted by the LLDP message, run no lldp med-tlv-select tlv-type. lldp dot3-tlv-select tlv-type no lldp dot3-tlv-select tlv-type Parameters Parameters Description tlv-type Stands for TLV that are available for selective transmission. Its values are: link-aggregation link aggregation TLV macphy-confg MAC/Phy configuration/status TLV max-frame-size max frame size TLV power Power Via MDI TLV Default Value All TLVs are sent. Usage Guidelines None 6 Table of Contents Command Mode Port configuration mode Example The following example shows how to enable the TLV not to be transmitted by deletion of the MAC/Phy configuration/status of a port in the transmitted packet. switch_config#int g0/1 switch_config_g0/1#no lldp dot3-tlv-select macphy-confg switch_config_g0/1# 1.1.8 lldp med-tlv-select Syntax To add TLV which is transmitted by the LLDP message, run lldp med-tlv-select tlv-type. To delete TLV which is transmitted by the LLDP message, run no lldp med-tlv-select tlv-type. lldp med-tlv-select tlv-type no lldp med-tlv-select tlv-type Parameters Parameters Description tlv-type Stands for TLV that are available for selective transmission. Its values are: network-policy network policy TLV inventory inventory management TLV location location identification TLV power-management expand Power Via MDI TLV Default Value All TLVs are sent. Usage Guidelines By default, the TLV of MED cannot be transmitted. When the TLV of MED need be transmitted, the MED capability TLV must be transmitted. Hence it does not fall into the choice. 7 Table of Contents Command Mode Port configuration mode Example The following example shows how to enable the TLV not to be transmitted by deletion of the detailed list management in a transmitted packet. switch_config#int g0/1 switch_config_g0/1#no lldp med-tlv-select inventory switch_config_g0/1# 1.1.9 lldp transmit Syntax lldp transmit no lldp transmit To set the port to send the LLDP message, run lldp transmit. To forbid receiving the LLDP message, run no lldp transmit. Parameters None Default Value Transmittable LLDP message mode Usage Guidelines Only after the LLDP module is enabled can the command be valid. Command Mode Port configuration mode Example The following example shows how to set port g0/1 not to send the LLDP message. switch_config_g0/1# no lldp transmit switch_config_g0/1# 8 Table of Contents 1.1.10 lldp receive Syntax lldp receive no lldp receive To set the port to the receivable LLDP message mode, run lldp receive. To forbid receiving the LLDP message, run no lldp receive. Parameters None Default Value Receivable LLDP message mode Usage Guidelines Only after the LLDP module is enabled can the configuration be valid. Command Mode Port configuration mode Example The following example shows how to set port g0/1 not to receive the LLDP message. switch_config_g0/1# no lldp receive switch_config_g0/1# 1.1.11 lldp management-ip Syntax lldp management-ip A.B.C.D no lldp management-ip To configure the management address of the LLDP port, run lldp management-ip A.B.C.D. To resume the default transmission delay, run no lldp management-ip. 9 Table of Contents Parameters Parameters Description A.B.C.D Stands for the management IP address that will be specified. Default Value The default management address is the IP address of the VLAN interface that pvid corresponds to; if this IP address does not exist, the default management address is 0.0.0.0. Usage Guidelines The configured management IP address should be the IP address related with a port. Command Mode Port configuration mode Example The following example shows how to set the management IP address of port g0/1 to 90.0.0.99. switch_config_g0/1# lldp management-ip 90.0.0.99 switch_config_g0/1# 1.1.12 lldp trap-send Syntax lldp tranp-send lldp-mib To forward trap notification to lldp mib, run this command. lldp tranp-send ptopo-mib To forward trap notification to ptopo mib, run this command. Parameters None Default Value None 10 Table of Contents Usage Guidelines None Command Mode Global configuration mode Example The following example shows how to send trap notification to lldp mib. switch_config#lldp trap-send lldp-mib switch_config# The following example shows how to send trap notification to ptopo mib. switch_config#lldp trap-send ptopo-mib switch_config# 1.1.13 location elin identifier id WORD Syntax location elin identifier id WORD no location elin identifier id To add the elin information, run location elin identifier id WORD; to delete the elin information, run no location elin identifier id. Parameters Parameters Description id Stands for the ID of the to-be-set elin, which ranges from 1 to 65535. WORD Stands for the content of the configured elin, which ranges from 10 to 25 bytes. Default Value None 11 Table of Contents Usage Guidelines None Command Mode Global configuration mode Example The following example shows how to set the identifier to 1 and the content of elin to 1234567890. switch_config# location elin identifier 1 1234567890 switch_config# 1.1.14 location civic identifier id Syntax location civic identifier id no location civic identifier id To enter the location configuration mode and set the civic information, run location civic identifier id. To delete the civic information, run no location civic identifier id. Parameters Parameters Description id Stands for the ID of the to-be-set civic, which ranges from 1 to 65535. Default Value None Usage Guidelines After the system enters the location configuration mode, you can run the following commands to conduct the corresponding configuration to the civic of the ID. Command Purpose (no) language WORD Sets the language. (no) state WORD Sets the state’s (provincial) name, such as shanghai. 12 Table of Contents (no) county WORD Sets the name of a county. (no) city WORD Sets the name of a city. (no) division WORD Sets the name of a division. (no) neighborhood WORD Sets the name of neighborhood. (no) street WORD Sets the name of a street. (no) leading-street-dir WORD Sets the direction of a main street, such as N (north). (no) trailing-street-suffix WORD Sets the suffix of a small street, such as SW. (no) street-suffix WORD Sets the suffix of a street, such as platz. (no) number WORD Sets the street number, such as number 123. Sets the suffix of the street number, such as number (no) street-number-suffix WORD 1/2 of A road. (no) landmark WORD Sets the landmark, such as Colombia University. (no) additional-location WORD Sets the additional location. Sets the information about a resident, such as Joe’s (no) name WORD haircut shop. (no) postal-code WORD Sets the postal code. (no) building WORD Sets the information about a building. (no) unit WORD Sets the information about a unit. (no) floor WORD Sets the information about a floor. (no) room WORD Sets the information about a room. (no) type-of-place WORD Sets the type of a place, such as office. (no) postal-community WORD Sets the name of a postal office. (no) post-office-box WORD Sets the name of a postal box, such as 12345. (no) additional-code WORD Sets the additional code. (no) country WORD Sets the name of a country. (no) script WORD Sets the script. Command Mode Global configuration mode Example The following example shows how to set the civic information of identifier 1. Switch_config#location civic identifier 1 Switch_config_civic#language English Switch_config_civic#city Shanghai 13 Table of Contents Switch_config_civic#street Curie Switch_config_civic#script EN Switch_config_civic#quit Switch_config# 1.1.15 location elin/civic id Syntax location elin/civic id no location elin/civic To set the location for a port, run location elin/civic id. To delete the location of a port, run no location elin/civic id. Parameters Parameters Description id Stands for the ID of the to-be-set elin/civic, which ranges from 1 to 65535. Default Value None Usage Guidelines None Command Mode Port configuration mode Example The following example shows how to set the elin and the civic for a port. Switch_config#int g0/8 Switch_config_g0/8#location elin 1 Switch_config_g0/8#location civic 1 14 Table of Contents 1.1.16 show lldp errors Syntax show lldp errors To display the error information about the LLDP module, run this command. Parameters None Default Value None Usage Guidelines None Command Mode EXEC/global configuration mode Example The following example shows how to check the error information of lldp module. switch_config#show lldp errors LLDP errors/overflows: Total memory allocation failures: 0 Total encapsulation failures: 0 Total table overflows: 0 switch_config# 1.1.17 show lldp interface Syntax show lldp interface interface-name To check the transmission and reception mode, run show lldp interface interface name. 15 Table of Contents Parameters Parameters Description interface-name The interrface name, for instance, "G0/1", "GigaEthernet0/1". Default Value None Usage Guidelines Only when lldp is enabled can the state of the port, the transmission and reception mode of lldp packets can be checked. Command Mode EXEC/global configuration mode Example The following example shows how to check the transmission and reception mode of port g0/1. switch_config#show lldp interface g0/1 GigaEthernet0/1: Rx: enabled Tx: enabled switch_config# 1.1.18 show lldp neighbors Syntax show lldp neighbors To display the simple information about neighbors, run this command. Parameters None Default Value None 16 Table of Contents Usage Guidelines The command is used to display the simple information about neighbor list, including Device-ID, Local-Intf, Hldtme, Port-ID and Capability. Command Mode EXEC/global configuration mode Example switch_config#show lldp neighbors Capability Codes: (R)Router,(B)Bridge,(C)DOCsIs Cable Device,(T)Telephone (W)WLAN Access Point, (P)Repeater,(s)station,(O)Other Device-ID Local-Intf Hldtme Port-ID Capability switch Gig0/2 115 Gig0/32 B switch Gig0/32 114 Gig0/2 B Total entries dispalyed: 2 switch_config# 1.1.19 show lldp neighbors detail Syntax show lldp neighbors detail It is used to display the detailed information about the neighbor. Parameters None Default Value None Usage Guidelines None 17 Table of Contents Command Mode EXEC/global configuration mode Example switch_config#show lldp neighbors detail chassis id: 00e0.0f61.ca53 port id: Gig0/32 port description: GigaEthernet0/32 system name: switch system description: s3448 software, Version 2.0.1K serial: s35000456 Compiled: 2008-11-13 13:33:36 by 16170F032B9F Time remaining: 98 system capabilities: R B enabled capabilities: B Managment Address: IP: 192.168.213.62 Auto Negotiation -- supported,enabled Physical media capabilitise: 100baseTX(FD) 100baseTX(HD) 10baseT(FD) 10baseT(HD) Media Attachment Unit type: 16 ------------------------------------------ chassis id: 00e0.0f61.ca35 port id: Gig0/2 port description: GigaEthernet0/2 system name: switch system description: s3448 software, Version 2.0.1K serial: s35000456 Compiled: 2008-11-13 13:33:36 by 16170F032B9F Time remaining: 95 system capabilities: R B enabled capabilities: B Managment Address: IP: 90.0.0.66 18 Table of Contents Auto Negotiation -- supported,enabled Physical media capabilitise: 100baseTX(FD) 100baseTX(HD) 10baseT(FD) 10baseT(HD) Media Attachment Unit type: 16 ------------------------------------------ Total entries dispalyed: 2 switch# 1.1.20 show lldp traffic Syntax show lldp traffic To display all statistics information about LLDP, run show lldp traffic. Parameters None Default Value None Usage Guidelines None Command Mode EXEC/global configuration mode Example switch_config#show lldp traffic LLDP traffic statistics: Total frames out: 1599 Total entries aged: 0 Total frames in: 624 19 Table of Contents Total frames received in error: 0 Total frames discarded: 0 Total TLVs unrecognized: 0 switch_config# 1.1.21 show location elin Syntax show location elin To display the elin configuration of the location, run the previous command. Parameters None Default Value None Usage Guidelines None Command Mode EXEC/global configuration mode Example Switch_config#show location elin elin information: elin 2: 0987654321 elin 1: 1234567890 total: 2 Switch_config# 1.1.22 show location civic [identifier id] Syntax show location civic [identifier id] To display the civic information of the location, run the previous command. 20 Table of Contents Parameters Parameters Description id Stands for the ID of the to-be-set civic, which ranges from 1 to 65535. Default Value None Usage Guidelines None Command Mode EXEC/global configuration mode Example Switch_config#show location civic civic address information: identifier: 2 Language: Chinese Script: CN ------------------------------------- identifier: 1 City: Shanghai Language: English Script: EN ------------------------------------- total: 2 Switch_config# 1.1.23 clear lldp counters Syntax clear lldp counters To clear the statistics information, run clear lldp counters. Parameters None 21 Table of Contents Default Value None Usage Guidelines None Command Mode EXEC Example switch#clear lldp counters switch# switch#show lldp traffic LLDP traffic statistics: Total frames out: 0 Total entries aged: 0 Total frames in: 0 Total frames received in error: 0 Total frames discarded: 0 Total TLVs unrecognized: 0 switch# switch#show lldp errors LLDP errors/overflows: Total memory allocation failures: 0 Total encapsulation failures: 0 Total table overflows: 0 switch# 1.1.24 clear lldp table Syntax clear lldp table To remove the neighbor list, run cleas lldp table. Parameters None 22 Table of Contents Default Value None Usage Guidelines None Command Mode EXEC Example switch#clear lldp table switch# switch#show lldp neighbors Capability Codes: (R)Router,(B)Bridge,(C)DOCsIs Cable Device,(T)Telephone (W)WLAN Access Point, (P)Repeater,(s)station,(O)Other Device-ID Local-Intf Hldtme Port-ID Capability Total entries displayed: 0 23