0% found this document useful (0 votes)
2 views

Cisco Terminal Server with Menu command _ Routing-Bits

Uploaded by

Tony De La Rocha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Cisco Terminal Server with Menu command _ Routing-Bits

Uploaded by

Tony De La Rocha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Cisco Terminal Server with ‘Menu’ command | Routing-Bits https://routing-bits.com/2008/09/30/cisco-terminal-server-with-menu-...

Filling the Gaps


Cisco Terminal Server with ‘Menu’ command September 30, 2008
To 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 be er 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

1 di 8 15/03/2017 23:23
Cisco Terminal Server with ‘Menu’ command | Routing-Bits https://routing-bits.com/2008/09/30/cisco-terminal-server-with-menu-...

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
ip host FRS 2015 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 14 Connect to Rack1FRS - 3640
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 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 R6 /connect telnet R6

2 di 8 15/03/2017 23:23
Cisco Terminal Server with ‘Menu’ command | Routing-Bits https://routing-bits.com/2008/09/30/cisco-terminal-server-with-menu-...

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 14 resume FRS /connect telnet FRS
!
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
menu TS command c14 c14

This configures the alias’s referenced by the last part 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 R6
alias exec c7 disconnect SW1
alias exec c8 disconnect SW2
alias exec c9 disconnect SW3
alias exec c10 disconnect SW4
alias exec c11 disconnect BB1
alias exec c12 disconnect BB2
alias exec c13 disconnect BB3
alias exec c14 disconnect FRS

Then to have the menu loaded upon connection via Telnet :

line vty 0 4
autocommand menu TS

3 di 8 15/03/2017 23:23
Cisco Terminal Server with ‘Menu’ command | Routing-Bits https://routing-bits.com/2008/09/30/cisco-terminal-server-with-menu-...

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 bo om 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

4 di 8 15/03/2017 23:23
Cisco Terminal Server with ‘Menu’ command | Routing-Bits https://routing-bits.com/2008/09/30/cisco-terminal-server-with-menu-...

Posted in General info |

17 comments

Thanks for this post! It helped out a lot! Saved me a whole lot of time trying to figure it out without
any instructions.

by Perez Studios May 8, 2012 at 22:25


Reply
Thanks for this post.

I have the following situation:


I have 2 users with different privileges and I have also defined two menus TS1 and TS2. How can I
set menu TS1 for user1 and menu TS2 for user2

line vty 0 4
login local
autocommand ????

Thanks in advance

by Ben May 9, 2012 at 16:47


Reply
Use the following syntax:
#username bob autocommand TS1
#username bruce autocommand TS2

HTH :)

by wiggwire May 9, 2012 at 16:52


Reply
Thanks Wiggwire for this quick reply. It’s working but after adding the menu after
autocommand:

#username bob autocommand menu TS1


#username bruce autocommand menu TS2

Another issue:

5 di 8 15/03/2017 23:23
Cisco Terminal Server with ‘Menu’ command | Routing-Bits https://routing-bits.com/2008/09/30/cisco-terminal-server-with-menu-...

When I switch from a router R1 with Ctrl+Shift+6 ++x to the access server (without logging
out from R1) and disconnect the session for R1 . If I open a new session to R1 it doesn’t ask
for username and password (even from another telnet to the AS)

by Ben May 9, 2012 at 18:10


Not 100% I understand you problem.
The AS prompt users for authentication and assigns the menu individually.
The reverse console to R1 should not have (easiest way) authentication. (it is a lab afterall)
Then once there is an active session to the R1 console it should be locked to that one session
from the AS, there by protecting R1 from being highjacked by another unknowing person.

Perhaps using a hierarchy of menus migth solve your problem?


hth :)

by wiggwire May 9, 2012 at 22:13


Wiggwire,

Thanks for this quick reply. It’s working but after adding menu after autocommand
#username bob autocommand menu TS1
#username bruce autocommand menu TS2

Now, I have the following the situation:


1/ I login to router R1 and switch back to the AS by Ctrl+Shift+6++x (without logging out).
2/ Then I disconnect the session to R1
3/ If I create a new session to R1, I still can login without providing username and password
(even from another telnet to the AS)

How can I forbid to get access to the router R1 if its session is disconnected from the AS??

Thanks again for your help

by Ben May 9, 2012 at 21:02


can we make router work like both terminal server and router (configure interfaces,routing) at the
same time..

by vinay September 17, 2012 at 22:46


Reply
Yes you can by controlling the VTY access with specific usernames.
I.e., if user “ccielab” logs in he will always get the console menu, with no access to the router cli
or or functions.
Configured with “username ccielab autocommand menu TS”
If any other use logs in they can be presented with normal CLI prompts. Routing carries on as
usual.

hth :)

by Ruhann September 19, 2012 at 07:50


Reply
Thanks for the additional HWIC-8A configuration steps!

by user October 18, 2012 at 14:19


Reply

6 di 8 15/03/2017 23:23
Cisco Terminal Server with ‘Menu’ command | Routing-Bits https://routing-bits.com/2008/09/30/cisco-terminal-server-with-menu-...

This is fully applicable for IOS 15+ :-) The only thing that I noticed is that the hivens (-) have to be
replaced.

by Philipp October 30, 2013 at 14:11


Reply
i am not able to create multiple telnet connection to y line port only one user can access at a time
to a port 2004 vi pu y can u tell me how can we access multiple session for same port ..

by Rupesh K November 23, 2013 at 12:32


Reply
you cant have multiple sesssions to the same port

by Ruhann November 27, 2013 at 08:11


Reply
Hi, I’ve configured my 2511 exactly the same but got stock with “open”

Make a selection: 1
Trying SW3 (1.1.1.1, 2001)… Open

I read in Cisco forum that got fixed with SecureCRT but I’m using TeraTerm. Any ideas?

supportforums.cisco.com/thread/2108242

by John January 25, 2014 at 20:52


Reply
Hello,

Did anyone get to the bo om of the above problem? I’m using PuTTY and also ge ing the
problem where it gets stuck on “Open”

Luke

by Luke May 30, 2014 at 00:56


Reply
Did anyone manage to resolve John’s issue above?

I’m hi ing exactly the same thing with PuTTY. Everything looks good, but can’t connect to any
console sessions. Just sits on:
Trying R2 (10.10.10.100, 2004)… Open

Any help appreciated!


Luke

by luckyluke699 May 30, 2014 at 00:57


Reply
All you need to do is hit enter again. This has been around for ever and not a bug or issue, as far
as I’ve been using TS “Cisco Routers/2511/2811 with nm-16a cards” I’ve always had to hit
before it gets prompts form the router or connected device

by Joe Sanchez June 24, 2015 at 21:25


Reply
This post is be er than ciscos own documentation. Thanks very much

by Rowan August 25, 2015 at 18:30


Reply

7 di 8 15/03/2017 23:23
Cisco Terminal Server with ‘Menu’ command | Routing-Bits https://routing-bits.com/2008/09/30/cisco-terminal-server-with-menu-...

Create a free website or blog at WordPress.com.


Entries (RSS) and Comments (RSS).

8 di 8 15/03/2017 23:23

You might also like