cli reference

974
170 West Tasman Drive San Jose, CA 95134-1706 USA http://www.cisco.com Cisco Systems, Inc. Corporate Headquarters Tel: 800 553-NETS (6387) 408 526-4000 Fax: 408 526-4100 Cisco IOS Configuration Fundamentals Command Reference Release 12.2 Customer Order Number: DOC-7811740= Text Part Number: 78-11740-02

Upload: manuelsmeriglio

Post on 16-Nov-2014

495 views

Category:

Documents


1 download

TRANSCRIPT

Cisco IOS Configuration Fundamentals Command ReferenceRelease 12.2

Corporate Headquarters Cisco Systems, Inc. 170 West Tasman Drive San Jose, CA 95134-1706 USA http://www.cisco.com Tel: 408 526-4000 800 553-NETS (6387) Fax: 408 526-4100

Customer Order Number: DOC-7811740= Text Part Number: 78-11740-02

THE SPECIFICATIONS AND INFORMATION REGARDING THE PRODUCTS IN THIS MANUAL ARE SUBJECT TO CHANGE WITHOUT NOTICE. ALL STATEMENTS, INFORMATION, AND RECOMMENDATIONS IN THIS MANUAL ARE BELIEVED TO BE ACCURATE BUT ARE PRESENTED WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. USERS MUST TAKE FULL RESPONSIBILITY FOR THEIR APPLICATION OF ANY PRODUCTS. THE SOFTWARE LICENSE AND LIMITED WARRANTY FOR THE ACCOMPANYING PRODUCT ARE SET FORTH IN THE INFORMATION PACKET THAT SHIPPED WITH THE PRODUCT AND ARE INCORPORATED HEREIN BY THIS REFERENCE. IF YOU ARE UNABLE TO LOCATE THE SOFTWARE LICENSE OR LIMITED WARRANTY, CONTACT YOUR CISCO REPRESENTATIVE FOR A COPY. The Cisco implementation of TCP header compression is an adaptation of a program developed by the University of California, Berkeley (UCB) as part of UCBs public domain version of the UNIX operating system. All rights reserved. Copyright 1981, Regents of the University of California. NOTWITHSTANDING ANY OTHER WARRANTY HEREIN, ALL DOCUMENT FILES AND SOFTWARE OF THESE SUPPLIERS ARE PROVIDED AS IS WITH ALL FAULTS. CISCO AND THE ABOVE-NAMED SUPPLIERS DISCLAIM ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THOSE OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OR ARISING FROM A COURSE OF DEALING, USAGE, OR TRADE PRACTICE. IN NO EVENT SHALL CISCO OR ITS SUPPLIERS BE LIABLE FOR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, OR INCIDENTAL DAMAGES, INCLUDING, WITHOUT LIMITATION, LOST PROFITS OR LOSS OR DAMAGE TO DATA ARISING OUT OF THE USE OR INABILITY TO USE THIS MANUAL, EVEN IF CISCO OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

AccessPath, AtmDirector, Browse with Me, CCDA, CCDE, CCDP, CCIE, CCNA, CCNP, CCSI, CD-PAC, CiscoLink, the Cisco NetWorks logo, the Cisco Powered Network logo, Cisco Systems Networking Academy, the Cisco Systems Networking Academy logo, Fast Step, Follow Me Browsing, FormShare, FrameShare, GigaStack, IGX, Internet Quotient, IP/VC, iQ Breakthrough, iQ Expertise, iQ FastTrack, the iQ Logo, iQ Net Readiness Scorecard, MGX, the Networkers logo, Packet, PIX, RateMUX, ScriptBuilder, ScriptShare, SlideCast, SMARTnet, TransPath, Unity, Voice LAN, Wavelength Router, and WebViewer are trademarks of Cisco Systems, Inc.; Changing the Way We Work, Live, Play, and Learn, Discover All Thats Possible, and Empowering the Internet Generation, are service marks of Cisco Systems, Inc.; and Aironet, ASIST, BPX, Catalyst, Cisco, the Cisco Certified Internetwork Expert logo, Cisco IOS, the Cisco IOS logo, Cisco Systems, Cisco Systems Capital, the Cisco Systems logo, Enterprise/Solver, EtherChannel, EtherSwitch, FastHub, FastSwitch, IOS, IP/TV, LightStream, MICA, Network Registrar, Post-Routing, Pre-Routing, Registrar, StrataView Plus, Stratm, SwitchProbe, TeleRouter, and VCO are registered trademarks of Cisco Systems, Inc. or its affiliates in the U.S. and certain other countries. All other brands, names, or trademarks mentioned in this document or Web site are the property of their respective owners. The use of the word partner does not imply a partnership relationship between Cisco and any other company. (0102R) Cisco IOS Configuration Fundamentals Command Reference 2001 2006 Cisco Systems, Inc. All rights reserved.

CONTENTSAbout Cisco IOS Software Documentation Using Cisco IOS Softwarexiii v

CISCO IOS USER INTERFACE COMMANDS Basic Command-Line Interface Commands The Setup CommandFR-45 FR-53 FR-123 FR-167 FR-3

Terminal Operating Characteristics Commands

Connection, Menu, and System Banner Commands Cisco IOS Web Browser User Interface Commands FILE MANAGEMENT COMMANDS Cisco IOS File System CommandsFR-179 FR-231 FR-267

Configuration File Management Commands System Image and Microcode Commands Router Memory Commands Booting CommandsFR-311 FR-293

Basic File Transfer Services Commands SYSTEM MANAGEMENT COMMANDS Basic System Management Commands

FR-343

FR-375 FR-481

Troubleshooting and Fault Management Commands SNMP Commands CDP Commands RMON CommandsFR-667 FR-743 FR-767 FR-805

Cisco Service Assurance Agent Commands

Cisco IOS Configuration Fundamentals Command Reference 78-11740-02

iii

Contents

WCCP Commands APPENDIXES

FR-895

ASCII Character Set and Hex Values

FR-919 FR-925

Cisco 7500 Series Line Card Configuration Commands INDEX

Cisco IOS Configuration Fundamentals Command Reference

iv

78-11740-02

About Cisco IOS Software DocumentationThis chapter discusses the objectives, audience, organization, and conventions of Cisco IOS software documentation. It also provides sources for obtaining documentation from Cisco Systems.

Documentation ObjectivesCisco IOS software documentation describes the tasks and commands necessary to configure and maintain Cisco networking devices.

AudienceThe Cisco IOS software documentation set is intended primarily for users who configure and maintain Cisco networking devices (such as routers and switches) but who may not be familiar with the tasks, the relationship between tasks, or the Cisco IOS software commands necessary to perform particular tasks. The Cisco IOS software documentation set is also intended for those users experienced with Cisco IOS software who need to know about new features, new configuration options, and new software characteristics in the current Cisco IOS software release.

Documentation OrganizationThe Cisco IOS software documentation set consists of documentation modules and master indexes. In addition to the main documentation set, there are supporting documents and resources.

Documentation ModulesThe Cisco IOS documentation modules consist of configuration guides and corresponding command reference publications. Chapters in a configuration guide describe protocols, configuration tasks, and Cisco IOS software functionality and contain comprehensive configuration examples. Chapters in a command reference publication provide complete Cisco IOS command syntax information. Use each configuration guide in conjunction with its corresponding command reference publication.

Cisco IOS Configuration Fundamentals Command Reference 78-11740-02

v

About Cisco IOS Software Documentation Documentation Organization

Figure 1 shows the Cisco IOS software documentation modules.

Note

The abbreviations (for example, FC and FR) next to the book icons are page designators, which are defined in a key in the index of each document to help you with navigation. The bullets under each module list the major technology areas discussed in the corresponding books.

Figure 1

Cisco IOS Software Documentation ModulesIPC IP1RCisco IOS IP Command Reference, Volume 1 of 3: Addressing and Services

FC

Cisco IOS Configuration Fundamentals Configuration Guide

Cisco IOS IP Configuration Guide

P2C

Cisco IOS AppleTalk and Novell IPX Configuration Guide

P3C

IP3RCisco IOS AppleTalk and Novell IPX Command Reference

Cisco IOS Apollo Domain, Banyan VINES, DECnet, ISO CLNS, and XNS Configuration Guide Cisco IOS Apollo Domain, Banyan VINES, DECnet, ISO CLNS, and XNS Command Reference

FR

Cisco IOS Configuration Fundamentals Command Reference

IP2R

Cisco IOS IP Command Reference, Volume 2 of 3: Routing Protocols

Cisco IOS IP Command Reference, Volume 3 of 3: Multicast

P2R

P3R

Module FC/FR: Cisco IOS User Interfaces File Management System Management

Module IPC/IP1R/IP2R/IP3R: IP Addressing and Services IP Routing Protocols IP Multicast

Module P2C/P2R: AppleTalk Novell IPX

Module P3C/P3R: Apollo Domain Banyan VINES DECnet ISO CLNS XNS

WC

