思科2960初始化配置CONSOLE口

思科2960初始化配置CONSOLE口 
 
VTY(virtual type terminal)虚拟终端连接 
line vty 0 4  // VTY是路由器的远程登陆的虚拟端口,0 4表示可以同时打开5个会话 
1. 建立PC到路由器的物理连接,用RS232 CONSOLE线(随交换机带)连接路由器CONSOLE接口和PC的COM口。 
2. 在计算机上使用超级终端:打开“开始-程序-附件-通讯-超级终端—新建超级终端”,首先为新建连接设置名称。  
  然后,设置连接用端口,一般选择COM1,再设置连接参数,设置参数如下:每秒位数为9600,数据位为8,奇偶校验为无,停止位为1,数据流控制为Xon/Xoff。 不可搞错了! 3. 等待30秒,回车,出现人机对话界面 
    Would you like to enter the initial configuration dialog? [yes/no]: 是否按提示步骤操作   % Please answer yes or no. 
  Would you like to enter the initial configuration dialog? [yes/no]: n 输入n(自己手工设置)   Press RETURN to get started!   Switch>    首先看到的是用户模式 
  Switch>en  输入en(即enable)进入特权模式   Switch#conf t 进入配置模式 
  
Enter configuration commands, one per line. End with CNTL/Z. 
Switch(config)#hostname sw2960 给交换机命名 
sw2960(config)#enable secret Cisco  设置特权加密口令 
sw2960(config)#enable password Cisco 给交换机配置特权管理口令(明码的) sw2960(config)#line consle 0  进入控制台口(RS232) sw2960(config-line)#password Cisco  设置登录口令 sw2960(config-line)#login  登录要求口令验证 sw2960(config-line)#exit 退出到上级目录 
  sw2960(config)#line vty 0 4 给交换机开启远程管理     sw2960(config-line)#pass Cisco! 设置远程管理口令   sw2960(config-line)#login 允许远程登陆   sw2960(config-line)#exit 退出到上级目录   sw2960(config)#int vlan 1 进入vlan1 接口   sw2960(config-if)#no shut 开启此接口 
  1y13w: %LINK-3-UPDOWN: Interface Vlan1, changed state to up 
  
1y13w: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up 
  sw2960(config-if)#ip add 192.168.1.2 255.255.255.0 设置此接口地址   sw2960(config-if)#exit 退出到上一层 
sw2960(config-if-range)#exit 退出到上一级目录 sw2960(config)#show run  查看配置信息   sw2960(config)#end 退到根目录 
  sw2960#write 保存配置 切记!必须保存,否则重新启动后设置丢失!   4d00h: %SYS-5-CONFIG_I: Configured from console by console   Building configuration... 
  [OK] (保存好了,已经生效) 


重新启动交换机之后就可以通过浏览器输入IP地址进行访问或设置了,也可通过思科专业软件思科网络助理4.0中文版设置。 
 
Cisco2960交换机密码破解方法 
 
1.启用超级终端并出现连接界面。 2.拔掉交换机的电源. 
3.按下交换机上的Mode按钮,与此同时,重新插上交换机的电源线. 
4.当交换机左边的sys灯会慢慢的闪动,(细心的话会发现部分灯红色的闪过),按住mode按钮直到sys灯不闪动(常亮状态).否则提前松开的按钮的话会直接进入正常的启动,跳回步骤2重来. 
5.可以松开Mode按钮 
之后系统将显示一些指示信息: 
The system has been interrupted prior to initializing the flash file system. The following commands will initialize the flash file system, and finish loading the operating system software: 
flash_init /---初始化flash文件系统---/ load_helper /---加载帮助文件---/ 
boot /---启动设备进入正常的模式---/ 步骤: switch: 
Switch:flash_init 
Switch:dir flash: /---查看Flash的文件名字可以用来确认文件名为config.text---/ 
Switch:rename flash:config.text flash:oldconfig.text/---把配置文件重命名,当然你可以不改为oldconfig.text,只要文件名和原来的不相同就可以---/ Switch:boot /---手动启动交换机---/ 
配置文件改过了,交换机找不到默认的config.text而出现配置的对话向导,选择n然后回车然后我们就会绕过原来的password而进入到: Switch> 
Switch>en /--可以进入特权模式--/ 
Switch#rename flash:oldconfig.text flash:config.text /---恢复交换机配置文件---/ Switch#copy flash:config.text system:running-config /---保存配置到DRAM里---/ Switch#config t 这时就可以设置新的password为cisco  Switch(config)# enable password cisco  Switch(config)# enable secret CISCO  Switch(config)#line con 0  
Switch(config)#password cisco  
Switch#copy run start 或用下面方法暂时清空密码,待以后再做设置 Switch(config)#no enable password /---干掉特权模式旧密码---/ Switch(config)#no enable secret /---干掉加秘密码---/ Switch(config)#exit 
Switch#copy run start /---把当前配置的文件写回Flash---/ 
用这个方法修改密码不会把原来的配置文件内容清掉.特别是一个现成的大型网络里已经在运行的交换机,这样比较保险点.
  • 4
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值