Overview

In this chapter, you will learn about operating a router to ensure delivery of data on a network with routers. You will become familiar with the Cisco CLI (command line interface). You will learn to:

  • login with the user password
  • enter privileged mode with the enable password
  • disable or quit

In addition, you will learn how to use the following advanced help features:

  • command completion and prompting
  • syntax checking

Lastly, you will learn how to use the following advanced editing features:

  • automatic line scrolling
  • cursor controls
  • history buffer with command recall
  • copy and paste, which are available on most computers

 

3.1

Router User Interface

 

3.1.1

User and privileged modes

To configure Cisco routers, you must either access the user interface on the router with a terminal or access the router remotely. When accessing a router, you must login to the router before you enter any other commands.

For security purposes, the router has two levels of access to commands

  • user mode --Typical tasks include those that check the router status. In this mode, router configuration changes are not allowed.
  • privileged mode --Typical tasks include those that change the router configuration.

When you first login to a router, you see a user mode prompt. Commands available at this user level are a subset of the commands available at the privileged level. For the most part, these commands allow you to display information without changing router configuration settings.

To access the full set of commands, you must first enable the privileged mode. At the ">" prompt, type "enable". At the "password" prompt, enter the password that has been set with the "enable secret" command. Once you have completed the login steps, the prompt changes to a # (pound sign) because you are now in the privileged mode. From the privileged mode, you can access modes such as the global configuration mode and other specific modes including:

  • interface
  • subinterface
  • line
  • router
  • route-map
  • several additional configuration modes

To logout of the router, type exit.
Screen output varies with the specific Cisco IOS software level and router configuration.

 

3.1

Router User Interface

 

3.1.2

User mode command list

Typing a question mark (?) at the user mode prompt or the privileged mode prompt displays a handy list of commonly used commands. Notice the "--More--" at the bottom of the sample display. The screen displays 22 lines at one time. So sometimes you will get the "--More--" prompt at the bottom of the display. It indicates that multiple screens are available as output; that is, more commands follow. Here, or anywhere else in Cisco IOS software, whenever a "--More--" prompt appears, you can continue viewing the next available screen by pressing the space bar. To display just the next line, press the Return key (or, on some keyboards, the Enter key). Press any other key to return to the prompt.

 

3.1

Router User Interface

 

3.1.3

Privileged-mode command list

To access privileged mode, type enable (or as shown in the figure, the abbreviation ena). You will be prompted for a password. If you type a"?" (question mark) at the privileged mode prompt, the screen displays a longer list of commands than it would at the user mode prompt. -

 

3.1

Router User Interface

 

3.1.4

User router help functions

Suppose you want to set the router clock. If you do not know the command to do so, use the help command to check the syntax for setting the clock. The following exercise illustrates one of the many functions of the help command. Your task is to set the router clock. Assuming that you do not know the command, proceed using the following steps:

  1. Use help to check the syntax for setting the clock. The help output shows that the clock command is required.
  2. Check the syntax for changing the time.
  3. Enter the current time by using hours, minutes, and seconds, as shown. The system indicates that you need to provide additional information to complete the command. The help output in Figure shows that the set keyword is required.
  4. Check the syntax for entering the time and enter the current time using hours, minutes, and seconds. As shown in Figure , the system indicates that you need to provide additional information to complete the command.
  5. Press Ctrl-P (or the up arrow) to repeat the previous command entry automatically. Then add a space and a question mark (?) to reveal the additional arguments. Now you can complete the command entry.
  6. The caret symbol (^) and help response indicate an error. The placement of the caret symbol shows you where the possible problem is located. To input the correct syntax, re-enter the command up to the point where the caret symbol is located and then enter a question mark (?).
  7. Enter the year, using the correct syntax, and press Return to execute the command.

The user interface provides syntax checking by placing a ^ where the error occurred. The ^ appears at the point in the command string where you have entered an incorrect command, keyword, or argument. The error location indicator and interactive help system enable you to find and correct syntax errors easily.

 

 

3.1

Router User Interface

 

3.1.5

Using IOS editing commands

The user interface includes an enhanced editing mode that provides a set of editing key functions that allow you to edit a command line as it is being typed. Use the key sequences indicated in Figure to move the cursor around on the command line for corrections or changes. Although enhanced editing mode is automatically enabled with the current software release, you can disable it if you have written scripts that do not interact well while enhanced editing is enabled. To disable enhanced editing mode, type "terminal no editing" at the privileged mode prompt.

The editing command set provides a horizontal scrolling feature for commands that extend beyond a single line on the screen. When the cursor reaches the right margin, the command line shifts 10 spaces to the left. You cannot see the first 10 characters of the line, but you can scroll back and check the syntax at the beginning of the command. To scroll back, press Ctrl-B or the left arrow key repeatedly until you are at the beginning of the command entry, or press Ctrl-A to return directly to the beginning of the line.

In the example shown in Figure , the command entry extends beyond one line. When the cursor first reaches the end of the line, the line is shifted 10 spaces to the left and redisplayed. The dollar sign ($) indicates that the line has been scrolled to the left. Each time the cursor reaches the end of the line, the line is again shifted 10 spaces to the left.

 

3.1

Router User Interface

 

3.1.6

Using IOS command history

The user interface provides a history, or record, of commands that you have entered. This feature is particularly useful for recalling long or complex commands or entries. With the command history feature you can complete the following tasks:

  • Set the command history buffer size.
  • Recall commands.
  • Disable the command history feature.

By default, the command history is enabled and the system records 10 command lines in its history buffer. To change the number of command lines the system records during a terminal session, use the terminal history size or the history size command. The maximum number of commands is 256.

To recall commands in the history buffer, beginning with the most recent command, press Ctrl-P or the up arrow key repeatedly to recall successively older commands. To return to more recent commands in the history buffer, after recalling commands with Ctrl-P or the up arrow, press Ctrl-N or the down arrow key repeatedly to recall successively more recent commands.

When typing commands, as a shortcut, you may enter the unique characters for a command, press the Tab key, and the interface will finish the entry for you. The unique letters identify the command, the Tab key simply acknowledges visually that the router has understood the specific command that you intended.

On most computers you may also have additional select and copy functions available. You can copy a previous command string and then paste or insert it as your current command entry, and press Return. You can use Ctrl-Z to back out of configuration mode.

 

Summary

You can configure Cisco routers from the user interface that runs on the router console or terminal. For security purposes, Cisco routers have two levels of access to commands: user mode and privileged mode.

Using a user interface to a router, you can:

  • Login with a user password
  • Enter privileged mode with the enable password
  • Disable or quit

You can use advanced help features to perform the following:

  • Command completion and prompting
  • Syntax checking

The user interface includes an enhanced editing mode that provides a set of editing key functions. The user interface provides a history, or record, of commands you have entered.

 

1