[Cisco Packet Tracer| 2. Remotely log in to the switch via telnet]

Drag a switch and two terminal devices. One terminal is directly connected to the switch using a console line, and the other terminal uses Telnet to remotely log in to the switch.

1. PC0 is connected to the switch through the console line

image-20230416224923927

A direct connect switch

Insert image description here

2. PC1 remotely logs in to the switch through Telnet

1.PC1 is connected to the switch through twisted pair cable

image-20230416230120788

Insert image description here

2. Set the IP address for the host

Insert image description here
Insert image description here

3. Configure a virtual management interface for the switch

Because the switch is a layer 2 device and does not have a p address at the network layer, in order to manage the switch, it is necessary to set up an interface vlan 1 on the switch to manage the switch and configure the IP address (make sure it is in the same network as PC1 network segment), use no shut to start it

song(config)#interface vlan 1
song(config-if)#ip add 192.168.0.1 255.255.255.0
song(config-if)#no shut

song(config-if)#
%LINK-5-CHANGED: Interface Vlan1, changed state to up

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

4. Set the password for the switch to enter privileged mode in global mode.

song(config)#enable password 111111
song(config)#

image-20230416231311166

5. Set up 5 virtual terminal users

song(config)#line vty 0 4 #进入线路配置模式并配置管理5个虚拟终端用户
song(config-line)#password 222222 #设置远程登录密码
song(config-line)#login #密码设置为登陆时有效
song(config-line)#end #一步退回到特权模式

6. Test

6.1 Test whether the host and switch are in the same network segment

Ping the switch IP from the host computer

image-20230416232116090

image-20230416232147494

It means that the ping is successful. PC1 and the switch are in the same network segment.

image-20230416232716949

6.2 Host remote login/connection to the switch

image-20230416233016160

success!

ps: here I am

  1. Telnet remote login password: 222222
  2. Password to enter privileged mode: 111111

Guess you like

Origin blog.csdn.net/qq_64428099/article/details/130190513
Recommended