Section 1-1. Catalyst Operating System (COS)


1-1. Catalyst Operating System (COS)

  • The COS uses a basic command-line interpreter as the user interface for configuration and management.

  • The COS runs on the Network Management Processor of Catalyst 4000, 5000, and 6000 series switches.

  • The command-line interface (CLI) can be accessed through the console port or by Telnet.

  • The COS CLI has two basic modes for configuration and managementuser mode and privileged mode.

  • The COS is not case-sensitive and allows for command abbreviations.

  • Help and editing features enhance the COS and make using the operating system easier.

  • Syntax and usage prompts help the user deal with syntax errors.

  • The COS has default settings for most of the parameters on the switch. These settings allow for the simplification of basic configuration.

Using COS

COS has two basic modes for switch administration, as well as a number of useful commands and options that enable you to interact with the switch for management purposes. The following items describe how to access these modes and use options to configure the switch.

1.

User interface modes

a. User mode

 Cisco Systems Console Enter password: password Console> 

Users can connect to a switch through the console port or a Telnet session. The initial access to a switch places the user in user mode and offers a limited number of commands. When connecting to the switch, a user-level password is required. The default user password is nullthat is no password is set and you just press the Enter key to gain access to user mode. When in user mode, you gain access to the user prompt, which is Console> by default. To close your connection to the console or Telnet facility use the command logout or exit.

b. Privileged mode

 Console> enable Enter password: password Console> (enable) 

When a user gains access to the user mode, the enable command can be used to enter privileged or enable mode. In this mode, the user has access to all the commands and can set switch parameters. To leave privileged EXEC mode, use the disable command. A user can also close the connection using the logout or exit command.

2.

User interface features

a. Entering commands

 Console> command Console> (enable) command 

Commands can be entered from either the user or privileged mode. In user mode, the commands available are limited to switch examination and a few test utilities. To enable a feature or parameter, you must be in privileged mode and use the set commands to configure the switch. To establish a parameter, type the command and its options normally, as in command.

To disable the commands that you have configured, use the set command to reestablish the default parameter or in some instances use the clear command. Not all set commands have corresponding clear commands. To view the configuration changes that have been made in the COS, use the command show config in privileged mode. To view all the parameters that are set on the switch, use the command show config all. You can also view the configuration of a particular module using the command show config [mod] [all]; use the all option to see both default and nondefault settings.

You can edit a command line by using the left and right arrow keys to move within the line. When editing a line, you are in insert mode. This means that if additional characters are typed, the remainder of the line to the right is spaced over. You can use the Backspace and Delete keys to make corrections.

b. Syntax checking

COS is a command-line interpreter. The operation of the interface is to take user input on the command line and parse it to interpret and perform a function based on the entered commands. If the CLI does not recognize the command entered by a user, a syntax error is generated. A syntax error is a message that informs the user of a problem with the typed command. For the COS, syntax errors usually appear in one of the following two forms:

- Help error

A help error occurs when the CLI cannot reconcile the user input with a valid command. If a user were to enter a command such as set speed port 3/5 100, for example, a help error would be generated.

 Console> (enable) set speed port 3/5 100 Unknown command "set speed". Use 'set help' for more info. 

This error message is telling the user that it does not understand anything beyond the word set. If the user were to type set help or set ?, the user would see a listing of all the valid set commands, one of which would be set port speed.

- Usage error

A usage error occurs when a valid command has been entered but an error is present in the options selected for that command. The error could be that the options are not there, the options are not in the proper order, or that options have been specified when none are available. If a user were to enter a command such as set port speed 100 3/5, for example, a usage error would be generated.

 Console> (enable) set port speed 100 3/5 Usage: set port speed <mod/port> <10|100|auto> 

This type of error message is telling the user that it understands the major command (set port speed), but that the options (100 and 3/5) are not correct. By displaying the usage of the command set port speed and all the options, the CLI informs the user of the proper way to format the syntax. Any parameters between the less than (<) and greater than (>) brackets are required, whereas anything in the square brackets ([ ]) are options.

