Switch>enable //进入特权模式
Switch#conf t //进入配置模式
Switch(config)#hostname S2960 //修改交换机名
S2960(config)#interface fa 0/1 //选择端口
S2960(config-if)#speed 100 //修改端口配置
S2960(config-if)#duplex full
S2960(config-if)#exit
同时将PC的网卡改成全双工模式,100M速率,否则链路不通
Switch#show version
Switch#show run
Switch#show interface
Switch#show mac-address-table
Switch#config t
Switch(config)#enable password cisco //激活特权模式密码为cisco
Switch(config)#no enable password //取消特权模式密码
Switch(config)#line console 0 //选择控制台线路
Switch(config-line)#password cisco //激活该控制台线路密码为cisco
Switch(config-line)#login //打开登录认证功能
Switch(config-line)#no password //取消密码

原文:https://www.cnblogs.com/tomtellyou/p/10849574.html