Cisco Systems Cat2960-Xr User Manual

Catalyst 2960-XR Switch VLAN Configuration Guide, Cisco IOS Release
15.0(2)EX1
First Published: August 08, 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-29440-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 SOFTWAREOF 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)
©
2013 Cisco Systems, Inc. All rights reserved.

CONTENTS

Preface
CHAPTER 1
Preface xi
Document Conventions xi
Related Documentation xiii
Obtaining Documentation and Submitting a Service Request xiii
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
CHAPTER 2
Configuring VTP 13
Finding Feature Information 13
Prerequisites for VTP 13
Catalyst 2960-XR Switch VLAN Configuration Guide, Cisco IOS Release 15.0(2)EX1
OL-29440-01 iii
Contents
Information About VTP 14
VTP 14
VTP Domain 14
VTP Modes 15
VTP Advertisements 16
VTP Version 2 17
VTP Version 3 17
VTP Pruning 18
VTP and Switch Stacks 20
VTP Configuration Guidelines 20
Configuration Requirements 20
VTP Settings 20
Domain Names for Configuring VTP 21
Passwords for the VTP Domain 21
VTP Version 22
Default VTP Configuration 23
How to Configure VTP 24
Configuring VTP Mode 24
Configuring a VTP Version 3 Password 26
Configuring a VTP Version 3 Primary Server 27
Enabling the VTP Version 28
Enabling VTP Pruning 29
Configuring VTP on a Per-Port Basis 31
Adding a VTP Client Switch to a VTP Domain 32
Monitoring VTP 34
Configuration Examples for VTP 35
Example: Configuring the Switch as a VTP Server 35
Example: Configuring a Hidden Password 35
Example: Configuring a VTP Version 3 Primary Server 35
Example: Configuring VTP on a Per-Port Basis 36
Where to Go Next 36
Additional References 36
Feature History and Information for VTP 37
CHAPTER 3
Catalyst 2960-XR Switch VLAN Configuration Guide, Cisco IOS Release 15.0(2)EX1
iv OL-29440-01
Configuring VLANs 39
Contents
Finding Feature Information 39
Prerequisites for VLANs 39
Restrictions for VLANs 40
Information About VLANs 40
Logical Networks 40
Supported VLANs 41
VLAN Port Membership Modes 41
Normal-Range VLAN Overview 42
Token Ring VLANs 43
Normal-Range VLANs Configuration Process 43
VLAN Configuration Saving Process 43
Normal-Range VLAN Configuration Guidelines 44
Extended-Range VLAN Configuration Guidelines 45
Default Ethernet VLAN Configuration 46
Default VLAN Configuration 46
How to Configure VLANs 47
How to Configure Normal-Range VLANs 47
Creating or Modifying an Ethernet VLAN 47
Deleting a VLAN 49
Assigning Static-Access Ports to a VLAN 50
How to Configure Extended-Range VLANs 52
Creating an Extended-Range VLAN 52
Creating an Extended-Range VLAN with an Internal VLAN ID 54
Monitoring VLANs 56
Configuration Examples 57
Example: Creating a VLAN Name 57
Example: Configuring a Port as Access Port 57
Example: Creating an Extended-Range VLAN 57
Where to Go Next 58
Additional References 58
Feature History and Information for VLAN 59
CHAPTER 4
Configuring VLAN Trunks 61
Finding Feature Information 61
Prerequisites for VLAN Trunks 61
Catalyst 2960-XR Switch VLAN Configuration Guide, Cisco IOS Release 15.0(2)EX1
OL-29440-01 v
Contents
Restrictions for VLAN Trunks 62
Information About VLAN Trunks 62
Trunking Overview 62
Trunking Modes 62
Layer 2 Interface Modes 63
Allowed VLANs on a Trunk 64
Load Sharing on Trunk Ports 64
Network Load Sharing Using STP Priorities 64
Network Load Sharing Using STP Path Cost 65
Feature Interactions 66
Default Layer 2 Ethernet Interface VLAN Configuration 66
How to Configure VLAN Trunks 67
Configuring an Ethernet Interface as a Trunk Port 67
CHAPTER 5
Configuring a Trunk Port 67
Defining the Allowed VLANs on a Trunk 69
Changing the Pruning-Eligible List 71
Configuring the Native VLAN for Untagged Traffic 72
Configuring Trunk Ports for Load Sharing 73
Configuring Load Sharing Using STP Port Priorities 73
Configuring Load Sharing Using STP Path Cost 77
Configuration Examples for VLAN Trunking 80
Example: Configuring an IEEE 802.1Q Trunk 80
Example: Removing a VLAN 81
Where to Go Next 81
Additional References 81
Feature History and Information for VLAN Trunks 82
Configuring Private VLANs 83
Finding Feature Information 83
Prerequisites for Private VLANs 83
Secondary and Primary VLAN Configuration 84
Private VLAN Port Configuration 85
Restrictions for Private VLANs 86
Limitations with Other Features 86
Information About Private VLANs 87
Catalyst 2960-XR Switch VLAN Configuration Guide, Cisco IOS Release 15.0(2)EX1
vi OL-29440-01
Contents
Private VLAN Domains 87
Secondary VLANs 88
Private VLANs Ports 88
Private VLANs in Networks 89
IP Addressing Scheme with Private VLANs 90
Private VLANs Across Multiple Switches 90
Private VLAN Interaction with Other Features 91
Private VLANs and Unicast, Broadcast, and Multicast Traffic 91
Private VLANs and SVIs 92
Private VLANs and Switch Stacks 92
Private VLAN Configuration Tasks 92
Default Private VLAN Configuration 93
How to Configure Private VLANs 93
Configuring and Associating VLANs in a Private VLAN 93
Configuring a Layer 2 Interface as a Private VLAN Host Port 96
Configuring a Layer 2 Interface as a Private VLAN Promiscuous Port 98
Mapping Secondary VLANs to a Primary VLAN Layer 3 VLAN Interface 99
Monitoring Private VLANs 101
Configuration Examples for Private VLANs 102
Example: Configuring a Primary VLAN, Isolated VLAN, and a Community of VLANs 102
Example: Configuring an Interface as a Host Port 102
Example: Configuring an Interface as a Private VLAN Promiscuous Port 103
Example: Mapping Secondary VLANs to a Primary VLAN Interface 103
Example: Monitoring Private VLANs 104
Where to Go Next 104
Additional References 104
Feature History and Information for Private VLANs 105
CHAPTER 6
Configuring VMPS 107
Finding Feature Information 107
Prerequisites for VMPS 107
Restrictions for VMPS 108
Information About VMPS 108
Dynamic VLAN Assignments 108
Dynamic-Access Port VLAN Membership 109
Catalyst 2960-XR Switch VLAN Configuration Guide, Cisco IOS Release 15.0(2)EX1
OL-29440-01 vii
Contents
Default VMPS Client Configuration 110
How to Configure VMPS 110
Entering the IP Address of the VMPS 110
Configuring Dynamic-Access Ports on VMPS Clients 111
Reconfirming VLAN Memberships 113
Changing the Reconfirmation Interval 114
Changing the Retry Count 115
Troubleshooting Dynamic-Access Port VLAN Membership 116
Monitoring the VMPS 117
Configuration Example for VMPS 117
Example: VMPS Configuration 117
Where to Go Next 118
Additional References 119
CHAPTER 7
Feature History and Information for VMPS 120
Configuring IEEE 802.1Q and Layer 2 Protocol Tunneling 121
Finding Feature Information 121
Prerequisites for Configuring Tunneling 121
IEEE 802.1Q Tunneling and Incompatibilities 122
Layer 2 Protocol Tunneling 122
Layer 2 Tunneling for EtherChannels 124
Information about Tunneling 124
IEEE 802.1Q and Layer 2 Protocol Overview 124
IEEE 802.1Q Tunneling 124
IEEE 802.1Q Tunneling Configuration Guidelines 127
Native VLANs 127
System MTU 128
Default IEEE 802.1Q Tunneling Configuration 129
Layer 2 Protocol Tunneling Overview 129
Layer 2 Protocol Tunneling on Ports 131
Default Layer 2 Protocol Tunneling Configuration 132
How to Configure Tunneling 133
Configuring an IEEE 802.1Q Tunneling Port 133
Configuring Layer 2 Protocol Tunneling 135
Configuring the SP Edge Switch 138
Catalyst 2960-XR Switch VLAN Configuration Guide, Cisco IOS Release 15.0(2)EX1
viii OL-29440-01
Contents
Configuring the Customer Switch 141
Configuration Examples for IEEE 802.1Q and Layer 2 Protocol Tunneling 143
Example: Configuring an IEEE 802.1Q Tunneling Port 143
Example: Configuring Layer 2 Protocol Tunneling 144
Examples: Configuring the SP Edge and Customer Switches 145
Monitoring Tunneling Status 146
Where to Go Next 147
Additional References 147
Feature History and Information for Tunneling 148
CHAPTER 8
Configuring Voice VLANs 149
Finding Feature Information 149
Prerequisites for Voice VLANs 149
Restrictions for Voice VLANs 150
Information About Voice VLAN 150
Voice VLANs 150
Cisco IP Phone Voice Traffic 151
Cisco IP Phone Data Traffic 151
Voice VLAN Configuration Guidelines 152
Default Voice VLAN Configuration 153
How to Configure Voice VLAN 153
Configuring Cisco IP Phone Voice Traffic 153
Configuring the Priority of Incoming Data Frames 155
Monitoring Voice VLAN 157
Configuration Examples for Voice VLANs 157
Example: Configuring Cisco IP Phone Voice Traffic 157
Example: Configuring a Port Connected to an IP Phone Not to Change Frame Priority 158
Where to Go Next 158
Additional References 159
Feature History and Information for Voice VLAN 160
Catalyst 2960-XR Switch VLAN Configuration Guide, Cisco IOS Release 15.0(2)EX1
OL-29440-01 ix
Contents
Catalyst 2960-XR Switch VLAN Configuration Guide, Cisco IOS Release 15.0(2)EX1
x OL-29440-01

