文档介绍:思科交换机命令大全 1. 设置主机名/ 系统名 IOS : switch(config)# hostname "hostname" CLI : switch(enable) set system name name-string 2 .设置登录口令 IOS : switch(config)# enable password level 1 password CLI : switch(enable) set password switch(enable) set enalbepass 3 .设置远程访问 IOS : switch(config)# interface vlan 1 switch(config-if)# ip address ip-mask switch(config-if)# ip default-gateway ip-address CLI : switch(enable) set interface sc0 ip-mask broadcast-address switch(enable) set interface sc0 vlan switch(enable) set ip route default gateway 4 .启用和浏览 CDP 信息 IOS : switch(config-if)# cdp enable switch(config-if)# no cdp enable CLI : switch(enable) set cdp {enable|disable} module/port 5 .查看 Cisco 邻接设备的 CDP 通告 IOS : switch# show cdp interface [type modle/port] switch# show cdp neighbors [type module/port] [detail] CLI : switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail] 6 .端口描述 IOS : switch(config-if)#description escription-string CLI : switch(enable)set port name module/number description-string 7 .设置端口速度 IOS : switch(config-if)# speed{10|100|auto} CLI : switch(enable) set port speed moudle/number {10|100|auto} switch(enable) set port speed moudle/number {4|16|auto} 8 .设置以太网的链路模式 IOS : switch(config-if)# duplex {auto|full|half} CLI : switch(enable) set port duplex module/number {full|half} 9 .配置静态 VLAN IOS : switch# vlan database switch(vlan)# vlan vlan-num name vla switc