Cisco Terminal Server Configuration Example

In this tutorial I’ll show you how to configure your own Cisco Terminal Server. This is a great solution for your home or remote lab when you want to have access to the console of multiple devices. There are a couple of hardware products that we can use for this, below is an example of the Cisco 2511-RJ:

Cisco 2511RJ Terminal Server

This router has 16 built-in connectors that can be used for console access. This is a great “all-in-one” router to use as a terminal server but they can be expensive sometimes. Another option is the NM16-A or NM32-A Async Network Module, they look like this:

NM-32A Octal Cable

You can use this module in a router and it comes with a convenient cable to connect to your console ports. Whatever you pick, the configuration will be pretty much the same.

I’ll walk you through the configuration and I’ll explain why you require certain commands.

Configuration

Making a connection from the router to one of the console ports is called reverse telnet. In order to do this, we require an IP address to connect to. We can do this by creating a loopback interface with an IP address on it:

Router(config)#interface Loopback 0
Router(config-if)#ip address 10.10.10.10 255.255.255.0

Just pick any IP address you like, it’s only used locally on your router.

Your terminal-server-to-be comes with some lines that refer to the ports that it has. You can use the show line command to see what line numbers it uses:

Router#show line 
   Tty Typ     Tx/Rx    A Modem  Roty AccO AccI   Uses   Noise  Overruns   Int
     0 CTY              -    -      -    -    -      0       0     0/0       -
     1 TTY   9600/9600  -    -      -    -    -      0       0     0/0       -
     2 TTY   9600/9600  -    -      -    -    -      0       0     0/0       -
     3 TTY   9600/9600  -    -      -    -    -      0       0     0/0       -
     4 TTY   9600/9600  -    -      -    -    -      0       0     0/0       -
     5 TTY   9600/9600  -    -      -    -    -      0       0     0/0       -
     6 TTY   9600/9600  -    -      -    -    -      0       0     0/0       -
     7 TTY   9600/9600  -    -      -    -    -      0       0     0/0       -
     8 TTY   9600/9600  -    -      -    -    -      0       0     0/0       -
     9 TTY   9600/9600  -    -      -    -    -      0       0     0/0       -
    10 TTY   9600/9600  -    -      -    -    -      0       0     0/0       -
    11 TTY   9600/9600  -    -      -    -    -      0       0     0/0       -
    12 TTY   9600/9600  -    -      -    -    -      0       0     0/0       -
    13 TTY   9600/9600  -    -      -    -    -      0       0     0/0       -
    14 TTY   9600/9600  -    -      -    -    -      0       0     0/0       -
    15 TTY   9600/9600  -    -      -    -    -      0       0     0/0       -
    16 TTY   9600/9600  -    -      -    -    -      0       0     0/0       -
    17 AUX   9600/9600  -    -      -    -    -      0       0     0/0       -
[output omitted]

My router (2511-RJ) has 16 ports which translate to TTY line 1-16, you can see them above. To test our lines we can telnet to our IP address on the loopback interface and specifying the port number. The port number is 2000 + line number, so for line 1 I need to telnet to port 2001:

Router#telnet 10.10.10.10 2001
Trying 10.10.10.10, 2001 ... Open

This seems to be working, it says “Open” which means its connected. You should be able to see the console of whatever device you are connected to now. If you want to return to your terminal server you need to press CTRL+SHIFT+6 and then X. This doesn’t kill the connnection but puts it in the background, if you want to terminate it you’ll have to use the clear line command:

Router#clear line 1
[confirm]
 [OK]

Instead of typing these commands we can use some shortcuts, we also require these for our menu:

Router(config)#ip host R1 2001 10.10.10.10
Router(config)#alias exec clr1 clear line 1

The ip host command tells the router that whenever we type “R1” that it has to telnet to 10.10.10.10 port 2001. The alias exec command means that whenever we type “clr1” that it has to perform “clear line 1”.

Here’s a demonstration of these two commands:

Router#R1
Translating "R1"
Trying R1 (10.10.10.10, 2001)... Open