Cisco IOS Wide-Area Networking Configuration Guide

IC

Cisco IOS Interface Configuration Guide

MWC

Cisco IOS Mobile Wireless Configuration Guide

SC

Cisco IOS Security Configuration Guide

WR

Cisco IOS Wide-Area Networking Command Reference

IR

Cisco IOS Interface Command Reference

MWR

Cisco IOS Mobile Wireless Command Reference

SR

Cisco IOS Security Command Reference

Module WC/WR: ATM Broadband Access Frame Relay SMDS X.25 and LAPB

Module IC/IR: LAN Interfaces Serial Interfaces Logical Interfaces

Module MWC/MWR: General Packet Radio Service

Module SC/SR: AAA Security Services Security Server Protocols Traffic Filtering and Firewalls IP Security and Encryption Passwords and Privileges Neighbor Router Authentication IP Security Options Supported AV Pairs

Cisco IOS Configuration Fundamentals Command Reference

vi

47953

78-11740-02

About Cisco IOS Software Documentation Documentation Organization

DC

Cisco IOS Dial Technologies Configuration Guide

TC

Cisco IOS Terminal Services Configuration Guide

BC

Cisco IOS Bridging and IBM Networking Configuration Guide

B1RCisco IOS Dial Technologies Command Reference Cisco IOS Terminal Services Command Reference Cisco IOS Bridging and IBM Networking Command Reference, Volume 1 of 2

B2RCisco IOS Bridging and IBM Networking Command Reference, Volume 2 of 2

DR

TR

Module DC/DR: Preparing for Dial Access Modem and Dial Shelf Configuration and Management ISDN Configuration Signalling Configuration Dial-on-Demand Routing Configuration Dial-Backup Configuration Dial-Related Addressing Services Virtual Templates, Profiles, and Networks PPP Configuration Callback and Bandwidth Allocation Configuration Dial Access Specialized Features Dial Access Scenarios

Module TC/TR: ARA LAT NASI Telnet TN3270 XRemote X.28 PAD Protocol Translation

Module BC/B1R: Transparent Bridging SRB Token Ring Inter-Switch Link Token Ring Route Switch Module RSRB DLSw+ Serial Tunnel and Block Serial Tunnel LLC2 and SDLC IBM Network Media Translation SNA Frame Relay Access NCIA Client/Server Airline Product Set

Module BC/B2R: DSPU and SNA Service Point SNA Switching Services Cisco Transaction Connection Cisco Mainframe Channel Connection CLAW and TCP/IP Offload CSNA, CMPC, and CMPC+ TN3270 Server

VC

Cisco IOS Voice, Video, and Fax Configuration Guide

QC

Cisco IOS Quality of Service Solutions Configuration Guide

XC

Cisco IOS Switching Services Configuration Guide

VR

Cisco IOS Voice, Video, and Fax Command Reference

QR

Cisco IOS Quality of Service Solutions Command Reference

XR

Cisco IOS Switching Services Command Reference

Module VC/VR: Voice over IP Call Control Signalling Voice over Frame Relay Voice over ATM Telephony Applications Trunk Management Fax, Video, and Modem Support

Module QC/QR: Packet Classification Congestion Management Congestion Avoidance Policing and Shaping Signalling Link Efficiency Mechanisms

Module XC/XR: Cisco IOS Switching Paths NetFlow Switching Multiprotocol Label Switching Multilayer Switching Multicast Distributed Switching Virtual LANs LAN Emulation

Cisco IOS Configuration Fundamentals Command Reference 78-11740-02

47954

vii

About Cisco IOS Software Documentation Documentation Organization

Master IndexesTwo master indexes provide indexing information for the Cisco IOS software documentation set: an index for the configuration guides and an index for the command references. Individual books also contain a book-specific index. The master indexes provide a quick way for you to find a command when you know the command name but not which module contains the command. When you use the online master indexes, you can click the page number for an index entry and go to that page in the online document.

Supporting Documents and ResourcesThe following documents and resources support the Cisco IOS software documentation set:

Cisco IOS Command Summary (two volumes)This publication explains the function and syntax of the Cisco IOS software commands. For more information about defaults and usage guidelines, refer to the Cisco IOS command reference publications. Cisco IOS System Error MessagesThis publication lists and describes Cisco IOS system error messages. Not all system error messages indicate problems with your system. Some are purely informational, and others may help diagnose problems with communications lines, internal hardware, or the system software. Cisco IOS Debug Command ReferenceThis publication contains an alphabetical listing of the debug commands and their descriptions. Documentation for each command includes a brief description of its use, command syntax, usage guidelines, and sample output. Dictionary of Internetworking Terms and AcronymsThis Cisco publication compiles and defines the terms and acronyms used in the internetworking industry. New feature documentationThe Cisco IOS software documentation set documents the mainline release of Cisco IOS software (for example, Cisco IOS Release 12.2). New software features are introduced in early deployment releases (for example, the Cisco IOS T release train for 12.2, 12.2(x)T). Documentation for these new features can be found in standalone documents called feature modules. Feature module documentation describes new Cisco IOS software and hardware networking functionality and is available on Cisco.com and the Documentation CD-ROM. Release notesThis documentation describes system requirements, provides information about new and changed features, and includes other useful information about specific software releases. See the section Using Software Release Notes in the chapter Using Cisco IOS Software for more information. Caveats documentationThis documentation provides information about Cisco IOS software defects in specific software releases. RFCsRFCs are standards documents maintained by the Internet Engineering Task Force (IETF). Cisco IOS software documentation references supported RFCs when applicable. The full text of referenced RFCs may be obtained on the World Wide Web at http://www.rfc-editor.org/. MIBsMIBs are used for network monitoring. For lists of supported MIBs by platform and release, and to download MIB files, see the Cisco MIB website on Cisco.com at http://www.cisco.com/public/sw-center/netmgmt/cmtk/mibs.shtml.

Cisco IOS Configuration Fundamentals Command Reference

viii

78-11740-02

About Cisco IOS Software Documentation Document Conventions

Document ConventionsWithin Cisco IOS software documentation, the term router is generally used to refer to a variety of Cisco products (for example, routers, access servers, and switches). Routers, access servers, and other networking devices that support Cisco IOS software are shown interchangeably within examples. These products are used only for illustrative purposes; that is, an example that shows one product does not necessarily indicate that other products are not supported. The Cisco IOS documentation set uses the following conventions: Convention ^ or Ctrl Description The ^ and Ctrl symbols represent the Control key. For example, the key combination ^D or Ctrl-D means hold down the Control key while you press the D key. Keys are indicated in capital letters but are not case sensitive. A string is a nonquoted set of characters shown in italics. For example, when setting an SNMP community string to public, do not use quotation marks around the string or the string will include the quotation marks. Command syntax descriptions use the following conventions: Convention boldface italics [x] | [x | y] {x | y} Description Boldface text indicates commands and keywords that you enter literally as shown. Italic text indicates arguments for which you supply values. Square brackets enclose an optional element (keyword or argument). A vertical line indicates a choice within an optional or required set of keywords or arguments. Square brackets enclosing keywords or arguments separated by a vertical line indicate an optional choice. Braces enclosing keywords or arguments separated by a vertical line indicate a required choice. Nested sets of square brackets or braces indicate optional or required choices within optional or required elements. For example: Convention [x {y | z}] Description Braces and a vertical line within square brackets indicate a required choice within an optional element. Examples use the following conventions: Conventionscreen boldface screen

string

Description Examples of information displayed on the screen are set in Courier font. Examples of text that you must enter are set in Courier bold font. Angle brackets enclose text that is not printed to the screen, such as passwords.

Cisco IOS Configuration Fundamentals Command Reference 78-11740-02

ix

About Cisco IOS Software Documentation Obtaining Documentation

Convention ! [ ]

Description An exclamation point at the beginning of a line indicates a comment line. (Exclamation points are also displayed by the Cisco IOS software for certain processes.) Square brackets enclose default responses to system prompts. The following conventions are used to attract the attention of the reader:

Caution

Means reader be careful. In this situation, you might do something that could result in equipment damage or loss of data.

Note

Means reader take note. Notes contain helpful suggestions or references to materials not contained in this manual.

Timesaver

Means the described action saves time. You can save time by performing the action described in the paragraph.

Obtaining DocumentationThe following sections provide sources for obtaining documentation from Cisco Systems.

World Wide WebThe most current Cisco documentation is available on the World Wide Web at the following website: http://www.cisco.com Translated documentation is available at the following website: http://www.cisco.com/public/countries_languages.html

Documentation CD-ROMCisco documentation and additional literature are available in a CD-ROM package, which ships with your product. The Documentation CD-ROM is updated monthly and may be more current than printed documentation. The CD-ROM package is available as a single unit or through an annual subscription.

Cisco IOS Configuration Fundamentals Command Reference

x

78-11740-02

About Cisco IOS Software Documentation Documentation Feedback

Ordering DocumentationCisco documentation can be ordered in the following ways:

