S21交换机配置LLDP
福 建 星 网 锐 捷 网 络 有 限 公 司 800技术支持平台 800-858-1360
福州总部 福州市金山大道618号橘园洲星网锐捷科技园 邮编:350002
www.ruijie.com.cn
配置LLDP
LLDP的缺省配置
内容 LLDP功能 LLDP可用端口 LLDP timer LLDP holdtime 缺省配置 打开 在所有物理端口上均可用 60秒 180秒 打开或关闭LLDP功能
步骤如下:
Switch# configure terminal !进入全局配置模式
Enter configuration commands, one per line. End with CNTL/Z. Switch(config)# no lldp run !关闭LLDP功能
2006-03-16 12:46:05 @5-CONFIG:Configured from outband Switch(config)# end !退回到特权模式
2006-03-16 12:46:08 @5-CONFIG:Configured from outband Switch# show lldp !验证配置
% LLDP is not enabled
Switch# write !保存
Building configuration... [OK]
注:通过全局配置模式下的命令lldp run来打开LLDP功能
配置LLDP timer
步骤如下 :
Switch# configure terminal !进入全局配置模式
Enter configuration commands, one per line. End with CNTL/Z. Switch(config)# lldp timer 68
!配置timer,范围在5-299,缺省值为60秒
2006-03-16 12:52:16 @5-CONFIG:Configured from outband Switch(config)# end !退回到特权模式
福 建 星 网 锐 捷 网 络 有 限 公 司 800技术支持平台 800-858-1360
福州总部 福州市金山大道618号橘园洲星网锐捷科技园 邮编:350002
www.ruijie.com.cn
2006-03-16 12:52:19 @5-CONFIG:Configured from outband Switch# show lldp !验证你的配置
Sending LLDP packets interval(seconds): 68 Sending a holdtime value(seconds): 180
Switch# write !保存配置
Building configuration... [OK]
注:若要恢复为缺省值,可以在全局配置模式下执行命令no lldp timer
配置LLDP holdtime
步骤如下:
Switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z. Switch(config)# lldp holdtime 190
!配置holdtime,范围为10-300,缺省值为180,这里将holdtime设置成190秒 2006-03-16 12:57:15 @5-CONFIG:Configured from outband Switch(config)# end
2006-03-16 12:57:18 @5-CONFIG:Configured from outband Switch# show lldp !验证配置
Sending LLDP packets interval(seconds): 68 Sending a holdtime value(seconds): 190
Switch# write
Building configuration... [OK]
注:若要恢复为缺省值,可以在全局配置模式下执行命令no lldp holdtime
在某个物理接口上使能或禁用LLDP
例子:在物理接口fa0/3上禁用LLDP:
步骤如下:
Switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z. Switch(config)# interface fa0/3 !进入你需要禁用LLDP的接口
2006-03-16 13:02:35 @5-CONFIG:Configured from outband Switch(config-if)# no lldp enable
福 建 星 网 锐 捷 网 络 有 限 公 司 800技术支持平台 800-858-1360
福州总部 福州市金山大道618号橘园洲星网锐捷科技园 邮编:350002
www.ruijie.com.cn
!禁用LLDP
2006-03-16 13:02:41 @5-CONFIG:Configured from outband Switch(config-if)# end
2006-03-16 13:02:49 @5-CONFIG:Configured from outband Switch# show lldp interface !验证你的配置
Interface Status ------------ --------
Fa0/1 enabled Fa0/2 enabled Fa0/3 disabled Fa0/4 enabled Fa0/5 enabled Fa0/6 enabled Fa0/7 enabled Fa0/8 enabled Fa0/9 enabled Fa0/10 enabled Fa0/11 enabled Fa0/12 enabled Fa0/13 enabled Fa0/14 enabled Fa0/15 enabled Fa0/16 enabled Fa0/17 enabled Fa0/18 enabled Fa0/19 enabled Fa0/20 enabled Fa0/21 enabled Fa0/22 enabled Fa0/23 enabled Fa0/24 enabled
Switch# write
Building configuration... [OK]
注:若要恢复LLDP,可以在接口配置模式下执行命令lldp enable
消除LLDP计数器
将fa0/2接口上的LLDP计数器清零 步骤如下:
福 建 星 网 锐 捷 网 络 有 限 公 司800技术支持平台 800-858-1360
福州总部 福州市金山大道618号橘园洲星网锐捷科技园 www.ruijie.com.cn
邮编:350002
Switch# clear lldp counters fastEthernet 0/2 将fa0/2接口上的LLDP计数器清零 Switch# show lldp traffic !验证你的配置
Interface InGoodPkts InErrors OutPkts ---------- ----------- ----------- -----------
Fa0/1 0 0 0 Fa0/2 0 0 0 Fa0/3 0 0 0 Fa0/4 0 0 0 Fa0/5 0 0 0 Fa0/6 0 0 0 Fa0/7 0 0 0 Fa0/8 284 0 143 Fa0/9 0 0 0 Fa0/10 0 0 0 Fa0/11 0 0 0 Fa0/12 0 0 0 Fa0/13 0 0 0 Fa0/14 0 0 0 Fa0/15 0 0 0 Fa0/16 0 0 144 Fa0/17 0 0 0 Fa0/18 0 0 0 Fa0/19 0 0 0 Fa0/20 0 0 0 Fa0/21 0 0 0 Fa0/22 0 0 0 Fa0/23 0 0 0 Fa0/24 0 0 0
清除LLDP接收表
步骤如下:
Switch# clear lldp table !将接收表中的内容清空 Switch# show lldp neighbors !验证你的配置
福 建 星 网 锐 捷 网 络 有 限 公 司800技术支持平台 800-858-1360
福州总部 福州市金山大道618号橘园洲星网锐捷科技园 www.ruijie.com.cn
邮编:350002
福 建 星 网 锐 捷 网 络 有 限 公 司 800技术支持平台 800-858-1360
福州总部 福州市金山大道618号橘园洲星网锐捷科技园 邮编:350002
www.ruijie.com.cn