cc/td/doc/product/lan/c2900xl/c2900sa3
hometocprevnextglossaryfeedbacksearchhelp
PDF

Table of Contents

Cisco IOS Management

Cisco IOS Management

This chapter introduces the Cisco IOS command-line interface (CLI) and provides procedures for configuring those switch features that require you to use the CLI. An introduction to using the CLI is also included.

The Catalyst 2900 Series XL Command Reference is a complete description of commands that have been created or changed for the Catalyst 2900 series switches. The documentation set for Cisco IOS Release 11.2(8) describes all commands supported by the switches.

This chapter presents the following topics:

Using Catalyst 2900 Series XL Commands

This section describes how to perform the following tasks:

Assigning IP Information to the Switch

When you first power up the switch, you are prompted for IP information. You can also enter IP information by following these steps:
Task Prompt Command

Step 1 Enter privileged EXEC mode.

switch>

enable

Step 2 Enter configuration mode.

switch#

configure terminal

Step 3 Define the IP address of the default router.

switch(config)#

ip default-gateway ip_address

Step 4 Enter the interface to which the IP information is assigned. VLAN1 is the switch interface.

switch(config)#

interface vlan1

Step 5 Assign the IP address and subnet mask.

switch(config-if)#

ip address ip_address subnet_mask

Step 6 Return to EXEC mode.

switch(config-if)#

end

Step 7 Verify that the information was entered correctly by displaying the running configuration. If the information is incorrect, repeat the procedure.

switch#

show running-config

Configuring the Switch for Telnet

The following procedure describes one way to configure a password for Telnet.
Task Prompt Command

Step 1 Attach a PC or workstation with emulation software to the switch console port. The data characteristics of the console port are 9600, 8, 1, no parity. When the command line appears, go to Step 2.

Step 2 Enter privileged EXEC mode.

switch>

enable

Step 3 Enter configuration mode.

switch#

configuration terminal

Step 4 Enter the interface configuration mode for the Telnet interface. The 0 and 4 indicate that you are configuring all five possible Telnet sessions.

switch(config)#

line vty 0 4

Step 5 Enter a password.

switch(config)#

password password

Step 6 Return to EXEC mode so that you can confirm the entry.

switch(config)#

end

Step 7 Display the running configuration. The password is listed under the command line vty 0 4.

switch#

show running-config

Step 8 As an option, save the running configuration to the startup configuration.

switch#

write mem

Enabling Broadcast-Storm Control on a Port

Broadcast-storm control blocks the forwarding of packets created by broadcast storms, the bursts of broadcast traffic that ports can sometimes generate. When you enable broadcast-storm control on a port, two parameters define the beginning and end of a broadcast storm. The threshold rising parameter determines when the forwarding of broadcast packets from the port is blocked. The threshold falling parameter determines when normal forwarding resumes. You can set the port to generate a trap when these thresholds are crossed (port storm-control trap), and you can disable the port during a broadcast storm (port storm-control filter).

Switch ports are referred to with the constant "fastethernet" and a module and port number. Fixed ports are module 0, and 1 and 2 refer to the Catalyst 2916M expansion slot ports. The following examples are valid ports:
fastethernet0/8
fa2/2
fa2/1

Task Prompt Command

Step 1 Enter privileged EXEC mode.

switch>

enable

Step 1 Enter global configuration mode.

switch#

configure terminal

Step 2 Enter interface configuration mode and define the interface to configure.

switch(config)#

interface interface

Step 3 Enter the port storm-control command and the two threshold parameters.

switch(config-if)#

port storm-control threshold
[rising number falling number]

Step 4 Return to EXEC mode to verify the entry.

switch(config-if)#

end

Step 5 Verify that the parameters were entered correctly by using the show command.

switch#

show port storm-control interface

Follow these steps to enable broadcast storm control:

Working with Files in Flash Memory

You can use the file system in Flash memory to copy files and to troubleshoot configuration problems. Use the privileged EXEC dir flash: command to display the contents of Flash memory:

Switch# dir flash:
Directory of flash:
 
  2  -rwx      843947   Mar 01 1993 00:02:18  C2900XL-h-mz-112.8-SA
  4  drwx        3776   Mar 01 1993 01:23:24  html
 66  -rwx         130   Jan 01 1970 00:01:19  env_vars
 68  -rwx        1296   Mar 01 1993 06:55:51  config.text
 
1728000 bytes total (456704 bytes free)

