思科交换机基础--2telnet远程登陆设置

2交换机telnet远程登陆设置

一、实验目标
掌握采用telnet方式配置交换机的方法

在这里插入图片描述

二、技术原理
• 配置交换机的管理IP地址(计算机的IP地址与交换机管理IP地址在同一网段);
Switch>en //特权模式
Switch#conf t //全局模式
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#line vty 0 4 //设置telnet远程登陆密码
Switch(config-line)#password 123456 //密码:123456
Switch(config-line)#login //login = 确认
Switch(config-line)#exit
Switch(config)#line console 0 //设置console口密码
Switch(config-line)#password 123456 //密码:123456
Switch(config-line)#login
Switch(config-line)#exit
Switch(config)#enable password 123456 //设置进入特权模式密码

三、实验步骤
实验拓扑

Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
1、配置交换机的管理IP地址
Switch(config)#interface vlan 1 //默认情况下交换机所有端口都处于 vlan 1 当中
Switch(config-if)#ip address 192.168.1.1 255.255.255.0 //配置交换机管理IP地址
Switch(config-if)#no shutdown //开启Interface Vlan1

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

Switch(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up
在这里插入图片描述
Switch(config-if)#exit
2、设置进入特权模式的密码
Switch(config)#enable password 123456 //设置进入特权模式的密码
Switch(config)#line console ?
<0-0> First Line number
3、设置通过console端口连接设备的密码
Switch(config)#line console 0
Switch(config-line)#password 123456 //设置通过console端口连接设备的密码
Switch(config-line)#login
Switch(config-line)#exit
Switch(config)#line vty ?
<0-15> First Line number
4、设置telnet远程登录密码
Switch(config)#line vty 0 4
Switch(config-line)#password 123456 //设置telnet远程登录密码
Switch(config-line)#login
Switch(config-line)#end
Switch#
%SYS-5-CONFIG_I: Configured from console by console

5、查看配置情况
Switch#show running-config
Building configuration…

Current configuration : 1064 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch
!
enable password 123456
!
!
!
interface FastEthernet0/1
!

!
interface FastEthernet0/24
!
interface GigabitEthernet1/1
!
interface GigabitEthernet1/2
!
interface Vlan1
ip address 192.168.1.1 255.255.255.0
!
!
line con 0
password asdf
login
!
line vty 0 4
password abc123
login
line vty 5 15
login
!
!
end

Switch#
在这里插入图片描述

四、验证
1、验证通过console端口连接设备的密码
Press RETURN to get started.

User Access Verification

Password: //这里输入123456 密码不可见
Switch>
2、验证进入特权模式的密码
Switch>en
Password: //这里输入123456 密码不可见
Switch#
3、验证telnet远程登录密码
a. 给PC机设置IP地址
在这里插入图片描述
四、验证
1、验证通过console端口连接设备的密码
在这里插入图片描述
Press RETURN to get started.

User Access Verification

Password: //这里输入123456
Switch>
2、验证进入特权模式的密码
在这里插入图片描述
Switch>en
Password: //这里输入123456
Switch#
3、验证telnet远程登录密码

在这里插入图片描述
telnet 192.168.0.1 //vlan1的IP地址
//终端机 和交换机必须在同一个网段

猜你喜欢

转载自blog.csdn.net/L_O_V_E8023/article/details/107290851