Configuring the Cisco 2509 Router as a Terminal Server
In this article I'll show you how to configure the Cisco 2509 Router as a Terminal Server to access the other routers and switches in your lab or network via console cable from one interface. Using the 2509 allows you network access to a central device wich is connected via an octal cable to multiple other routers and/or switches via their console ports.
The first thing we do as with any other router is configure our standard settings like the enable secret, logging and timeout options, an IP address, users and passwords:
Router>en Router#conf t Enter configuration commands, one per line. End with CNTL/Z. Router(config)#hostname FooTS FooTS(config)#enable secret cisco FooTS(config)#service password-encryption FooTS(config)#no ip domain-lookup FooTS(config)#line console 0 FooTS(config-line)#logging synchronous FooTS(config-line)#exec-timeout 0 0 FooTS(config-line)#interface ethernet0 FooTS(config-if)#ip address 10.1.1.70 255.255.255.0 FooTS(config-if)#no shutdown FooTS(config-if)#line vty 0 4 FooTS(config-line)#login local FooTS(config-line)#password cisco FooTS(config-line)#exit FooTS(config)#username user1 password cisco FooTS(config)#line vty 0 4
Now that we have our standard configuration setup, well configure the terminal server part of this article. We'll configure a loopback interface for use with our terminal server configuration since it will always be available unlike an ethernet connection which may go down. As mentioned earlier the 2509 has a CAB-OCTAL-ASYC or octal cable which connects to the console port on each of our routers or switches. To access the devices connected to each of the cables we'll be using Reverse Telnet connections to the loopback interface we created.
FooTS(config)#interface loopback 1 FooTS(config-if)#ip address 172.21.1.1 255.0.0.0
Now that we have the loopback interface we need allow telnet as a transport over the asynchronous lines:
FooTS(config)#line tty 1 8 FooTS(config-line)#transport input telnet
We'll now configure our host table which allows us to enter short names for our connections such as R1 or SW1, each of the entries on the host table essentially maps the line number (1 - 8) to the loopback interface IP address. The line number start at 2000 for line one and increment by one for each line there after:
FooTS(config)#ip host R0 2000 172.21.1.1 FooTS(config)#ip host R1 2001 172.21.1.1 FooTS(config)#ip host R2 2002 172.21.1.1 FooTS(config)#ip host R3 2003 172.21.1.1 FooTS(config)#ip host SW1 2004 172.21.1.1 FooTS(config)#ip host SW2 2005 172.21.1.1
Now that the host mappings have been added you can simply enter from exec mode r1 or r2 and so on and you will be connected to the console session on the destination device. When you do this you may need to hit the enter key a few times to wake the session up so to speak. Once you've configured the destinatation router or switch, you use the key combination ctrl+shift+6, x from inside the router or switch which will bring you back to the terminal server console. At this point if you simply press enter again you will be taken back to the last reverse telnet connection you had open.
You can view your open telnet sessions with the show sessions command. Each session will have connection number which you can use from the terminal server to reconnect to the sessions. To do this simply type the number at the exec prompt and press enter.
Some times you will get a connection refused message when trying to reverse telnet to a router or switch, if this happens use the clear line x, x being the line number 1,2,3... You may need to do this more than once, normally I find three times is enough.
Lastly you can use the disconnect x command to disconnect telnet sessions, where x is the connection number shown in output of the show sessions command.




