11-LLDP命令
本章节下载: 11-LLDP命令 (210.96 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 ] [ | { begin | exclude | include } regular-expression ]
【视图】
任意视图
【缺省级别】
1:监控级
【参数】
global:显示待发送的全局LLDP信息。
interface interface-type interface-number:显示指定接口上待发送的LLDP信息,interface-type interface-number表示接口类型和接口编号。
|:使用正则表达式对显示信息进行过滤。有关正则表达式的详细介绍,请参见“基础配置指导”中的“CLI”。
begin:从包含指定正则表达式的行开始显示。
exclude:只显示不包含指定正则表达式的行。
include:只显示包含指定正则表达式的行。
regular-expression:表示正则表达式,为1~256个字符的字符串,区分大小写。
【描述】
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 : Sysname
System description : H3C Comware Platform Software
Comware Software Version 5.20,A2702
H3C Service Router SR6602-X
Copyright(c) 2004-2012 Hangzhou H3C Technologies Co., Ltd..
System capabilities supported : Router
System capabilities enabled : Router
MED information
Device class: Connectivity device
HardwareRev : REV.A
FirmwareRev : 109
SoftwareRev : 5.20 Alpha 2101
SerialNum : NONE
Manufacturer name : H3C
Model name : SR6602-X2
Asset tracking identifier : Unknown
LLDP local-information of port 3[GigabitEthernet0/0/1]:
Port ID subtype : Interface name
Port ID : GigabitEthernet0/0/1
Port description : GigabitEthernet0/0/1 Interface
Management address type : ipv4
Management address : 192.168.66.2
Management address interface type : IfIndex
Management address interface ID : 1
Management address OID : 0
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: 1500
表1-1 display lldp local-information命令显示信息描述表
字段 |
描述 |
Global LLDP local-information |
待发送的全局LLDP信息 |
Chassis ID |
Chassis ID值,为本设备的桥MAC地址 |
System name |
系统名称 |
System description |
系统描述 |
System capabilities supported |
系统所支持的功能: · Repeater:表示支持信号中继功能。 · Bridge:表示支持交换功能 · Router:表示支持路由功能 |
System capabilities enabled |
系统已使能的功能: · Repeater:表示信号中继功能已使能。 · Bridge:表示交换功能已使能 · Router:表示路由功能已使能 |
MED information |
MED相关信息 |
Device class |
MED设备类型 · Connectivity device:表示网络设备 · Class I:表示一般终端设备,即所有需要LLDP发现服务的终端设备 · Class II:表示媒体终端设备,即具备媒体能力的终端设备,其能力包含了一般终端设备的能力。该类设备支持媒体流 · Class III:表示通讯终端设备,即直接支持目标用户IP通讯系统的终端设备,其能力包含了一般终端设备和媒体终端设备的所有能力。该类设备直接被目标用户所使用 |
MED inventory information of master board |
主控板MED资产信息 |
HardwareRev |
产品的硬件版本 |
FirmwareRev |
产品的固件版本 |
SoftwareRev |
产品的软件版本 |
SerialNum |
序列号 |
Manufacturer name |
制造厂商 |
Model name |
模块名称 |
Asset tracking identifier |
资产跟踪ID |
LLDP local-information of port 1 |
端口1上待发送的LLDP信息 |
Port ID subtype |
端口ID类型: · MAC address:表示MAC地址 · Interface name:表示接口名称 |
Port ID |
端口ID值,根据本设备的Port ID subtype取相应类型的值 |
Port description |
端口描述 |
Management address type |
管理地址类型 |
Management address |
管理地址 |
Management address interface type |
管理地址所在接口的编码方式 |
Management address interface ID |
管理地址接口索引 |
Management address OID |
管理地址对象标识符 |
Auto-negotiation supported |
端口是否支持自协商 |
Auto-negotiation enabled |
端口是否已使能自协商 |
OperMau |
端口自适应的速率和双工状态 |
PoE supported |
是否支持PoE |
Link aggregation supported |
端口是否支持链路聚合 |
Link aggregation enabled |
端口是否已使能链路聚合 |
Aggregation port ID |
聚合端口的端口ID,0表示未使能链路聚合功能 |
Maximum frame Size |
端口支持的最大帧长度 |
【命令】
display lldp neighbor-information [ brief | interface interface-type interface-number [ brief ] | list [ system-name system-name ] ] [ | { begin | exclude | include } regular-expression ]
【视图】
任意视图
【缺省级别】
1:监控级
【参数】
brief:显示由邻居设备发来的LLDP信息摘要。如果未指定该参数,将显示由邻居设备发来的LLDP信息详情。
interface interface-type interface-number:显示指定接口收到的由邻居设备发来的LLDP信息,interface-type interface-number表示接口类型和接口编号。如果未指定该参数,将显示所有接口收到的由邻居设备发来的LLDP信息。
list:按列表显示由邻居设备发来的LLDP信息。
system-name system-name:按列表显示由指定邻居设备发来的LLDP信息。system-name表示邻居设备的系统名称,为1~255个字符的字符串。如果未指定该参数,将按列表显示由所有邻居设备发来的LLDP信息。
|:使用正则表达式对显示信息进行过滤。有关正则表达式的详细介绍,请参见“基础配置指导”中的“CLI”。
begin:从包含指定正则表达式的行开始显示。
exclude:只显示不包含指定正则表达式的行。
include:只显示包含指定正则表达式的行。
regular-expression:表示正则表达式,为1~256个字符的字符串,区分大小写。
【描述】
display lldp neighbor-information命令用来显示由邻居设备发来的LLDP信息,这些信息是由邻居设备组织成TLV并发送给本设备的。
【举例】
# 显示所有接口收到的由邻居设备发来的LLDP信息。
<Sysname> display lldp neighbor-information
LLDP neighbor-information of port 3[GigabitEthernet0/0/1]:
Neighbor index : 1
Update time : 0 days,3 hours,30 minutes,48 seconds
Chassis type : MAC address
Chassis ID : 0023-89b6-ecfe
Port ID type : Interface name
Port ID : GigabitEthernet0/0/1
Port description : GigabitEthernet0/0/1 Interface
System name : SR6602-X2
System description : H3C Comware Platform Software
Comware Software Version 5.20,A2702
H3C Service Router SR6602-X
Copyright(c) 2004-2012 Hangzhou H3C Technologies Co., Ltd.
System capabilities supported : Router
System capabilities enabled : Router
Management address type : ipv4
Management address : 192.168.1.11
Management address interface type : IfIndex
Management address interface ID : 2
Management address OID : 0
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: 1500
# 按列表显示所有邻居设备发来的LLDP信息。
<Sysname> display lldp neighbor-information list
System Name Local Interface Chassis ID Port ID
SR6602-X2 GE0/0/1 0023-89b6-ecfe GigabitEthernet0/0/1
表1-2 display lldp neighbor-information命令显示信息描述表
字段 |
描述 |
LLDP neighbor-information of port 3 |
端口3上收到的LLDP信息 |
Neighbor index |
邻居索引 |
Update time |
邻居信息最新更新时间 |
Chassis type |
Chassis ID类型: · Chassis component:表示底架组件 · Interface alias:表示接口化名 · Port component:表示端口组件 · MAC address:表示MAC地址 · Network address(ipv4):表示网络地址(括号里表示地址类型) · Interface name:表示接口名称 · Locally assigned:表示本地配置 |
Chassis ID |
Chassis ID值,根据邻居设备的Chassis type取相应类型的值 |
Port ID type |
端口ID类型: · Interface alias:表示接口化名 · Port component:表示端口组件 · MAC address:表示MAC地址 · Network Address(ipv4):表示网络地址(括号里表示地址类型) · Interface name:表示接口名称 · Agent circuit ID:表示代理巡回标识符 · Locally assigned:表示本地配置 |
Port ID |
端口ID值,根据邻居设备的Port ID type取相应类型的值 |
Port description |
端口描述 |
System name |
系统名称 |
System description |
系统描述 |
System capabilities supported |
系统所支持的功能: · Repeater:表示支持信号中继功能 · Bridge:表示支持交换功能 · Router:表示支持路由功能 |
System capabilities enabled |
系统已使能的功能: · Repeater:表示信号中继功能已使能 · Bridge:表示交换功能已使能 · Router:表示路由功能已使能 |
Management address type |
管理地址类型 |
Management address |
管理地址 |
Management address interface type |
管理地址接口类型 |
Management address interface ID |
管理地址接口索引 |
Management address OID |
管理地址对象标识符 |
Auto-negotiation supported |
端口是否支持自协商 |
Auto-negotiation enabled |
端口是否已使能自协商 |
OperMau |
端口自适应的速率和双工状态 |
Power port class |
PoE类型: · PSE:表示供电设备 · PD:表示受电设备 |
PSE power supported |
是否支持PSE供电 |
PSE power enabled |
是否已使能PSE供电 |
PSE pairs control ability |
供电方式是否可控 |
Power pairs |
PoE端口的远程供电模式: · Signal:表示信号线供电模式 · Spare:表示空闲线供电模式 |
Port power classification |
PD的端口控制级别: · Class 0:表示级别0 · Class 1:表示级别1 · Class 2:表示级别2 · Class 3:表示级别3 · Class 4:表示级别4 |
Link aggregation supported |
端口是否支持链路聚合 |
Link aggregation enabled |
端口是否已使能链路聚合 |
Aggregation port ID |
聚合端口的端口ID,0表示未使能链路聚合功能 |
Maximum frame Size |
端口支持的最大帧长度 |
【命令】
display lldp statistics [ global | interface interface-type interface-number ] [ | { begin | exclude | include } regular-expression ]
【视图】
任意视图
【缺省级别】
1:监控级
【参数】
global:显示全局LLDP统计信息。
interface interface-type interface-number:显示指定接口上的LLDP统计信息,interface-type interface-number表示接口类型和接口编号。
|:使用正则表达式对显示信息进行过滤。有关正则表达式的详细介绍,请参见“基础配置指导”中的“CLI”。
begin:从包含指定正则表达式的行开始显示。
exclude:只显示不包含指定正则表达式的行。
include:只显示包含指定正则表达式的行。
regular-expression:表示正则表达式,为1~256个字符的字符串,区分大小写。
【描述】
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 : 1
The number of LLDP neighbor information dropped : 0
The number of LLDP neighbor information aged out : 1
LLDP statistics information of port 1 [GigabitEthernet4/0/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
表1-3 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 1 |
端口1上的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 ] [ | { begin | exclude | include } regular-expression ]
【视图】
任意视图
【缺省级别】
1:监控级
【参数】
interface interface-type interface-number:显示指定接口上的LLDP状态信息,interface-type interface-number表示接口类型和接口编号。如果未指定该参数,将显示所有接口上的LLDP状态信息。
|:使用正则表达式对显示信息进行过滤。有关正则表达式的详细介绍,请参见“基础配置指导”中的“CLI”。
begin:从包含指定正则表达式的行开始显示。
exclude:只显示不包含指定正则表达式的行。
include:只显示包含指定正则表达式的行。
regular-expression:表示正则表达式,为1~256个字符的字符串,区分大小写。
【描述】
display lldp status命令用来显示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 [GigabitEthernet4/0/1]:
Port status of LLDP : Enable
Admin status : Tx_Rx
Trap flag : No
Polling interval : 0s
Number of neighbors: 0
Number of MED neighbors : 0
Number of CDP neighbors : 0
Number of sent optional TLV : 19
Number of received unknown TLV : 0
表1-4 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 |
LLDP报文的发送间隔 |
Hold multiplier |
TTL乘数 |
Reinit delay |
端口初始化延迟时间 |
Transmit delay |
LLDP报文的发送延迟 |
Trap interval |
Trap信息的发送间隔 |
Fast start times |
快速发送LLDP报文的个数 |
Port 1 |
端口1上的LLDP状态信息 |
Port status of LLDP |
LLDP功能是否已在端口上使能 |
Admin status |
端口LLDP工作模式: · Tx_Rx:表示既发送也接收LLDP报文 · Rx_Only:表示只接收不发送LLDP报文 · Tx_Only:表示只发送不接收LLDP报文 · Disable:表示既不发送也不接收LLDP报文 |
Trap Flag |
Trap功能是否已使能 |
Polling interval |
轮询间隔的值,0表示轮询功能处于关闭状态 |
Number of neighbors |
端口LLDP邻居数量 |
Number of MED neighbors |
端口MED邻居设备的数量 |
Number of CDP neighbors |
端口CDP邻居设备的数量 |
Number of sent optional TLV |
端口在一个LLDP报文中发送的可选TLV总数 |
Number of received unknown TLV |
端口在所有LLDP报文中收到的不能识别的TLV总数 |
【命令】
display lldp tlv-config [ interface interface-type interface-number ] [ | { begin | exclude | include } regular-expression ]
【视图】
任意视图
【缺省级别】
1:监控级
【参数】
interface interface-type interface-number:显示指定接口上可发送的可选TLV信息,interface-type interface-number表示接口类型和接口编号。如果未指定该参数,将显示所有接口上可发送的可选TLV信息。
|:使用正则表达式对显示信息进行过滤。有关正则表达式的详细介绍,请参见“基础配置指导”中的“CLI”。
begin:从包含指定正则表达式的行开始显示。
exclude:只显示不包含指定正则表达式的行。
include:只显示包含指定正则表达式的行。
regular-expression:表示正则表达式,为1~256个字符的字符串,区分大小写。
【描述】
display lldp tlv-config命令用来显示接口上可发送的可选TLV信息。
【举例】
# 显示接口GigabitEthernet4/0/1上可发送的可选TLV信息。
<Sysname> display lldp tlv-config interface GigabitEthernet 4/0/1
LLDP tlv-config of port 1[GigabitEthernet4/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-5 display lldp tlv-config命令显示信息描述表
字段 |
描述 |
LLDP tlv-config of port 1 |
端口1上可发送的可选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种类型: · 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
【视图】
二层以太网接口视图/三层以太网接口视图/端口组视图
不同型号的设备支持的情况如下表所示:
型号 |
视图 |
描述 |
SR6602 |
二层以太网接口视图 |
不支持 |
SR6602-X |
不支持 |
|
SR6604/SR6608/SR6616 |
配置了SAP板并且SAP板工作在二层模式下支持 |
|
SR6604-X/SR6608-X/SR6616-X |
型号 |
视图 |
描述 |
SR6602 |
端口组视图 |
不支持 |
SR6602-X |
不支持 |
|
SR6604/SR6608/SR6616 |
配置了RPE-X1或RSE-X1主控板支持 配置了MCP主控板不支持 |
|
SR6604-X/SR6608-X/SR6616-X |
支持 |
【缺省级别】
2:系统级
【参数】
disable:表示工作模式为Disable,既不发送也不接收LLDP报文。
rx:表示工作模式为Rx,只接收不发送LLDP报文。
tx:表示工作模式为Tx,只发送不接收LLDP报文。
txrx:表示工作模式为TxRx,既发送也接收LLDP报文。
【描述】
lldp admin-status命令用来配置LLDP的工作模式。undo lldp admin-status命令用来恢复缺省情况。
缺省情况下,LLDP的工作模式为TxRx,既发送也接收LLDP报文。
【举例】
# 配置接口GigabitEthernet4/0/1上LLDP的工作模式为Rx。
<Sysname> system-view
[Sysname] interface GigabitEthernet 4/0/1
[Sysname-GigabitEthernet4/0/1] lldp admin-status rx
【命令】
lldp check-change-interval interval
undo lldp check-change-interval
【视图】
二层以太网接口视图/三层以太网接口视图/端口组视图
不同型号的设备支持的情况如下表所示:
型号 |
视图 |
描述 |
SR6602 |
二层以太网接口视图 |
不支持 |
SR6602-X |
不支持 |
|
SR6604/SR6608/SR6616 |
配置了SAP板并且SAP板工作在二层模式下支持 |
|
SR6604-X/SR6608-X/SR6616-X |
型号 |
视图 |
描述 |
SR6602 |
端口组视图 |
不支持 |
SR6602-X |
不支持 |
|
SR6604/SR6608/SR6616 |
配置了RPE-X1或RSE-X1主控板支持 配置了MCP主控板不支持 |
|
SR6604-X/SR6608-X/SR6616-X |
支持 |
【缺省级别】
2:系统级
【参数】
interval:表示轮询间隔,取值范围为1~30,单位为秒。
【描述】
lldp check-change-interval命令用来使能轮询功能并配置轮询间隔。undo lldp check-change-interval命令用来关闭轮询功能。
缺省情况下,轮询功能处于关闭状态。
【举例】
# 在接口GigabitEthernet4/0/1上使能轮询功能,并配置轮询间隔为30秒。
<Sysname> system-view
[Sysname] interface GigabitEthernet 4/0/1
[Sysname-GigabitEthernet4/0/1] lldp check-change-interval 30
【命令】
lldp compliance admin-status cdp { disable | txrx }
undo lldp compliance admin-status cdp
【视图】
二层以太网接口视图/三层以太网接口视图/端口组视图
【缺省级别】
2:系统级
【参数】
disable:表示工作模式为Disable,既不发送也不接收CDP报文。
txrx:表示工作模式为TxRx,既发送也接收CDP报文。
【描述】
lldp compliance admin-status cdp命令用来配置LLDP兼容CDP功能的工作模式。undo lldp compliance admin-status cdp命令用来恢复缺省情况。
缺省情况下,LLDP兼容CDP功能的工作模式为Disable,既不发送也不接收CDP报文。
需要注意的是,欲使LLDP兼容CDP的功能生效,必须先使能LLDP兼容CDP功能,同时将LLDP兼容CDP功能的工作模式配置为TxRx。
相关配置可参考命令lldp compliance cdp。
SR6600/SR6600-X路由器各款型对于本节所描述的命令支持情况有所不同,详细差异信息如下:
型号 |
命令 |
描述 |
SR6602 |
lldp compliance admin-status cdp |
不支持 |
SR6602-X |
不支持 |
|
SR6604/SR6608/SR6616 |
配置了RPE-X1或RSE-X1主控板支持 配置了MCP主控板不支持 |
|
SR6604-X/SR6608-X/SR6616-X |
支持 |
【举例】
# 在接口GigabitEthernet4/0/1上配置LLDP兼容CDP功能的工作模式为TxRx。
<Sysname> system-view
[Sysname] interface GigabitEthernet 4/0/1
[Sysname-GigabitEthernet4/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报文所携Time To Live TLV中TTL的最大值为255,而TTL=Min(65535,(TTL乘数×LLDP报文的发送间隔)),因此为保证LLDP兼容CDP功能的正常运行,应确保该乘积不大于255。
相关配置可参考命令lldp hold-multiplier和lldp timer tx-interval。
SR6600/SR6600-X路由器各款型对于本节所描述的命令支持情况有所不同,详细差异信息如下:
型号 |
命令 |
描述 |
SR6602 |
lldp compliance cdp |
不支持 |
SR6602-X |
不支持 |
|
SR6604/SR6608/SR6616 |
配置了RPE-X1或RSE-X1主控板支持 配置了MCP主控板不支持 |
|
SR6604-X/SR6608-X/SR6616-X |
支持 |
【举例】
# 使能LLDP兼容CDP功能。
<Sysname> system-view
[Sysname] lldp compliance cdp
【命令】
lldp enable
undo lldp enable
【视图】
系统视图/二层以太网接口视图/三层以太网接口视图/端口组视图
不同型号的设备支持的情况如下表所示:
型号 |
视图 |
描述 |
SR6602 |
二层以太网接口视图 |
不支持 |
SR6602-X |
不支持 |
|
SR6604/SR6608/SR6616 |
配置了SAP板并且SAP板工作在二层模式下支持 |
|
SR6604-X/SR6608-X/SR6616-X |
型号 |
视图 |
描述 |
SR6602 |
端口组视图 |
不支持 |
SR6602-X |
不支持 |
|
SR6604/SR6608/SR6616 |
配置了RPE-X1或RSE-X1主控板支持 配置了MCP主控板不支持 |
|
SR6604-X/SR6608-X/SR6616-X |
支持 |
【缺省级别】
2:系统级
【参数】
无
【描述】
lldp enable命令用来使能LLDP功能。undo lldp enable命令用来关闭LLDP功能。
缺省情况下,LLDP功能在接口上处于使能状态,全局都处于关闭状态。
需要注意的是,LLDP功能必须在全局和接口上同时使能后才能生效。
【举例】
# 在接口GigabitEthernet4/0/1上关闭LLDP功能。
<Sysname> system-view
[Sysname] interface GigabitEthernet 4/0/1
[Sysname-GigabitEthernet4/0/1] undo lldp enable
【命令】
lldp encapsulation snap
undo lldp encapsulation
【视图】
二层以太网接口视图/三层以太网接口视图/端口组视图
不同型号的设备支持的情况如下表所示:
型号 |
视图 |
描述 |
SR6602 |
二层以太网接口视图 |
不支持 |
SR6602-X |
不支持 |
|
SR6604/SR6608/SR6616 |
配置了SAP板并且SAP板工作在二层模式下支持 |
|
SR6604-X/SR6608-X/SR6616-X |
型号 |
视图 |
描述 |
SR6602 |
端口组视图 |
不支持 |
SR6602-X |
不支持 |
|
SR6604/SR6608/SR6616 |
配置了RPE-X1或RSE-X1主控板支持 配置了MCP主控板不支持 |
|
SR6604-X/SR6608-X/SR6616-X |
支持 |
【缺省级别】
2:系统级
【参数】
无
【描述】
lldp encapsulation snap命令用来配置LLDP报文的封装格式为SNAP格式。undo lldp encapsulation命令用来恢复缺省情况。
缺省情况下,LLDP报文的封装格式为Ethernet II格式。
需要注意的是,LLDP CDP报文的封装格式只能为SNAP格式,不能为Ethernet II格式。
【举例】
# 配置接口GigabitEthernet4/0/1上发送的LLDP报文的封装格式为SNAP格式。
<Sysname> system-view
[Sysname] interface GigabitEthernet 4/0/1
[Sysname-GigabitEthernet4/0/1] lldp encapsulation snap
【命令】
lldp fast-count count
undo lldp fast-count
【视图】
系统视图
【缺省级别】
2:系统级
【参数】
count:表示快速发送LLDP报文的个数,取值范围为1~10,单位为个。
【描述】
lldp fast-count命令用来配置快速发送LLDP报文的个数。undo lldp fast-count命令用来恢复缺省情况。
缺省情况下,快速发送LLDP报文的个数为3个。
【举例】
# 配置快速发送LLDP报文的个数为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。
需要注意的是,LLDP报文所携Time To Live TLV中TTL的值用来设置邻居信息在本地设备上的老化时间,由于TTL=Min(65535,(TTL乘数×LLDP报文的发送间隔)),即取65535与(TTL乘数×LLDP报文的发送间隔)中的最小值,因此通过调整TTL乘数可以控制本设备信息在邻居设备上的老化时间。
相关配置可参考命令lldp timer tx-interval。
【举例】
# 配置TTL乘数为6。
<Sysname> system-view
[Sysname] lldp hold-multiplier 6
【命令】
lldp management-address-format string
undo lldp management-address-format
【视图】
二层以太网接口视图/三层以太网接口视图/端口组视图
不同型号的设备支持的情况如下表所示:
型号 |
视图 |
描述 |
SR6602 |
二层以太网接口视图 |
不支持 |
SR6602-X |
不支持 |
|
SR6604/SR6608/SR6616 |
配置了SAP板并且SAP板工作在二层模式下支持 |
|
SR6604-X/SR6608-X/SR6616-X |
型号 |
视图 |
描述 |
SR6602 |
端口组视图 |
不支持 |
SR6602-X |
不支持 |
|
SR6604/SR6608/SR6616 |
配置了RPE-X1或RSE-X1主控板支持 配置了MCP主控板不支持 |
|
SR6604-X/SR6608-X/SR6616-X |
支持 |
【缺省级别】
2:系统级
【参数】
无
【描述】
lldp management-address-format string命令用来配置管理地址在TLV中的封装格式为字符串格式。undo lldp management-address-format命令用来恢复缺省情况。
缺省情况下,管理地址在TLV中的封装格式为数字格式。
【举例】
# 在接口GigabitEthernet4/0/1上配置管理地址在TLV中的封装格式为字符串格式。
<Sysname> system-view
[Sysname] interface GigabitEthernet 4/0/1
[Sysname-GigabitEthernet4/0/1] lldp management-address-format string
【命令】
lldp management-address-tlv [ ip-address ]
undo lldp management-address-tlv
【视图】
二层以太网接口视图/三层以太网接口视图/端口组视图
不同型号的设备支持的情况如下表所示:
型号 |
视图 |
描述 |
SR6602 |
二层以太网接口视图 |
不支持 |
SR6602-X |
不支持 |
|
SR6604/SR6608/SR6616 |
配置了SAP板并且SAP板工作在二层模式下支持 |
|
SR6604-X/SR6608-X/SR6616-X |
型号 |
视图 |
描述 |
SR6602 |
端口组视图 |
不支持 |
SR6602-X |
不支持 |
|
SR6604/SR6608/SR6616 |
配置了RPE-X1或RSE-X1主控板支持 配置了MCP主控板不支持 |
|
SR6604-X/SR6608-X/SR6616-X |
支持 |
【缺省级别】
2:系统级
【参数】
ip-address:表示在LLDP报文中发布的管理地址。
【描述】
lldp management-address-tlv命令用来允许在LLDP报文中发布管理地址并配置所发布的管理地址。undo lldp management-address-tlv命令用来禁止在LLDP报文中发布管理地址。
缺省情况下,允许在LLDP报文中发布管理地址:二层以太网接口发布的管理地址为该端口允许通过的、配置有IP地址的最小VLAN的主IP地址,但如果该端口允许通过的所有VLAN都未配置IP地址,则不发布管理地址;三层以太网接口发布的管理地址为该接口的IP地址,如果该接口未配置IP地址,则不发布管理地址。
需要注意的是:
· 每个LLDP报文中只能携带一个管理地址TLV,若重复配置,只发送最新配置的管理地址。
· 在二层以太网接口视图下配置时,若未指定参数ip-address,则发布的管理地址为该端口允许通过的、配置有IP地址的最小VLAN的主IP地址,但如果该端口允许通过的所有VLAN都未配置IP地址,则不发布管理地址。
· 在三层以太网接口视图下配置时,若未指定参数ip-address,则发布的管理地址为该接口的IP地址,如果该接口未配置IP地址,则不发布管理地址。
【举例】
# 在接口GigabitEthernet4/0/1上配置在LLDP报文中发布的管理地址为192.6.0.1。
<Sysname> system-view
[Sysname] interface GigabitEthernet 4/0/1
[Sysname-GigabitEthernet4/0/1] lldp management-address-tlv 192.6.0.1
【命令】
lldp notification remote-change enable
undo lldp notification remote-change enable
【视图】
二层以太网接口视图/三层以太网接口视图/端口组视图
不同型号的设备支持的情况如下表所示:
型号 |
视图 |
描述 |
SR6602 |
二层以太网接口视图 |
不支持 |
SR6602-X |
不支持 |
|
SR6604/SR6608/SR6616 |
配置了SAP板并且SAP板工作在二层模式下支持 |
|
SR6604-X/SR6608-X/SR6616-X |
型号 |
视图 |
描述 |
SR6602 |
端口组视图 |
不支持 |
SR6602-X |
不支持 |
|
SR6604/SR6608/SR6616 |
配置了RPE-X1或RSE-X1主控板支持 配置了MCP主控板不支持 |
|
SR6604-X/SR6608-X/SR6616-X |
支持 |
【缺省级别】
2:系统级
【参数】
无
【描述】
lldp notification remote-change enable命令用来使能LLDP Trap功能。undo lldp notification remote-change enable命令用来关闭LLDP Trap功能。
缺省情况下,LLDP Trap功能处于关闭状态。
【举例】
# 在接口GigabitEthernet4/0/1上使能LLDP Trap功能。
<Sysname> system-view
[Sysname] interface GigabitEthernet 4/0/1
[Sysname-GigabitEthernet4/0/1] lldp notification remote-change enable
【命令】
lldp timer notification-interval interval
undo lldp timer notification-interval
【视图】
系统视图
【缺省级别】
2:系统级
【参数】
interval:表示LLDP Trap信息的发送间隔,取值范围为5~3600,单位为秒。
【描述】
lldp timer notification-interval命令用来配置LLDP Trap信息的发送间隔。undo lldp timer notification-interval命令用来恢复缺省情况。
缺省情况下,LLDP Trap信息的发送间隔为5秒。
【举例】
# 配置LLDP Trap信息的发送间隔为8秒。
<Sysname> system-view
[Sysname] lldp timer notification-interval 8
【命令】
lldp timer reinit-delay delay
undo lldp timer reinit-delay
【视图】
系统视图
【缺省级别】
2:系统级
【参数】
delay:接口初始化的延迟时间,取值范围为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 delay
undo lldp timer tx-delay
【视图】
系统视图
【缺省级别】
2:系统级
【参数】
delay:表示LLDP报文的发送延迟,取值范围为1~8192,单位为秒。
【描述】
lldp timer tx-delay命令用来配置LLDP报文的发送延迟。undo lldp timer tx-delay命令用来恢复缺省情况。
缺省情况下,LLDP报文的发送延迟为2秒。
需要注意的是:
l 根据协议推荐,建议将LLDP报文的发送延迟配置为不大于其发送间隔的四分之一。
l 如果所配置的LLDP报文的发送延迟大于其发送间隔,那么其实际发送间隔将以其发送延迟的取值为准。
相关配置可参考命令lldp timer tx-interval。
【举例】
# 配置LLDP报文的发送延迟为4秒。
<Sysname> system-view
[Sysname] lldp timer tx-delay 4
【命令】
lldp timer tx-interval interval
undo lldp timer tx-interval
【视图】
系统视图
【缺省级别】
2:系统级
【参数】
interval:表示LLDP报文的发送间隔,取值范围为5~32768,单位为秒。
【描述】
lldp timer tx-interval命令用来配置LLDP报文的发送间隔。undo lldp timer tx-interval命令用来恢复缺省情况。
缺省情况下,LLDP报文的发送间隔为30秒。
需要注意的是:
l 根据协议推荐,建议将LLDP报文的发送间隔配置为不小于其发送延迟的四倍。
l 如果所配置的LLDP报文的发送间隔小于其发送延迟,那么其实际发送间隔将以其发送延迟的取值为准。
相关配置可参考命令lldp timer tx-delay。
【举例】
# 配置LLDP报文的发送间隔为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 } }
在三层以太网接口视图下:
lldp tlv-enable { basic-tlv { all | port-description | system-capability | system-description | system-name } | 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 } | power-over-ethernet } }
undo lldp tlv-enable { basic-tlv { all | port-description | system-capability | system-description | system-name } | dot3-tlv { all | link-aggregation | mac-physic | max-frame-size | power } | med-tlv { all | capability | inventory | location-id | power-over-ethernet } }
【视图】
二层以太网接口视图/三层以太网接口视图/端口组视图
不同型号的设备支持的情况如下表所示:
型号 |
视图 |
描述 |
SR6602 |
二层以太网接口视图 |
不支持 |
SR6602-X |
不支持 |
|
SR6604/SR6608/SR6616 |
配置了SAP板并且SAP板工作在二层模式下支持 |
|
SR6604-X/SR6608-X/SR6616-X |
型号 |
视图 |
描述 |
SR6602 |
端口组视图 |
不支持 |
SR6602-X |
不支持 |
|
SR6604/SR6608/SR6616 |
配置了RPE-X1或RSE-X1主控板支持 配置了MCP主控板不支持 |
|
SR6604-X/SR6608-X/SR6616-X |
支持 |
【缺省级别】
2:系统级
【参数】
all:在二层以太网接口视图下指定basic-tlv、dot1-tlv或dot3-tlv,或者在三层以太网接口视图下指定basic-tlv或dot3-tlv时,本参数表示该类型下所有的可选TLV;而不论在二层还是三层以太网接口视图下指定med-tlv时,本参数都表示该类型下除location-id以外所有的可选TLV。
basic-tlv:表示基本类型TLV。
port-description:表示Port Description TLV。
system-capability:表示System Capabilities TLV。
system-description:表示System Description TLV。
system-name:表示System Name TLV。
dot1-tlv:表示IEEE 802.1组织定义的TLV。
port-vlan-id:表示Port VLAN ID TLV。
protocol-vlan-id [ vlan-id ]:表示Port And Protocol VLAN ID TLV,vlan-id为所要发布VLAN的VLAN ID,取值范围为1~4094,缺省值为该端口所属VLAN中最小的VLAN ID。
vlan-name [ vlan-id ]:表示VLAN Name TLV,vlan-id为所要发布VLAN的VLAN ID,取值范围为1~4094,缺省值为该端口所属VLAN中最小的VLAN ID。
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和Power Stateful Control 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类型。
缺省情况下,二层以太网接口上允许发布除Location Identification TLV之外所有类型的TLV;三层以太网接口上允许发布除IEEE 802.1组织定义的TLV、Network Policy TLV和Location Identification TLV之外所有类型的TLV。
需要注意的是:
· 必须先允许发布LLDP-MED Capabilities TLV,才能允许发布LLDP-MED其它类型的TLV;必须先禁止发布LLDP-MED其它类型的TLV,才能禁止发布LLDP-MED Capabilities TLV;必须先禁止发布LLDP-MED Capabilities TLV,才能禁止发布MAC/PHY Configuration/Status TLV。
· 当允许发布LLDP-MED Capabilities TLV之后,MAC/PHY Configuration/Status TLV也将自动发布。
· 在使用该命令时若不指定all参数,每次只能配置某类型下的一种可选TLV,此时可通过多次使用该命令来配置各类型下的多种可选TLV。
【举例】
# 配置接口GigabitEthernet4/0/1上允许发布IEEE 802.3组织定义的Link Aggregation可选TLV。
<Sysname> system-view
[Sysname] interface GigabitEthernet 4/0/1
[Sysname-GigabitEthernet4/0/1] lldp tlv-enable dot3-tlv link-aggregation
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!