CISCO密码设置

开启交换机telnet的命令步骤:

第一步:给telnet登陆配置密码:

Switch>
Switch>en            用户模式进入特权模式
Switch#conft       特权模式进入配置模式
Enter configuration commands, oneper line.  End with CNTL/Z.
Switch(config)#lin
Switch(config)#line vt
Switch(config)#line vty 04     允许5个用户登陆
Switch(config-line)#passw
Switch(config-line)#password123456     设置telnet时的登陆密码
Switch(config-line)#login                    使登陆密码生效
Switch(config-line)#^Z         退出到特权模式
%SYS-5-CONFIG_I: Configured from console by console
Switch#cop rs                  保存配置文件
Destination filename [startup-config]? 
Building configuration...
[OK]                                      保存成功

第二步:telnet密码虽然配置成功了,可是一想,IP还没配置啊,telnet登陆谁呢?~! 所以这个时候需要开启交换机的管理vlan,给管理vlan配置Ip,一般交换机都有初始的默认vlan1,用他来做管理vlan吧【说说管理vlan的作用:管理VLAN是指设备的IP地址所在的VLAN,主要用来远程连接这个设备进行管理使用  如果不配置这个,你将无法通过网络管理这台设备,业务VLAN就是普通的接台式机的VLAN,接业务使用...】,下面配置二层交换机的管理vlan的Ip:

test02#   conft           特权模式进入配置模式
Enter configuration commands, oneper line.  End with CNTL/Z.
test02(config)#int vlan1        进入vlan1虚拟口
test02(config-if)#ip add 10.1.1.1255.255.255.0            给vlan1设置IP地址
test02(config-if)#noshutdown        开启vlan1

%LINK-5-CHANGED: Interface Vlan1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changedstate to up
test02(config-if)#^Z           由配置模式推出到特权模式;
%SYS-5-CONFIG_I: Configured from console by console
test02#cop rs                  保存配置文件;

 

第三步:现在看来telnet是有目标IP地址了,也有telnet登陆时候的密码了,但是我在telnet的时候虽然成功了,但是又出现了令一个问题,我无法由用户模式进入特权模式:

PC>telnet 10.1.1.1
Trying 10.1.1.1 ...


User Access Verification

Password:                                          此处输入设置的vty密码;
test02>en
% No password set
test02>en
% No password set
test02>?                                      查看可以使用的命令;
Exec commands:
 <1-99>     Session number to resume
 connect    Open a terminal connection
  disconnect  Disconnect anexisting network connection
 enable     Turn on privileged commands
 exit       Exit from the EXEC
 logout     Exit from the EXEC
 ping       Send echo messages
 resume     Resume an active network connection
 show       Show running system information
 telnet     Open a telnet connection
 terminal    Setterminal line parameters
  traceroute  Trace route todestination
test02>enable
% No password set

 

总是提示我没有设置密码;可见,通过telnet登陆交换机,还需要提高从用户模式到特权模式的密码,如果不设置密码,还是不能成功远程登陆一台交换机的。于是:

第四步:在交换机控制台设置从用户模式到特权模式的密码:

test02> en
test02#conf t
Enter configuration commands, oneper line.  End with CNTL/Z.
test02(config)#ena
test02(config)#enable pas
test02(config)#enable password 234567 
test02(config)#^Z
%SYS-5-CONFIG_I: Configured from console by console
test02#cop r s
Destination filename [startup-config]? 
Building configuration...
[OK]

然后在从远端pc登陆交换机,操作步骤及其显示结果如下:

PC>telnet 10.1.1.1
Trying 10.1.1.1 ...


User Access Verification

Password:                  输入最初设置的vty密码;
test02>en
Password:                输入从用户模式登陆到特权模式的密码;
test02#conft           显示登陆成功,输入命令,进入配置模式;
Enter configuration commands, oneper line.  End with CNTL/Z.
test02(config)#

最后再多说几个知识点:

设置使用console线登陆的密码:

一.设置console密码
>enable
#configure trminal
(confing)#line console0                              登陆进入console口
(config-line)#password  (cisco                      设置密码
(config-line)#login                  这个一定不能少啊,console密码设置完成
(config-line)#exit                 退出配置模式

 

#cop rs                  保存配置文件;  


  • 0
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值