
Cisco Terminal Server with ‘Menu’ command
September 30, 2008To setup a Cisco Terminal Server for your CCIE Lab you would require the following:
- Either a Cisco 2509/11 access router or 1841 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 router in your LAB, via their console ports.
To configure your Terminal Server you can setup just reverse telnet sessions with the ‘host’ command, but I prefer using the ‘Menu’ command, it looks a lot better and is more convenient to use.
This current lab setup is according to Internetwork Expert R&S Lab Workbook V4, so the menu config will be based on that. This is what is looks like:
The configuration is as follow:
Create a reverse telnet session to each router, using a loopback or any other active interface. Configure your reverse telnet ports starting at port 2002. This because the first two are already used, ie the console and aux ports. Then point 0/0 on your octal cable would use port 2002, 0/1 would use 2003, 0/2 would use 2004 etc.
interface Loopback0
ip address 172.21.1.1 255.255.255.255
!
ip host R1 2002 172.21.1.1
ip host R2 2003 172.21.1.1
ip host R3 2004 172.21.1.1
ip host R4 2005 172.21.1.1
ip host R5 2006 172.21.1.1
ip host R6 2007 172.21.1.1
ip host SW1 2008 172.21.1.1
ip host SW2 2009 172.21.1.1
ip host SW3 2010 172.21.1.1
ip host SW4 2011 172.21.1.1
ip host BB1 2012 172.21.1.1
ip host BB2 2013 172.21.1.1
ip host BB3 2014 172.21.1.1
Then configure the Heading, Prompt and Text for the menu:
menu TS title ^
**********************************************************
CCIE Lab Terminal Server
To exit from a device, use CTRL+SHIFT+6 then press x
**********************************************************
^
menu TS prompt ^ Your selection : ^
!
menu TS text 1 Connect to Rack1R1 - 2801
menu TS text 2 Connect to Rack1R2 - 2811
menu TS text 3 Connect to Rack1R3 - 2811
menu TS text 4 Connect to Rack1R4 - 3640
menu TS text 5 Connect to Rack1R5 - 3640
menu TS text 6 Connect to Rack1R6 - 2621xm
menu TS text 7 Connect to Rack1SW1 - 3560
menu TS text 8 Connect to Rack1SW2 - 3560
menu TS text 9 Connect to Rack1SW3 - 3560
menu TS text 10 Connect to Rack1SW4 - 3560
menu TS text 11 Connect to Rack1BB1 - 2620
menu TS text 12 Connect to Rack1BB2 - 2620
menu TS text 13 Connect to Rack1BB3 - 2620
menu TS text s show all established sessions
menu TS text c<no> clear the session by number ie: c5
menu TS text e menu-exit
menu TS text q Quit terminal server session
Then 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 session number, (unfortunately this can not be done via host name, so I used aliases instead)
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 R6 /connect telnet R6
menu TS command 7 resume SW1 /connect telnet SW1
menu TS command 8 resume SW2 /connect telnet SW2
menu TS command 9 resume SW3 /connect telnet SW3
menu TS command 10 resume SW4 /connect telnet SW4
menu TS command 11 resume BB1 /connect telnet BB1
menu TS command 12 resume BB2 /connect telnet BB2
menu TS command 13 resume BB3 /connect telnet BB3
!
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
menu TS command c11 c11
menu TS command c12 c12
menu TS command c13 c13
This configures the alias’s referenced by the last part above.
alias exec c1 disconnect 1
alias exec c2 disconnect 2
alias exec c3 disconnect 3
alias exec c4 disconnect 4
alias exec c5 disconnect 5
alias exec c6 disconnect 6
alias exec c7 disconnect 7
alias exec c8 disconnect 8
alias exec c9 disconnect 9
alias exec c10 disconnect 10
alias exec c11 disconnect 11
alias exec c12 disconnect 12
alias exec c13 disconnect 13
Then to have the menu loaded upon connection via Telnet :
line vty 0 4
autocommand menu TS
Alternatively to load the menu manually from privileged config mode:
menu TS
The other options I configured on the menu is ‘S’ to see the open sessions. (see 1st picture below)
I would recommend starting the sessions from top to bottom so that the session number ties up with the router number etc. That way the clearing of session makes a lot more sense, as shown below:
.
Take note of the extra configuration required when using a Cisco 1841 with a HWIC-8A (8ports) or 28xx with a HWIC-16A, else your reverse telnet session will say “connection refused”. (This is not required on a Cisco 2509 or 2511).
Here is the config for a HWIC-16A with its 16 ports:
line 0/0/0 0/0/15
exec-timeout 0 0
no exec
transport input telnet
transport output none
stopbits 1
flowcontrol hardware


