思科交换机基础--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地址
//终端机 和交换机必须在同一个网段

  • 5
    点赞
  • 32
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

刘浩冬

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值