Line VTY 0 4 in Cisco routers and switches

What is the VTY line and what is the difference between line VTY 0 4, line VTY 5 15, and line VTY 0 15

The full form of VTY is Virtual teletype. This interface is used in a Cisco router and switches to establish connectivity with other devices via telnet protocol.

To enable telnet connectivity on the Cisco devices, we have to configure VTY lines.

Line VTY 0 4

Cisco devices have the capabilities to support many simultaneous telnet sessions so several users can establish telnet sessions remotely with the routers and switches however for this functionality we have to configure more than 1 VTY line. The simplest way to configure multiple lines is by selecting the range of lines so line VTY 0 4 configures 5 lines 0 to 4 together. If only one line is required then only one line can be configured like line VTY 0, line VTY 1, etc.

Note – While configuring the telnet on the devices, we must use space between 0 and 4 e.g. line VTY 04 will not work.

Line VTY 5 15

Some of the older versions of IOS supported only 5 lines 0 to 4 however new version of IOS support up to 16 lines so a maximum of 16 simultaneous telnet connection can be handled by the Cisco router or switch. If lines from 0 to 4 are configured already and there is a need for more VTY lines then the rest of the lines can also be configured by selecting line VTY 5 15 on the command line interface.

Line VTY 0 15

We can configure all available lines at once by selecting the full range on the command line interface. Most administrators use line VTY 0 4 because the earlier Cisco operating systems were only allowing 5 lines so it’s become a kind of practice.

How to configure VTY lines

We will configure only 1 line on the Cisco switch i.e. line VTY 0. To configure the line, we have to enter into line configuration mode. On the global configuration mode in IOS, use the following commands to configure VTY lines.

Router(config)#line vty 0
Router(config-line)#password cisco
Router(config-line)#login

How to remove line VTY config

To remove the line VTY config, we just have to disable the password and it will disable the VTY line however we must have the information that how many lines are configured on the Cisco device and we must select the correct range while disabling the VTY config. Using the following commands will disable the VTY lines.

Router(config)#line vty 0

Router(config-line)#no password

Line VTY password in Cisco

When configuring the password on the VTY line, we are given two below options.

Router(config-line)#password ?
7 Specifies a HIDDEN password will follow
LINE the UNENCRYPTED (clear text) line password

We can use the command – Router(config-line)#password Cisco

The above command will configure the password as Cisco however it will be shown as clear text in the running config.

Another command that can be used is – Router(config-line)#password 7 (the encrypted version of the password)
This command allows us to enter the encrypted text however we have to convert our text to password 7 before entering the command and while login in, the Cisco device will accept the text version of the ‘7’ password entered.

 

Leave a Reply