Registered Cisco Direct Customers can order Cisco product documentation from the Networking Products MarketPlace: http://www.cisco.com/cgi-bin/order/order_root.pl Registered Cisco.com users can order the Documentation CD-ROM through the online Subscription Store: http://www.cisco.com/go/subscription Nonregistered Cisco.com users can order documentation through a local account representative by calling Cisco corporate headquarters (California, USA) at 408 526-7208 or, in North America, by calling 800 553-NETS(6387).

Documentation FeedbackIf you are reading Cisco product documentation on the World Wide Web, you can submit technical comments electronically. Click Feedback in the toolbar and select Documentation. After you complete the form, click Submit to send it to Cisco. You can e-mail your comments to [email protected]. To submit your comments by mail, use the response card behind the front cover of your document, or write to the following address: Cisco Systems, Inc. Document Resource Connection 170 West Tasman Drive San Jose, CA 95134-9883 We appreciate your comments.

Obtaining Technical AssistanceCisco provides Cisco.com as a starting point for all technical assistance. Customers and partners can obtain documentation, troubleshooting tips, and sample configurations from online tools. For Cisco.com registered users, additional troubleshooting tools are available from the TAC website.

Cisco.comCisco.com is the foundation of a suite of interactive, networked services that provides immediate, open access to Cisco information and resources at anytime, from anywhere in the world. This highly integrated Internet application is a powerful, easy-to-use tool for doing business with Cisco. Cisco.com provides a broad range of features and services to help customers and partners streamline business processes and improve productivity. Through Cisco.com, you can find information about Cisco and our networking solutions, services, and programs. In addition, you can resolve technical issues with online technical support, download and test software packages, and order Cisco learning materials and merchandise. Valuable online skill assessment, training, and certification programs are also available.

Cisco IOS Configuration Fundamentals Command Reference 78-11740-02

xi

About Cisco IOS Software Documentation Obtaining Technical Assistance

Customers and partners can self-register on Cisco.com to obtain additional personalized information and services. Registered users can order products, check on the status of an order, access technical support, and view benefits specific to their relationships with Cisco. To access Cisco.com, go to the following website: http://www.cisco.com

Technical Assistance CenterThe Cisco TAC website is available to all customers who need technical assistance with a Cisco product or technology that is under warranty or covered by a maintenance contract.

Contacting TAC by Using the Cisco TAC WebsiteIf you have a priority level 3 (P3) or priority level 4 (P4) problem, contact TAC by going to the TAC website: http://www.cisco.com/tac P3 and P4 level problems are defined as follows:

P3Your network performance is degraded. Network functionality is noticeably impaired, but most business operations continue. P4You need information or assistance on Cisco product capabilities, product installation, or basic product configuration.

In each of the above cases, use the Cisco TAC website to quickly find answers to your questions. To register for Cisco.com, go to the following website: http://www.cisco.com/register/ If you cannot resolve your technical issue by using the TAC online resources, Cisco.com registered users can open a case online by using the TAC Case Open tool at the following website: http://www.cisco.com/tac/caseopen

Contacting TAC by TelephoneIf you have a priority level 1 (P1) or priority level 2 (P2) problem, contact TAC by telephone and immediately open a case. To obtain a directory of toll-free numbers for your country, go to the following website: http://www.cisco.com/warp/public/687/Directory/DirTAC.shtml P1 and P2 level problems are defined as follows:

P1Your production network is down, causing a critical impact to business operations if service is not restored quickly. No workaround is available. P2Your production network is severely degraded, affecting significant aspects of your business operations. No workaround is available.

Cisco IOS Configuration Fundamentals Command Reference

xii

78-11740-02

Using Cisco IOS SoftwareThis chapter provides helpful tips for understanding and configuring Cisco IOS software using the command-line interface (CLI). It contains the following sections:

Understanding Command Modes Getting Help Using the no and default Forms of Commands Saving Configuration Changes Filtering Output from the show and more Commands Identifying Supported Platforms

For an overview of Cisco IOS software configuration, refer to the Release 12.2 Cisco IOS Configuration Fundamentals Configuration Guide. For information on the conventions used in the Cisco IOS software documentation set, see the previous chapter, About Cisco IOS Software Documentation.

Understanding Command ModesYou use the CLI to access Cisco IOS software. Because the CLI is divided into many different modes, the commands available to you at any given time depend on the mode you are currently in. Entering a question mark (?) at the CLI prompt allows you to obtain a list of commands available for each command mode. When you log in to the CLI, you are in user EXEC mode. User EXEC mode contains only a limited subset of commands. To have access to all commands, you must enter privileged EXEC mode, normally by using a password. From privileged EXEC mode you can issue any EXEC commanduser or privileged modeor you can enter global configuration mode. Most EXEC commands are one-time commands. For example, show commands show important status information, and clear commands clear counters or interfaces. The EXEC commands are not saved when the software reboots. Configuration modes allow you to make changes to the running configuration. If you later save the running configuration to the startup configuration, these changed commands are stored when the software is rebooted. To enter specific configuration modes, you must start at global configuration mode. From global configuration mode, you can enter interface configuration mode and a variety of other modes, such as protocol-specific modes. ROM monitor mode is a separate mode used when the Cisco IOS software cannot load properly. If a valid software image is not found when the software boots or if the configuration file is corrupted at startup, the software might enter ROM monitor mode.

Cisco IOS Configuration Fundamentals Command Reference 78-11740-02

xiii

Using Cisco IOS Software Getting Help

Table 1 describes how to access and exit various common command modes of the Cisco IOS software. It also shows examples of the prompts displayed for each mode.Table 1 Accessing and Exiting Command Modes

Command Mode User EXEC Privileged EXEC Global configuration

Access Method Log in. From user EXEC mode, use the enable EXEC command. From privileged EXEC mode, use the configure terminal privileged EXEC command.

PromptRouter> Router#

Exit Method Use the logout command. To return to user EXEC mode, use the disable command. To return to privileged EXEC mode from global configuration mode, use the exit or end command, or press Ctrl-Z. To return to global configuration mode, use the exit command. To return to privileged EXEC mode, use the end command, or press Ctrl-Z. To exit ROM monitor mode, use the continue command.

Router(config)#

Interface configuration

Router(config-if)# From global configuration mode, specify an interface using an interface command. > From privileged EXEC mode, use the reload EXEC command. Press the Break key during the first 60 seconds while the system is booting.

ROM monitor

For more information on command modes, refer to the Using the Command-Line Interface chapter in the Release 12.2 Cisco IOS Configuration Fundamentals Configuration Guide.

Getting HelpEntering a question mark (?) at the CLI prompt displays a list of commands available for each command mode. You can also get a list of keywords and arguments associated with any command by using the context-sensitive help feature. To get help specific to a command mode, a command, a keyword, or an argument, use one of the following commands: Commandhelp abbreviated-command-entry?

Purpose Provides a brief description of the help system in any command mode. Provides a list of commands that begin with a particular character string. (No space between command and question mark.) Completes a partial command name. Lists all commands available for a particular command mode. Lists the keywords or arguments that you must enter next on the command line. (Space between command and question mark.)

abbreviated-command-entry ? command ?

Cisco IOS Configuration Fundamentals Command Reference

xiv

78-11740-02

Using Cisco IOS Software Getting Help

Example: How to Find Command OptionsThis section provides an example of how to display syntax for a command. The syntax can consist of optional or required keywords and arguments. To display keywords and arguments for a command, enter a question mark (?) at the configuration prompt or after entering part of a command followed by a space. The Cisco IOS software displays a list and brief description of available keywords and arguments. For example, if you were in global configuration mode and wanted to see all the keywords or arguments for the arap command, you would type arap ?. The symbol in command help output stands for carriage return. On older keyboards, the carriage return key is the Return key. On most modern keyboards, the carriage return key is the Enter key. The symbol at the end of command help output indicates that you have the option to press Enter to complete the command and that the arguments and keywords in the list preceding the symbol are optional. The symbol by itself indicates that no more arguments or keywords are available and that you must press Enter to complete the command. Table 2 shows examples of how you can use the question mark (?) to assist you in entering commands. The table steps you through configuring an IP address on a serial interface on a Cisco 7206 router that is running Cisco IOS Release 12.0(3).Table 2 How to Find Command Options

CommandRouter> enable Password: Router#

Comment Enter the enable command and password to access privileged EXEC commands. You are in privileged EXEC mode when the prompt changes to Router#. Enter the configure terminal privileged EXEC command to enter global configuration mode. You are in global configuration mode when the prompt changes to Router(config)#. Enter interface configuration mode by specifying the serial interface that you want to configure using the interface serial global configuration command. Enter ? to display what you must enter next on the command line. In this example, you must enter the serial interface slot number and port number, separated by a forward slash. You are in interface configuration mode when the prompt changes toRouter(config-if)#.

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

Router(config)# interface serial ? Serial interface number Router(config)# interface serial 4 ? / Router(config)# interface serial 4/ ? Serial interface number Router(config)# interface serial 4/0 Router(config-if)#

