交换命令
•CDP•
Sw(config)#cdp run //打开CDP(交换机默认)
Sw(config)#no cdp run //关闭CDP
Sw(config-if)#(no) cdp enable //接口下打开/关闭CDP
Show cdp neighbors //显示邻居设备
Show cdp neighbors detail //显示邻居细节
Show cdp //显示CDP发送时间,holdtime时间
Show cdp traffic //显示CDP流量统计信息
Debug cdp packets
•Switch工作原理•
sw1(config)#interface f0/1
sw1(config-if)#duplex (full|half|auto) //duplex用来配置接口的双工模式:full-全双工 half-半双工 auto-自动监测双工的模式
Sw#show mac-address-table aging-time //老化时间
Sw(config)# mac-address-table aging-time 150 vlan 1 //有的版本没有
Sw#show mac-address-table //查看MAC地址表
SW#clear mac address-table dynamic //清除MAC动态地址表项
Sw(config)#mac address-table static xxxx.xxxx.xxxx vlan x interface interface0/0 //将某一MAC地址静态添加到某一VLAN的某一接口
SW(config)#mac address-table static xxxx.xxxx.xxxx vlan 1 drop //基于MAC地址表过滤某台机器,可防止ARP
sw1#copy running-config startup-config //保存配置
SW#erase startup-config //清空路由器只这一条
SW#delete flash:vlan.dat //交换机有这条
SW#reload //清空交换机配置的3步命令
•Frame-relay•