1、交换机命令大全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 passwordswitch(enable) set enalbepass3.在基于IO
2、S的交换机上设置远程访问: switch(config)# interface vlan 1switch(config-if)# ip address ip-address netmaskswitch(config-if)# ip default-gateway ip-address在基于CLI的交换机上设置远程访问: switch(enable) set interface sc0 ip-address netmask broadcast-addressswitch(enable) set interface sc0 vlanswitch(enabl
3、e) set ip route default gateway4.在基于IOS的交换机上启用和浏览CDP信息: switch(config-if)# cdp enableswitch(config-if)# no cdp enable为了查看Cisco邻接设备的CDP通告信息:switch# show cdp interface [type modle/port]switch# show cdp neighbors [type module/port] [detail]在基于CLI的交换机上启用和浏览CDP信息: switch(enable) set
4、cdp {enable
5、disable} module/port为了查看Cisco邻接设备的CDP通告信息:switch(enable) show cdp neighbors[module/port] [vlan
6、duplex
7、capabilities
8、detail]5.基于IOS的交换机的端口描述:switch(config-if)# description description-string基于CLI的交换机的端口描述: switch(enable)set port name module/number description-string 6.
9、在基于IOS的交换机上设置端口速度: switch(config-if)# speed{10
10、100
11、auto}在基于CLI的交换机上设置端口速度:switch(enable) set port speed moudle/number {10
12、100
13、auto}switch(enable) set port speed moudle/number {4