Cisco IOS Configuration Fundamentals Command Reference 78-11740-02

xv

Using Cisco IOS Software Getting Help

Table 2

How to Find Command Options (continued)

CommandRouter(config-if)# ? Interface configuration commands: . . . ip Interface Internet Protocol config commands keepalive Enable keepalive lan-name LAN Name command llc2 LLC2 Interface Subcommands load-interval Specify interval for load calculation for an interface locaddr-priority Assign a priority group logging Configure logging for interface loopback Configure internal loopback on an interface mac-address Manually set interface MAC address mls mls router sub/interface commands mpoa MPOA interface configuration commands mtu Set the interface Maximum Transmission Unit (MTU) netbios Use a defined NETBIOS access list or enable name-caching no Negate a command or set its defaults nrzi-encoding Enable use of NRZI encoding ntp Configure NTP . . . Router(config-if)# Router(config-if)# ip ? Interface IP configuration subcommands: access-group Specify access control for packets accounting Enable IP accounting on this interface address Set the IP address of an interface authentication authentication subcommands bandwidth-percent Set EIGRP bandwidth limit broadcast-address Set the broadcast address of an interface cgmp Enable/disable CGMP directed-broadcast Enable forwarding of directed broadcasts dvmrp DVMRP interface commands hello-interval Configures IP-EIGRP hello interval helper-address Specify a destination address for UDP broadcasts hold-time Configures IP-EIGRP hold time . . . Router(config-if)# ip

Comment Enter ? to display a list of all the interface configuration commands available for the serial interface. This example shows only some of the available interface configuration commands.

Enter the command that you want to configure for the interface. This example uses the ip command. Enter ? to display what you must enter next on the command line. This example shows only some of the available interface IP configuration commands.

Cisco IOS Configuration Fundamentals Command Reference

xvi

78-11740-02

Using Cisco IOS Software Using the no and default Forms of Commands

Table 2

How to Find Command Options (continued)

CommandRouter(config-if)# ip address ? A.B.C.D IP address negotiated IP Address negotiated over PPP Router(config-if)# ip address

Comment Enter the command that you want to configure for the interface. This example uses the ip address command. Enter ? to display what you must enter next on the command line. In this example, you must enter an IP address or the negotiated keyword. A carriage return () is not displayed; therefore, you must enter additional keywords or arguments to complete the command.

Router(config-if)# ip address 172.16.0.1 ? A.B.C.D IP subnet mask Router(config-if)# ip address 172.16.0.1

Enter the keyword or argument you want to use. This example uses the 172.16.0.1 IP address. Enter ? to display what you must enter next on the command line. In this example, you must enter an IP subnet mask. A is not displayed; therefore, you must enter additional keywords or arguments to complete the command.

Router(config-if)# ip address 172.16.0.1 255.255.255.0 ? secondary Make this IP address a secondary address Router(config-if)# ip address 172.16.0.1 255.255.255.0

Enter the IP subnet mask. This example uses the 255.255.255.0 IP subnet mask. Enter ? to display what you must enter next on the command line. In this example, you can enter the secondary keyword, or you can press Enter. A is displayed; you can press Enter to complete the command, or you can enter another keyword.

Router(config-if)# ip address 172.16.0.1 255.255.255.0 Router(config-if)#

In this example, Enter is pressed to complete the command.

Using the no and default Forms of CommandsAlmost every configuration command has a no form. In general, use the no form to disable a function. Use the command without the no keyword to reenable a disabled function or to enable a function that is disabled by default. For example, IP routing is enabled by default. To disable IP routing, use the no ip routing command; to reenable IP routing, use the ip routing command. The Cisco IOS software command reference publications provide the complete syntax for the configuration commands and describe what the no form of a command does. Configuration commands also can have a default form, which returns the command settings to the default values. Most commands are disabled by default, so in such cases using the default form has the same result as using the no form of the command. However, some commands are enabled by default and

Cisco IOS Configuration Fundamentals Command Reference 78-11740-02

xvii

Using Cisco IOS Software Saving Configuration Changes

have variables set to certain default values. In these cases, the default form of the command enables the command and sets the variables to their default values. The Cisco IOS software command reference publications describe the effect of the default form of a command if the command functions differently than the no form.

Saving Configuration ChangesUse the copy system:running-config nvram:startup-config command to save your configuration changes to the startup configuration so that the changes will not be lost if the software reloads or a power outage occurs. For example:Router# copy system:running-config nvram:startup-config Building configuration...

It might take a minute or two to save the configuration. After the configuration has been saved, the following output appears:[OK] Router#

On most platforms, this task saves the configuration to NVRAM. On the Class A Flash file system platforms, this task saves the configuration to the location specified by the CONFIG_FILE environment variable. The CONFIG_FILE variable defaults to NVRAM.

Filtering Output from the show and more CommandsIn Cisco IOS Release 12.0(1)T and later releases, you can search and filter the output of show and more commands. This functionality is useful if you need to sort through large amounts of output or if you want to exclude output that you need not see. To use this functionality, enter a show or more command followed by the pipe character (|); one of the keywords begin, include, or exclude; and a regular expression on which you want to search or filter (the expression is case-sensitive): command | {begin | include | exclude} regular-expression The output matches certain lines of information in the configuration file. The following example illustrates how to use output modifiers with the show interface command when you want the output to include only lines in which the expression protocol appears:Router# show interface | include protocol FastEthernet0/0 is up, line protocol is up Serial4/0 is up, line protocol is up Serial4/1 is up, line protocol is up Serial4/2 is administratively down, line protocol is down Serial4/3 is administratively down, line protocol is down

For more information on the search and filter functionality, refer to the Using the Command-Line Interface chapter in the Cisco IOS Configuration Fundamentals Configuration Guide.

Cisco IOS Configuration Fundamentals Command Reference

xviii

78-11740-02

Using Cisco IOS Software Identifying Supported Platforms

Identifying Supported PlatformsCisco IOS software is packaged in feature sets consisting of software images that support specific platforms. The feature sets available for a specific platform depend on which Cisco IOS software images are included in a release. To identify the set of software images available in a specific release or to find out if a feature is available in a given Cisco IOS software image, see the following sections:

Using Feature Navigator Using Software Release Notes

Using Feature NavigatorFeature Navigator is a web-based tool that enables you to quickly determine which Cisco IOS software images support a particular set of features and which features are supported in a particular Cisco IOS image. Feature Navigator is available 24 hours a day, 7 days a week. To access Feature Navigator, you must have an account on Cisco.com. If you have forgotten or lost your account information, e-mail the Contact Database Administration group at [email protected]. If you do not have an account on Cisco.com, go to http://www.cisco.com/register and follow the directions to establish an account. To use Feature Navigator, you must have a JavaScript-enabled web browser such as Netscape 3.0 or later, or Internet Explorer 4.0 or later. Internet Explorer 4.0 always has JavaScript enabled. To enable JavaScript for Netscape 3.x or Netscape 4.x, follow the instructions provided with the web browser. For JavaScript support and enabling instructions for other browsers, check with the browser vendor. Feature Navigator is updated when major Cisco IOS software releases and technology releases occur. You can access Feature Navigator at the following URL: http://www.cisco.com/go/fn

Using Software Release NotesCisco IOS software releases include release notes that provide the following information:

Platform support information Memory recommendations Microcode support information Feature set tables Feature descriptions Open and resolved severity 1 and 2 caveats for all platforms

Release notes are intended to be release-specific for the most current release, and the information provided in these documents may not be cumulative in providing information about features that first appeared in previous releases.

Cisco IOS Configuration Fundamentals Command Reference 78-11740-02

xix

Using Cisco IOS Software Identifying Supported Platforms

Cisco IOS Configuration Fundamentals Command Reference

xx

78-11740-02

Cisco IOS User Interface Commands

Basic Command-Line Interface CommandsThis chapter describes the commands used to enter and exit the various Cisco IOS configuration command modes. It provides a description of help features, command-line interface (CLI) navigation commands, and the command history feature. The CLI allows you to enter partial Cisco IOS configuration commands. The software recognizes a command when you enter enough characters of the command to uniquely identify it. For user interface task information and examples, see the Using the Command-Line Interface chapter of the Release 12.2 Cisco IOS Configuration Fundamentals Configuration Guide.

Cisco IOS Configuration Fundamentals Command Reference 78-11740-02

FR-3

Basic Command-Line Interface Commands disable

disableTo exit privileged EXEC mode and return to user EXEC mode, or to exit to a lower privilege level, enter the disable EXEC command. disable [privilege-level]

Syntax Description

privilege-level

(Optional) Specific privilege level (other than user EXEC mode).

Command Modes

EXEC

Command History

Release 10.0

Modification This command was introduced.

Usage Guidelines

Up to 16 security levels can be configured using Cisco IOS software. If such levels are configured on a system, using this command with the privilege-level option allows you to exit to a lower security level. If a level is not specified, the user will exit to the user EXEC mode, which is the default.

