06-LLDP命令
本章节下载: 06-LLDP命令 (176.68 KB)
目 录
1.1.1 display lldp local-information
1.1.2 display lldp neighbor-information
1.1.7 lldp check-change-interval
1.1.8 lldp compliance admin-status cdp
1.1.11 lldp encapsulation snap
1.1.14 lldp management-address-format string
1.1.15 lldp management-address-tlv
1.1.16 lldp notification remote-change enable
1.1.17 lldp timer notification-interval
1.1.18 lldp timer reinit-delay
【命令】
display lldp local-information [ global | interface interface-type interface-number ]
【视图】
任意视图
【缺省级别】
1:监控级
【参数】
global:显示全局LLDP信息。
interface interface-type interface-number:端口类型和端口编号,显示指定端口的LLDP信息。
【描述】
display lldp local-information命令用来显示当前设备要发送的LLDP信息,这些信息将被组织成TLV发送给邻居。
需要注意的是,如果不指定参数,将显示当前设备所有要发送给邻居的LLDP信息,包括全局LLDP信息以及使能LLDP功能且状态为up端口的LLDP信息。
【举例】
<Sysname> display lldp local-information
Global LLDP local-information:
Chassis ID : 00e0-fc00-5600
System name : System
System description : System
System capabilities supported : Bridge,Router
System capabilities enabled : Bridge,Router
MED information
Device class: Connectivity device
HardwareRev : REV.A
FirmwareRev : 109
SoftwareRev : 5.20 Alpha 2101
SerialNum : NONE
Manufacturer name : Unknown
Model name : Unknown
Asset tracking identifier : Unknown
LLDP local-information of port 1[GigabitEthernet1/1/1]:
Port ID subtype : Interface name
Port ID : GigabitEthernet1/1/1
Port description : GigabitEthernet1/1/1 Interface
Management address type : ipV4
Management address : 192.168.102.11
Management address interface type : IfIndex
Management address interface ID : 54
Management address OID : 0
Port VLAN ID(PVID): 1
Port and protocol VLAN ID(PPVID) : 1
Port and protocol VLAN supported : Yes
Port and protocol VLAN enabled : No
VLAN name of VLAN 1: VLAN 0001
Auto-negotiation supported : Yes
Auto-negotiation enabled : Yes
OperMau : speed(1000)/duplex(Full)
PoE supported: No
Link aggregation supported : Yes
Link aggregation enabled : No
Aggregation port ID : 0
Maximum frame Size: 1536
MED information
Media policy type : Unknown
Unknown Policy : Yes
VLAN tagged : No
Media policy VlanID : 0
Media policy L2 priority : 0
Media policy Dscp : 0
表1-1 display lldp local-information命令显示信息描述表
字段 |
描述 |
Global LLDP local-information |
显示全局LLDP信息 |
Chassis ID |
设备MAC |
System name |
设备名称 |
System description |
系统描述 |
System capabilities supported |
系统支持的功能,其中: l Bridge表示交换功能已使能 l Router表示支持路由功能 |
System capabilities enabled |
系统使能的功能,其中: l Bridge表示交换功能已使能 l Router表示路由功能已使能 |
MED information |
MED相关信息 |
Device class |
MED设备类型,其中: l Connectivity device表示网络连接设备 l Class Ⅰ表示一般终端设备,即所有需要LLDP发现服务的终端设备 l Class Ⅱ表示媒体终端设备,即具备媒体能力的终端设备,其能力包含了一般终端设备的能力,但该类设备支持媒体流 l Class Ⅲ表示通讯终端设备,即直接支持目标用户IP通讯系统的终端设备,其能力包含了一般终端设备和媒体终端设备的所有能力,但是该类设备直接被目标用户所使用 |
HardwareRev |
产品的硬件版本 |
FirmwareRev |
产品的固件版本 |
SoftwareRev |
产品的软件版本 |
SerialNum |
序列号 |
Manufacturer name |
制造厂商 |
Model name |
模块名称 |
Asset tracking identifier |
资产跟踪ID |
LLDP local-information of port number interface-type interface-number |
指定端口的LLDP信息 |
Port ID subtype |
端口ID类型 |
Port ID |
端口ID值 |
Port description |
端口描述 |
Management address type |
管理地址类型 |
Management address |
管理地址 |
Management address interface type |
管理地址所在接口的编码方式 |
Management address interface ID |
管理地址所在接口ID |
Management address OID |
管理地址对象标识 |
Port VLAN ID(PVID) |
端口VLAN ID |
Port and protocol VLAN ID(PPVID) |
端口协议VLAN ID |
Port and protocol VLAN supported |
是否支持端口协议VLAN |
Port and protocol VLAN enabled |
是否使能端口协议VLAN |
VLAN name of VLAN ID |
VLAN ID对应VLAN的名称 |
Auto-negotiation supported |
端口是否支持自协商 |
Auto-negotiation enabled |
端口是否使能自协商 |
OperMau |
端口自适应的速率和双工状态 |
PoE supported |
设备是否支持PoE |
Link aggregation supported |
端口是否支持链路聚合 |
Link aggregation enabled |
端口是否使能链路聚合 |
Aggregation port ID |
聚合端口的端口ID,倘若未使能链路聚合功能,值为0 |
Maximum frame Size |
端口支持的最大帧长度 |
MED information |
显示MED LLDP信息 |
Media policy type |
媒体策略类型: l unknown:表示类型未知 l voice:表示语音 l voiceSignaling:表示语音信号 l guestVoice:表示访客语音 l guestVoiceSignaling:表示访客语音信号 l softPhoneVoice:表示软体电话语音 l videoconferencing:表示视频会议 l streamingVideo:表示流视频 l videoSignaling:表示视频信号 |
Unknown Policy |
媒体策略类型是否未知,Yes表示策略类型未知,No表示策略类型已知 |
VLAN tagged |
Voice VLAN是否加Tag |
Media Policy VlanID |
Voice VLAN的VLAN ID |
Media Policy L2 priority |
二层优先级 |
Media Policy Dscp |
DSCP的值 |
Location format |
位置信息格式,其中: l Invalid表示无效位置数据类型 l Coordinate-based LCI表示基于坐标的位置信息 l Civic Address LCI表示普通地址信息 l ECS ELIN表示紧急电话号码 |
Location Information |
位置信息 |
【命令】
display lldp neighbor-information [ interface interface-type interface-number ] [ brief ]
【视图】
任意视图
【缺省级别】
1:监控级
【参数】
interface interface-type interface-number:端口类型和端口编号,显示从指定端口收到的LLDP信息。
brief:显示摘要信息。
【描述】
display lldp neighbor-information命令用来显示从邻居收到的LLDP信息,邻居将这些信息组织成TLV发送给当前设备。
需要注意的是,如果不指定参数,将显示所有从邻居收到的LLDP信息,否则将显示从指定端口收到的LLDP信息。
【举例】
# 显示所有从邻居收到的LLDP信息。
<Sysname> display lldp neighbor-information
LLDP neighbor-information of port 1[GigabitEthernet1/1/1]:
Neighbor index : 1
Update time : 0 days,0 hours,1 minutes,1 seconds
Chassis type : MAC address
Chassis ID : 000f-0055-0002
Port ID type : Interface name
Port ID : GigabitEthernet1/1/1
Port description : GigabitEthernet1/1/1 Interface
System name : Sysname
System description : Sysname Switch
System capabilities supported : Bridge,Router
System capabilities enabled : Bridge,Router
Management address type : ipV4
Management address : 127.0.0.1
Management address interface type : IfIndex
Management address interface ID : Unknown
Management address OID : 0
Port VLAN ID(PVID): 1
Port and protocol VLAN ID(PPVID) : 1
Port and protocol VLAN supported : Yes
Port and protocol VLAN enabled : No
VLAN name of VLAN 1: VLAN 0001
Auto-negotiation supported : Yes
Auto-negotiation enabled : Yes
OperMau : speed(1000)/duplex(Full)
Power port class : PD
PSE power supported : No
PSE power enabled : No
PSE pairs control ability : No
Power pairs : Signal
Port power classification : Class 0
Link aggregation supported : Yes
Link aggregation enabled : No
Aggregation port ID : 0
Maximum frame Size: 1536
Neighbor index : 2
Neighbor index : 1
Update time : 0 days,0 hours,1 minutes,1 seconds
Chassis type : MAC address
Chassis ID : 000f-0055-0002
Port ID type : Interface name
Port ID : GigabitEthernet1/1/2
Port description : GigabitEthernet1/1/2 Interface
System name : Sysname
System description : Sysname Switch
System capabilities supported : Bridge,Router
System capabilities enabled : Bridge,Router
Management address type : ipV4
Management address : 127.0.0.1
Management address interface type : IfIndex
Management address interface ID : Unknown
Management address OID : 0
Port VLAN ID(PVID): 1
Port and protocol VLAN ID(PPVID) : 1
Port and protocol VLAN supported : Yes
Port and protocol VLAN enabled : No
VLAN name of VLAN 1: VLAN 0001
Auto-negotiation supported : Yes
Auto-negotiation enabled : Yes
OperMau : speed(1000)/duplex(Full)
Power port class : PD
PSE power supported : No
PSE power enabled : No
PSE pairs control ability : No
Power pairs : Signal
Port power classification : Class 0
Link aggregation supported : Yes
Link aggregation enabled : No
Aggregation port ID : 0
Maximum frame Size: 1536
表1-2 display lldp neighbor-information命令显示信息描述表
字段 |
描述 |
LLDP neighbor-information of Port number interface-type interface number |
显示从指定端口收到的LLDP信息 |
Neighbor index |
邻居索引 |
Update time |
邻居信息最新更新时间 |
Chassis type |
Chassis ID类型,其中: l Chassis component表示底架组件 l Interface alias表示接口化名 l Port component表示端口组件 l MAC address表示MAC地址 l Network address表示网络地址 l Interface name表示接口名称 l Locally assigned表示本地配置 |
Chassis ID |
Chassis ID值 |
Port ID type |
Port ID类型,其中: l Interface alias表示接口化名 l Port component表示端口组件 l MAC address表示MAC地址 l Network Address表示网络地址 l Interface name表示接口名称 l Agent circuit ID表示代理巡回标识 l Locally assigned表示本地配置 |
Port ID |
端口ID值 |
Port description |
端口描述 |
System name |
设备名称 |
System description |
系统描述 |
System capabilities supported |
系统支持的功能,其中: l Bridge表示支持交换功能 l Router表示支持路由功能 l Repeater表示支持转发功能 |
System capabilities enabled |
系统使能的功能,其中: l Bridge表示交换功能已使能 l Router表示路由功能已使能 l Repeater表示转发功能已使能 |
Management address type |
管理地址类型 |
Management address |
管理地址 |
Management address interface type |
管理地址接口类型 |
Management address interface ID |
管理地址接口索引 |
Management address OID |
管理地址对象标识 |
Port VLAN ID |
端口VLAN ID |
Port and protocol VLAN ID(PPVID) |
端口协议VLAN ID |
Port and protocol VLAN supported |
是否支持端口协议VLAN |
Port and protocol VLAN enabled |
是否使能端口协议VLAN |
VLAN name of VLAN 1 |
端口VLAN对应的VLAN名称 |
Auto-negotiation supported |
端口是否支持自协商 |
Auto-negotiation enabled |
端口是否使能自协商 |
OperMau |
端口自适应的速率和双工状态 |
Power port class |
PoE类型,其中: l PSE表示供电设备 l PD表示受电设备 |
PSE power supported |
是否支持PSE |
PSE power enabled |
是否使能PSE |
PSE pairs control ability |
供电方式是否可控 |
Power pairs |
PoE接口远程供电模式(信号线&空闲供电模式) |
Port power classification |
PD的端口控制级别,其中: l Class0表示级别1 l Class1表示级别2 l Class2表示级别3 l Class3表示级别4 l Class4表示级别5 |
Link aggregation supported |
端口是否支持链路聚合 |
Link aggregation enabled |
端口是否使能链路聚合 |
Aggregation port ID |
聚合端口的端口ID,倘若未使能链路聚合功能,值为0 |
Maximum frame Size |
端口发送支持的最大帧长度 |
Location format |
位置信息格式,其中: l Invalid表示无效位置数据类型 l Coordinate-based LCI表示基于坐标的位置信息 l Civic Address LCI表示普通地址信息 l ECS ELIN表示紧急电话号码 |
Location Information |
位置信息 |
PoE PSE power source |
PSE的电源类型,其中: l Primary表示主用电源 l Backup表示备用电源 |
PoE service type |
PoE服务类型 |
Port PSE Priority |
端口PSE优先级,其中: l Unknown表示未知 l Critical表示优先级1级 l High表示优先级2级 l Low表示优先级3级 |
Available power value |
端口PoE所能提供的电量值 |
Unknown basic TLV |
未知的基本TLV |
TLV type |
未知的基本TLV类型 |
TLV information |
未知的基本TLV的具体信息 |
Unknown organizationally-defined TLV |
未知组织定义TLV |
TLV OUI |
未知组织定义TLV的对象唯一标识 |
TLV subtype |
未知的组织定义TLV类型 |
Index |
未知组织的索引 |
TLV information |
未知组织定义TLV的具体信息 |
【命令】
display lldp statistics [ global | interface interface-type interface-number ]
【视图】
任意视图
【缺省级别】
1:监控级
【参数】
global:显示全局LLDP统计信息。
interface interface-type interface-number:端口类型和端口编号,显示指定端口的LLDP统计信息。
【描述】
display lldp statistics命令用来显示LLDP统计信息。
需要注意的是,如果不指定参数,将显示所有LLDP统计信息。
【举例】
# 显示所有LLDP统计信息。
<Sysname> display lldp statistics
LLDP statistics global Information :
LLDP neighbor information last change time : 0 days, 0 hours, 4 minutes, 40 seconds
The number of LLDP neighbor information inserted : 1
The number of LLDP neighbor information deleted : 0
The number of LLDP neighbor information dropped : 0
The number of LLDP neighbor information aged out : 1
LLDP statistics Information of port 1 [GigabitEthernet1/1/1]:
The number of LLDP frames transmitted : 0
The number of LLDP frames received : 0
The number of LLDP frames discarded : 0
The number of LLDP error frames : 0
The number of LLDP TLVs discarded : 0
The number of LLDP TLVs unrecognized : 0
The number of LLDP neighbor information aged out : 0
The number of CDP frames transmitted : 0
The number of CDP frames received : 0
The number of CDP frames discarded : 0
The number of CDP error frames : 0
display lldp statistics命令显示信息描述表
字段 |
描述 |
LLDP statistics global information |
显示全局LLDP统计信息 |
LLDP neighbor information last change time |
邻居信息最后更新时间 |
The number of LLDP neighbor information inserted |
增加邻居信息的次数 |
The number of LLDP neighbor information deleted |
删除邻居信息的次数 |
The number of LLDP neighbor information dropped |
由于没有足够的空间创建邻居信息而丢弃的邻居信息的次数 |
The number of LLDP neighbor information aged out |
老化掉的邻居信息的数量 |
lldp statistics Information of port number interface-type interface-number |
端口LLDP统计信息 |
The number of LLDP frames transmitted |
端口上发送LLDP帧的总数 |
The number of LLDP frames received |
端口上收到的LLDP帧的总数 |
The number of LLDP frames discarded |
端口上丢弃的LLDP帧的总数 |
The number of LLDP error frames |
端口上收到的错误LLDP帧的总数 |
The number of LLDP TLVs discarded |
端口上丢弃的LLDP TLV的总数 |
The number of LLDP TLVs unrecognized |
端口上不可识别的LLDP TLV的总数 |
The number of LLDP neighbor information aged out |
端口上老化的LLDP邻居信息的数量 |
The number of CDP frames transmitted |
端口上发送CDP帧的总数 |
The number of CDP frames received |
端口上收到的CDP帧的总数 |
The number of CDP frames discarded |
端口上丢弃的CDP帧的总数 |
The number of CDP error frames |
端口上收到的错误CDP帧的总数 |
【命令】
display lldp status [ interface interface-type interface-number ]
【视图】
任意视图
【缺省级别】
1:监控级
【参数】
interface interface-type interface-number:端口类型和端口编号,显示指定端口的LLDP状态信息。
【描述】
display lldp status命令用来显示LLDP状态信息。
需要注意的是,如果不指定参数,将显示所有端口的LLDP状态信息。
【举例】
# 显示所有LLDP状态信息。
<Sysname> display lldp status
Global status of LLDP: Enable
The current number of LLDP neighbors: 0
The current number of CDP neighbors: 0
LLDP neighbor information last changed time : 0 days, 0 hours, 4 minutes, 40 seconds
Transmit interval : 30s
Hold multiplier : 4
Reinit delay : 2s
Transmit delay : 2s
Trap interval : 5s
Fast start times : 3
Port 1 [Ethernet1/0/1] :
Port status of LLDP : Enable
Admin status : Tx_Rx
Trap flag : No
Roll time : 0s
Number of neighbors : 5
Number of MED neighbors : 2
Number of CDP neighbors : 0
Number of sent optional TLV : 12
Number of received unknown TLV : 5
表1-3 display lldp status命令显示信息描述表
字段 |
描述 |
Global status of LLDP |
LLDP功能是否全局使能 |
The current number of LLDP neighbors |
当前设备的LLDP邻居总数 |
The current number of CDP neighbors |
当前设备的CDP邻居总数 |
LLDP neighbor information last changed time |
邻居信息的最后更新时间 |
Transmit interval |
LLDPDU发送时间间隔 |
Hold multiplier |
TTL乘数 |
Reinit delay |
端口初始化延迟时间 |
Transmit delay |
LLDPDU发送延迟时间 |
Trap interval |
Trap信息的发送时间间隔 |
Fast start times |
快速发送报文个数 |
Port number interface-type interface-number |
端口LLDP状态信息 |
Port status of LLDP |
LLDP功能是否端口使能 |
Admin status |
端口LLDP工作模式,其中: l Tx_Rx表示既发送也接收LLDPDU收 l Rx_Only表示只接收不发送LLDPDU l Tx_Only表示只发送不接收LLDPDU l Disable表示既不发送也不接收LLDPDU |
Trap Flag |
Trap功能是否使能 |
Roll time |
轮询时间间隔的值,为0表示轮询功能处于关闭状态 |
Number of neighbors |
端口LLDP邻居数量 |
Number of MED neighbors |
端口MED邻居设备的数量 |
Number of CDP neighbors |
端口CDP邻居设备的数量 |
Number of sent optional TLV |
端口在一个LLDPDU中发送的可选TLV个数 |
Number of received unknown TLV |
端口在一个LLDPDU中收到不能识别的TLV个数 |
【命令】
display lldp tlv-config [ interface interface-type interface-number ]
【视图】
任意视图
【缺省级别】
1:监控级
【参数】
interface interface-type interface-number:端口类型和端口编号,显示指定端口发送的可选TLV。
【描述】
display lldp tlv-config命令用来显示端口可以发送的可选TLV。
需要注意的是,如果不指定参数,显示所有端口可以发送的可选TLV。
【举例】
# 显示端口Ethernet1/0/1可以发送的可选TLV。
<Sysname> display lldp tlv-config interface Ethernet 1/0/1
LLDP tlv-config of port 1 [Ethernet1/0/1] :
NAME STATUS DEFAULT
Basic optional TLV :
Port Description TLV YES YES
System Name TLV YES YES
System Description TLV YES YES
System Capabilities TLV YES YES
Management Address TLV YES YES
IEEE 802.1 extend TLV :
Port VLAN ID TLV YES YES
Port And Protocol VLAN ID TLV YES YES
VLAN Name TLV YES YES
IEEE 802.3 extend TLV :
MAC-Physic TLV YES YES
Power via MDI TLV YES YES
Link Aggregation TLV YES YES
Maximum Frame Size TLV YES YES
LLDP-MED extend TLV :
Capabilities TLV YES YES
Network Policy TLV YES YES
Location Identification TLV NO NO
Extended Power via MDI TLV YES YES
Inventory TLV YES YES
表1-4 display lldp tlv-config命令显示信息描述表
字段 |
描述 |
LLDP tlv-config of port number interface-type interface-number |
显示端口配置发送的TLV类型 |
NAME |
TLV类型 |
STATUS |
端口是否配置发布指定类型TLV |
DEFAULT |
端口发布指定类型TLV的缺省情况 |
Basic optional TLV |
端口可以发送的基本TLV类型 |
Port Description TLV |
端口描述TLV |
System Name TLV |
系统名称TLV |
System Description TLV |
系统描述TLV |
System Capabilities TLV |
系统能力集TLV |
Management Address TLV |
管理地址TLV |
IEEE 802.1 extended TLV |
端口可以发送的IEEE 802.1组织定义的TLV类型 |
Port VLAN ID TLV |
端口VLAN ID TLV |
Port And Protocol VLAN ID TLV |
协议VLAN ID TLV |
VLAN Name TLV |
VLAN名称TLV |
IEEE 802.3 extended TLV |
端口可以发送的IEEE 802.3组织定义的TLV类型 |
MAC-Physic TLV |
端口物理属性TLV |
Power via MDI TLV |
供电能力TLV |
Link Aggregation TLV |
链路聚合TLV |
Maximum Frame Size TLV |
最大帧长度TLV |
LLDP-MED extend TLV |
LLDP MED TLV |
Capabilities TLV |
MED能力集TLV |
Network Policy TLV |
网络策略TLV |
Location Identification TLV |
位置标识TLV |
Extended Power via MDI TLV |
扩展供电能力TLV |
Inventory TLV |
资产信息TLV,包括7种类型TLV:Hardware Revision TLV、Firmware Revision TLV、Software Revision TLV、Serial Number TLV、Manufacturer Name TLV、Model name TLV和Asset id TLV |
【命令】
lldp admin-status { disable | rx | tx | txrx }
undo lldp admin-status
【视图】
以太网端口视图/端口组视图
【缺省级别】
2:系统级
【参数】
disable:配置工作模式为Disable,既不发送也不接收LLDPDU。
rx:配置工作模式为Rx,只接收不发送LLDPDU。
tx:配置工作模式为Tx,只发送不接收LLDPDU。
txrx:配置工作模式为TxRx,既发送也接收LLDPDU。
【描述】
lldp admin-status命令用来配置端口的LLDP工作模式。undo lldp admin-status命令用来恢复缺省情况。
缺省情况下,LLDP工作模式处于TxRx,既发送也接收LLDPDU。
【举例】
# 配置端口Ethernet1/0/3的LLDP工作模式为Rx。
<Sysname> system-view
[Sysname] interface ethernet1/0/3
[Sysname-Ethernet1/0/3] lldp admin-status rx
【命令】
lldp check-change-interval value
undo lldp check-change-interval
【视图】
以太网端口视图/端口组视图
【缺省级别】
2:系统级
【参数】
value:轮询间隔时间,取值范围为1~30,单位为秒。
【描述】
lldp check-change-interval命令用来在指定端口使能轮询功能并配置轮询时间间隔的值。undo lldp check-change-interval命令用来恢复缺省情况。
缺省情况下,轮询功能处于关闭状态。
通过配置轮询功能,LLDP将在指定的轮询时间间隔内周期查询本设备的相关配置是否发生改变,如果发生改变将触发LLDPDU的发送,可以将本设备配置变化迅速通知其它设备。
【举例】
# 在端口Ethernet1/0/3使能轮询功能并配置轮询时间间隔的值为30秒。
<Sysname> system-view
[Sysname] interface ethernet1/0/3
[Sysname-Ethernet1/0/3] lldp check-change-interval 30
【命令】
lldp compliance admin-status cdp { disable | txrx }
【视图】
以太网端口视图/端口组视图
【缺省级别】
2:系统级
【参数】
disable:配置工作模式为Disable,既不发送也不接收CDP报文。
txrx:配置工作模式为TxRx,既发送也接收CDP报文。
【描述】
lldp compliance admin-status cdp用来配置端口或端口组LLDP兼容CDP功能的工作模式。
缺省情况下,端口LLDP兼容CDP功能的工作模式为Disable,既不发送也不接收CDP报文。
需要注意的是,欲使LLDP兼容CDP功能生效,必须先在全局使能LLDP兼容CDP功能,同时将端口下LLDP兼容CDP功能的工作模式配置为txrx。
【举例】
# 在端口Ethernet1/0/1下配置LLDP兼容CDP功能的工作模式为TxRx。
<Sysname> system-view
[Sysname] interface ethernet 1/0/1
[Sysname-Ethernet1/0/1] lldp compliance admin-status cdp txrx
【命令】
lldp compliance cdp
undo lldp compliance cdp
【视图】
系统视图
【缺省级别】
2:系统级
【参数】
无
【描述】
lldp compliance cdp命令用来全局使能LLDP兼容CDP功能。undo lldp compliance cdp命令用来恢复缺省情况。
缺省情况下,全局LLDP兼容CDP功能处于关闭状态。
需要注意的是,CDP报文中TTL的最大值为255,CDP报文中的TTL值等于LLDP的发送周期与TTL乘数的乘积,为了保证LLDP兼容CDP功能的正常运行,用户在配置LLDP的发送周期和TTL乘数时需要注意,LLDP的发送周期与TTL乘数的乘积应该小于或等于255。
相关配置可参考命令lldp hold-multiplier和lldp timer tx-interval。
【举例】
# 全局使能LLDP兼容CDP功能。
<Sysname> system-view
[Sysname] lldp compliance cdp
【命令】
lldp enable
undo lldp enable
【视图】
系统视图/以太网端口视图/端口组视图
【缺省级别】
2:系统级
【参数】
无
【描述】
lldp enable命令用来使能LLDP功能。undo lldp enable命令用来关闭LLDP功能。
缺省情况下,端口LLDP功能处于使能状态,全局LLDP功能处于关闭状态。
需要注意的是,LLDP功能必须在全局和端口同时使能才能生效。
【举例】
# 配置端口Ethernet1/0/3关闭LLDP功能。
<Sysname> system-view
[Sysname] interface ethernet1/0/3
[Sysname-Ethernet1/0/3] undo lldp enable
【命令】
lldp encapsulation snap
undo lldp encapsulation
【视图】
以太网端口视图/端口组视图
【缺省级别】
2:系统级
【参数】
无
【描述】
lldp encapsulation snap命令用来配置LLDP报文的封装格式为SNAP。undo lldp encapsulation命令用来恢复缺省情况。
缺省情况下,LLDP报文的封装格式为ETHII。
需要注意的是,LLDP CDP报文的封装格式只能为SNAP,不能为ETHII。
【举例】
# 配置端口Ethernet1/0/3发送的LLDP报文的封装格式为SNAP。
<Sysname> system-view
[Sysname] interface ethernet1/0/3
[Sysname-Ethernet1/0/3] lldp encapsulation snap
【命令】
lldp fast-count value
undo lldp fast-count
【视图】
系统视图
【缺省级别】
2:系统级
【参数】
value:LLDP快速发送报文的个数,取值范围为1~10,单位为个。
【描述】
lldp fast-count命令用来配置快速发送报文个数。undo lldp fast-count命令用来恢复缺省情况。
缺省情况下,快速发送报文的个数为3个。
【举例】
# 配置快速发送报文个数为4。
<Sysname> system-view
[Sysname] lldp fast-count 4
【命令】
lldp hold-multiplier value
undo lldp hold-multiplier
【视图】
系统视图
【缺省级别】
2:系统级
【参数】
value:TTL乘数的值,取值范围为2~10。
【描述】
lldp hold-multiplier命令用来配置TTL乘数的值。undo lldp hold-multiplier命令用来恢复缺省情况。
缺省情况下,配置TTL乘数的值为4。
可通过配置TTL乘数的值控制本地信息在邻居设备上的老化时间,TTL=TTL乘数×LLDPDU发送周期,如果TTL乘数与LLDPDU发送周期的乘积大于65535,则TTL的值取65535秒。
需要注意的是,LLDPDU发送时间间隔不得大于或等于TTL,否则将导致当前设备的信息在邻居设备老化后仍无法收到当前设备发送的LLDPDU。
【举例】
# 配置TTL乘数的值为6。
<Sysname> system-view
[Sysname] lldp hold-multiplier 6
【命令】
lldp management-address-format string
undo lldp management-address-format
【视图】
以太网端口视图/端口组视图
【缺省级别】
2:系统级
【参数】
无
【描述】
lldp management-address-format string命令用来配置管理地址在管理地址TLV中的封装形式为字符串。undo lldp management-address-format命令用来恢复缺省情况。
缺省情况下,管理地址在管理地址TLV中的封装形式为数字。
【举例】
# 配置管理地址在端口Ethernet1/0/3发布的管理地址TLV中的封装形式为字符串。
<Sysname> system-view
[Sysname] interface ethernet1/0/3
[Sysname-Ethernet1/0/3] lldp management-address-format string
【命令】
lldp management-address-tlv [ ip-address ]
undo lldp management-address-tlv
【视图】
以太网端口视图/端口组视图
【缺省级别】
2:系统级
【参数】
ip-address:设置在LLDP报文中发布的管理地址。
【描述】
lldp management-address-tlv命令用来配置LLDP在LLDP报文中发布管理地址。undo lldp management-address-tlv命令用来配置LLDP取消在LLDP报文中发布管理地址。
缺省情况下,LLDP在LLDP报文中发布管理地址,且发布的管理地址为端口允许通过且VLAN ID值最小的VLAN的主IP地址,若VLAN ID值最小的VLAN未配置主IP地址,发布的管理地址值为127.0.0.1。关于VLAN的详细信息,请参见“接入分册”中的“VLAN配置”。
需要注意的是,每个LLDP报文只能携带一个管理地址TLV,若重复配置,只发送最新配置的管理地址。
【举例】
# 在端口Ethernet1/0/3下模式下配置发布用户指定管理地址为192.6.0.1。
<Sysname> system-view
[Sysname] interface ethernet1/0/3
[Sysname-Ethernet1/0/3] lldp management-address-tlv 192.6.0.1
【命令】
lldp notification remote-change enable
undo lldp notification remote-change enable
【视图】
以太网端口视图/端口组视图
【缺省级别】
2:系统级
【参数】
无
【描述】
lldp notification remote-change enable命令用来配置端口使能Trap功能。undo lldp notification remote-change enable命令用来恢复缺省情况。
缺省情况下,端口Trap功能处于关闭状态。
【举例】
# 配置端口Ethernet1/0/3使能Trap功能。
<Sysname> system-view
[Sysname] interface ethernet1/0/3
[Sysname-Ethernet1/0/3] lldp notification remote-change enable
【命令】
lldp timer notification-interval value
undo lldp timer notification-interval
【视图】
系统视图
【缺省级别】
2:系统级
【参数】
value:配置Trap信息的发送时间间隔,取值范围为5~3600,单位是秒。
【描述】
lldp timer notification-interval命令用来配置Trap信息的发送时间间隔。undo lldp timer notification-interval命令用来恢复缺省情况。
缺省情况下,Trap信息的发送时间间隔为5秒。
【举例】
# 配置发送Trap信息的时间间隔为8秒。
<Sysname> system-view
[Sysname] lldp timer notification-interval 8
【命令】
lldp timer reinit-delay value
undo lldp timer reinit-delay
【视图】
系统视图
【缺省级别】
2:系统级
【参数】
value:端口初始化延迟时间,取值范围为1~10,单位是秒。
【描述】
lldp timer reinit-delay命令用来配置端口初始化延迟时间。undo lldp timer reinit-delay命令用来恢复缺省情况。
缺省情况下,配置端口初始化延迟时间为2秒。
【举例】
# 配置端口初始化延迟时间为4秒。
<Sysname> system-view
[Sysname] lldp timer reinit-delay 4
【命令】
lldp timer tx-delay value
undo lldp timer tx-delay
【视图】
系统视图
【缺省级别】
2:系统级
【参数】
value:LLDPDU发送延迟时间,取值范围为1~8192,单位是秒。
【描述】
lldp timer tx-delay命令用来配置LLDPDU发送延迟时间。undo lldp timer tx-delay命令用来恢复缺省情况。
缺省情况下,LLDPDU发送延迟时间为2秒。
【举例】
# 配置LLDPDU发送延迟时间为4秒。
<Sysname> system-view
[Sysname] lldp timer tx-delay 4
【命令】
lldp timer tx-interval value
undo lldp timer tx-interval
【视图】
系统视图
【缺省级别】
2:系统级
【参数】
value:LLDPDU发送时间间隔,取值范围为5~32768,单位是秒。
【描述】
lldp timer tx-interval命令用来配置LLDPDU发送时间间隔。undo lldp timer tx-interval命令用来恢复缺省情况。
缺省情况下,LLDPDU发送时间间隔为30秒。
【举例】
# 配置LLDPDU发送时间间隔为20秒。
<Sysname> system-view
[Sysname] lldp timer tx-interval 20
【命令】
lldp tlv-enable { basic-tlv { all | port-description | system-capability | system-description | system-name } | dot1-tlv { all | port-vlan-id | protocol-vlan-id [ vlan-id ] | vlan-name [ vlan-id ] } | dot3-tlv { all | link-aggregation | mac-physic | max-frame-size | power } | med-tlv { all | capability | inventory | location-id { civic-address device-type country-code { ca-type ca-value }&<1-10> | elin-address tel-number } | network-policy | power-over-ethernet } }
undo lldp tlv-enable { basic-tlv { all | port-description | system-capability | system-description | system-name } | dot1-tlv { all | port-vlan-id | protocol-vlan-id | vlan-name } | dot3-tlv { all | link-aggregation | mac-physic | max-frame-size | power } | med-tlv { all | capability | inventory | location-id | network-policy | power-over-ethernet } }
【视图】
以太网端口视图/端口组视图
【缺省级别】
2:系统级
【参数】
all:配置发布基本类型TLV、IEEE 802.1组织类型TLV或IEEE 802.3组织类型TLV时,指定all参数,将发布该类型所有可选TLV;配置发布LLDP-MED相关TLV,指定all参数将发布除Location Identification TLV之外该类型的所有可选TLV。
basic-tlv:配置发布基本TLV。
port-description:配置发布Port Description TLV。
system-capability:配置发布System Capabilities TLV。
system-description:配置发布System Description描述。
system-name:配置发布System Name TLV。
dot1-tlv:配置发布IEEE 802.1组织定义的TLV。
port-vlan-id:配置发布Port VLAN ID TLV。
protocol-vlan-id:配置发布Port And Protocol VLAN ID TLV。
vlan-name:配置发布VLAN Name TLV。
vlan-id:指定发布哪个指定要发布的VLAN ID,如果没有参数表示协议所属最小VLAN。
dot3-tlv:配置发布IEEE 802.3组织定义的TLV。
link-aggregation:配置发布Link Aggregation TLV。
mac-physic:配置发布MAC/PHY Configuration/Status TLV。
max-frame-size:配置发布Maximum Frame Size TLV。
power:配置发布Power Via MDI TLV。
med-tlv:配置发布LLDP-MED相关TLV。
capability:配置发布LLDP-MED Capabilities TLV。
inventory:配置发布Hardware Revision TLV、Firmware Revision TLV、Software Revision TLV、Serial Number TLV、Manufacturer Name TLV、Model Name TLV和Asset ID TLV。
location-id:配置发布Location Identification TLV。
civic-address:配置Location Identification TLV封装网络连接设备的普通地址信息。
device-type:配置设备类型,取值范围为0~2,0表示配置设备类型为DHCP server,1表示配置设备类型为Switch,2表示配置设备类型为LLDP-MED Endpoint。
country-code:国家编码,取值范围请参考ISO 3166。
{ ca-type ca-value }&<1-10>:配置地址信息,其中ca-type表示地址信息的类型,取值范围为0~255,ca-value表示地址信息,为1~250个字符的字符串;&<1-10>表示前面的参数最多可以输入10次。
elin-address:配置Location Identification TLV封装紧急电话号码。
tel-number:配置紧急电话号码,字符串形式,为10~25个字符的字符串。
network-policy:配置发布Network Policy TLV。
power-over-ethernet:配置发布Extended Power-via-MDI TLV。
【描述】
lldp tlv-enable命令用来配置端口发布的TLV类型。undo lldp tlv-enable命令用来配置端口禁止发布的TLV类型。
缺省情况下,LLDP发布除Location Identification TLV之外所有类型的TLV。
需要注意的是:
l 必须首先配置发布LLDP-MED Capabilities TLV,才能配置发布LLDP-MED其它类型的TLV;必须首先禁止发布LLDP-MED其它类型的TLV,才能禁止发布LLDP-MED Capabilities TLV;必须首先禁止发布LLDP-MED Capabilities TLV,才能禁止发布MAC/PHY Configuration/Status TLV。
l 配置发布基本、IEEE 802.1组织类型TLV或IEEE 802.3组织类型TLV时,指定all参数,将发布该类型所有可选TLV;配置发布LLDP-MED相关TLV,指定all参数将发布除Location Identification TLV之外该类型的所有可选TLV。
l 配置发布LLDP-MED Capabilities TLV后,MAC/PHY Configuration/Status TLV也将自动发布。
l 不指定all参数,每次只能配置发布一种类型的可选TLV,可以通过多次配置发布多种类型的可选TLV。
【举例】
# 配置端口Ethernet1/0/3发布IEEE 802.3组织定义的Link Aggregation可选TLV。
<Sysname> system-view
[Sysname] interface ethernet1/0/3
[Sysname-Ethernet1/0/3] lldp tlv-enable dot3-tlv link-aggregation
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!