• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 关于我们

02-网络管理命令参考

目录

24-设备支持lldp协议

本章节下载 24-设备支持lldp协议  (191.72 KB)

24-设备支持lldp协议


1 设备支持LLDP协议命令参考

1.1  开启设备lldp功能

1.1.1  lldp global

此命令用来开启/关闭设备的全局LLDP开关功能。

启用LLDP功能后,设备能向启用LLDP功能的邻居节点发送携带本端状态信息的LLDP报文,同时也能通过LLDP报文获取启用LLDP功能的邻居节点的状态信息。

【命令】

lldp global { enable | disable }

【缺省情况】

缺省情况下,全局LLDP开关为关闭。

【视图】

配置视图

【参数】

enable:开启设备lldp功能。

disable:关闭设备lldp功能。

【使用指导】

LLDP支持物理接口、桥口和聚合口发现邻居,通过lldp global enable命令开启全局开关后,还需打开接口LLDP开关。

【举例】

# 开启lldp全局开关。

host(config)# lldp global enable

【相关命令】

·     lldp enable

1.2  lldp信息显示命令

1.2.1  display lldp local-information

查看设备配置lldp接口信息。

【命令】

display lldp local-information

【视图】

配置视图

【参数】

【举例】

# 查看本地接口lldp配置信息。

host(config)# display lldp local-information

Global LLDP local-information:

Chassis ID          :50:21:45:3F:DE:A0

System name         :host

System description  :

  i-Ware software,Version 1.10,Release 6611-20201216

 

LLDP local-information of port 3 [ge1]

Port ID             : ge1

Port description    :

 LLDP agent nearest-bridge management address:

 admin-status: txrx

 LLDP agent nearest-customer management address:

 admin-status: txrx

1.2.2  display lldp neighbor -information

查看设备接口邻居lldp信息。

【命令】

display lldp neighbor-information [ brief | interface INTERFACE_NAME ]

【视图】

配置视图

【参数】

brief:显示lldp邻居简要信息。

Interface显示指定接口的lldp邻居信息。

INTERFACE_NAME:接口名称。

【举例】

# 查看设备接口邻居详细信息

host(config)# display lldp neighbor-information

LLDP neighbor-information of [ge3]:

LLDP agent nearest-bridge:

Chassis type              : MAC address

Chassis ID                : f8:6e:ee:8b:9b:1c

Port ID type              : Interface name

Port ID                   : GigabitEthernet1/0/1

Time to live              : 120

System name               : XXXXXXX

System description:

XXXXXXX, XXXX Versatile Routing Platform Software, Software Version : XXXXXXX VX.X (VRP (R) Software, Version X.0), Copyright (C) 2020 XXXX Technologies Co., Ltd.

System capabilities supported : Router

System capabilities enabled   : Router

Management address type           : IPv4

Management address                : 192.168.146.1

Management address interface type : System Port Number

Management address interface ID   : 8

Management address OID            : 0

host(config)# display lldp neighbor-information brief

Local Intf   Neighbor Name        Chass Id             Neighbor Intf        TTL    Up time   Agent              

ge3          USG6300              f8:6e:ee:8b:9b:1c    GigabitEthernet1/0/1 120    23        bridge

1.2.3  display lldp statistics

查看设备lldp接口统计信息。

【命令】

display lldp statistics

【视图】

配置视图

【参数】

【举例】

# 查看设备lldp接口统计信息。

host(config)# display lldp statistics

LLDP statistics information of port [ge3]

LLDP agent nearest-bridge:

The number of LLDP frames tx    : 70435

The number of LLDP frames rx    : 104278

The number of LLDP frames error : 0

1.3  lldp接口状态管理

1.3.1  lldp { enable | disable }

此命令用来开启/关闭设备上指定接口的LLDP功能。

【命令】

lldp { enable | disable }

【缺省情况】

缺省情况下,接口LLDP功能为关闭状态。

 

【视图】

接口视图

【参数】

enable:开启接口lldp功能。

disable:关闭接口lldp功能。

【使用指导】