Note

Five EXEC commands are associated with privilege level 0: disable, enable, exit, help, and logout. If you configure a privilege level greater than 0, these five commands will not be included in the command set for that privilege level.

Examples

In the following example, the user enters privileged EXEC mode using the enable command, then exits back to user EXEC mode using the disable command. Note that the prompt for user EXEC mode is >, and the prompt for privileged EXEC mode is #.Router> enable Password: Router# disable Router>

Related Commands

Command enable

Description Enables higher privilege level access, such as privileged EXEC mode.

Cisco IOS Configuration Fundamentals Command Reference

FR-4

78-11740-02

Basic Command-Line Interface Commands editing

editingTo reenable Cisco IOS enhanced editing features for a particular line after they have been disabled, use the editing line configuration command. To disable these features, use the no form of this command. editing no editing

Syntax Description

This command has no arguments or keywords.

Defaults

Enabled

Command Modes

Line configuration

Command History

Release 10.0

Modification This command was introduced.

Usage Guidelines

Enhanced editing features are enabled by default. However, there may be situations in which you need to disable these features. The no form of this command disables these enhanced editing features, and the plain form of the command can be used to reenable these features. Table 3 provides a description of the keys used to enter and edit commands when the editing features are enabled. Ctrl indicates the Control key, which must be pressed simultaneously with its associated letter key. Esc indicates the Escape key, which must be pressed first, followed by its associated letter key. A comma is used in the following table to indicate a key sequence (the comma key should not be pressed). Keys are not case sensitive. Many letters used for CLI navigation and editing were chosen to provide an easy way of remembering their functions. In the following table (Table 3), characters are bolded in the Function Summary column to indicate the relation between the letter used and the function.

Cisco IOS Configuration Fundamentals Command Reference 78-11740-02

FR-5

Basic Command-Line Interface Commands editing

Table 3

Command Editing Keys and Functions

Keys Tab

Function Summary Complete command

Function Details Completes a partial command name entry. When you enter a unique set of characters and press the Tab key, the system completes the command name. If you enter a set of characters that could indicate more than one command, the system beeps to indicate an error. To view the commands which match the set of characters you have entered, enter a question mark (?) immediately following the partial command (no space). The CLI will then list the commands that begin with that string. Executes the command.

Return (at the command line) Return (at the --More-prompt) Space Bar (at the --More-prompt) Delete or Backspace Left Arrow1 or Ctrl-B

Execute

Continue

Displays the next line of output.

Continue

Displays the next screen of output. The amount of output you see will depend on the screen depth setting of your terminal. Erases the character to the left of the cursor. Moves the cursor one character to the left. When you enter a command that extends beyond a single line, you can press the Left Arrow or Ctrl-B keys repeatedly to scroll back toward the system prompt and verify the beginning of the command entry. Moves the cursor one character to the right. Moves the cursor back one word. Moves the cursor forward one word. Moves the cursor to the beginning of the line. Moves the cursor to the end of the command line. Deletes the character at the cursor. Deletes from the cursor to the end of the word . Deletes the word to the left of the cursor. Deletes all characters from the cursor to the end of the command line. Deletes all characters from the cursor back to the beginning of the command line. Transposes the character to the left of the cursor with the character located at the cursor.

Backspace Back character

Right Arrow1 or Ctrl-F Esc, B Esc, F Ctrl-A Ctrl-E Ctrl-D Esc, D Ctrl-W Ctrl-K Ctrl-U or Ctrl-X Ctrl-T

Forward character Back word Forward word Beginning of line End of line Delete character Delete next word Delete previous word Delete line forward Delete line backward Transpose characters

Cisco IOS Configuration Fundamentals Command Reference

FR-6

78-11740-02

Basic Command-Line Interface Commands editing

Table 3

Command Editing Keys and Functions (continued)

Keys Ctrl-R or Ctrl-L Ctrl-V or Esc, Q

Function Summary Redisplay line Ignore editing

Function Details Redisplays the system prompt and command line. Inserts a code to indicate to the system that the keystroke immediately following should be treated as a command entry, not as an editing key. Recalls commands in the history buffer, beginning with the most recent command. Repeat the key sequence to recall successively older commands. Returns to more recent commands in the history buffer (after recalling commands with the Up Arrow or Ctrl-P). Repeat the key sequence to recall successively more recent commands. Recalls the most recent entry in the delete buffer. The delete buffer contains the last ten items you have deleted or cut. Ctrl-Y can be used in conjunction with Esc Y. Recalls the next entry in the delete buffer. The delete buffer contains the last ten items you have deleted. Press Ctrl-Y first to recall the most recent entry. Then press Esc Y up to nine times to recall the remaining entries in the buffer. If you bypass an entry, continue to press Esc Y to cycle back to it. Capitalizes the word from the cursor to the end of the word. Changes all letters from the cursor to the next space on the line appear in uppercase letters. Changes the word to lowercase from the cursor to the end of the word.

Up Arrow1 or Ctrl-P Down Arrow1 or Ctrl-N (next)

Previous command

Next command

Ctrl-Y

Recall last deleted command

Esc, Y

Recall next deleted command

Esc, C Esc, U Esc, L

Capitalize word Make word uppercase Make word lowercase

1. The arrow keys function only with ANSI-compatible terminals.

Examples

In the following example, enhanced editing mode is disabled on line 3:Router(config)# line 3 Router(config-line)# no editing

Related Commands

Command terminal editing

Description Controls CLI enhanced editing feature for the current terminal session.

Cisco IOS Configuration Fundamentals Command Reference 78-11740-02

FR-7

Basic Command-Line Interface Commands enable

enableTo enter privileged EXEC mode, or any other security level set by a system administrator, use the enable EXEC command. enable [privilege-level]

Syntax Description

privilege-level

(Optional) Privilege level at which to log in.

Defaults

Privilege-level 15 (privileged EXEC)

Command Modes

EXEC

Command History

Release 10.0

Modification This command was introduced.

Usage Guidelines

Entering privileged EXEC mode enables the use of privileged commands. Because many of the privileged commands set operating parameters, privileged access should be password-protected to prevent unauthorized use. If the system administrator has set a password with the enable password global configuration command, you are prompted to enter it before being allowed access to privileged EXEC mode. The password is case sensitive. If an enable password has not been set, enable mode only can be accessed through the console connection. Security levels can be set by an administrator using the enable password and privilege level commands. Up to 16 privilege levels can be specified, using the numbers 0 through 15. Using these privilege levels, the administrator can allow or deny access to specific commands. Privilege level 0 is associated with user EXEC mode, and privilege level 15 is associated with privileged EXEC mode. For more information on defined privilege levels, see the Passwords and Privileges chapters of the Cisco IOS Security Configuration Guide and the Cisco IOS Security Command Reference publications. If a level is not specified when entering the enable command, the user will enter the default mode of privileged EXEC (level 15).

Cisco IOS Configuration Fundamentals Command Reference

FR-8

78-11740-02

Basic Command-Line Interface Commands enable

Examples

In the following example, the user enters privileged EXEC mode using the enable command. The system prompts the user for a password before allowing access to the privileged EXEC mode. The password is not printed to the screen. The user then exits back to user EXEC mode using the disable command. Note that the prompt for user EXEC mode is >, and the prompt for privileged EXEC mode is #.Router> enable Password: Router# disable Router>

Related Commands

Command disable enable password privilege level (global) privilege level (line)

Description Exits from privileged EXEC mode to user EXEC mode, or, if privilege levels are set, to the specified privilege level. Sets a local password to control access to various privilege levels. Sets a privilege level for a command. Sets a privilege level for a command for a specific line.

Cisco IOS Configuration Fundamentals Command Reference 78-11740-02

FR-9

Basic Command-Line Interface Commands end

endTo end the current configuration session and return to privileged EXEC mode, use the end global configuration command. end

Syntax Description

This command has no arguments or keywords.

Defaults

No default behavior or values

Command Modes

Global configuration

Command History

Release 10.0

Modification This command was introduced.

Usage Guidelines

This command will bring you back to privileged EXEC mode regardless of what configuration mode or configuration submode you are in.

Note

This global configuration command can be used in any configuration mode. Use this command when you are done configuring the system and you want to return to EXEC mode to perform verification steps.

Examples

In the following example, the end command is used to exit from ALPS ASCU configuration mode and return to privileged EXEC mode. A show command is used in privileged EXEC mode to verify the configuration.Router# configure terminal Router(config)# interface serial 1:1 Router(config-if)# alps ascu 4B Router(config-alps-ascu)# end Router# show interface serial 1:1

Related Commands

Command exit (global)

Description Exits from the current configuration mode.

Cisco IOS Configuration Fundamentals Command Reference

FR-10

78-11740-02

Basic Command-Line Interface Commands exit (EXEC)

exit (EXEC)To close an active terminal session by logging off the router, use the exit command in EXEC mode. exit

