示例:配置 LLDP
以下示例在接口 ge-1/1/1
上配置 LLDP,但在所有其他接口上禁用 LLDP,显式配置所有自动启用功能的默认值,并为 LLDP 配置通知间隔配置 30 秒,为物理拓扑陷阱间隔配置 30 秒。
[edit] protocols { lldp { advertisement-interval 30; hold-multiplier 4; interface all { disable; } interface ge-1/1/1; lldp-configuration-notification-interval 30; ptopo-configuration-maximum-hold-time 300; ptopo-configuration-trap-interval 30; transmit-delay 2; } }
您可以使用几个 show 命令验证 LLDP 的操作:
show lldp <detail>
show lldp neighbors interface-name
show lldp statistics interface-name
show lldp local-information
show lldp remote-global-statisitics
您可以全局或接口上清除 LLDP 邻接方信息或统计信息:
clear lldp neighbors interface-name
clear lldp statistics interface-name
您可以使用命令显示有关 LLDP show lldp detail
的基本信息:
user@host> show lldp detail LLDP : Enabled Advertisement interval : 30 Second(s) Transmit delay : 2 Second(s) Hold timer : 4 Second(s) Notification interval : 30 Second(s) Config Trap Interval : 300 Second(s) Connection Hold timer : 60 Second(s) Interface LLDP Neighbor count ge-1/1/1 Enabled 0 LLDP basic TLVs supported: Chassis identifier, Port identifier, Port description, System name, System description, System capabilities, Management address. LLDP 802 TLVs supported: Link aggregation, Maximum frame size, MAC/PHY Configuration/Status, Port VLAN ID, Port VLAN name.
有关这些命令输出的详细信息,请参阅 CLI 浏览器。