CONFIGURE TELNET ON SWITCH (in Cisco Packet Tracer)

Swati Tripathi
6 min readNov 3, 2020

Telnet is a protocol by which you can remotely login into remote devices to make changes in the configuration of that device. The aim of this article is to give you a quick guide about how you can enable telnet on a switch.

Configuring telnet for the above network topology

STEP BY STEP GUIDE:

STEP 1: OPEN CISCO PACKET TRACER

Blank Cisco Packet Tracer

STEP 2: MAKE CONNECTIONS

As shown in the figure below, go to (1) End Devices and select (2) PC and then finally drag and drop PC on Screen.

Then select a switch [ I have taken Switch named as 2950–24]. Go to (1)Network device ->(2) switches ->(3) 2950–24 as shown in the figure below.

Then finally take a wire and connect PC to switch.

Now when you have taken the PC, wire, switch then start making the connection as shown in the figure below.

Note: The green triangle might be appearing as an orange circle when you have just made the connections, but don’t worry after some time they will become green.

STEP 3: ADD IP ADDRESS TO PC

Click on the PC and then a dialogue box will appear. Go to Desktop then click IP Configuration button.

A dialogue box will open up and then fill the IP address of PC whatever you want to, For e.g. write 10.0.0.1 in IP address field and then automatically subnet mask will be filled as 255.0.0.0.

STEP 4: ENABLE TELNET ON SWITCH

Now close the dialogue box and select switch now and then a dialogue box will be opened for the switch and then select CLI where we will have to write the main commands to do telnet configuration on the switch.

The dialogue box that will get opened after clicking the switch

Now hit enter and start writing commands on CLI. Write the commands highlighted in yellow colour as shown in the figure below.

In case the image is not visible, the commands that you have to write are:

en

conf t

int vlan 1

no shut

ip add 10.0.0.10 255.0.0.0

exit

line vty 0 4

password cisco

login

exit

enable secret cisco12

After you are done writing all the commands then it means you have successfully enabled telnet on the switch. A brief explanation of these commands is given at last of this article.

STEP 5: CHECK IF TELNET IS ENABLED OR NOT?

Now to test it go to pc and then select command prompt.

The dialogue box which will appear after clicking on PC

After opening the command prompt, write

telnet 10.0.0.10

It will ask you for a password and then you need to write

cisco

We are writing cisco as it is the password we have given, this is just an example, hence if you have given some other password, then write that. Also, when you will type cisco you will see nothing happening on the keyboard. So, don’t worry it is how the command prompt works when the user is typing a password. So, after you are done typing password and though nothing seems to be written just press enter. Only if you have filled correct password, it will work.

After successfully entering the password, now you are able to remotely login into the switch using telnet. Due to which you will see the following coming on command prompt.

switch>

Then type en which means enable and enter the password as cisco12. Now you are done and experiment has been completed. The following image of PC dialogue box shows what you have to write in command prompt.

Zoomed view of the command prompt

DOWNLOAD THIS LAB EXPERIMENT

If you want to download this experiment and run it on your cisco packet tracer, click me to visit that .pkt file. After the link opens you will see a download button as shown in the figure below from where you can download the experiment and run it on your Packet tracer.

Click the download button circled and hit the start button to show your support.

Explanation of commands used:

  1. en means to enable and is used to enter into privileged mode and you will see after typing en the symbol > will become to #. The symbol > indicates you are in user mode and # means you are in privileged mode. In privileged mode, you get more powers which you don’t get in user mode Like in this # mode you can see more detailed information about configuration, copy that configuration, etc. However, the limitation is that you cannot make any change to global parameters. So, in order to do that type conf t.

Switch>en

Switch#conf t

2. conf t is for configuring terminal and after typing it you enter into global configuration mode where you have the powers to change global parameters which you don’t have in privileged mode.

3. int vlan 1: Here int means interface. int vlan means interface VLAN which gives your switch a routable interface. This then allows you to assign ip address to the interface so the switch can be managed over the network. You can read more about it on Wikipedia.

4. no shut or no shutdown is just to enable an interface or say to turn it up. It is a very simple command to turn on the interface.

5. ip add 10.0.0.10 255.0.0.0 command is for giving IP address to VLAN interface, think it as the switch has now an IP 10.0.0.10 whose subnet mask is 255.0.0.0.

6. line vty 0 4 means you are assigning 5 virtual terminal connections to the virtual port. These virtual connections, in this case, are for telnet and 0–4 is the range. If we write line vty 0 15 then it will mean 16 virtual connections are allowed. This command is basically used to get telnet access to the device.

7. password cisco command means that we are setting the password as cisco. You can keep the password as anything. Writing cisco here is just an example. If you think line vty as a door to enter switch here then the password is the key to that door. Unless you don’t write the correct password you will have no right to access the switch.

8. login command is just to ensure that when you try to remotely access the switch using telnet protocol then it must ask for a password. It is just ensuring that your door i.e. line vty is locked and anyone trying to open that door needs a key i.e. password to open it.

9. enable secret cisco12 command is you need to access the privileged mode. Earlier by simply writing en, you were able to enter privileged mode. But now after writing this command you need to enter password first to enter the privileged mode. Here the password set is cisco12. You can write anything in place of cisco12. Also, secret means that your password will be stored in encrypted form and hence is more secure.

Thank you for reading this far!

There is a list of lab experiments performed on cisco packet tracer which you can visit by clicking me. If the repository is helpful then please don’t forget to star it and fork it, also if this article was helpful then please do give it a clap.

--

--

Swati Tripathi

I believe everyone should hustle hard to make a positive impact!