Telnet and Routers
- Networking Topics
- Telnet and Routers
There are two ways to connect to a Cisco router in order to configure or troubleshoot it. You can connect a rollover cable to the routers console port and the other end to a spare COM port on your computer or you can Telnet into the router from a remote location.
Telnet is a terminal emulation protocol which is part of the TCP/IP suite of protocols. In order to connect to your router via telnet you need to set up the virtual terminal VTY ports on your router and assign them passwords. This is achieved by typing the following IOS commands.
Router#config terminalRouter(config)#line vty 0 4Router(config-line)#loginRouter(config-line)#password nikRouter(config-line)#exit
Make sure these passwords are secure since these ports will allow access to your router!If you have no need for telnet access you may wish to shut the ports down using the following IOS commands.
Router#config terminalRouter(config)#line vty 0 4Router(config-line)#no loginRouter(config-line)#exit
Remember though, if no virtual terminal VTY passwords are set you can't gain access to your router via telnet.
To gain access to your router from a Microsoft Windows computer open up a Hyperterminal session (Start>Accessories>Communications>Hyperterminal) or open up the MS DOS prompt (Windows NT/2000/XP Start>Run>Type CMD) (Windows 95/98 Start>Run>Type Command). From here you can telnet into the router you wish to connect to by typing the following.Telnet >IP address/Domain name<
Once you are logged into your router you can telnet into other devices via telnet. The easiest way to do this is type the IP address of the router you wish to connect to at the IOS command prompt, however the telnet command will also work. You use the disconnect or exit command to end the telnet session.
Checking Telnet Connections and Users
There are a couple of Cisco IOS commands you can use to check how many telnet connections are being made from your router, which users/hosts are connected, and for how long.Show UsersRouter#show users
The show users command will provide you with the host IP addresses, connection times and the VTY lines on which they are connected.Show SessionsRouter#show sessions
The show sessions command lists the IP addresses of the current connections to your router.
© 2021 Internetwork Training
Internetwork Training cannot guarantee that the informtion on this website is complete and free from errors. If you feel there are errors on this page then please tell us.