Syntax Description

This command has no arguments or keywords.

Defaults

No default behavior or values

Command Modes

EXEC

Command History

Release 10.0

Modification This command was introduced.

Usage Guidelines

Use the exit (EXEC) command in EXEC mode to exit the active session (log off the device).

Examples

In the following example, the exit (global) command is used to move from global configuration mode to privileged EXEC mode, the disable command is used to move from privileged EXEC mode to user EXEC mode, and the exit (EXEC) command is used to log off (exit the active session):Router(config)# exit Router# disable Router> exit

Related Commands

Command disconnect end exit (global)

Description Disconnects a line. Exits configuration mode, or any of the configuration submodes. Exits from the current configuration mode to the next highest configuration mode.

Cisco IOS Configuration Fundamentals Command Reference 78-11740-02

FR-11

Basic Command-Line Interface Commands exit (global)

exit (global)To exit any configuration mode to the next highest mode in the CLI mode hierarchy, use the exit command in any configuration mode. exit

Syntax Description

This command has no arguments or keywords.

Defaults

No default behavior or values

Command Modes

All configuration modes

Command History

Release 10.0

Modification This command was introduced.

Usage Guidelines

The exit command is used in the Cisco IOS CLI to exit from the current command mode to the next highest command mode in the CLI mode hierarchy. For example, use the exit command in global configuration mode to return to privileged EXEC mode. Use the exit command in interface, line, or router configuration mode to return to global configuration mode. Use the exit command in subinterface configuration mode to return to interface configuration mode. At the highest level, EXEC mode, the exit command will exit the EXEC mode and disconnect from the router interface (see the description of the exit (EXEC) command for details).

Examples

The following example displays an exit from the subinterface configuration mode to return to the interface configuration mode:Router(config-subif)# exit Router(config-if)#

The following example displays an exit from the interface configuration mode to return to the global configuration mode:Router(config-if)# exit Router(config)#

Related Commands

Command disconnect end exit (EXEC)

Description Disconnects a line. Exits from any configuration mode to privileged EXEC mode. Closes the active terminal session by logging off the router.

Cisco IOS Configuration Fundamentals Command Reference

FR-12

78-11740-02

Basic Command-Line Interface Commands full-help

full-helpTo get help for the full set of user-level commands, use the full-help line configuration command. full-help

Syntax Description

This command has no arguments or keywords.

Defaults

Disabled

Command Modes

Line configuration

Command History

Release 10.0

Modification This command was introduced.

Usage Guidelines

The full-help command enables (or disables) an unprivileged user to see all of the help messages available. It is used with the show ? command.

Examples

In the following example, the show ? command is used first with full-help disabled. Then full-help is enabled for the line, and the show ? command is used again to demonstrate the additional help output that is displayed.Router> show ? bootflash calendar clock context dialer history hosts isdn kerberos modemcap ppp rmon sessions snmp terminal users version Boot Flash information Display the hardware calendar Display the system clock Show context information Dialer parameters and statistics Display the session command history IP domain-name, lookup style, nameservers, and host table ISDN information Show Kerberos Values Show Modem Capabilities database PPP parameters and statistics rmon statistics Information about Telnet connections snmp statistics Display terminal configuration parameters Display information about terminal lines System hardware and software status

Router> enable Password:

Router# configure terminal Enter configuration commands, one per line.

End with CNTL/Z.

Cisco IOS Configuration Fundamentals Command Reference 78-11740-02

FR-13

Basic Command-Line Interface Commands full-help

Router(config)# line console 0 Router(config-line)# full-help Router(config-line)# ^Z Router# %SYS-5-CONFIG_I: Configured from console by console Router# disable Router> show ? access-expression access-lists aliases apollo appletalk arp async bootflash bridge bsc bstun buffers calendar . . . translate ttycap users version vines vlans whoami x25 xns xremote Protocol translation information Terminal capability tables Display information about terminal lines System hardware and software status VINES information Virtual LANs Information Info on current tty line X.25 information XNS information XRemote statistics List access expression List access lists Display alias commands Apollo network information AppleTalk information ARP table Information on terminal lines used as router interfaces Boot Flash information Bridge Forwarding/Filtering Database [verbose] BSC interface information BSTUN interface information Buffer pool statistics Display the hardware calendar

Related Commands

Command help

Description Displays a brief description of the help system.

Cisco IOS Configuration Fundamentals Command Reference

FR-14

78-11740-02

Basic Command-Line Interface Commands help

helpTo display a brief description of the help system, enter the help command. help

Syntax Description

This command has no arguments or keywords.

Defaults

No default behavior or values

Command Modes

All command modes

Command History

Release 10.0

Modification This command was introduced.

Usage Guidelines

The help command provides a brief description of the context-sensitive help system, which functions as follows:

To list all commands available for a particular command mode, enter a question mark (?) at the system prompt. To obtain a list of commands that begin with a particular character string, enter the abbreviated command entry immediately followed by a question mark (?). This form of help is called word help, because it lists only the keywords or arguments that begin with the abbreviation you entered. To list the keywords and arguments associated with a command, enter a question mark (?) in place of a keyword or argument on the command line. This form of help is called command syntax help, because it lists the keywords or arguments that apply based on the command, keywords, and arguments you have already entered.

Examples

In the following example, the help command is used to display a brief description of the help system:Router# help Help may be requested at any point in a command by entering a question mark '?'. If nothing matches, the help list will be empty and you must backup until entering a '?' shows the available options. Two styles of help are provided: 1. Full help is available when you are ready to enter a command argument (e.g. 'show ?') and describes each possible argument. 2. Partial help is provided when an abbreviated argument is entered and you want to know what arguments match the input (e.g. 'show pr?'.)

Cisco IOS Configuration Fundamentals Command Reference 78-11740-02

FR-15

Basic Command-Line Interface Commands help

The following example shows how to use word help to display all the privileged EXEC commands that begin with the letters co. The letters entered before the question mark are reprinted on the next command line to allow the user to continue entering the command.Router# co? configure connect Router# co copy

The following example shows how to use command syntax help to display the next argument of a partially complete access-list command. One option is to add a wildcard mask. The symbol indicates that the other option is to press Return to execute the command without adding any more keywords or arguments. The characters entered before the question mark are reprinted on the next command line to allow the user to continue entering the command or to execute that command as it is.Router(config)# access-list 99 deny 131.108.134.234 ? A.B.C.D Mask of bits to ignore Router(config)# access-list 99 deny 131.108.134.234

Related Commands

Command full-help

Description Gets help for the full set of user-level commands.

Cisco IOS Configuration Fundamentals Command Reference

FR-16

78-11740-02

Basic Command-Line Interface Commands history

historyTo enable the command history function, use the history line configuration command. To disable the command history feature, use the no form of this command. history no history

Syntax Description

This command has no arguments or keywords.

Defaults

Enabled, ten command lines in buffer

Command Modes

Line configuration

Command History

Release 10.0

Modification This command was introduced.

Usage Guidelines

The command history feature provides a record of EXEC commands that you have entered. This feature is particularly useful for recalling long or complex commands or entries, including access lists. To change the number of command lines that the system will record in its history buffer, use the history size line configuration command. The history command enables the history function with the last buffer size specified or, if there was not a prior setting, with the default of ten lines. The no history command disables the history feature. The show history EXEC command will list the commands you have entered, but you can also use your keyboard to display individual commands. Table 4 lists the keys you can use to recall commands from the command history buffer.Table 4 History Keys

Key(s) Ctrl-P or Up Arrow1

Functions Recalls commands in the history buffer in a backward sequence, beginning with the most recent command. Repeat the key sequence to recall successively older commands.

Ctrl-N or Down Arrow1 Returns to more recent commands in the history buffer after recalling commands with Ctrl-P or the Up Arrow. Repeat the key sequence to recall successively more recent commands.1. The arrow keys function only with ANSI-compatible terminals.

Examples

In the following example, line 4 is configured with a history buffer size of 35 lines:Router(config)# line 4

Cisco IOS Configuration Fundamentals Command Reference 78-11740-02

FR-17

Basic Command-Line Interface Commands history

Router(config-line)# history size 35

Related Commands

Command history size show history terminal history

Description Sets the command history buffer size for a particular line. Lists the commands you have entered in the current EXEC session. Enables the command history feature for the current terminal session or changes the size of the command history buffer for the current terminal session.

Cisco IOS Configuration Fundamentals Command Reference

FR-18

78-11740-02

Basic Command-Line Interface Commands history size

history sizeTo change the command history buffer size for a particular line, use the history size line configuration command. To reset the command history buffer size to ten lines, use the no form of this command. history size number-of-lines no history size

Syntax Description

number-of-lines

Specifies the number of command lines that the system will record in its history buffer. The range is from 0 to 256. The default is ten.

Defaults

Ten command lines

Command Modes

Line configuration

Command History

Release 10.0

Modification This command was introduced.

Usage Guidelines