The file system uses a URL-based file specification. The following example uses the TFTP protocol to copy the file conffile.txt from the host arno to Catalyst 2900 Flash memory with the name bootfile:

switch# copy tftp://arno/2900/conffile.txt flash:bootfile

You can enter the following parameters as part of a filename:

Enter the privileged EXEC write memory command to save your configuration changes to nonvolatile RAM (NVRAM) so that they are not lost if there is a system reload or power outage. This example shows how to use this command to save your changes:

switch# write mem
Building configuration...
 

It might take a minute or two to save the configuration to Flash NVRAM. After the configuration has been saved, the following appears:

[OK]
switch#

Upgrading Switch Software by Using Telnet

After you have downloaded the new files to your PC or workstation, you can use Telnet and the switch command-line interface (CLI) to perform a TFTP transfer of the files to the switch. You can also connect a PC or workstation to the console port and transfer the files via XMODEM.

The procedure that follows includes the commands to address the following issues:

Follow these steps to upgrade the switch software by using a TFTP transfer:

Step 1 If your PC or workstation cannot act as a TFTP server, copy the files to a TFTP server to which you have access.

Step 2 Start a Telnet session on your PC or workstation, and display the switch CLI by entering the following command:

    server% telnet switch_ip_address

Step 3 Enter privileged EXEC mode:

    switch> enable
    switch#

Step 4 Display the name of the current (default) image file. The following example shows the current name in italic:

    switch# show boot
    BOOT path-list: flash:current_image
    Config file: flash:config.text
    Enable Break: 1
    Manual Boot: no
    HELPER path-list:
    NVRAM/Config file
    buffer size: 32768

Step 5 Rename the current image file to the name of the new image. This does not affect the operation of the switch.

    switch# rename flash:current_image flash:new_image
    Source filename [current_image]?
    Destination filename [new_image]?

Step 6 Display the contents of Flash memory to verify the renaming of the file:

    switch# dir flash:
    Directory of flash:
    -rwx 910426 Mar 06 1993 23:47:28 new_image
    -rwx 4800 Mar 01 1993 00:04:14 html
    -rwx 159 Jan 01 1970 00:00:34 env_vars
    -rwx 1121 Mar 01 1993 18:46:01 config.text

Step 7 Remove the manager software HTML files:

    switch# del flash:html/*.*

Press the Enter key to confirm the deletion of each file. Do not press any other keys during this process.

Step 8 Enter terminal configuration mode:

    switch# conf terminal
    Enter configuration commands, one per line. End with CNTL/Z.

Step 9 Disable access to the switch HTML pages:

    switch(config)# no IP http server

Step 10 Change the name of the default image file:

    switch(config)# boot system flash:new_image

Step 11 Return to privileged EXEC mode:

    switch(config)# end

Step 12 Verify that the name of the default image file is correct:

    switch# show boot
    BOOT path-list: flash:new_image
    Config file: flash:config.text
    Enable Break: 1
    Manual Boot: no
    HELPER path-list:
    NVRAM/Config file
    buffer size: 32768

Step 13 Use the name of the new image file when you copy it from the TFTP server to the Flash memory:

    switch# copy tftp://server_ip_address//path/new_image.bin flash:new_image
    Source IP address or hostname [server_ip_address]?
    Source filename [path/filename.bin]?
    Destination filename [flash:new_image]?
    Loading /path/filename.bin from server_ip_address (via!)
    [OK - 843975 bytes]

Step 14 Create a directory on the switch Flash memory to be used for the HTML files.

    switch# mkdir flash:html/Snmp

Make sure the "S" in "Snmp" is in uppercase.

Step 15 Enter the following command to copy the HTML file from the TFTP server to the switch Flash memory:

    switch# tar /x tftp://server_ip_address//path/filename.tar flash:html
    Loading /path/filename.tar from server_ip_address (via!)
    extracting advanced.gif (2648 bytes)
    extracting amber.gif (530 bytes)!
    extracting bar.gif (4156 bytes)!
    extracting cool.gif (530 bytes)
    extracting daytona.gif (1470 bytes)
    extracting duplgnd.gif (639 bytes)!
    . . .

Depending on the TFTP server being used, you might need to enter only one slash (/) after the server_ip_address in the tar command.

Step 16 Reload the new software with the following command:

    switch# reload
    System configuration has been modified. Save? [yes/no]:y
    Proceed with reload? [confirm]

Step 17 Press Return to confirm the reload.

Your Telnet session ends when the switch resets. Restart Telnet as described at the beginning of this procedure.

