I did some labbing yesterday and I got a task that said I should create an IOS menu
for NOC users so that they can ping and traceroute without needing to know the CLI.
I had never used this feature before and the only time I’ve seen it in real life is when
using a Cisco router as a console server and you can choose what line you want to use
through a menu.

The menu is created with the menu command. First we create the menu and set a title for it.

menu NOC title # Menu for NOC users #

The pound sign is a delimiting character, just as if we were creating a banner.

menu NOC prompt # Choose your selection: #

The prompt is used to ask the user for a selection. Now we need to create the different line
items that can be selected.

menu NOC text 1. Ping R5
menu NOC command 1. ping 150.25.5.5
menu NOC options 1. pause

Text is the string that should be output on the menu, the number to the left
is a key for identification. Command is used to send commands and we put a
pause after the command since we need to wait for output from ping and traceroute.

We create an option for exiting the menu.

menu NOC text 2. Exit
menu NOC command 2. exit

We will also use clear-screen to clear the screen before printing the menu.

menu NOC clear-screen

If we want the users to only have access to the menu we can use the autocommand feature.

username NOC password NOC
username NOC autocommand menu NOC

This will force the menu when logging in with the NOC account. We need to use local login
for this to work.

line vty 0 4
login local

This is what the entire configuration looks like.

menu NOC title # Menu for NOC users #
menu NOC prompt # Choose your selection: #
menu NOC text 1. Ping R5
menu NOC command 1. ping 150.25.5.5
menu NOC options 1. pause
menu NOC text 2. Exit
menu NOC command 2. exit
menu NOC clear-screen
!
username NOC password NOC
username NOC autocommand menu NOC
!
line vty 0 4
login local

If you forget to set the promp you will get an output like this.

Username: NOC
Password:
Line has invalid autocommand “menu NOC”
[Connection to 141.25.12.1 closed by foreign host]

This feature might not be the most common but it could be on the lab and if not, now
you know how to create a fancy menu for your Cisco console server.

Creating an IOS menu
Tagged on:     

2 thoughts on “Creating an IOS menu

  • May 5, 2011 at 6:26 pm
    Permalink

    That’s really nifty

    thanks 😀

    Reply
    • May 5, 2011 at 8:19 pm
      Permalink

      Glad you like it 🙂 So how are your studies going dlots?

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *