示例:配置 LLDP
以下示例在接口上配置 LLDP,但在所有其他 ge-1/1/1 接口上禁用 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-nameshow lldp statistics interface-nameshow lldp local-informationshow lldp remote-global-statisitics
您可以全局或在接口上清除 LLDP 邻居信息或统计信息:
clear lldp neighbors interface-nameclear lldp statistics interface-name
您可以使用以下命令 show lldp detail 显示有关 LLDP 的基本信息:
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 资源管理器。