Table Of Contents
Using the Command-Line Interface
Getting Help
Understanding Command Modes
Understanding Interface Numbering
Card Numbering
Subcard Numbering
Route Processor Interface Numbering
Port Numbering
Example of Interface Numbering
Undoing a Command or Feature
Displaying the Configuration
Saving Configuration Changes
Where to Go Next
Using the Command-Line Interface
This chapter describes what you need to know about the Cisco IOS software (the software that runs the switch router) before you begin to configure it, and includes the following sections:
•
Getting Help
•
Understanding Command Modes
•
Understanding Interface Numbering
•
Undoing a Command or Feature
•
Displaying the Configuration
•
Saving Configuration Changes
•
Where to Go Next
Understanding these concepts will save you time later on. If you have never used the Cisco IOS software or need a refresher, take a few minutes to read this chapter before you proceed to the next chapter.
If you are already familiar with the Cisco IOS software, skip this chapter and proceed to the next chapter, " Getting Started."
Note
This document assumes you have already connected all necessary external devices to the switch router and configured your PC terminal emulation program for 9600 baud, 8 data bits, no parity, and 2 stop bits.
Getting Help
You can use the question mark (?) and arrow keys to help you enter commands.
For a list of available commands, type the question mark:
Switch> ?
To complete a command, type a few known characters followed by the question mark (with no space):
Switch> s?
For a list of command keywords and variables, type the command followed by a space and a question mark:
Switch> show ?
To redisplay a command you previously entered, press the up arrow key. Continue to press the up arrow key for more commands.
Understanding Command Modes
You use many different command modes when you configure the switch router. Each command mode restricts you to a subset of commands.
In the following example, notice how the prompt changes after each command to indicate a new command mode:
Switch> enable
Switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)# interface ethernet 0
Switch(config-if)# exit
Switch(config)# map-list atm
Switch(config-map-list)# end
Switch#
Tips
If you are having difficulty entering a command, check the prompt and then enter the question mark (?) for a list of available commands. You might be in the wrong command mode or using the wrong syntax.
Understanding Interface Numbering
Before you can configure a software interface, you need to know how the physical location of the port adapter or interface module in the chassis corresponds to how it is addressed (referred to) in the software. In interface configuration mode, you must enter the card/subcard/port number to configure an interface:
•
card—Card number
•
subcard—Subcard number
•
port—Port number
Figure 1-1 describes the parts of the interface identifier format.
Figure 1-1 Interface Port Identifier Format
Card, subcard, and port numbering all start at 0 and increment by 1, from top to bottom, and from left to right.
Note
In the subsections that follow, the Catalyst 8540 chassis is shown because it is the most robust system. The Catalyst 8540 chassis has 13 slots and supports redundant route processors and switch cards. The Catalyst 8510 and LightStream 1010 chassis have only 5 slots and do not support redundant route processors or switch cards. However the numbering scheme concept is the same, regardless of which chassis you have.
Card Numbering
Card numbering starts at 0 and increments by 1 from top to bottom, as shown in Figure 1-2. The card number slots are silk-screened on the left side of each slot.
Figure 1-2 Card Numbering (Catalyst 8540 shown)
Subcard Numbering
Subcards are numbered from 0 to 1, left to right. Subcards include half-width port adapters (such as a 155-Mbps port adapter) and full-width interface modules (such as a Gigabit Ethernet interface module).
Two half-width port adapters can occupy one chassis slot. Figure 1-3 shows that the two half-width port adapters in slot 0 are numbered subcards 0 and 1, from left to right. The port adapter in the left slot is numbered subcard 0, and the port adapter in the right slot is numbered subcard 1.
When you apply this numbering scheme to full-width interface modules, the subcard number is 0, because only one full-width interface module fits in a card slot. See Figure 1-3.
So, the subcard portion of the card/subcard/port CLI variable is either 0 or 1 for half-width port adapters, and is 0 for full-width interface modules. For example, in 0/0/1 the second 0 represents subcard 0.
Figure 1-3 Subcard Numbering
Route Processor Interface Numbering
The interface on the route processor is addressed as either ethernet 0 or atm 0, depending on the type of configuration. The other interfaces on the processor card start with 0 and increment by 1. See Figure 1-4.
Figure 1-4 Route Processor Numbering (Catalyst 8540 Route Processor shown)
Port Numbering
Port numbering for each subcard starts with 0 and increments by 1, from left to right, as shown in Figure 1-5.
Figure 1-5 Port Numbering
Example of Interface Numbering
Figure 1-6 shows a Catalyst 8540 chassis populated with several half-width port adapters and full-width interface modules. In this example, 12/0/3 is called out in the last interface module installed in the chassis. The 12/0/3 interface number is derived by:
•
Card (12)—The interface module is in the thirteenth slot of the chassis; therefore, the card number is 12. (Card numbering starts at 0 and increments by 1 from top to bottom.)
•
Subcard (0)—The full-width interface module is the only subcard within the twelfth slot; therefore, the subcard number is 0.
•
Port (3)—The callout points to the fourth port on the interface module; therefore, the port number is 3. (Port numbering starts at 0 and increments by 1 from left to right.)
Figure 1-6 Interface Numbering Example (Catalyst 8540 shown)
Undoing a Command or Feature
If you want to undo a command you entered or disable a feature, you can enter the keyword no before most commands; for example, no atm router pnni.
Displaying the Configuration
You can display various aspects of the switch router configuration by entering more commands. You can only use more commands in user EXEC and privileged EXEC modes.
To display the current running (unsaved) configuration, enter the more system:running-config command:
Switch# more system:running-config
Building configuration...
Current configuration:
!
version XX.X
<Information deleted>
!
line con 0
line vty 0 4
no login
!
end
To display the saved configuration (stored in nonvolatile random-access memory [NVRAM]), enter the more nvram:startup-config command.
To see a complete list of available more commands, enter the more ? command:
Switch# more ?
access-lists List access lists
accounting Accounting data for active sessions
aliases Display alias commands
arp ARP table
async Information on terminal lines used as router
interfaces
atm ATM information
boot Boot and related environment variable
buffers Buffer pool statistics
calendar Display the hardware calendar
cdp CDP information
<Information deleted>
Saving Configuration Changes
The switch router contains two types of configuration files: the running configuration and the startup configuration. The running configuration is the current (unsaved) configuration that reflects the most recent configuration changes. The startup configuration is the saved configuration in NVRAM and is used when the system initializes. The two configuration files provide a safeguard against configuration mistakes. If you make a mistake while configuring the switch router, you can revert back to the saved startup configuration by entering the copy nvram:startup-config system:running-config command. Or you can reboot the switch router (without saving the configuration changes) to use the startup configuration in NVRAM.
Enter the copy system:running-config nvram:startup-config command to save your configuration changes to NVRAM so that they will not be lost if there is a system reload or power outage:
Switch# copy system:running-config nvram:startup-config
Building configuration...
Depending on the size and complexity of the configuration file, it might take a minute or two to save the configuration to NVRAM. After the configuration has been saved, the following is displayed:
[OK]
Switch#
Where to Go Next
Now that you have learned some Cisco IOS software basics, you can begin to configure the switch router.
Remember that:
•
You can use the question mark (?) and arrow keys to help you enter commands.
•
Each command mode restricts you to a set of commands. If you have difficulty entering a command, check the prompt and then enter the question mark (?) for a list of available commands. You might be in the wrong command mode or using the wrong syntax.
•
If you want to disable a feature, enter the keyword no before the command; for example, no atm router pnni.
•
You need to save your configuration changes to NVRAM so that they will not be lost if a system reload or power outage occurs.
Proceed to the next chapter, " Getting Started," to begin configuring the switch router.