Step 18 Enter terminal configuration mode:

    switch(config)# conf terminal
    Enter configuration commands, one per line. End with CNTL/Z.

Step 19 Reenable access to the switch HTTP pages:

    switch(config)# IP http server

Step 20 Return to privileged EXEC mode:

    switch(config)# end

Step 21 Save the running configuration as the startup configuration:

    switch# copy running-config startup-config

You do not need to restart the switch to begin using the new HTML pages.

Understanding the CLI

This section describes the Cisco IOS command-mode structure. Each command mode supports specific Cisco IOS commands. For example, the interface type_number command is used only from global configuration mode.

The Catalyst 2900 series switches support the following command modes:

Table 6-1 describes how to access each mode, the prompt you see in that mode, and how to exit the mode. The examples in the table use the host name switch.

Getting Help

You can use the question mark (?) and arrow keys to help you enter commands.

For a list of available commands in a command mode, enter a question mark:

switch> ?
 

To complete a command, enter a few known characters followed by a tab (with no space):

switch# sh conf<tab>
switch#sh configuration

For a list of command variables, enter the command followed by a space and a question mark:

switch> show ?
 

To redisplay a command you previously entered, press the up-arrow key. You can continue to press the up-arrow key for more commands.


Table 6-1:
Command Modes Summary
Modes Access Method Prompt Exit Method About This Mode1

User EXEC

Begin a session with your switch.

switch>

Enter the logout command or quit.

Use this mode to:

  • Change terminal settings

  • Perform basic tests

  • Display system information

Privileged EXEC

Enter the enable command while in user EXEC mode.

switch#

Enter the disable command to exit.

Use this mode to verify commands you have entered. Access to this mode should be protected with a password.

Global configuration

Enter the configure command while in privileged EXEC mode.

switch(config)#

To exit to privileged EXEC mode, enter the exit or end command, or press Ctrl-Z.

Use this mode to configure parameters that apply to your switch as a whole.

Interface configuration

Enter the interface command (with a specific interface) while in the global configuration mode.

switch(config-if)#

To exit to global configuration mode, enter the exit command.

Enter Ctrl-Z or end to return to privileged EXEC mode.

Use this mode to configure parameters for the Ethernet interfaces.

Line configuration

Specify a line with the line vty or line console command while in the global configuration mode.

switch(config-line)#

To exit to global configuration mode, enter the exit command.

Enter Ctrl-Z or end to return to privileged EXEC mode.

Use this mode to configure parameters for the terminal line.

1For any of the modes, you can see a comprehensive list of the available commands by entering a question mark (?) at the prompt.

Setting Passwords

Because many privileged EXEC commands are used to set operating parameters, you should password-protect these commands to prevent unauthorized use.

You use two commands to do this:

You must enter an enable password to gain access to privileged EXEC mode.

For maximum security, the passwords should be different. If you enter the same password for both during the setup process, your switch prompts you to make them different.

An enable secret password can contain from 1 to 25 uppercase and lowercase alphanumeric characters. An enable password can contain any number of uppercase and lowercase alphanumeric characters. In both cases, a number cannot be the first character. Spaces are also valid password characters; for example, two words is a valid password. Leading spaces are ignored; trailing spaces are recognized.

If you lose or forget your enable password, refer to the "Troubleshooting" chapter for a recovery procedure.

Abbreviating Commands

You only have to enter enough characters for the switch to recognize the command as unique. This example shows how to enter the show configuration command:

switch# show conf

Using No Commands

The word no can be used to create a no form of a command. The no form of a command can be used to do the following:

Understanding Command-Line Error Messages

Table 6-2 lists some error messages that you might encounter while using the CLI to configure your switch.


Table 6-2:
Common CLI Error Messages
Error Message Meaning How to Get Help
% Ambiguous command: "show 
con"

You did not enter enough characters for your switch to recognize the command.

Reenter the command followed by a question mark (?) with no space between the command and the question mark.

The possible keywords that you can enter with the command are displayed.

% Incomplete command.

You did not enter all of the keywords or values required by this command.

Reenter the command followed by a question mark (?) with no space between the command and the question mark.

% Invalid input detected at 
`^' marker.

You entered the command incorrectly. The caret (^) marks the point of the error.

Enter a question mark (?) to display all of the commands that are available in this command mode.


hometocprevnextglossaryfeedbacksearchhelp
Posted: Tue May 11 12:04:06 PDT 1999
Copyright 1989-1999©Cisco Systems Inc.