We are now connected to R1 and after doing SHIFT+CTRL+6, X to return to the router we’ll clear the line:

Router#clr1
[confirm]
 [OK]

So far so good, now it’s time to create a menu that shows these options to our lab users. I’ll add some commands for R2 and R3 so we’ll have a nice menu with 3 routers to connect to:

Router(config)#ip host R2 2002 10.10.10.10
Router(config)#ip host R3 2003 10.10.10.10
Router(config)#alias exec clr2 clear line 2
Router(config)#alias exec clr3 clear line 3

Now it’s time to configure the menu:

Router(config)#
menu MYMENU title ^
************************    TERMINAL SERVER   **************************
************************         MENU         **************************
      To exit ssh session and return to the menu press
   <CTRL>+<SHFT>+<6> then <X>.  To clear a connection to begin
 a new console session type cls# (where # = the menu item number)
               Type "exit" to return to main menu.
*****************************************************************                    
  ITEM#        DEVICE NAME
-----------------------------------------------------------------^C
menu MYMENU prompt ^ Please enter your selection: ^C
menu MYMENU text 1 R1
menu MYMENU command 1 resume R1 /connect telnet R1
menu MYMENU text 2 R2
menu MYMENU command 2 resume R2 /connect telnet R2
menu MYMENU text 3 R3
menu MYMENU command 3 resume R3 /connect telnet R3
menu MYMENU text 4 Exit
menu MYMENU command 4 hangup
menu MYMENU command cls1 clr1
menu MYMENU command cls2 clr2
menu MYMENU command cls3 clr3

The menu is called “MYMENU” and first it will show the user an introduction how to use the menu. It will then show an option to connect to R1, R2 or R3, quit the menu or clear the lines.

We can test this menu by running it from the console:

We're Sorry, Full Content Access is for Members Only...

If you like to keep on reading, Become a Member Now! Here is why:

  • Learn any CCNA, CCNP and CCIE R&S Topic. Explained As Simple As Possible.
  • Try for Just $1. The Best Dollar You've Ever Spent on Your Cisco Career!
  • Full Access to our 655 Lessons. More Lessons Added Every Week!
  • Content created by Rene Molenaar (CCIE #41726)

546 Sign Ups in the last 30 days

satisfaction-guaranteed
100% Satisfaction Guaranteed!
You may cancel your monthly membership at any time.
No Questions Asked!

Tags: ,


Forum Replies

  1. Good timing! Do you recommend this router over the Digi cm32 ??

  2. Hi,

    Daft question but if I have a terminal server in my rack, octal cable going patched to all console ports for the devices I have

    How do I manage the terminal server from my PC without disrupting Internet access, do I need a dual NIC or can I simply run an extended rollover-to-usb cable from the terminal server’s console port to a spare usb slot on my desktop

    Thanks in advance,
    Steve

  3. Hi @stig.the.legend

    I usually just use the same IP address, the username that I use to manage the terminal server doesn’t get the menu, just the console. If you are afraid that you might break something and lock yourself out, schedule a reload before you make any changes:

    Router#reload in 10
    Reload scheduled in 10 minutes by console
    Reload reason: Reload Command
    Proceed with reload? [confirm]

  4. hi rene
    I am using cisco asa 5505 i want to access cisco asa 5505 from terminal server cisco 2511 in asa i could not find any line con or line vty command what i have configure in cisco asa to access from 2511 like other routers and switches i could not find any thingt on internet i need your help please post me config for asa

  5. Hi,
    That very well explained, but I just have one question. This brief representation below is to give you an idea on I’m about to explain.
    R1->R2->X1, X2, X3
    We have one terminal server, Which R1 represent, set up in my workplace and I would like to use one octal cable to plug in another router, R2, which will have couple of switches(X1,X2,X3) connected to it for my CCNP switch practice. The issue I have is when I’m consoled into one of the switches and want to move to another switch, I usually type CTR+SHIFT+6 and then X, but this command send me back to the

    ... Continue reading in our forum

19 more replies! Ask a question or join the discussion by visiting our Community Forum