Configuring Telnet

My last networking article; Connecting to a switch by remote access, I discussed connecting a PC to a Cisco switch using a Console cable. In this article I will follow up in this article by configuring the switch to receive a remote Telnet connection. We will then have the ability to remotely connect to the switch.

A word of warning. Telnet is not secure and transmits all data in clear text. In reality we would access the switch using Secure Shell (SSH) instead of Telnet. All the the information here also applies to SSH, except we would need to add a few more steps. I will discuss SSH specifically in a future article.

My previous article Connecting to a switch by remote access finished with us connected to our physical switch with a console cable and our terminal emulator running. If using Packet Tracer we would have a switch CLI open.

This image has an empty alt attribute; its file name is switch-rollover-1.jpg

Enable mode Password

Anyone can access User mode on Cisco switches unhindered. However Enable mode requires a password. This is referred to as a shared password as its used by everyone.

enable secret password* (where the password* is the actual password you choose) is used.

In Global Configuration mode I have set the password to blueocean

I am now prompted for a password when entering Enable mode

Note that even though I typed the password nothing shows on the screen. This is normal and it works fine, once you type the correct password of course!

Management IP address

In order to setup a remote connection to our Switch we must first configure a management IP address.

This IP address has nothing to do with the movement of frames on our switch. It’s solely used as a means to access the switch with a remote connection.

We connect to our switch from a PC using an Ethernet cable. In the above example I connected the cable into the switches Fast Ethernet 0/1 interface. In reality we can connect the cable into any of the switches Fast Ethernet interfaces.

Virtual Lan (VLAN)

Virtual Lans (VLAN’s) are a big subject and beyond the scope of this article. If your interested in knowing more check out my articles; VLans the Basics

For the purpose of this article all we need to know is that Vlan 1 contains all of the switches interfaces by default. What that means is that we will have access to Vlan 1 whether we plug our cable into interface Fa0/1, Fa0/24 or anything in-between. So it makes sense for us to use Vlan1 as our management interfaces.

Configuring the Switch for Telnet

Now that I have explained the basics we can get on with configuring the switch. There are a number of steps we must complete in order to configure our switch for Telnet connections.

  • Navigate to Global Configuration mode
  • Configure an enable mode password
  • Configure the Vlan interface
  • Configure Telnet

Configuration mode

  • Enter enable mode on the switch by typing enable
  • Enter Global Configuration mode by typing conf t

Configure the Enable mode shared password

This image has an empty alt attribute; its file name is image-11.png

Configure the VLAN Interface

  • enter the vlan interface by typing int vlan 1
  • type the management IP Address followed by subnet mask. In this case IP 192.168.1.30 and subnet mask 255.255.255.0
  • Bring up the interface by typing no shutdown or no shut
  • Type exit to return to Global config mode

Configure Telnet

Telnet and (SSH for that matter) require a per-username and password combination, as opposed to the shared password used with enable mode.

The specific Telnet configuration requires access on line vty 0 15 and the login local command.

The 0 15 means that there can be 16 (0 through to 15) simultaneous Telnet connections. i.e 16 people can log in at the same time on the various different lines. The “local” part of the login tells the program to look for username and password combination on the switch as the information is stored locally.

Congratulations, Telnet is now configured!

Connecting via Telnet

Lets connect to Telnet. Connect the switch with an Ethernet cable

Ensure your PC is on the the same subnet

On Packet Tracer;

  • click on the PC, Config, FastEthernet0
  • Type an IP address with the same in the same subnet range as your switch
  • The Subnet mask should propagate automatically, if not type 255.255.255.0

Now click Desktop, scroll down and select Telnet/SSH client

Change the connection type from SSH to Telnet

Enter the IP address of the switch and press Connect

  • I am prompted for my username and password that I set up on the switch earlier.
  • then for the enable mode password
  • Im now connected to the switch!!

This concludes Telnet configuration and access. Dont forget if you want to know more about VLans check out this article Vlans the basics

Need more help? Check out my configuring Telnet video on Youtube