Telnet Command on CISCO Router/Switch

Command

Telnet

Use

Allows you connect to another device remotely. Telnet is an excellent troubleshooting tool that can be used to validate various Layer 7 technologies such as HTTP and Email.

Althoug it is a useful tool for a CCNA, it is important to note that telnet traffic is unsecure. All traffic is sent in plaintext.

Syntax

Router#telnet <ip address or DNS name>

or

Router#<ip address or DNS name>

Example 1

This first example illustrates how telnet is not a secure way to access your device. To show this, first we telnet from R1 to R2 using a password of ‘cisco’.

R1#telnet 10.1.1.2
Trying 10.1.1.2 … Open

User Access Verification

Password: *****
R2>

Here is a packet capture taken using Wireshark.Notice that the password is visible over several packets.

Example 2

The below example shows how to disconnect from a telnet session that has been paused.

R1#telnet 10.1.1.2
Trying 10.1.1.2 … Open

R2#

You can also telnet using a DNS name.

R1(config)#ip host R2 10.1.1.2
R1(config)#exit

R1#telnet R2
Trying R2 (10.1.1.2)… Open

R2

You can also specify the source interface that the telnet uses connect to, by default telnet will use the closest interface as per the routing tables.

This is particularlly useful in troubleshooting or verifying proper routing.

R1#telnet 2.2.2.2 /source-interface loopback 0
Trying 2.2.2.2 … Open

R2#

You can also use telnet to verify that most layer 7 protocols are working correctly. This includes protocols such as Email, and HTTP. It is also useful for verifying that access-lists are working properly.

2611XM#telnet google.com 80
Translating “google.com”…domain server (10.10.2.1) [OK]
Trying google.com (209.85.171.100, 80)… Open

Related Articles

Leave a Reply

avatar

Send this to a friend