First Published: July 10, 2013
Americas 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 527-0883
Text Part Number: OL-29044-01
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 UCB's 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.
Any Internet Protocol (IP) addresses and phone numbers used in this document are not intended to be actual addresses and phone numbers. Any examples, command display output, network topology diagrams, and other figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses or phone numbers in illustrative content is unintentional and coincidental.
Cisco and the Cisco logo are trademarks or registered trademarks of Cisco and/or its affiliates in the U.S. and other countries. To view a list of Cisco trademarks, go to this URL: http:// www.cisco.com/go/trademarks. Third-party trademarks mentioned 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. (1110R)
© Cisco Systems, Inc. All rights reserved.
C O N T E N T S
P r e f a c e
C H A P T E R 1
C H A P T E R 2
Preface ix
Document Conventions ix
Related Documentation xi
Obtaining Documentation and Submitting a Service Request xi
Using the Command-Line Interface 1
Information About Using the Command-Line Interface 1
Command Modes 1
Using the Help System 3
Understanding Abbreviated Commands 4
No and default Forms of Commands 4
CLI Error Messages 4
Configuration Logging 5
How to Use the CLI to Configure Features 5
Configuring the Command History 5
Changing the Command History Buffer Size 6
Recalling Commands 6
Disabling the Command History Feature 7
Enabling and Disabling Editing Features 7
Editing Commands through Keystrokes 8
Editing Command Lines That Wrap 9
Searching and Filtering Output of show and more Commands 10
Accessing the CLI through a Console Connection or through Telnet 11
Configuring Cisco IOS Configuration Engine 13
Finding Feature Information 13
Prerequisites for Configuring the Configuration Engine 13
Catalyst 2960-X Switch Network Management Configuration Guide, Cisco IOS Release 15.0(2)EX
OL-29044-01 |
iii |
Contents
C H A P T E R 3
Restrictions for Configuring the Configuration Engine 14
Information About Configuring the Configuration Engine 14
Cisco Configuration Engine Software 14
Configuration Service 15
Event Service 16
NameSpace Mapper 16
Cisco Networking Services IDs and Device Hostnames 16
ConfigID 16
DeviceID 17
Hostname and DeviceID 17
Hostname, DeviceID, and ConfigID 17
Cisco IOS CNS Agents 18
Initial Configuration 18
Incremental (Partial) Configuration 19
Synchronized Configuration 19
Automated CNS Configuration 19
How to Configure the Configuration Engine 20
Enabling the CNS Event Agent 20
Enabling the Cisco IOS CNS Agent 22
Enabling an Initial Configuration for Cisco IOS CNS Agent 23
Refreshing DeviceIDs 28
Enabling a Partial Configuration for Cisco IOS CNS Agent 30
Monitoring CNS Configurations 31
Additional References 32
Feature History and Information for the Configuration Engine 32
Configuring the Cisco Discovery Protocol 33
Finding Feature Information 33
Information About CDP 33
CDP Overview 33
CDP and Stacks 34
Default CDP Configuration 34
How to Configure CDP 34
Configuring CDP Characteristics 34
Disabling CDP 36
|
Catalyst 2960-X Switch Network Management Configuration Guide, Cisco IOS Release 15.0(2)EX |
iv |
OL-29044-01 |
Contents
C H A P T E R 4
C H A P T E R 5
Enabling CDP 37
Disabling CDP on an Interface 38
Enabling CDP on an Interface 39
Monitoring and Maintaining CDP 40
Additional References 41
Feature History and Information for Cisco Discovery Protocol 42
Configuring Simple Network Management Protocol 43
Finding Feature Information 43
Prerequisites for SNMP 43
Restrictions for SNMP 46
Information About SNMP 46
SNMP Overview 46
SNMP Manager Functions 46
SNMP Agent Functions 47
SNMP Community Strings 47
SNMP MIB Variables Access 47
SNMP Notifications 48
SNMP ifIndex MIB Object Values 48
Default SNMP Configuration 49
SNMP Configuration Guidelines 49
How to Configure SNMP 50
Disabling the SNMP Agent 50
Configuring Community Strings 51
Configuring SNMP Groups and Users 53
Configuring SNMP Notifications 55
Setting the Agent Contact and Location Information 60
Limiting TFTP Servers Used Through SNMP 61
Monitoring SNMP Status 62
SNMP Examples 63
Feature History and Information for Simple Network Management Protocol 64
Configuring SPAN and RSPAN 65
Finding Feature Information 65
Prerequisites for SPAN and RSPAN 65
Catalyst 2960-X Switch Network Management Configuration Guide, Cisco IOS Release 15.0(2)EX
OL-29044-01 |
v |
Contents
Restrictions for SPAN and RSPAN 66
Information About SPAN and RSPAN 68
SPAN and RSPAN 68
Local SPAN 68
Remote SPAN 69
SPAN and RSPAN Concepts and Terminology 70
SPAN Sessions 71
Monitored Traffic 71
Source Ports 72
Source VLANs 73
VLAN Filtering 73
Destination Port 73
RSPAN VLAN 74
SPAN and RSPAN Interaction with Other Features 75
SPAN and RSPAN and Device Stacks 76
Flow-Based SPAN 76
Default SPAN and RSPAN Configuration 77
Configuration Guidelines 77
SPAN Configuration Guidelines 77
RSPAN Configuration Guidelines 78
FSPAN and FRSPAN Configuration Guidelines 78
How to Configure SPAN and RSPAN 78
Creating a Local SPAN Session 78
Creating a Local SPAN Session and Configuring Incoming Traffic 80
Specifying VLANs to Filter 82
Configuring a VLAN as an RSPAN VLAN 83
Creating an RSPAN Source Session 85
Specifying VLANs to Filter 86
Creating an RSPAN Destination Session 88
Creating an RSPAN Destination Session and Configuring Incoming Traffic 89
Configuring an FSPAN Session 91
Configuring an FRSPAN Session 93
Monitoring SPAN and RSPAN Operations 95
SPAN and RSPAN Configuration Examples 96
Example: Configuring Local SPAN 96
|
Catalyst 2960-X Switch Network Management Configuration Guide, Cisco IOS Release 15.0(2)EX |
vi |
OL-29044-01 |
Contents
Examples: Creating an RSPAN VLAN 97
Feature History and Information for SPAN and RSPAN 97
Catalyst 2960-X Switch Network Management Configuration Guide, Cisco IOS Release 15.0(2)EX
OL-29044-01 |
vii |
Contents
|
Catalyst 2960-X Switch Network Management Configuration Guide, Cisco IOS Release 15.0(2)EX |
viii |
OL-29044-01 |
This preface contains the following topics:
• Document Conventions, page ix
• Related Documentation, page xi
• Obtaining Documentation and Submitting a Service Request, page xi
This document uses the following conventions:
Convention |
Description |
^ or Ctrl |
Both the ^ symbol and Ctrl represent the Control (Ctrl) key on a keyboard. |
|
For example, the key combination ^D or Ctrl-D means that you hold |
|
down the Control key while you press the D key. (Keys are indicated in |
|
capital letters but are not case sensitive.) |
bold font |
Commands and keywords and user-entered text appear in bold font. |
Italic font |
Document titles, new or emphasized terms, and arguments for which you |
|
supply values are in italic font. |
Courier font |
Terminal sessions and information the system displays appear in courier |
|
font. |
Bold Courier font |
Bold Courier font indicates text that the user must enter. |
[x] |
Elements in square brackets are optional. |
... |
An ellipsis (three consecutive nonbolded periods without spaces) after |
|
a syntax element indicates that the element can be repeated. |
| |
A vertical line, called a pipe, indicates a choice within a set of keywords |
|
or arguments. |
Catalyst 2960-X Switch Network Management Configuration Guide, Cisco IOS Release 15.0(2)EX
OL-29044-01 |
ix |
Preface
Document Conventions
Convention |
Description |
[x | y] |
Optional alternative keywords are grouped in brackets and separated by |
|
vertical bars. |
{x | y} |
Required alternative keywords are grouped in braces and separated by |
|
vertical bars. |
[x {y | z}] |
Nested set of square brackets or braces indicate optional or required |
|
choices within optional or required elements. Braces and a vertical bar |
|
within square brackets indicate a required choice within an optional |
|
element. |
string |
A nonquoted set of characters. Do not use quotation marks around the |
|
string or the string will include the quotation marks. |
< > |
Nonprinting characters such as passwords are in angle brackets. |
[ ] |
Default responses to system prompts are in square brackets. |
!, # |
An exclamation point (!) or a pound sign (#) at the beginning of a line |
|
of code indicates a comment line. |
Reader Alert Conventions
This document uses the following conventions for reader alerts:
Note Means reader take note. Notes contain helpful suggestions or references to material not covered in the manual.
Tip Means the following information will help you solve a problem.
Caution Means reader be careful. In this situation, you might do something that could result in equipment damage or loss of data.
Timesaver Means the described action saves time. You can save time by performing the action described in the paragraph.
Warning Means reader be warned. In this situation, you might perform an action that could result in bodily injury.
|
Catalyst 2960-X Switch Network Management Configuration Guide, Cisco IOS Release 15.0(2)EX |
x |
OL-29044-01 |
Preface
Related Documentation
Note Before installing or upgrading the switch, refer to the switch release notes.
•Catalyst 2960-X Switch documentation, located at: http://www.cisco.com/go/cat2960x_docs
•Cisco SFP and SFP+ modules documentation, including compatibility matrixes, located at: http://www.cisco.com/en/US/products/hw/modules/ps5455/tsd_products_support_series_home.html
•Cisco Validated Designs documents, located at: http://www.cisco.com/go/designzone
For information on obtaining documentation, submitting a service request, and gathering additional information, see the monthly What's New in Cisco Product Documentation, which also lists all new and revised Cisco technical documentation, at:
http://www.cisco.com/en/US/docs/general/whatsnew/whatsnew.html
Subscribe to the What's New in Cisco Product Documentation as a Really Simple Syndication (RSS) feed and set content to be delivered directly to your desktop using a reader application. The RSS feeds are a free service and Cisco currently supports RSS version 2.0.
Catalyst 2960-X Switch Network Management Configuration Guide, Cisco IOS Release 15.0(2)EX
OL-29044-01 |
xi |
Preface
Obtaining Documentation and Submitting a Service Request
|
Catalyst 2960-X Switch Network Management Configuration Guide, Cisco IOS Release 15.0(2)EX |
xii |
OL-29044-01 |
C H A P T E R 1
This chapter contains the following topics:
• |
Information About Using the Command-Line Interface, page 1 |
• |
How to Use the CLI to Configure Features, page 5 |
This section describes the Cisco IOS command-line interface (CLI) and how to use it to configure your switch.
The Cisco IOS user interface is divided into many different modes. The commands available to you depend on which mode you are currently in. Enter a question mark (?) at the system prompt to obtain a list of commands available for each command mode.
You can start a CLI session through a console connection, through Telnet, a SSH, or by using the browser.
When you start a session, you begin in user mode, often called user EXEC mode. Only a limited subset of the commands are available in user EXEC mode. For example, most of the user EXEC commands are one-time commands, such as show commands, which show the current configuration status, and clear commands, which clear counters or interfaces. The user EXEC commands are not saved when the switch reboots.
To have access to all commands, you must enter privileged EXEC mode. Normally, you must enter a password to enter privileged EXEC mode. From this mode, you can enter any privileged EXEC command or enter global configuration mode.
Using the configuration modes (global, interface, and line), you can make changes to the running configuration. If you save the configuration, these commands are stored and used when the switch reboots. To access the various configuration modes, you must start at global configuration mode. From global configuration mode, you can enter interface configuration mode and line configuration mode.
This table describes the main command modes, how to access each one, the prompt you see in that mode, and how to exit the mode.
Catalyst 2960-X Switch Network Management Configuration Guide, Cisco IOS Release 15.0(2)EX
OL-29044-01 |
1 |
Using the Command-Line Interface
Command Modes
Table 1: Command Mode Summary |
|
|
|
|
Mode |
Access Method |
Prompt |
Exit Method |
About This Mode |
User EXEC |
Begin a session |
Switch> |
Enter logout or |
Use this mode to |
|
using Telnet, SSH, |
quit. |
• Change |
|
|
or console. |
|
|
|
|
|
|
terminal |
|
|
|
|
|
|
|
|
|
|
settings. |
|
|
|
|
• Perform basic |
|
|
|
|
tests. |
|
|
|
|
• Display |
|
|
|
|
system |
|
|
|
|
information. |
Privileged EXEC |
While in user EXEC |
Switch# |
Enter disable to |
Use this mode to |
|
mode, enter the |
exit. |
verify commands |
|
|
enable command. |
|
|
that you have |
|
|
|
|
entered. Use a |
|
|
|
|
password to protect |
|
|
|
|
access to this mode. |
Global |
While in privileged |
Switch(config)# |
To exit to privileged |
Use this mode to |
configuration |
EXEC mode, enter |
EXEC mode, enter |
configure |
|
|
the configure |
|
exit or end, or press |
parameters that |
|
command. |
|
Ctrl-Z. |
apply to the entire |
|
|
|
|
switch. |
VLAN |
While in global |
To exit to global |
configuration |
configuration mode, |
Switch(config-vlan)# configuration mode, |
|
enter the vlan |
enter the exit |
|
vlan-id command. |
command. |
|
|
To return to |
|
|
privileged EXEC |
|
|
mode, press Ctrl-Z |
|
|
or enter end. |
Use this mode to configure VLAN parameters. When VTP mode is transparent, you can create extended-range VLANs(VLANIDs greater than 1005) and save configurations in the switch startup configuration file.
Interface |
While in global |
To exit to global |
configuration |
configuration mode, |
Switch(config-if)# configuration mode, |
|
enter the interface |
enter exit. |
|
command (with a |
To return to |
|
specific interface). |
|
|
privileged EXEC |
|
|
|
|
|
|
mode, press Ctrl-Z |
|
|
or enter end. |
Use this mode to configure parameters for the Ethernet ports.
|
Catalyst 2960-X Switch Network Management Configuration Guide, Cisco IOS Release 15.0(2)EX |
2 |
OL-29044-01 |
Using the Command-Line Interface
Mode |
Access Method |
Prompt |
Exit Method |
About This Mode |
Line configuration While in global
configuration mode, Switch(config-line)# specify a line with
the line vty or line console command.
To exit to global configuration mode, enter exit.
To return to privileged EXEC mode, press Ctrl-Z or enter end.
Use this mode to configure parameters for the terminal line.
Using the Help System
You can enter a question mark (?) at the system prompt to display a list of commands available for each command mode. You can also obtain a list of associated keywords and arguments for any command.
SUMMARY STEPS
1.help
2.abbreviated-command-entry ?
3.abbreviated-command-entry <Tab>
4.?
5.command ?
6.command keyword ?
DETAILED STEPS
|
Command or Action |
Purpose |
Step 1 |
help |
Obtains a brief description of the help system in any |
|
|
command mode. |
|
Example: |
|
|
Switch# help |
|
Step 2 |
abbreviated-command-entry ? |
Obtains a list of commands that begin with a particular |
|
|
character string. |
|
Example: |
|
|
Switch# di? |
|
|
dir disable disconnect |
|
Step 3 |
abbreviated-command-entry <Tab> |
Completes a partial command name. |
|
Example: |
|
|
Switch# sh conf<tab> |
|
|
Switch# show configuration |
|
Catalyst 2960-X Switch Network Management Configuration Guide, Cisco IOS Release 15.0(2)EX
OL-29044-01 |
3 |
Using the Command-Line Interface
|
Command or Action |
Purpose |
Step 4 |
? |
Lists all commands available for a particular command |
|
|
mode. |
|
Example: |
|
|
Switch> ? |
|
Step 5 |
command ? |
Lists the associated keywords for a command. |
|
Example: |
|
|
Switch> show ? |
|
Step 6 |
command keyword ? |
Lists the associated arguments for a keyword. |
|
Example: |
|
|
Switch(config)# cdp holdtime ? |
|
|
<10-255> Length of time (in sec) that receiver |
|
|
must keep this packet |
|
Understanding Abbreviated Commands
You need to enter only enough characters for the switch to recognize the command as unique.
This example shows how to enter the show configuration privileged EXEC command in an abbreviated form:
Switch# show conf
Almost every configuration command also has a no form. In general, use the no form to disable a feature or function or reverse the action of a command. For example, the no shutdown interface configuration command reverses the shutdown of an interface. Use the command without the keyword no to reenable a disabled feature or to enable a feature that is disabled by default.
Configuration commands can also have a default form. The default form of a command returns the command setting to its default. Most commands are disabled by default, so the default form is the same as the no form. However, some commands are enabled by default and have variables set to certain default values. In these cases, the default command enables the command and sets variables to their default values.
This table lists some error messages that you might encounter while using the CLI to configure your switch.
|
Catalyst 2960-X Switch Network Management Configuration Guide, Cisco IOS Release 15.0(2)EX |
4 |
OL-29044-01 |
Using the Command-Line Interface
Table 2: Common CLI Error Messages
Error Message
% Ambiguous command: "show con"
% Incomplete command.
% Invalid input detected at ‘^’ marker.
Meaning |
How to Get Help |
You did not enter enough characters for your switch to recognize the command.
You did not enter all the keywords or values required by this command.
You entered the command incorrectly. The caret (^) marks the point of the error.
Reenter the command followed by a question mark (?) with a space between the command and the question mark.
The possible keywords that you can enter with the command appear.
Reenter the command followed by a question mark (?) with a space between the command and the question mark.
The possible keywords that you can enter with the command appear.
Enter a question mark (?) to display all the commands that are available in this command mode.
The possible keywords that you can enter with the command appear.
Configuration Logging
You can log and view changes to the switch configuration. You can use the Configuration Change Logging and Notification feature to track changes on a per-session and per-user basis. The logger tracks each configuration command that is applied, the user who entered the command, the time that the command was entered, and the parser return code for the command. This feature includes a mechanism for asynchronous notification to registered applications whenever the configuration changes. You can choose to have the notifications sent to the syslog.
Note Only CLI or HTTP changes are logged.
The software provides a history or record of commands that you have entered. The command history feature is particularly useful for recalling long or complex commands or entries, including access lists. You can customize this feature to suit your needs.
Catalyst 2960-X Switch Network Management Configuration Guide, Cisco IOS Release 15.0(2)EX
OL-29044-01 |
5 |
Using the Command-Line Interface
Configuring the Command History
By default, the switch records ten command lines in its history buffer. You can alter this number for a current terminal session or for all sessions on a particular line. This procedure is optional.
SUMMARY STEPS
1. terminal history [size number-of-lines]
DETAILED STEPS
Command or Action
Step 1 terminal history [size number-of-lines]
Example:
Switch# terminal history size 200
Purpose
Changes the number of command lines that the switch records during the current terminal session in the privileged EXEC mode. You can configure the size from 0 through 256.
To recall commands from the history buffer, perform one of the actions listed in this table. These actions are optional.
Note The arrow keys function only on ANSI-compatible terminals such as VT100s.
SUMMARY STEPS
1.Ctrl-P or use the up arrow key
2.Ctrl-N or use the down arrow key
3.show history
DETAILED STEPS
|
Command or Action |
Purpose |
Step 1 |
Ctrl-P or use the up arrow key |
Recalls commands in the history buffer, beginning with the most recent command. |
|
|
Repeat the key sequence to recall successively older commands. |
Step 2 |
Ctrl-N or use the down arrow key |
Returns to more recent commands in the history buffer after recalling commands |
|
|
with Ctrl-P or the up arrow key. Repeat the key sequence to recall successively |
|
|
more recent commands. |
|
Catalyst 2960-X Switch Network Management Configuration Guide, Cisco IOS Release 15.0(2)EX |
6 |
OL-29044-01 |
Using the Command-Line Interface
|
Command or Action |
Step 3 |
show history |
|
Example: |
Purpose
Lists the last several commands that you just entered in privileged EXEC mode. The number of commands that appear is controlled by the setting of the terminal history global configuration command and the history line configuration
Switch# show history |
command. |
The command history feature is automatically enabled. You can disable it for the current terminal session or for the command line. This procedure is optional.
SUMMARY STEPS
1. terminal no history
DETAILED STEPS
|
Command or Action |
Purpose |
Step 1 |
terminal no history |
Disables the feature during the current terminal session in the |
|
|
privileged EXEC mode. |
|
Example: |
|
|
Switch# terminal no history |
|
Enabling and Disabling Editing Features
Although enhanced editing mode is automatically enabled, you can disable it, and reenable it.
SUMMARY STEPS
1.terminal editing
2.terminal no editing
DETAILED STEPS
|
Command or Action |
Purpose |
Step 1 |
terminal editing |
Reenables the enhanced editing mode for the current terminal |
|
|
session in the privileged EXEC mode. |
|
Example: |
|
|
Switch# terminal editing |
|
Catalyst 2960-X Switch Network Management Configuration Guide, Cisco IOS Release 15.0(2)EX
OL-29044-01 |
7 |
Using the Command-Line Interface
Enabling and Disabling Editing Features
|
Command or Action |
Purpose |
Step 2 |
terminal no editing |
Disables the enhanced editing mode for the current terminal session |
|
|
in the privileged EXEC mode. |
|
Example: |
|
|
Switch# terminal no editing |
|
The keystrokes help you to edit the command lines. These keystrokes are optional.
Note The arrow keys function only on ANSI-compatible terminals such as VT100s.
Table 3: Editing Commands |
|
Editing Commands |
Description |
Ctrl-B or use the left arrow key |
Moves the cursor back one character. |
Ctrl-F or use the right arrow key |
Moves the cursor forward one character. |
Ctrl-A |
Moves the cursor to the beginning of the command |
|
line. |
Ctrl-E |
Moves the cursor to the end of the command line. |
Esc B |
Moves the cursor back one word. |
Esc F |
Moves the cursor forward one word. |
Ctrl-T |
Transposes the character to the left of the cursor with |
|
the character located at the cursor. |
Delete or Backspace key |
Erases the character to the left of the cursor. |
Ctrl-D |
Deletes the character at the cursor. |
Ctrl-K |
Deletes all characters from the cursor to the end of |
|
the command line. |
Ctrl-U or Ctrl-X |
Deletes all characters from the cursor to the beginning |
|
of the command line. |
Ctrl-W |
Deletes the word to the left of the cursor. |
|
Catalyst 2960-X Switch Network Management Configuration Guide, Cisco IOS Release 15.0(2)EX |
8 |
OL-29044-01 |
Using the Command-Line Interface
Enabling and Disabling Editing Features
Esc D |
Deletes from the cursor to the end of the word. |
|
Esc C |
Capitalizes at the cursor. |
|
Esc L |
Changes the word at the cursor to lowercase. |
|
Esc U |
Capitalizes letters from the cursor to the end of the |
|
|
word. |
|
Ctrl-V or Esc Q |
Designates a particular keystroke as an executable |
|
|
command, perhaps as a shortcut. |
|
Return key |
Scrolls down a line or screen on displays that are |
|
|
longer than the terminal screen can display. |
|
|
Note |
The More prompt is used for any output that |
|
|
has more lines than can be displayed on the |
|
|
terminal screen, including show command |
|
|
output. You can use the Return and Space |
|
|
bar keystrokes whenever you see the More |
|
|
prompt. |
Space bar |
Scrolls down one screen. |
|
Ctrl-L or Ctrl-R |
Redisplays the current command line if the switch |
|
|
suddenly sends a message to your screen. |
You can use a wraparound feature for commands that extend beyond a single line on the screen. When the cursor reaches the right margin, the command line shifts ten spaces to the left. You cannot see the first ten characters of the line, but you can scroll back and check the syntax at the beginning of the command. The keystroke actions are optional.
To scroll back to the beginning of the command entry, press Ctrl-B or the left arrow key repeatedly. You can also press Ctrl-A to immediately move to the beginning of the line.
Note The arrow keys function only on ANSI-compatible terminals such as VT100s.
The following example shows how to wrap a command line that extend beyond a single line on the screen.
SUMMARY STEPS
1.access-list
2.Ctrl-A
3.Return key
Catalyst 2960-X Switch Network Management Configuration Guide, Cisco IOS Release 15.0(2)EX
OL-29044-01 |
9 |
Using the Command-Line Interface
DETAILED STEPS
|
Command or Action |
Purpose |
Step 1 |
access-list |
Displays the global configuration command entry that extends beyond |
|
|
one line. |
Example:
Switch(config)# access-list 101 permit tcp
10.15.22.25 255.255.255.0 10.15.22.35
Switch(config)# $ 101 permit tcp
10.15.22.25 255.255.255.0 10.15.22.35 255.25
Switch(config)# $t tcp 10.15.22.25
255.255.255.0 131.108.1.20 255.255.255.0 eq
Switch(config)# $15.22.25 255.255.255.0
10.15.22.35 255.255.255.0 eq 45
When the cursor first reaches the end of the line, the line is shifted ten spaces to the left and redisplayed. The dollar sign ($) shows that the line has been scrolled to the left. Each time the cursor reaches the end of the line, the line is again shifted ten spaces to the left.
Step 2 |
Ctrl-A |
Example:
Switch(config)# access-list 101 permit tcp
10.15.22.25 255.255.255.0 10.15.2$
Checks the complete syntax.
The dollar sign ($) appears at the end of the line to show that the line has been scrolled to the right.
Step 3 |
Return key |
Execute the commands. |
The software assumes that you have a terminal screen that is 80 columns wide. If you have a different width, use the terminal width privileged EXEC command to set the width of your terminal.
Use line wrapping with the command history feature to recall and modify previous complex command entries.
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 that you do not need to see. Using these commands is optional.
SUMMARY STEPS
1. {show | more} command | {begin | include | exclude} regular-expression
DETAILED STEPS
|
Command or Action |
Purpose |
Step 1 |
{show | more} command | {begin | include | exclude} |
Searches and filters the output. |
|
regular-expression |
|
|
Catalyst 2960-X Switch Network Management Configuration Guide, Cisco IOS Release 15.0(2)EX |
10 |
OL-29044-01 |
Using the Command-Line Interface
Command or Action
Example:
Switch# show interfaces | include protocol
Vlan1 is up, line protocol is up Vlan10 is up, line protocol is down
GigabitEthernet1/0/1 is up, line protocol is down GigabitEthernet1/0/2 is up, line protocol is up
Purpose
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.
Accessing the CLI through a Console Connection or through Telnet
Before you can access the CLI, you must connect a terminal or a PC to the switch console or connect a PC to the Ethernet management port and then power on the switch, as described in the hardware installation guide that shipped with your switch.
If your switch is already configured, you can access the CLI through a local console connection or through a remote Telnet session, but your switch must first be configured for this type of access.
You can use one of these methods to establish a connection with the switch:
•Connect the switch console port to a management station or dial-up modem, or connect the Ethernet management port to a PC. For information about connecting to the console or Ethernet management port, see the switch hardware installation guide.
•Use 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.
•The switch supports up to 16 simultaneous Telnet sessions. Changes made by one Telnet user are reflected in all other Telnet sessions.
•The switch supports up to five simultaneous secure SSH sessions.
After you connect through the console port, through the Ethernet management port, through a Telnet session or through an SSH session, the user EXEC prompt appears on the management station.
Catalyst 2960-X Switch Network Management Configuration Guide, Cisco IOS Release 15.0(2)EX
OL-29044-01 |
11 |
Using the Command-Line Interface
Accessing the CLI through a Console Connection or through Telnet
|
Catalyst 2960-X Switch Network Management Configuration Guide, Cisco IOS Release 15.0(2)EX |
12 |
OL-29044-01 |
C H A P T E R 2
This chapter describes how to configure the Cisco IOS Configuration Engine.
• Finding Feature Information, page 13
• Prerequisites for Configuring the Configuration Engine, page 13
• Restrictions for Configuring the Configuration Engine, page 14
• Information About Configuring the Configuration Engine, page 14
• How to Configure the Configuration Engine, page 20
• Monitoring CNS Configurations, page 31
• Additional References, page 32
• Feature History and Information for the Configuration Engine, page 32
Your software release may not support all the features documented in this module. For the latest feature information and caveats, see the release notes for your platform and software release.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required.
•Obtain the name of the configuration engine instance to which you are connecting.
•Because the CNS uses both the event bus and the configuration server to provide configurations to devices, you must define both ConfigID and Device ID for each configured switch.
•All switches configured with the cns config partial global configuration command must access the event bus. The DeviceID, as originated on the switch, must match the DeviceID of the corresponding switch definition in the Cisco Configuration Engine. You must know the hostname of the event bus to which you are connecting.
Catalyst 2960-X Switch Network Management Configuration Guide, Cisco IOS Release 15.0(2)EX
OL-29044-01 |
13 |
Configuring Cisco IOS Configuration Engine
Related Topics
Cisco Networking Services IDs and Device Hostnames, on page 16
DeviceID, on page 17
Restrictions for Configuring the Configuration Engine
•Within the scope of a single instance of the configuration server, no two configured switches can share the same value for ConfigID.
•Within the scope of a single instance of the event bus, no two configured switches can share the same value for DeviceID.
Related Topics
Cisco Networking Services IDs and Device Hostnames, on page 16
The Cisco Configuration Engine is network management utility software that acts as a configuration service for automating the deployment and management of network devices and services. Each Cisco Configuration Engine manages a group of Cisco devices (switches and routers) and the services that they deliver, storing their configurations and delivering them as needed. The Cisco Configuration Engine automates initial configurations and configuration updates by generating device-specific configuration changes, sending them to the device, executing the configuration change, and logging the results.
The Cisco Configuration Engine supports standalone and server modes and has these Cisco Networking Services (CNS) components:
•Configuration service:
◦Web server
◦File manager
◦Namespace mapping server
•Event service (event gateway)
•Data service directory (data models and schema)
|
Catalyst 2960-X Switch Network Management Configuration Guide, Cisco IOS Release 15.0(2)EX |
14 |
OL-29044-01 |
Configuring Cisco IOS Configuration Engine
In standalone mode, the Cisco Configuration Engine supports an embedded directory service. In this mode, no external directory or other data store is required. In server mode, the Cisco Configuration Engine supports the use of a user-defined external directory.
Figure 1: Cisco Configuration Engine Architectural Overview
Configuration Service
The Configuration Service is the core component of the Cisco Configuration Engine. It consists of a Configuration Server that works with Cisco IOS CNS agents on the switch. The Configuration Service delivers device and service configurations to the switch for initial configuration and mass reconfiguration by logical groups. Switches receive their initial configuration from the Configuration Service when they start up on the network for the first time.
The Configuration Service uses the CNS Event Service to send and receive configuration change events and to send success and failure notifications.
The Configuration Server is a web server that uses configuration templates and the device-specific configuration information stored in the embedded (standalone mode) or remote (server mode) directory.
Configuration templates are text files containing static configuration information in the form of CLI commands. In the templates, variables are specified by using Lightweight Directory Access Protocol (LDAP) URLs that reference the device-specific configuration information stored in a directory.
The Cisco IOS agent can perform a syntax check on received configuration files and publish events to show the success or failure of the syntax check. The configuration agent can either apply configurations immediately or delay the application until receipt of a synchronization event from the configuration server.
Catalyst 2960-X Switch Network Management Configuration Guide, Cisco IOS Release 15.0(2)EX
OL-29044-01 |
15 |
Configuring Cisco IOS Configuration Engine
Event Service
The Cisco Configuration Engine uses the Event Service for receipt and generation of configuration events. The Event Service consists of an event agent and an event gateway. The event agent is on the switch and facilitates the communication between the switch and the event gateway on the Cisco Configuration Engine.
The Event Service is a highly capable publish-and-subscribe communication method. The Event Service uses subject-based addressing to send messages to their destinations. Subject-based addressing conventions define a simple, uniform namespace for messages and their destinations.
Related Topics
Enabling the CNS Event Agent, on page 20
The Cisco Configuration Engine includes the NameSpace Mapper (NSM) that provides a lookup service for managing logical groups of devices based on application, device or group ID, and event.
Cisco IOS devices recognize only event subject-names that match those configured in Cisco IOS software; for example, cisco.cns.config.load. You can use the namespace mapping service to designate events by using any desired naming convention. When you have populated your data store with your subject names, NSM changes your event subject-name strings to those known by Cisco IOS.
For a subscriber, when given a unique device ID and event, the namespace mapping service returns a set of events to which to subscribe. Similarly, for a publisher, when given a unique group ID, device ID, and event, the mapping service returns a set of events on which to publish.
The Cisco Configuration Engine assumes that a unique identifier is associated with each configured switch. This unique identifier can take on multiple synonyms, where each synonym is unique within a particular namespace. The event service uses namespace content for subject-based addressing of messages.
The Cisco Configuration Engine intersects two namespaces, one for the event bus and the other for the configuration server. Within the scope of the configuration server namespace, the term ConfigID is the unique identifier for a device. Within the scope of the event bus namespace, the term DeviceID is the CNS unique identifier for a device.
Related Topics
Prerequisites for Configuring the Configuration Engine, on page 13
Restrictions for Configuring the Configuration Engine, on page 14
Each configured switch has a unique ConfigID, which serves as the key into the Cisco Configuration Engine directory for the corresponding set of switch CLI attributes. The ConfigID defined on the switch must match the ConfigID for the corresponding switch definition on the Cisco Configuration Engine.
|
Catalyst 2960-X Switch Network Management Configuration Guide, Cisco IOS Release 15.0(2)EX |
16 |
OL-29044-01 |
Configuring Cisco IOS Configuration Engine
Cisco Networking Services IDs and Device Hostnames
The ConfigID is fixed at startup time and cannot be changed until the device restarts, even if the switch hostname is reconfigured.
Each configured switch participating on the event bus has a unique DeviceID, which is analogous to the switch source address so that the switch can be targeted as a specific destination on the bus.
The origin of the DeviceID is defined by the Cisco IOS hostname of the switch. However, the DeviceID variable and its usage reside within the event gateway adjacent to the switch.
The logical Cisco IOS termination point on the event bus is embedded in the event gateway, which in turn functions as a proxy on behalf of the switch. The event gateway represents the switch and its corresponding DeviceID to the event bus.
The switch declares its hostname to the event gateway immediately after the successful connection to the event gateway. The event gateway couples the DeviceID value to the Cisco IOS hostname each time this connection is established. The event gateway retains this DeviceID value for the duration of its connection to the switch.
Related Topics
Prerequisites for Configuring the Configuration Engine, on page 13
The DeviceID is fixed at the time of the connection to the event gateway and does not change even when the switch hostname is reconfigured.
When changing the switch hostname on the switch, the only way to refresh the DeviceID is to break the connection between the switch and the event gateway. For instructions on refreshing DeviceIDs, see "Related Topics."
When the connection is reestablished, the switch sends its modified hostname to the event gateway. The event gateway redefines the DeviceID to the new value.
Caution When using the Cisco Configuration Engine user interface, you must first set the DeviceID field to the hostname value that the switch acquires after, not before, and you must reinitialize the configuration for your Cisco IOS CNS agent. Otherwise, subsequent partial configuration command operations may malfunction.
Related Topics
Refreshing DeviceIDs, on page 28
In standalone mode, when a hostname value is set for a switch, the configuration server uses the hostname as the DeviceID when an event is sent on hostname. If the hostname has not been set, the event is sent on the cn=<value> of the device.
Catalyst 2960-X Switch Network Management Configuration Guide, Cisco IOS Release 15.0(2)EX
OL-29044-01 |
17 |
Configuring Cisco IOS Configuration Engine
In server mode, the hostname is not used. In this mode, the unique DeviceID attribute is always used for sending an event on the bus. If this attribute is not set, you cannot update the switch.
These and other associated attributes (tag value pairs) are set when you run Setup on the Cisco Configuration Engine.
Cisco IOS CNS Agents
The CNS event agent feature allows the switch to publish and subscribe to events on the event bus and works with the Cisco IOS CNS agent. These agents, embedded in the switch Cisco IOS software, allow the switch to be connected and automatically configured.
When the switch first comes up, it attempts to get an IP address by broadcasting a Dynamic Host Configuration Protocol (DHCP) request on the network. Assuming there is no DHCP server on the subnet, the distribution switch acts as a DHCP relay agent and forwards the request to the DHCP server. Upon receiving the request, the DHCP server assigns an IP address to the new switch and includes the Trivial File Transfer Protocol (TFTP) server Internet Protocol (IP) address, the path to the bootstrap configuration file, and the default gateway IP address in a unicast reply to the DHCP relay agent. The DHCP relay agent forwards the reply to the switch.
The switch automatically configures the assigned IP address on interface VLAN 1 (the default) and downloads the bootstrap configuration file from the TFTP server. Upon successful download of the bootstrap configuration file, the switch loads the file in its running configuration.
The Cisco IOS CNS agents initiate communication with the Configuration Engine by using the appropriate ConfigID and EventID. The Configuration Engine maps the Config ID to a template and downloads the full configuration file to the switch.
The following figure shows a sample network configuration for retrieving the initial bootstrap configuration file by using DHCP-based autoconfiguration.
Figure 2: Initial Configuration
Related Topics
Automated CNS Configuration, on page 19
|
Catalyst 2960-X Switch Network Management Configuration Guide, Cisco IOS Release 15.0(2)EX |
18 |
OL-29044-01 |