思科交换机密码设置方法

人气:127 ℃/2022-01-14 17:51:18
【导读】 思科交换机密码设置方法,下面是小编为你收集整理的,希望对你有帮助!你还在为而烦恼么?不用担心,接下来是小编为大家收集的,欢迎大家阅读::开启交换机telnet的命令步骤:第一步:给telnet登陆配置密码:Switch>Switch>en 用户模式进入特...

你还在为而烦恼么?不用担心,接下来是小编为大家收集的,欢迎大家阅读:

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

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

Switch>

Switch>en 用户模式进入特权模式

Switch#conf t 特权模式进入配置模式

Enter configuration commands, one per line. End with CNTL/Z.

Switchconfig#lin

Switchconfig#line vt

Switchconfig#line vty 0 4 允许5个用户登陆

Switchconfig-line#passw

Switchconfig-line#password 123456 设置telnet时的登陆密码

Switchconfig-line#login 使登陆密码生效

Switchconfig-line#^Z 退出到特权模式

%SYS-5-CONFIG_I: Configured from console by console

Switch#cop r s 保存配置文件

Destination filename [startup-config]?

Building configuration...

[OK] 保存成功

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

test02# conf t 特权模式进入配置模式

Enter configuration commands, one per line. End with CNTL/Z.

test02config#int vlan 1 进入vlan1虚拟口

test02config-if#ip add 10.1.1.1 255.255.255.0 给vlan1设置IP地址

test02config-if#no shutdown 开启vlan1

%LINK-5-CHANGED: Interface Vlan1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up

test02config-if#^Z 由配置模式推出到特权模式;

%SYS-5-CONFIG_I: Configured from console by console

test02#cop r s 保存配置文件;

第三步:现在看来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 an existing 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 Set terminal line parameters

traceroute Trace route to destination

test02>enable

% No password set

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

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

test02> en

test02#conf t

Enter configuration commands, one per line. End with CNTL/Z.

test02config#ena

test02config#enable pas

test02config#enable password 234567

test02config#^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#conf t 显示登陆成功,输入命令,进入配置模式;

Enter configuration commands, one per line. End with CNTL/Z.

test02config#

最后再多说几个知识点:

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

一.设置console密码

>enable

#configure trminal

confing#line console 0 登陆进入console口

config-line#password cisco 设置密码

config-line#login 这个一定不能少啊,console密码设置完成

config-line#exit 退出配置模式

#cop r s 保存配置文件;

Copyright © 2008-2024 蜗牛素材网 All Rights Reserved
一个致力于分享各种行业知识与经验、学习资源交流平台,知识让你的眼界更宽广!