Cisco Terminal Server Configuration Example

In this lesson, 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.


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

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 2001
Trying, 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

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

Router(config)#ip host R1 2001
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 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:

Translating "R1"
Trying R1 (, 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:


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
Router(config)#ip host R3 2003
Router(config)#alias exec clr2 clear line 2
Router(config)#alias exec clr3 clear line 3

Now it’s time to configure the menu:

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.
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 739 Lessons. More Lessons Added Every Week!
  • Content created by Rene Molenaar (CCIE #41726)

540 Sign Ups in the last 30 days

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

Tags: ,

Forum Replies

  1. 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]

  2. 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

  3. Hi Laz,

    thanks for the quick reply. Yes the ISR came installed with the Asynch modules, the problem I’m having is "I dont know which ports to allocate in the following command:
    ip host SwitchA #?#?
    I saw an example where the port mapping was in the range of 200x, but where is this information? Why does it start in the 2000s?


  4. Hello Conrad

    This is an excellent question, and it has given the opportunity for further research. It seems that Cisco has predefined various ports for use with TTY lines. Specifically, for Async ports, you use the absolute numbers of the Async ports (1 to 16 for example) and prepend 20 at the beginning. In the book CCIE Practical Studies Volume 1, page 55, it states:

    Lines 1 through 16 are TTY lines. you use these lines for the reverse Telnet sessions. To configure a reverse Telnet session, simply add a 20 in front of the absolute line number. The synta

    ... Continue reading in our forum

  5. Hello Lagapides,

    Thanks for answering. In my case, since my customer is actually ssh’ing into a terminal router, then it’s most probably be this command.

    ssh -l userid :rotary number ip-address

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