配置思科交换机的步骤(思科交换机配置Telnet远程连接)(1)

思科交换机打开Telnet服务

交换机端配置: 1.Switch>enable 从用户模式进入特权模式 2.Switch#configure terminal 从特权模式进入全局配置模式 3.Switch(config)#hostname sw0 给交换机指定主机名为sw0 4.sw0(config)#username cisco password cisco 创建远程登录的用户名和密码 5.sw0(config)#line vty 0 4 指定vty线路并且进入线路配置模式 6.sw0(config-line)#login local 指定在登录时检查密码 7.sw0(config-line)#transport input telnet 开启Telnet服务 8.sw0(config-line)#exit 退出配置模式 9.sw0(config)#enable password 123456 设置特权模式非安全加密 10.sw0(config)#service password-encryption 设置密码加密 11.sw0(config)#interface VLAN 1 进入vlan 1配置模式 12.sw0(config-if)#ip address 192.168.1.254 255.255.255.0 配置交换机管理IP地址和子网掩码 13.sw0(config-if)#no shutdown 启用接口 14.sw0(config-if)#exit 退出到上一层全局配置模式 15.sw0(config)#interface fastEthernet 0/1 指定接口并且进入接口配置模式 16.sw0(config)#switchport mode access 配置vlan 访问模式 17.sw0(config-if)#switchport access vlan 1 设置端口可以访问VLAN 1 18.sw0(config-if)#no shutdown 启用端口 19.sw0(config-if)#end 返回特权EXE模式 20.sw0#copy running-config startup-config 将运行配置作为启动配置存储到NVRAM中 (非易失性随机存储器) 客户端PC配置同网段IP和网关: 21.全局--FastEthernet--配置IP地址为192.168.1.99 22.全局--设置--网关设置成192.168.1.254,DNS服务器设置成114.114.114.114 ping测试连通性和Telnet远程登录交换机验证 23.PC打开桌面--命令提示符。 24.ping 192.168.1.254 25.telnet 192.168.1.254 输入用户名:cisco 输入密码:cisco 26.输入enable 输入特权EXEC模式的密码: 123456 27.查看当前配置: sw0#show running-config 最后提示:二层交换机远程管理, 配置了VLAN管理地址, 还需要配置ip default-gateway的地址, 管理VLAN的地址必须与 ip default-gateway的默认网关地址 在同一个网段。

,