TIP

Sometimes when a user is entering a command, the switch displays console messages while the user is typing. It is common for the user to press the Enter key to move the information out of the way. However, pressing Enter on the CLI causes the interpreter to parse the command or partial command you have typed (which usually was not complete, and which results in a help or usage error). To prevent this and refresh your input, you can press the Ctrl-R or Ctrl-L keys to redisplay the line and continue editing the command.

c. Viewing output

 Console> or Console> (enable) show [parameter] 

To display information about the switch configuration or operation, use the show command followed by the appropriate option. By default the output is formatted to be 24 lines in length. This means that after 24 lines have been displayed, the output pauses and displays the --More-- prompt. To continue the output, press the Spacebar key for another page (24 lines) of output or press the Enter key for one line at a time. To stop the output completely, use the key Q or the key sequence Ctrl+C.

d. Terminal screen length

 Console> (enable) set length lines 

Use this command to change the length of the output before you receive the --More-- prompt. If you don't want the output displayed by page with a --More-- prompt, use the command set length 0. It is important to note that the screen width is not configurable on the COS but can be set on the terminal application used to access the CLI. Output can be long, and output that exceeds the width is typically wrapped by the terminal application. The COS does not count wrapped lines; so if the output contains several wrapped lines you might still have information that scrolls off the top of the page.

TIP

If you are displaying a great deal of information with the show command but are only looking for a specific item, you can scroll to the text by entering a slash (/) followed directly by the text you are looking for (/text). If you enter /text and press the Return key at the --More-- prompt, the output searches and the display returns the text starting two lines above the one containing the text string. If the text string is not found, a "Pattern Not Found" message displays. You can also enter n at the --More-- prompt to search for the last entered text string. You can use this search method on all show commands that use the more buffer to display screen by screen output except the commands show cam, show mls, and show tech-support.

e. Context-sensitive help

You can enter a question mark (?) or the keyword help anywhere in a command line to get additional information from the switch. If the question mark is typed alone on a command line, all available commands for that mode display. Question marks can also be typed at any place after a commandfor example for a keyword or an option. If the question mark follows a space, all available keywords or options display. If the question mark follows another word without a space, a list of all available commands beginning with that substring displays.

An abbreviated command can also be typed, followed by the Tab key. The command name is expanded to its full form if no other commands start with the same abbreviation.

f. Command history

- Recalling commands to use again

From any input mode, each press of the Up Arrow ( ) key or Ctrl-P recalls the next older command. Each press of the Down Arrow () key or Ctrl-N recalls the next most recent command. When commands are recalled from history, they can be edited as if you had just typed them. The

NOTE

The Up and Down Arrow keys require the use of an ANSI-compatible terminal emulator (that is, VT100).

3.

Telnet sessions

a. Start a new session

 Console> (enable) telnet host 

This initiates a Telnet connection to host (either an IP address or a host name). Then from the switch CLI, you can continue to communicate with the remote host. You can only initiate a Telnet session from privileged mode on a COS device.

b. Closing a Telnet session locally

During an active Telnet session to a host, you can use the key sequence Ctrl-]that is, hold the Ctrl key while you press the Right Bracket (]) keyto escape back to the Telnet application. This suspends the Telnet session and returns you to the local switch Telnet application prompt telnet>. From here you can type the command quit to close the Telnet connection locally instead of logging out remotely. This is useful when your Telnet session has become "locked up" and you get no response form the remote host.

d. Configure session timeout values

 Console> (enable) set logout time 

All active sessions on switcheither through the console or the Telnet facilityare logged out if no activity occurs for the number of minutes specified by the time parameter. The default setting is 20 minutes. Use this command to change the logout value. If you set the value to 0, sessions will not be timed out.



Cisco Field Manual. Catalyst Switch Configuration
Cisco Field Manual. Catalyst Switch Configuration
ISBN: 1587050439
EAN: N/A
Year: 2001
Pages: 150

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net