The history size command should be used in conjunction with the history and show history commands. The history command enables or disables the command history function. The show history command lists the commands you have entered in the current EXEC session. The number of commands that the history buffer will show is set by the history size command.

Note

The history size command only sets the size of the buffer; it does not reenable the history feature. If the no history command is used, the history command must be used to reenable this feature.

Examples

The following example displays line 4 configured with a history buffer size of 35 lines:Router(config)# line 4 Router(config-line)# history size 35

Related Commands

Command history show history terminal history size

Description Enables or disables the command history function. Lists the commands you have entered in the current EXEC session. Enables the command history function for the current terminal session or changes the size of the command history buffer for the current terminal session.

Cisco IOS Configuration Fundamentals Command Reference 78-11740-02

FR-19

Basic Command-Line Interface Commands logout

logoutTo close an active terminal session by logging off the router, use the logout command in user EXEC mode. logout

Syntax Description

This command has no arguments or keywords.

Defaults

No default behavior or values.

Command Modes

User EXEC

Command History

Release 10.0

Modification This command was introduced.

Examples

In the following example, the exit (global) command is used to move from global configuration mode to privileged EXEC mode, the disable command is used to move from privileged EXEC mode to user EXEC mode, and the logout command is used to log off (exit from the active session):Router(config)# exit Router# disable Router> logout

Related Commands

Command exit (global)

Description Exits any configuration mode to the next highest mode in the CLI mode hierarchy.

Cisco IOS Configuration Fundamentals Command Reference

FR-20

78-11740-02

Basic Command-Line Interface Commands menu (EXEC)

menu (EXEC)To display a preconfigured user menu, use the menu command in user or privileged EXEC mode. menu menu-name

Syntax Description

menu-name

The name of the menu.

Command Modes

EXEC

Command History

Release 10.0

Modification This command was introduced.

Usage Guidelines

A user menu is a type of user interface where text descriptions of actions to be performed are displayed to the user. The user can use the menu to select services and functions without having to know the details of command-line interface (CLI) commands. Menus can be created for users in global configuration mode, using the commands listed in the Related Commands section. The description of these commands can be found in the Connection, Menu, and System Banner Commands chapter of this document. A menu can be invoked at either the user or privileged EXEC level, but if an item in the menu contains a privileged EXEC command, the user must be logged in at the privileged level for the command to succeed.

Examples

The following example invokes a menu named OnRamp:Router> menu OnRamp Welcome to OnRamp Internet Services Type a number to select an option; Type 9 to exit the menu. 1 2 3 Read email UNIX Internet access Resume UNIX connection

6 9

Resume next connection Exit menu system

Cisco IOS Configuration Fundamentals Command Reference 78-11740-02

FR-21

Basic Command-Line Interface Commands menu (EXEC)

Related Commands

Command menu clear-screen menu command menu default menu line-mode menu options menu prompt menu single-space menu status-line menu text menu title no menu

Description Clears the terminal screen before displaying a menu. Specifies underlying commands for user interface menus. Specifies the menu item to use as the default. Requires the user to press Enter after specifying an option number. Sets options for items in user interface menus. Specifies the prompt for a user interface menu. Displays menu items single-spaced rather than double-spaced. Displays a line of status information about the current user at the top of a menu Specifies the text of a menu item in a user interface menu. Creates a title, or banner, for a user menu. Deletes a specified menu from a menu configuration.

Cisco IOS Configuration Fundamentals Command Reference

FR-22

78-11740-02

Basic Command-Line Interface Commands more begin

more beginTo search the output of any more command, use the more begin command in EXEC mode. This command begins unfiltered output of the more command with the first line that contains the regular expression you specify. more file-url | begin regular-expression

Syntax Description

file-url

The Universal Resource Locator (url) of the file to display. More commands are advanced show commands; for details, see the command reference page in this book for the more command. A vertical bar (the pipe symbol) indicates that an output processing specification follows. Any regular expression found in more command output. Specifies a search at a --More-- prompt that begins unfiltered output with the first line that contains the regular expression. Specifies a filter at a --More-- prompt that only displays output lines that do not contain the regular expression. Specifies a filter at a --More-- prompt that only displays output lines that contain the regular expression.

| regular-expression / +

Command Modes

EXEC

Command History

Release 11.3 AA 12.0(1)T

Modification The more command was introduced. This extension of the more command was introduced.

Usage Guidelines

The regular-expression argument is case sensitive and allows for complex matching requirements. You can specify a new search at every --More-- prompt. To search the remaining output of the more command, use the following command at the --More-prompt: /regular-expression To filter the remaining output of the more command, use one of the following commands at the --More-prompt: -regular-expression +regular-expression When output volume is large, the search can produce long lists of output. To interrupt the output, press Ctrl-^ (Ctrl-Shift-6) or Ctrl-Z.

Cisco IOS Configuration Fundamentals Command Reference 78-11740-02

FR-23

Basic Command-Line Interface Commands more begin

Note

Once you specify a filter for a more command, you cannot specify another filter at a --More-- prompt. The first specified filter remains until the more command output finishes or until you interrupt the output. The use of the keyword begin does not constitute a filter. Because prior output is not saved, you cannot search or filter backward through prior output.

Examples

The following is partial sample output of the more nvram:startup-config | begin command that begins unfiltered output with the first line that contain the regular expression ip. At the --More-- prompt, the user specifies a filter to exclude output lines that contain the regular expression ip.router# more nvram:startup-config | begin ip ip subnet-zero ip domain-name cisco.com ip name-server 198.92.30.32 ip name-server 171.69.2.132 ! isdn switch-type primary-5ess . . . interface Ethernet1 ip address 5.5.5.99 255.255.255.0 --More--ip filtering... media-type 10BaseT ! interface Serial0:23 encapsulation frame-relay no keepalive dialer string 4001 dialer-group 1 isdn switch-type primary-5ess no fair-queue

Related Commands

Command more exclude more include show begin show exclude show include

Description Filters more command output so that it excludes lines that contain a particular regular expression. Filters more command output so that it displays only lines that contain a particular regular expression. Searches the output of any show command and displays the output from the first instance of a specified string. Filters show command output so that it excludes lines that contain a particular regular expression. Filters show command output so that it displays only lines that contain a particular regular expression.

Cisco IOS Configuration Fundamentals Command Reference

FR-24

78-11740-02

Basic Command-Line Interface Commands more exclude

more excludeTo filter more command output so that it excludes lines that contain a particular regular expression, use the more exclude command in EXEC mode. more file-url | exclude regular-expression

Syntax Description

file-url

The Universal Resource Locator (url) of the file to display. More commands are advanced show commands; for details, see the command reference page in this book for the more command. A vertical bar (the pipe symbol) indicates that an output processing specification follows. Any regular expression found in more command output. Specifies a search at a --More-- prompt that begins unfiltered output with the first line that contains the regular expression.

| regular-expression /

Command Modes

EXEC

Command History

Release 11.3 AA 12.0(1)T

Modification The more command was introduced. This extension of the more command was introduced.

Usage Guidelines

The regular-expression argument is case sensitive and allows for complex matching requirements. You can specify a new search at any --More-- prompt. To search the remaining output of the more command, use the following command at the --More-- prompt: /regular-expression When output volume is large, the search can produce long lists of output. To interrupt the output, press Ctrl-^ (Ctrl-Shift-6) or Ctrl-Z. Because prior output is not saved, you cannot search or filter backward through prior output.

Examples

The following is partial sample output of the more nvram:startup-config | exclude command. The use of | exclude service in the command specifies a filter that excludes lines that contain the regular expression service. At the --More-- prompt, the user searches for the regular expression Dialer1, which continues filtered output with the first line that contains Dialer1.router# more nvram:startup-config | exclude service ! version 12.0 ! hostname router ! boot system flash no logging buffered !

Cisco IOS Configuration Fundamentals Command Reference 78-11740-02

FR-25

Basic Command-Line Interface Commands more exclude

ip subnet-zero ip domain-name cisco.com . . . --More-/Dialer1 filtering... interface Dialer1 no ip address no ip directed-broadcast dialer in-band no cdp enable

Related Commands

Command more begin more include show begin show exclude show include

Description Begins unfiltered output of the more command with the first line that contains the regular expression you specify. Filters more command output so that it displays only lines that contain a particular regular expression. Searches the output of any show command and displays the output from the first instance of a specified string. Filters show command output so that it excludes lines that contain a particular regular expression. Filters show command output so that it displays only lines that contain a particular regular expression.

Cisco IOS Configuration Fundamentals Command Reference

FR-26

78-11740-02

Basic Command-Line Interface Commands more include

more includeTo filter more command output so that it displays only lines that contain a particular regular expression, use the more include command in EXEC mode. more file-url | include regular-expression

Syntax Description

file-url

The Universal Resource Locator (url) of the file to display. More commands are advanced show commands; for details, see the command reference page in this book for the more command. A vertical bar (the pipe symbol) indicates that an output processing specification follows. Any regular expression found in more command output. Specifies a search at a --More-- prompt that begins unfiltered output with the first line that contains the regular expression.

