2-9
Catalyst2950 and Catalyst2955 Switch Software Configuration Guide
78-11380-10
Chapter2 Using the Command-Lin e Interface Searching and Filtering Output of show and more Commands
Use line wrapping with the command history feature to recall and modify previous complex comm and
entries. For information about recalling previous command entries, see the “E dit ing Com mands throug h
Keystrokes” section on page2-7.
Searching and Filtering Output of show and more Commands
You can search and filter the output for show and more commands. This is useful when you need to sort
through large amounts of output or if you want to exclude output t h at y ou do not nee d t o se e.
To use this functionality, enter a show or more command followed by the pipe character (|), one of the
keywords begin, include, or exclude, and an expression that you want to search for or filter out:
command | {begin | include | exclude} regular-expression
Expressions are case sensitive. For example, if you enter | exclude output, the lines that contain output
are not displayed, but the lines that contain Output appear.
This example shows how to include in the output display only lines where the expression protocol
appears:
Switch# show interfaces | include protocol
Vlan1 is up, line protocol is up
Vlan10 is up, line protocol is down
GigabitEthernet0/1 is up, line protocol is down
GigabitEthernet0/2 is up, line protocol is up
Accessing the CLI
Before you can access the CLI, you need to connect a terminal or PC to the switch console port and
power on the switch as described in the hardware installation guide that shipped with your switch. Then,
to understand the boot process and the options available for assigning IP inf ormat ion , see Chapter 5,
“Assigning the Switch IP Address and Default Gateway.”
If your switch is already configured, you can access the C LI t hr ough a lo ca l c onso le co nne ctio n o r
through a remote Telnet session, but your switch must first be configured for this type of access. For
more information, see the “Setting a Telnet Password for a Terminal Line” section on page9-6.
You can establish a connection with the switch by either
Connecting the switch console port to a management station or di al -up mode m. For in for mat ion
about connecting to the console port, refer to the switch hardware installation guide.
Using any Telnet TCP/IP or encrypted Secure Shell (SSH) package from a remote management
station. The switch must have network connectivity with the Telnet or SSH client, and the switch
must have an enable secret password configured.
For information about configuring the switch for Telnet access, see the “Setting a Telnet Password
for a Terminal Line” section on page 9-6. The switch supports up to 16 simultaneous Telnet sessions.
Changes made by one Telnet user are reflected in all other Telnet sessions.
For information about configuring the switch for SSH, see the “Configuring the Switch for Secure
Shell” section on page 9-33. The switch supports up to five simultaneous secure SSH sessions.
After you connect through the console port, or through a Telnet session, or through an SSH session, the
userEXEC prompt appears on the management station.