LLDP功能目前支持三层物理接口、桥接口(绑定物理接口或者聚合接口)和聚合口(绑定了物理接口):

·     三层物理接口:需要在物理口都开启LLDP。

·     桥接口:

¡     桥接口下绑定物理接口:需要在桥口和物理口都开启LLDP。

¡     桥接口下绑定聚合接口(聚合接口下绑定物理接口):需要在桥口和物理口都开启LLDP,中间聚合口不需要开启LLDP。

·     聚合口(聚合接口下绑定物理接口):需要在聚合和物理口都开启LLDP。

删除桥接口或聚合口后,桥接口或聚合口下物理口的lldp命令不会删除。

【举例】

# 开启ge1接口的LLDP功能。

host# configure terminal

host(config)# interface ge1

host(config-ge1)#lldp enable

1.3.2  lldp timer tx-interval

lldp timer tx-interval <5-32768> 命令用来配置设备向邻居节点发送LLDP报文的时间间隔。

no lldp timer tx-interval 命令用来恢复LLDP发送时间间隔为默认配置。

【命令】

lldp timer tx-interval <5-32768>

no lldp timer tx-interval

【视图】

系统视图

【参数】

<5-32768>:设备向邻居节点发送LLDP报文的时间间隔,单位为秒。取值范围为5~32768,默认为30秒。

【使用指导】

发送LLDP报文时间周期的取值要适当,同时要根据网络负载情况及时调节该参数。

·     取值大,能够降低本端状态信息向邻居设备发送的频率,从而节省系统资源。但是取值过大会导致设备状态不能及时地通知到邻居设备,从而影响网管对网络拓扑结构的及时发现。

·     取值小,能够增加本端状态信息向邻居设备发送的频率,从而能够及时发现网络拓扑结构。但是取值过小会导致LLDP报文交互过于频繁,从而增加系统的负担,造成资源的浪费。

·     一般情况下建议使用缺省值。

报文中携带的TTL为:发送LLDP时间周期乘以4的值,超过65535,按最大值65535填充。

【举例】

# 配置发送LLDP报文的时间间隔为10分钟

host# configure terminal

host(config)# lldp timer tx-interval 600

 

1.3.3  lldp agent

lldp agent { nearest-customer | nearest-nontpmr } admin-status { tx | rx | txrx | disable } 命令用来在接口模式下配置LLDP的工作模式。

no lldp agent { nearest-customer | nearest-nontpmr } admin-status 命令用来取消接口模式下配置LLDP的工作模式。

【命令】

lldp agent { nearest-customer | nearest-nontpmr } admin-status { tx | rx | txrx | disable }

no lldp agent { nearest-customer | nearest-nontpmr } admin-status

【视图】

接口视图

【参数】

nearest-customer:最近客户桥代理。

nearest-nontpmr:最近非TPMR代理。

tx:只发送不接收LLDP报文。

rx:只接收不发送LLDP报文。

txrx:既发送也接收LLDP报文。

disable:既不发送也不接收LLDP报文。

【举例】

# 配置lldp接口既可以发送也可以接收LLDP报文。

host(config-ge3)# lldp agent nearest-customer admin-status txrx

#查看接口配置:

host# display lldp local-information

LLDP local-information of port 5 [ge3]

Port ID             : ge3

Port description    :

 LLDP agent nearest-customer management address:

 admin-status: txrx

1.3.4  lldp admin-status

lldp admin-status 命令用来配置当前接口的LLDP管理状态。

no lldp admin-status命令用来恢复LLDP默认状态,关闭收发报文功能。

【命令】

lldp admin-status { tx | rx | txrx | disable }

no lldp admin-status

【视图】

接口视图

【参数】

tx:只能发送报文。

rx:只能接收报文。

txrx:既能接收LLDP报文,也能发送LLDP报文。

disable:关闭收发报文功能。

【使用指导】

命令用于设置接口LLDP收发报文功能。

【举例】

#设置接口LLDP发包功能。

host# configure terminal

host(config)# interface ge3

host(config-ge3)# lldp admin-status tx

 

不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!

新华三官网
联系我们