Preface

This guide describes configuration information and examples for VLANs on the switch.
Document Conventions, page xi
Related Documentation, page xiii
Obtaining Documentation and Submitting a Service Request, page xiii

Document Conventions

This document uses the following conventions:
DescriptionConvention
^ or Ctrl
Italic font
Courier font
...
|
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.)
Commands and keywords and user-entered text appear in bold font.bold font
Document titles, new or emphasized terms, and arguments for which you supply values are in italic font.
Terminal sessions and information the system displays appear in courier font.
Bold Courier font indicates text that the user must enter.Bold Courier font
Elements in square brackets are optional.[x]
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-XR Switch VLAN Configuration Guide, Cisco IOS Release 15.0(2)EX1
OL-29440-01 xi
Document Conventions
Preface
DescriptionConvention
[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
Tip
Caution
Timesaver
Warning
Means reader take note. Notes contain helpful suggestions or references to material not covered in the manual.
Means the following information will help you solve a problem.
Means reader be careful. In this situation, you might do something that could result in equipment damage or loss of data.
Means the described action saves time. You can save time by performing the action described in the paragraph.
Means reader be warned. In this situation, you might perform an action that could result in bodily injury.
Catalyst 2960-XR Switch VLAN Configuration Guide, Cisco IOS Release 15.0(2)EX1
xii OL-29440-01
Preface

Related Documentation

Before installing or upgrading the switch, refer to the switch release notes.Note
Catalyst 2960-XR Switch documentation, located at:
http://www.cisco.com/go/cat2960xr_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
Related Documentation

Obtaining Documentation and Submitting a Service Request

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-XR Switch VLAN Configuration Guide, Cisco IOS Release 15.0(2)EX1
OL-29440-01 xiii
Obtaining Documentation and Submitting a Service Request
Preface
Catalyst 2960-XR Switch VLAN Configuration Guide, Cisco IOS Release 15.0(2)EX1
xiv OL-29440-01
CHAPTER 1

Using the Command-Line Interface

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

Information About Using the Command-Line Interface

This section describes the Cisco IOS command-line interface (CLI) and how to use it to configure your switch.

Command Modes

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-XR Switch VLAN Configuration Guide, Cisco IOS Release 15.0(2)EX1
OL-29440-01 1
Command Modes
Using the Command-Line Interface
Table 1: Command Mode Summary
About This ModeExit MethodPromptAccess MethodMode
User EXEC
Privileged EXEC
Global configuration
Begin a session using Telnet, SSH, or console.
While in user EXEC mode, enter the enable command.
While in privileged EXEC mode, enter the configure command.
Switch>
Switch#
Switch(config)#
Enter logout or quit.
Enter disable to exit.
To exit to privileged EXEC mode, enter
exit or end, or press Ctrl-Z.
Use this mode to
Change
terminal settings.
Perform basic
tests.
Display
system information.
Use this mode to verify commands that you have entered. Use a password to protect access to this mode.
Use this mode to configure parameters that apply to the entire switch.
VLAN configuration
Interface configuration
While in global configuration mode, enter the vlan vlan-id command.
While in global configuration mode, enter the interface command (with a specific interface).
Switch(config-vlan)#
Switch(config-if)#
To exit to global configuration mode, enter the exit command.
To return to privileged EXEC mode, press Ctrl-Z or enter end.
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 VLAN parameters. When VTP mode is transparent, you can create extended-range VLANs (VLAN IDs greater than 1005) and save configurations in the switch startup configuration file.
Use this mode to configure parameters for the Ethernet ports.
Catalyst 2960-XR Switch VLAN Configuration Guide, Cisco IOS Release 15.0(2)EX1
2 OL-29440-01
Using the Command-Line Interface

Using the Help System

About This ModeExit MethodPromptAccess MethodMode
Line configuration Use this mode to
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
help
1.
abbreviated-command-entry ?
2.
abbreviated-command-entry <Tab>
3.
?
4.
command ?
5.
command keyword ?
6.
While in global configuration mode, specify a line with the line vty or line console command.
Switch(config-line)#
To exit to global configuration mode, enter exit.
To return to privileged EXEC mode, press Ctrl-Z or enter end.
configure parameters for the terminal line.
DETAILED STEPS
Step 1
Step 2
Step 3
help
Example:
Switch# help
abbreviated-command-entry ?
Example:
Switch# di? dir disable disconnect
abbreviated-command-entry <Tab>
Example:
Switch# sh conf<tab> Switch# show configuration
PurposeCommand or Action
Obtains a brief description of the help system in any command mode.
Obtains a list of commands that begin with a particular character string.
Completes a partial command name.
Catalyst 2960-XR Switch VLAN Configuration Guide, Cisco IOS Release 15.0(2)EX1
OL-29440-01 3

Understanding Abbreviated Commands

Using the Command-Line Interface
PurposeCommand or Action
Step 4
Step 5
Step 6
?
Example:
Switch> ?
command ?
Example:
Switch> show ?
command 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:
Lists all commands available for a particular command mode.
Lists the associated keywords for a command.
Lists the associated arguments for a keyword.
Switch# show conf

No and default Forms of Commands

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.

CLI Error Messages

This table lists some error messages that you might encounter while using the CLI to configure your switch.
Catalyst 2960-XR Switch VLAN Configuration Guide, Cisco IOS Release 15.0(2)EX1
4 OL-29440-01
Using the Command-Line Interface
Table 2: Common CLI Error Messages
% Ambiguous command: "show con"
You did not enter enough characters for your switch to recognize the command.

Configuration Logging

How to Get HelpMeaningError Message
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.
% Incomplete command.
% Invalid input detected at ^marker.
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.
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.
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.
Only CLI or HTTP changes are logged.Note

How to Use the CLI to Configure Features

Configuring the Command History

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-XR Switch VLAN Configuration Guide, Cisco IOS Release 15.0(2)EX1
OL-29440-01 5
Configuring the Command History
Changing the Command History Buffer Size
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
terminal history [size number-of-lines]
1.
DETAILED STEPS
Using the Command-Line Interface
PurposeCommand or Action
Step 1
terminal history [size number-of-lines]
Example:
Switch# terminal history size 200
Recalling Commands
SUMMARY STEPS
DETAILED STEPS
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.
The arrow keys function only on ANSI-compatible terminals such as VT100s.Note
Ctrl-P or use the up arrow key
1.
Ctrl-N or use the down arrow key
2.
show history
3.
PurposeCommand or Action
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-XR Switch VLAN Configuration Guide, Cisco IOS Release 15.0(2)EX1
6 OL-29440-01
Using the Command-Line Interface

Enabling and Disabling Editing Features

PurposeCommand or Action
Step 3
show history
Example:
Switch# show history
Disabling the Command History Feature
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
terminal no history
1.
DETAILED STEPS
Step 1
terminal no history
Example:
Switch# terminal no history
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 command.
PurposeCommand or Action
Disables the feature during the current terminal session in the privileged EXEC mode.
Enabling and Disabling Editing Features
Although enhanced editing mode is automatically enabled, you can disable it, and reenable it.
SUMMARY STEPS
terminal editing
1.
terminal no editing
2.
DETAILED STEPS
PurposeCommand or Action
Step 1
OL-29440-01 7
terminal editing
Example:
Switch# terminal editing
Catalyst 2960-XR Switch VLAN Configuration Guide, Cisco IOS Release 15.0(2)EX1
Reenables the enhanced editing mode for the current terminal session in the privileged EXEC mode.
Enabling and Disabling Editing Features
Using the Command-Line Interface
PurposeCommand or Action
Step 2
terminal no editing
Example:
Switch# terminal no editing
Editing Commands through Keystrokes
The keystrokes help you to edit the command lines. These keystrokes are optional.
The arrow keys function only on ANSI-compatible terminals such as VT100s.Note
Table 3: Editing Commands
Ctrl-A
Disables the enhanced editing mode for the current terminal session in the privileged EXEC mode.
DescriptionEditing Commands
Moves the cursor back one character.Ctrl-B or use the left arrow key
Moves the cursor forward one character.Ctrl-F or use the right arrow key
Moves the cursor to the beginning of the command line.
Ctrl-T
Ctrl-K
Ctrl-U or Ctrl-X
Moves the cursor to the end of the command line.Ctrl-E
Moves the cursor back one word.Esc B
Moves the cursor forward one word.Esc F
Transposes the character to the left of the cursor with the character located at the cursor.
Erases the character to the left of the cursor.Delete or Backspace key
Deletes the character at the cursor.Ctrl-D
Deletes all characters from the cursor to the end of the command line.
Deletes all characters from the cursor to the beginning of the command line.
Deletes the word to the left of the cursor.Ctrl-W
Catalyst 2960-XR Switch VLAN Configuration Guide, Cisco IOS Release 15.0(2)EX1
8 OL-29440-01
Using the Command-Line Interface
Enabling and Disabling Editing Features
Deletes from the cursor to the end of the word.Esc D
Capitalizes at the cursor.Esc C
Changes the word at the cursor to lowercase.Esc L
Esc U
Ctrl-V or Esc Q
Return key
Ctrl-L or Ctrl-R
Editing Command Lines That Wrap
Capitalizes letters from the cursor to the end of the word.
Designates a particular keystroke as an executable command, perhaps as a shortcut.
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.
Scrolls down one screen.Space bar
Redisplays the current command line if the switch suddenly sends a message to your screen.
SUMMARY STEPS
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.
The arrow keys function only on ANSI-compatible terminals such as VT100s.Note
The following example shows how to wrap a command line that extend beyond a single line on the screen.
access-list
1.
Ctrl-A
2.
Return key
3.
Catalyst 2960-XR Switch VLAN Configuration Guide, Cisco IOS Release 15.0(2)EX1
OL-29440-01 9

Searching and Filtering Output of show and more Commands

DETAILED STEPS
Using the Command-Line Interface
PurposeCommand or Action
Step 1
Step 2
Step 3
access-list
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
Example:
Switch(config)# access-list 101 permit tcp
10.15.22.25 255.255.255.0 10.15.2$
Displays the global configuration command entry that extends beyond one line.
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.
Checks the complete syntax.Ctrl-A
The dollar sign ($) appears at the end of the line to show that the line has been scrolled to the right.
Execute the commands.Return key
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
{show | more} command | {begin | include | exclude} regular-expression
1.
DETAILED STEPS
PurposeCommand or Action
Step 1
{show | more} command | {begin | include | exclude} regular-expression
Catalyst 2960-XR Switch VLAN Configuration Guide, Cisco IOS Release 15.0(2)EX1
10 OL-29440-01
Searches and filters the output.
Using the Command-Line Interface

Accessing the CLI through a Console Connection or through Telnet

PurposeCommand or Action
Expressions are case sensitive. For example, if you enter
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
| 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-XR Switch VLAN Configuration Guide, Cisco IOS Release 15.0(2)EX1
OL-29440-01 11
Accessing the CLI through a Console Connection or through Telnet
Using the Command-Line Interface
Catalyst 2960-XR Switch VLAN Configuration Guide, Cisco IOS Release 15.0(2)EX1
12 OL-29440-01

Configuring VTP

Finding Feature Information, page 13
Prerequisites for VTP, page 13
Information About VTP, page 14
Default VTP Configuration, page 23
How to Configure VTP, page 24
Monitoring VTP, page 34
Configuration Examples for VTP, page 35
Where to Go Next, page 36
Additional References, page 36
Feature History and Information for VTP, page 37
CHAPTER 2

Finding Feature Information

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.

Prerequisites for VTP

The following are prerequisites for VTP:
Before you create VLANs, you must decide whether to use the VLAN Trunking Protocol (VTP) in your
network. Using VTP, you can make configuration changes centrally on one or more switches and have those changes automatically communicated to all the other switches in the network. Without VTP, you cannot send information about VLANs to other switches. VTP is designed to work in an environment where updates are made on a single switch and are sent through VTP to other switches in the domain.
Catalyst 2960-XR Switch VLAN Configuration Guide, Cisco IOS Release 15.0(2)EX1
OL-29440-01 13

Information About VTP

It does not work well in a situation where multiple updates to the VLAN database occur simultaneously on switches in the same domain, which would result in an inconsistency in the VLAN database.
The switch supports 1005 VLANs when running the IP Lite image.
However, the number of routed ports, SVIs, and other configured features affects the usage of the switch
hardware. If the switch is notified by VTP of a new VLAN and the switch is already using the maximum available hardware resources, it sends a message that there are not enough hardware resources available and shuts down the VLAN. The output of the show vlan user EXEC command shows the VLAN in a suspended state.
Information About VTP
VTP
VTP is a Layer 2 messaging protocol that maintains VLAN configuration consistency by managing the addition, deletion, and renaming of VLANs on a network-wide basis. VTP minimizes misconfigurations and configuration inconsistencies that can cause several problems, such as duplicate VLAN names, incorrect VLAN-type specifications, and security violations.
VTP functionality is supported across the stack, and all switches in the stack maintain the same VLAN and VTP configuration inherited from the active switch. When a switch learns of a new VLAN through VTP messages or when a new VLAN is configured by the user, the new VLAN information is communicated to all switches in the stack.
When a switch joins the stack or when stacks merge, the new switches get VTP information from the active switch.
VTP version 1 and version 2 support only normal-range VLANs (VLAN IDs 1 to 1005). VTP version 3 supports the entire VLAN range (VLANs 1 to 4094). Extended range VLANs (VLANs 1006 to 4094) are supported only in VTP version 3. You cannot convert from VTP version 3 to VTP version 2 if extended VLANs are configured in the domain.
Configuring VTP

VTP Domain

A VTP domain (also called a VLAN management domain) consists of one switch or several interconnected switches or switch stacks under the same administrative responsibility sharing the same VTP domain name. A switch can be in only one VTP domain. You make global VLAN configuration changes for the domain.
By default, the switch is in the VTP no-management-domain state until it receives an advertisement for a domain over a trunk link (a link that carries the traffic of multiple VLANs) or until you configure a domain name. Until the management domain name is specified or learned, you cannot create or modify VLANs on a VTP server, and VLAN information is not propagated over the network.
If the switch receives a VTP advertisement over a trunk link, it inherits the management domain name and the VTP configuration revision number. The switch then ignores advertisements with a different domain name or an earlier configuration revision number.
Catalyst 2960-XR Switch VLAN Configuration Guide, Cisco IOS Release 15.0(2)EX1
14 OL-29440-01
Configuring VTP

VTP Modes

Note
VTP Modes
Before adding a VTP client switch to a VTP domain, always verify that its VTP configuration revision number is lower than the configuration revision number of the other switches in the VTP domain. Switches in a VTP domain always use the VLAN configuration of the switch with the highest VTP configuration revision number. If you add a switch that has a revision number higher than the revision number in the VTP domain, it can erase all VLAN information from the VTP server and VTP domain.
When you make a change to the VLAN configuration on a VTP server, the change is propagated to all switches in the VTP domain. VTP advertisements are sent over all IEEE trunk connections, including IEEE 802.1Q. VTP dynamically maps VLANs with unique names and internal index associates across multiple LAN types. Mapping eliminates excessive device administration required from network administrators.
If you configure a switch for VTP transparent mode, you can create and modify VLANs, but the changes are not sent to other switches in the domain, and they affect only the individual switch. However, configuration changes made when the switch is in this mode are saved in the switch running configuration and can be saved to the switch startup configuration file.
Related Topics
Adding a VTP Client Switch to a VTP Domain, on page 32
Table 4: VTP Modes
VTP server
VTP client
DescriptionVTP Mode
In VTP server mode, you can create, modify, and delete VLANs, and specify other configuration parameters (such as the VTP version) for the entire VTP domain. VTP servers advertise their VLAN configurations to other switches in the same VTP domain and synchronize their VLAN configurations with other switches based on advertisements received over trunk links.
VTP server is the default mode.
In VTP server mode, VLAN configurations are saved in NVRAM. If the switch detects a failure while writing a configuration to NVRAM, VTP mode automatically changes from server mode to client mode. If this happens, the switch cannot be returned to VTP server mode until the NVRAM is functioning.
A VTP client functions like a VTP server and transmits and receives VTP updates on its trunks, but you cannot create, change, or delete VLANs on a VTP client. VLANs are configured on another switch in the domain that is in server mode.
In VTP versions 1 and 2 in VTP client mode, VLAN configurations are not saved in NVRAM. In VTP version 3, VLAN configurations are saved in NVRAM in client mode.
Catalyst 2960-XR Switch VLAN Configuration Guide, Cisco IOS Release 15.0(2)EX1
OL-29440-01 15

VTP Advertisements

Configuring VTP
DescriptionVTP Mode
VTP transparent
VTP off
VTP transparent switches do not participate in VTP. A VTP transparent switch does not advertise its VLAN configuration and does not synchronize its VLAN configuration based on received advertisements. However, in VTP version 2 or version 3, transparent switches do forward VTP advertisements that they receive from other switches through their trunk interfaces. You can create, modify, and delete VLANs on a switch in VTP transparent mode.
In VTP versions 1 and 2, the switch must be in VTP transparent mode when you create extended-range VLANs. VTP version 3 also supports creating extended-range VLANs in client or server mode.
In VTP versions 1 and 2, the switch must be in VTP transparent mode when you create private VLANs and when they are configured, you should not change the VTP mode from transparent to client or server mode. VTP version 3 also supports private VLANs in client and server modes. When private VLANs are configured, do not change the VTP mode from transparent to client or server mode.
When the switch is in VTP transparent mode, the VTP and VLAN configurations are saved in NVRAM, but they are not advertised to other switches. In this mode, VTP mode and domain name are saved in the switch running configuration, and you can save this information in the switch startup configuration file by using the copy running-config startup-config privileged EXEC command.
In a switch stack, the running configuration and the saved configuration are the same for all switches in a stack.
A switch in VTP off mode functions in the same manner as a VTP transparent switch, except that it does not forward VTP advertisements on trunks.
Related Topics
Configuring VTP Mode, on page 24
Example: Configuring the Switch as a VTP Server, on page 35
VTP Advertisements
Each switch in the VTP domain sends periodic global configuration advertisements from each trunk port to a reserved multicast address. Neighboring switches receive these advertisements and update their VTP and VLAN configurations as necessary.
Because trunk ports send and receive VTP advertisements, you must ensure that at least one trunk port is configured on the switch stack and that this trunk port is connected to the trunk port of another switch. Otherwise, the switch cannot receive any VTP advertisements.
VTP advertisements distribute this global domain information:
VTP domain name
VTP configuration revision number
Update identity and update timestamp
MD5 digest VLAN configuration, including maximum transmission unit (MTU) size for each VLAN
Catalyst 2960-XR Switch VLAN Configuration Guide, Cisco IOS Release 15.0(2)EX1
16 OL-29440-01
Loading...
+ 148 hidden pages