Cisco Terminal Server

To configure a Terminal Server it is possible to setup just reverse telnet sessions with the ‘host’ command

The cleanest implementation way is by using the ‘Menu’ command, since it looks better and is more convenient to use.

 

Component Used:

  • Cisco 2509/11 Access Router or a modular Cisco Router with a HWIC-8A (8ports) or 28xx with a HWIC-16A (16ports) expansion card.
  • 1 or 2 Octal Cables (CAB-HD8-ASYNC) to connect the Access Router (above) to every other serial device (switch or router), via console ports.

 

Configuration:

1. Create a reverse telnet session to each router, using a loopback or any other active interface and configure reverse telnet ports starting at port 2002 (Assuming the first two are already used by console and aux ports). Remember 0/0 port of the Octal Cable would use port 2002, 0/1 would use 2003,  0/2 would use 2004, etc.

!
interface Loopback0
ip address 172.20.20.20 255.255.255.255
!
ip host R1 2002 <code>172.20.20.20
ip host R2 2003 <code>172.20.20.20
ip host R3 2004 <code>172.20.20.20
ip host R4 2005 <code>172.20.20.20
ip host R5 2006 <code>172.20.20.20
ip host SW1 2007 <code>172.20.20.20
ip host SW2 2008 <code>172.20.20.20
ip host SW3 2009 <code>172.20.20.20
ip host SW4 2010 <code>172.20.20.20
ip host SW5 2011 <code>172.20.20.20
!

2. Configure the Heading, Prompt and Text for the menu.

!
menu TS title ^
****************************************************
                  Terminal Server
     To exit from a device, use Escape Sequence
             (CTRL+SHIFT+6 then press x)
****************************************************
^
menu TS prompt ^ Selection : ^
!
menu TS text 1 Connect to R1
menu TS text 2 Connect to R2
menu TS text 3 Connect to R3
menu TS text 4 Connect to R4
menu TS text 5 Connect to R5
menu TS text 6 Connect to SW1
menu TS text 7 Connect to SW2
menu TS text 8 Connect to SW3
menu TS text 9 Connect to SW4
menu TS text 10 Connect to SW5
menu TS text s show all established sessions
menu TS text c clear the session by number ex: c5
menu TS text e menu-exit
menu TS text q Quit Terminal Server session
!

3. Configure the commands the prompt should respond to. The first part will open a connection or resume a existing connection based on the host configured above. The last part will close a session based on the connections host name.

!
menu TS command 1 resume R1 /connect telnet R1
menu TS command 2 resume R2 /connect telnet R2
menu TS command 3 resume R3 /connect telnet R3
menu TS command 4 resume R4 /connect telnet R4
menu TS command 5 resume R5 /connect telnet R5
menu TS command 6 resume SW1 /connect telnet SW1
menu TS command 7 resume SW2 /connect telnet SW2
menu TS command 8 resume SW3 /connect telnet SW3
menu TS command 9 resume SW4 /connect telnet SW4
menu TS command 10 resume SW5 /connect telnet SW5
!
menu TS command s show sessions
menu TS options s pause
menu TS command e menu-exit
menu TS command q exit
menu TS clear-screen
menu TS line-mode
!
menu TS command c1 c1
menu TS command c2 c2
menu TS command c3 c3
menu TS command c4 c4
menu TS command c5 c5
menu TS command c6 c6
menu TS command c7 c7
menu TS command c8 c8
menu TS command c9 c9
menu TS command c10 c10
!

4. Configures the aliases referenced by the commands above.

!
alias exec c1 disconnect R1
alias exec c2 disconnect R2
alias exec c3 disconnect R3
alias exec c4 disconnect R4
alias exec c5 disconnect R5
alias exec c6 disconnect SW1
alias exec c7 disconnect SW2
alias exec c8 disconnect SW3
alias exec c9 disconnect SW4
alias exec c10 disconnect SW5
!

5. Configure the menu to be loaded upon connection:

!
line vty 0 4
autocommand menu TS
!

 

Extra configuration is required when using a Cisco Modular Router with a HWIC-8A (8ports) or HWIC-16A (16ports).

Here is the example config for a HWIC-16A:

!
line 0/0/0 0/0/15
 exec-timeout 0 0
 no exec
 transport input telnet
 transport output none
 stopbits 1
 flowcontrol hardware
!

Comments are closed.