| regular-expression /

Command Modes

EXEC

Command History

Release 11.3 AA 12.0(1)T

Modification The more command was introduced. This extension of the more command was introduced.

Usage Guidelines

The regular-expression argument is case sensitive and allows for complex matching requirements. You can specify a new search at any --More-- prompt. To search the remaining output of the more command, use the following syntax at the --More-- prompt: /regular-expression When output volume is large, the search can produce long lists of output. To interrupt the output, press Ctrl-^ (Ctrl-Shift-6) or Ctrl-Z. Because prior output is not saved, you cannot search or filter backward through prior output.

Examples

The following is partial sample output of the more nvram:startup-config | include command. It only displays lines that contain the regular expression ip.router# more nvram:startup-config | include ip ip subnet-zero ip domain-name cisco.com ip name-server 198.92.30.32 ip name-server 171.69.2.132 description ip address 172.21.53.199 255.255.255.0 ip address 172.21.53.199 255.255.255.0

Cisco IOS Configuration Fundamentals Command Reference 78-11740-02

FR-27

Basic Command-Line Interface Commands more include

Related Commands

Command more begin more exclude show begin show exclude show include

Description Begins unfiltered output of the more command with the first line that contains the regular expression you specify. Filters more command output so that it excludes lines that contain a particular regular expression. Searches the output of any show command and displays the output from the first instance of a specified string. Filters show command output so that it excludes lines that contain a particular regular expression. Filters show command output so that it displays only lines that contain a particular regular expression.

Cisco IOS Configuration Fundamentals Command Reference

FR-28

78-11740-02

Basic Command-Line Interface Commands show begin

show beginTo begin the output of any show command from a specified string, use the show begin command in EXEC mode. show any-command | begin regular-expression

Syntax Description

any-command | regular-expression

Any supported show command. A vertical bar (the pipe symbol) indicates that an output processing specification follows. Any regular expression found in show command output. The show output will begin from the first instance of this string (output prior to this string will not be printed to the screen). The string is case-sensitive. Use parenthesis to indicate a literal use of spaces. Specifies a search at a --More-- prompt that begins unfiltered output with the first line that contains the regular expression. Specifies a filter at a --More-- prompt that only displays output lines that do not contain the regular expression. Specifies a filter at a --More-- prompt that only displays output lines that contain the regular expression.

/ +

Command Modes

EXEC

Command History

Release 8.3 12.0(1)T

Modification The show command was introduced. This extension of the show command was introduced.

Usage Guidelines

The regular-expression argument is case sensitive and allows for complex matching requirements. Use parenthesis to indicate a literal use of spaces. For example, | begin u indicates that the show output should begin with any line that contains a u; | begin ( u) indicates that the show output should begin with any line that contains a space and a u together (line has a word that begins with a lowercase u). To search the remaining output of the show command, use the following command at the --More-prompt: /regular-expression You can specify a filtered search at any --More-- prompt. To filter the remaining output of the show command, use one of the following commands at the --More-- prompt: -regular-expression +regular-expression When output volume is large, the search can produce long lists of output. To interrupt the output, press Ctrl-^ (Ctrl-Shift-6) or Ctrl-z.

Cisco IOS Configuration Fundamentals Command Reference 78-11740-02

FR-29

Basic Command-Line Interface Commands show begin

Note

Once you specify a filter for a show command, you cannot specify another filter at the next --More-prompt. The first specified filter remains until the more command output finishes or until you interrupt the output. The use of the keyword begin does not constitute a filter. Because prior output is not saved, you cannot search or filter backward through prior output.

Note

A few show commands that have long output requirements do not require user input at the --More-prompt to jump to the next table of output; these types of output require you to enter the same number of Ctrl-^ or Ctrl-Z combinations as there are --More-- prompts to completely abort output.

Examples

The following is partial sample output of the show interface | begin command that begins unfiltered output with the first line that contains the regular expression Ethernet. At the --More-- prompt, the user specifies a filter to show only the lines in the remaining output that contain the regular expression Serial.router# show interface | begin Ethernet Ethernet0 is up, line protocol is up Hardware is Lance, address is 0060.837c.6399 (bia 0060.837c.6399) Description: ip address is 172.1.2.14 255.255.255.0 Internet address is 172.1.2.14/24 . . . 0 lost carrier, 0 no carrier 0 output buffer failures, 0 output buffers swapped out --More-+Serial filtering... Serial1 is up, line protocol is up Serial2 is up, line protocol is up Serial3 is up, line protocol is down Serial4 is down, line protocol is down Serial5 is up, line protocol is up Serial6 is up, line protocol is up Serial7 is up, line protocol is up

Related Commands

Command more begin more exclude more include show exclude show include

Description Begins unfiltered output of the more command with the first line that contains the regular expression you specify. Filters more command output so that it excludes lines that contain a particular regular expression. Filters more command output so that it displays only lines that contain a particular regular expression. Filters show command output so that it excludes lines that contain a particular regular expression. Filters show command output so that it displays only lines that contain a particular regular expression.

Cisco IOS Configuration Fundamentals Command Reference

FR-30

78-11740-02

Basic Command-Line Interface Commands show exclude

show excludeTo filter show command output so that it excludes lines that contain a particular regular expression, use the show exclude command in EXEC mode. show any-command | exclude regular-expression

Syntax Description

any-command | regular-expression /

Any supported show command. A vertical bar (the pipe symbol) indicates that an output processing specification follows. Any regular expression found in show command output. Specifies a search at a --More-- prompt that begins unfiltered output with the first line that contains the regular expression.

Command Modes

EXEC

Command History

Release 8.3 12.0(1)T

Modification The show command was introduced. This extension of the show command was introduced.

Usage Guidelines

The regular-expression argument is case sensitive and allows for complex matching requirements. You can specify a new search at every --More-- prompt. To search the remaining output of the show command, use the following syntax at the --More-- prompt: /regular-expression When output volume is large, the search can produce long lists of output. To interrupt the output, press Ctrl-^ (Ctrl-Shift-6) or Ctrl-Z. Because prior output is not saved, you cannot search or filter backward through prior output.

Note

A few show commands that have long output requirements do not require user input at the --More-prompt to jump to the next table of output; these types of output require you to enter the same number of Ctrl-^ or Ctrl-Z combinations as there are --More-- prompts to completely abort output.

Examples

The following is partial sample output of the show | exclude command used with the show buffers command. It excludes lines that contain the regular expression 0 misses. At the --More-- prompt, the user searches for the regular expression Serial0, which continues the filtered output with the first line that contains Serial0.router# show buffers | exclude 0 misses Buffer elements: 398 in free list (500 max allowed) Public buffer pools:

Cisco IOS Configuration Fundamentals Command Reference 78-11740-02

FR-31

Basic Command-Line Interface Commands show exclude

Small buffers, 104 bytes (total 50, permanent 50): 50 in free list (20 min, 150 max allowed) 551 hits, 3 misses, 0 trims, 0 created Big buffers, 1524 bytes (total 50, permanent 50): 49 in free list (5 min, 150 max allowed) Very Big buffers, 4520 bytes (total 10, permanent 10): . . . Huge buffers, 18024 bytes (total 0 permanent 0): 0 in free list (0 min, 4 max allowed) --More-/Serial0 filtering... Serial0 buffers, 1543 bytes (total 64, permanent 64): 16 in free list (0 min, 64 max allowed) 48 hits, 0 fallbacks

Related Commands

Command more begin more exclude more include show begin show include

Description Begins unfiltered output of the more command with the first line that contains the regular expression you specify. Filters more command output so that it excludes lines that contain a particular regular expression. Filters more command output so that it displays only lines that contain a particular regular expression. Searches the output of any show command and displays the output from the first instance of a specified string. Filters show command output so that it displays only lines that contain a particular regular expression.

Cisco IOS Configuration Fundamentals Command Reference

FR-32

78-11740-02

Basic Command-Line Interface Commands show history

show historyTo list the commands you have entered in the current EXEC session, use the show history EXEC command. show history

Syntax Description

This command has no arguments or keywords.

Command Modes

EXEC

Command History

Release 10.0

Modification This command was introduced.

Usage Guidelines

The command history feature provides a record of EXEC commands you have entered. The number of commands that the history buffer will record is determined by the history size line configuration command or the terminal history size EXEC command. Table 5 lists the keys and functions you can use to recall commands from the command history buffer.Table 5 History Keys

Key Ctrl-P or Up Arrow1

Function Recalls commands in the history buffer in a backward sequence, beginning with the most recent command. Repeat the key sequence to recall successively older commands.

Ctrl-N or Down Arrow1 Returns to more recent commands in the history buffer after recalling commands with Ctrl-P or the Up Arrow. Repeat the key sequence to recall successively more recent commands.1. The arrow keys function only with ANSI-compatible terminals.

Examples

The following is sample output from the show history command, which lists the commands the user has entered in