Using Command History 2-4 Changing the Command History Buffer Size 2-5 Recalling Commands 2-5 Disabling the Command History Feature 2-5 Using Editing Features 2-6 Enabling and Disabling Editing Features 2-6 Editing Commands through Keystrokes 2-6 Editing Command Lines that Wrap 2-8 Searching and Filtering Output of show and more Commands
2-8

Accessing the CLI 2-9 Accessing the CLI through a Console Connection or through Telnet Accessing the CLI from a Browser 2-9
3

Configuring IEEE 802.3X Flow Control 10-14 Configuring Auto-MDIX on an Interface 10-15 Configuring Power over Ethernet on an Interface Adding a Description for an Interface 10-18 Configuring Layer 3 Interfaces Configuring the System MTU
10-19 10-20

the EMI includes protocols such as the Enhanced Interior Gateway Routing Protocol (EIGRP) and the Open Shortest Path First (OSPF) Protocol. refer to the Catalyst 3560 Switch Command Reference for this release. hereafter referred to as the switch. For more information. It includes Layer 2+ features and full Layer 3 routing (IP unicast routing. a web-based switch management interface that helps you create and manage clusters of switches. This guide also includes an overview of the Cluster Management Suite (CMS). IP multicast routing.1 from the Cisco IOS Software drop-down list.1 commands. The SMI provides Layer 2+ features including access control lists (ACLs). It does not provide detailed information about these commands. This guide does not provide field-level descriptions of the CMS windows nor does it provide the procedures for configuring switches and switch clusters from CMS. For detailed information about these commands. On the Cisco Product Documentation home page. refer to the CMS online help. quality of service (QoS). you should have experience working with the Cisco IOS software and be familiar with the concepts and terminology of Ethernet and local area networking.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
xxxiii
. For information about the standard Cisco IOS Release 12. static routing. and the Routing Information Protocol (RIP). For all CMS window descriptions and procedures. refer to the Cisco IOS documentation set available from the Cisco. refer to the Catalyst 3560 Switch System Message Guide for this release and to the Catalyst 3560 Switch Hardware Installation Guide. To distinguish it from the Layer 2+ static routing and RIP.Preface
Audience
This guide is for the networking professional managing the Catalyst 3560 switch. This guide provides procedures for using the commands that have been created or changed for use with the Catalyst 3560 switch.com home page at Service and Support > Technical Documents. which is integrated with the software image. select Release 12. and fallback bridging). The EMI provides a richer set of enterprise-class features. Before using this guide. This guide does not describe system messages you might encounter or how to install your switch.
Purpose
The Catalyst 3560 switch is supported by either the standard multilayer image (SMI) or the enhanced multilayer image (EMI).

Square brackets ([ ]) mean optional elements. and vertical bars ( | ) separate the alternative elements.
Caution
Means reader be careful.Preface Conventions
Conventions
This publication uses these conventions to convey instructions and information: Command descriptions use these conventions:
• • • • •
Commands and keywords are in boldface text. Braces ({ }) group required choices. and timesavers use these conventions and symbols:
Note
Means reader take note.
Timesaver
Means the following will help you solve a problem. The tips information might not be troubleshooting or even an action. Notes contain helpful suggestions or references to materials not contained in this manual. Arguments for which you supply values are in italic. In this situation. cautions.
Interactive examples use these conventions:
• • •
Terminal sessions and system displays are in screen font. Braces and vertical bars within square brackets ([{ | }]) mean a required choice within an optional element. Information you enter is in boldface
screen
font. are in angle brackets (< >).
Catalyst 3560 Switch Software Configuration Guide
xxxiv
78-16156-01
. such as passwords or tabs.
Nonprinting characters. you might do something that could result in equipment damage or loss of data. but could be useful information.
Notes.

htm
Note
Before installing.com)
Obtaining Documentation
Cisco provides several ways to obtain documentation. refer to the “Getting Started with CMS” chapter in the software configuration guide.com sites and from the telephone numbers listed in the “Ordering Documentation” section on page xxxvi.
Cisco.com/univercd/home/home.cisco.htm You can access the Cisco website at this URL: http://www. configuring. technical assistance. or upgrading the switch.
You can order printed copies of documents with a DOC-xxxxxx= number from the Cisco.cisco. For cluster requirements.com site: http://www.com) Catalyst 3560 Switch Software Configuration Guide (order number DOC-7816156=) Catalyst 3560 Switch Command Reference (order number DOC-7816155=) Catalyst 3560 Switch System Message Guide (order number DOC-7816154=) Cluster Management Suite (CMS) online help (available only from the switch CMS software) Catalyst 3560 Switch Hardware Installation Guide (order number DOC-7816057=) Cisco Small Form-Factor Pluggable Modules Installation Notes (order number DOC-7815160=) Cisco CWDM GBIC and CWDM SFP Installation Note (not orderable but available on Cisco. refer to these documents:
• • • •
For initial configuration information. refer to the “Using Express Setup” chapter or the “Configuring the Switch with the CLI-Based Setup Program” appendix in the hardware installation guide. refer to the release notes.Preface Related Publications
Related Publications
These documents provide complete information about the switch and are available from this Cisco. For upgrading information. These sections explain how to obtain technical information from Cisco Systems.cisco. and other technical resources. refer to the “Downloading Software” section in the release notes.shtml
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
xxxv
.com International Cisco websites can be accessed from this URL: http://www.
• • • • • • • •
Release Notes for the Catalyst 3560 Switch (not orderable but available on Cisco. For CMS requirements.com/public/countries_languages.com/univercd/cc/td/doc/product/lan/cat3560/index.com
You can access the most current Cisco documentation on the World Wide Web at this URL: http://www.cisco.

com/en/US/partner/ordering/index. The CD-ROM package is available as a single unit or through an annual or quarterly subscription.
Obtaining Technical Assistance
For all customers.
Documentation Feedback
You can submit e-mail comments about technical documentation to bug-doc@cisco. elsewhere in North America. by calling 800 553-NETS (6387).com users can order a single Documentation CD-ROM (product number DOC-CONDOCCD=) through the Cisco Ordering tool: http://www.com users can order documentation through a local account representative by calling Cisco Systems Corporate Headquarters (California. award-winning technical support services. If you do not hold a valid Cisco service contract. which may have shipped with your product.com features the Cisco TAC website as an online starting point for technical assistance.
Ordering Documentation
You can find instructions for ordering documentation at this URL: http://www. online and over the phone.html All users can order annual or quarterly subscriptions through the online Subscription Store: http://www. Registered Cisco. please contact your reseller.htm You can order Cisco documentation in these ways:
•
Registered Cisco.com/go/subscription Click Subscriptions & Promotional Materials in the left navigation bar. The Documentation CD-ROM is updated regularly and may be more current than printed documentation.cisco.com/univercd/cc/td/doc/es_inpck/pdi.com users (Cisco direct customers) can order Cisco product documentation from the Networking Products MarketPlace: http://www. Cisco.Preface Documentation Feedback
Documentation CD-ROM
Cisco documentation and additional literature are available in a Cisco Documentation CD-ROM package.cisco.com.shtml
•
Nonregistered Cisco. partners.cisco. and distributors who hold valid Cisco service contracts. the Cisco Technical Assistance Center (TAC) provides 24-hour-a-day. USA) at 408 526-7208 or. CA 95134-9883 We appreciate your comments. resellers. You can submit comments by using the response card (if present) behind the front cover of your document or by writing to the following address: Cisco Systems Attn: Customer Document Ordering 170 West Tasman Drive San Jose.com/en/US/partner/ordering/ordering_place_order_ordering_tool_launch.
Catalyst 3560 Switch Software Configuration Guide
xxxvi
78-16156-01
.cisco.

com/warp/public/687/Directory/DirTAC. but most business operations remain functional.Preface Obtaining Technical Assistance
Cisco TAC Website
The Cisco TAC website provides online documents and tools for troubleshooting and resolving technical issues with Cisco products and technologies. If you have a valid service contract but do not have a login ID or password. (P3 and P4 cases are those in which your network is minimally impaired or for which you require product information. The Cisco TAC website is available 24 hours a day.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
xxxvii
.com/tac Accessing all the tools on the Cisco TAC website requires a Cisco. Cisco TAC engineers are assigned immediately to P1 and P2 cases to help keep your business operations running smoothly. The Cisco TAC website is located at this URL: http://www. use one of the following numbers: Asia-Pacific: +61 2 8446 7411 (Australia: 1 800 805 227) EMEA: +32 2 704 55 55 USA: 1 800 553-2447 For a complete listing of Cisco TAC contacts. You and Cisco will commit all necessary resources around the clock to resolve the situation. or configuration. To open a case by telephone. contact Cisco TAC by telephone.do
Opening a TAC Case
Using the online TAC Case Open Tool is the fastest way to open P3 and P4 cases.com/RPF/register/register.) After you describe your situation. go to this URL: http://www.shtml
TAC Case Priority Definitions
To ensure that all cases are reported in a standard format. There is little or no effect on your business operations.com/tac/caseopen For P1 or P2 cases (P1 and P2 cases are those in which your production network is down or severely degraded) or if you do not have Internet access. your case will be assigned to a Cisco TAC engineer.cisco. You and Cisco will commit full-time resources during normal business hours to resolve the situation. Priority 3 (P3)—Operational performance of your network is impaired. register at this URL: http://tools.cisco. If your issue is not resolved using the recommended resources. The online TAC Case Open Tool is located at this URL: http://www. Priority 1 (P1)—Your network is “down” or there is a critical impact to your business operations. installation. Cisco has established case priority definitions. Priority 2 (P2)—Operation of an existing network is severely degraded. the TAC Case Open Tool automatically recommends resources for an immediate solution.cisco.com user ID and password. or significant aspects of your business operation are negatively affected by inadequate performance of Cisco products. Priority 4 (P4)—You require information or assistance with Cisco product capabilities. You and Cisco will commit resources during normal business hours to restore service to satisfactory levels.cisco. 365 days a year.

com/en/US/about/ac123/ac147/about_cisco_the_internet_protocol_journal.html
Catalyst 3560 Switch Software Configuration Guide
xxxviii
78-16156-01
. training and certification titles.com/en/US/products/products_catalog_links_launch.com/en/US/learning/index.Preface Obtaining Additional Publications and Information
Obtaining Additional Publications and Information
Information about Cisco products.cisco.html
•
Cisco Press publishes a wide range of general networking. Access the Cisco Product Catalog at this URL: http://www.cisco. You can access the Internet Protocol Journal at this URL: http://www. Included are networking deployment and troubleshooting tips.com/packet
•
iQ Magazine is the Cisco bimonthly publication that delivers the latest information about Internet business strategies for executives. and Cisco products and solutions to help industry professionals get the most from their networking investment.com/go/iqmagazine
•
Internet Protocol Journal is a quarterly journal published by Cisco Systems for engineering professionals involved in designing.ciscopress. go to Cisco Press online at this URL: http://www. and operating public and private internets and intranets. You can access iQ Magazine at this URL: http://www.cisco.cisco.com
•
Packet magazine is the Cisco quarterly publication that provides the latest networking trends. as well as ordering and customer support services.cisco.html
•
Training—Cisco offers world-class networking training. customer case studies. Current offerings in network training are listed at this URL: http://www. technologies.
•
The Cisco Product Catalog describes the networking products offered by Cisco Systems. and links to numerous in-depth online resources. tutorials and training. configuration examples. technology breakthroughs. developing. and network solutions is available from various online and printed sources. For current Cisco Press titles and other information. Both new and experienced users will benefit from these publications. certification information. You can access Packet magazine at this URL: http://www.

C H A P T E R
1
Overview
This chapter provides these topics about the Catalyst 3560 switch software:
• • • •
Features. To distinguish it from the Layer 2+ static routing and RIP. These features include access control lists (ACLs). the EMI includes protocols such as the Enhanced Interior Gateway Routing Protocol (EIGRP) and the Open Shortest Path First (OSPF) Protocol. Enhanced multilayer image (EMI). page 1-11 Where to Go Next. page 1-16
In this document. Some features noted in this chapter are available only on the cryptographic (that is. page 1-9 Network Configuration Examples. supports encryption) versions of the SMI and EMI.
Features
The Catalyst 3560 switches are shipped with either of these software images installed:
•
Standard multilayer image (SMI). For more information. IP refers to IP version 4 (IPv4). and fallback bridging).
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
1-1
. which provides a richer set of enterprise-class intelligent services. IP multicast routing. static routing. which provides Layer 2+ features (enterprise-class intelligent services). page 1-1 Default Settings After Initial Switch Configuration. quality of service (QoS). It includes all SMI features plus full Layer 3 routing (IP unicast routing. Switches with the SMI installed can be upgraded to the EMI. all features described in this chapter and in this guide are supported on both the SMI and EMI. EMI-only features are noted in the “Layer 3 Features” section on page 1-8. and the Hot Standby Router Protocol (HSRP) and the Routing Information Protocol (RIP).
•
Note
Unless otherwise noted.com. You must obtain authorization to use this feature and to download the cryptographic version of the software from Cisco. refer to the release notes for this release.

page 1-8 Monitoring Features.
– Interactive guide mode that guides you in configuring complex features such as VLANs.
Catalyst 3560 Switch Software Configuration Guide
1-2
78-16156-01
. and multiple switch software upgrades. ACLs. link. page 1-4 (includes a feature requiring the cryptographic [that is.
– Accomplishing multiple configuration tasks from a single CMS window without needing to
remember command-line interface (CLI) commands to accomplish specific tasks. page 1-7 Layer 3 Features. page 1-6 (includes a feature requiring the cryptographic [that is. and security. supports encryption] versions of the SMI and EMI) QoS and CoS Features.
and quality of service (QoS). inventory and statistic reports.and switch-level monitoring and troubleshooting. page 1-8 (includes features requiring the EMI) Power over Ethernet (PoE) Features.
– Applying actions to multiple ports and multiple switches at the same time. page 1-2 Performance Features.
– Monitoring real-time status of a switch or multiple switches from the LEDs on the front-panel
images. page 1-4 Manageability Features. page 1-5 VLAN Features. priority levels for data applications. and Simple Network Management Protocol (SNMP) information through a browser-based program User-defined SmartPort macros for creating custom switch configurations for simplified deployment across the network Cluster Management Suite (CMS) graphical user interface (GUI) for
– Simplifying and minimizing switch and switch cluster management through a supported web
• •
browser from anywhere in your intranet. page 1-9
Ease-of-Use and Ease-of-Deployment Features
•
Express Setup for quickly configuring a switch for the first time with basic IP information.Chapter 1 Features
Overview
The Catalyst 3560 switches have these features:
• • • • • • • • • • •
Ease-of-Use and Ease-of-Deployment Features. switch and Telnet passwords. and port LED colors on the images are similar to those used on the physical LEDs. page 1-3 Management Options.
– Viewing a topology of interconnected devices to identify existing switch clusters and eligible
switches that can join a cluster and to identify link information between switches. redundant power system (RPS). page 1-5 Security Features. The system. supports encryption] versions of the SMI and EMI) Availability Features. contact information. such as VLAN and
QoS settings.
– Automated configuration wizards that prompt you to provide only the minimum required
information to configure complex features such as QoS priorities for video traffic.

Chapter 1
Overview Features
•
Switch clustering technology for
– Unified configuration. and bridged broadcast traffic Cisco Group Management Protocol (CGMP) server support and Internet Group Management Protocol (IGMP) snooping for IGMP versions 1. authentication. Fast EtherChannel. Refer to the release notes for a list of cluster-capable switches. including Ethernet. small form-factor pluggable (SFP) modules. Fast Ethernet. 2.
– Extended discovery of cluster candidates that are not directly connected to the command switch.
– Automatic discovery of candidate switches and creation of clusters of up to 16 switches that can
be managed through a single IP address. and software upgrade of multiple. monitoring. regardless of their geographic proximity and interconnection media. routers. and Gigabit EtherChannel connections.
Performance Features
• •
Autosensing of port speed and autonegotiation of duplex mode on all switch ports for optimizing bandwidth Automatic-medium-dependent interface crossover (Auto-MDIX) capability on 10/100 Mbps interfaces and on 10/100/1000 BASE-T/TX SFP interfaces that enables the interface to automatically detect the required cable connection type (straight-through or crossover) and to configure the connection appropriately IEEE 802. and unicast storms Port blocking on forwarding unknown Layer 2 unknown unicast. and 3:
– (For CGMP devices) CGMP for limiting multicast traffic to specified end stations and reducing
• • • • • • •
overall network traffic
– (For IGMP devices) IGMP snooping for efficiently forwarding multimedia and multicast traffic • • • • •
IGMP report suppression for sending only one IGMP report per multicast router query to the multicast devices (supported only for IGMPv1 or IGMPv2 queries) Multicast VLAN registration (MVR) to continuously send multicast streams in a multicast VLAN while isolating the streams from subscriber VLANs for bandwidth and security reasons IGMP filtering for controlling the set of multicast groups to which hosts on a switch port can belong IGMP throttling for configuring the action when the maximum number of entries is in the IGMP forwarding table Switch Database Management (SDM) templates for allocating system resources to maximize support for user-selected features
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
1-3
. Gigabit Ethernet. multicast.
cluster-capable switches.3X flow control on all ports (the switch does not send pause frames) EtherChannel for enhanced fault tolerance and for providing up to 8 Gbps (Gigabit EtherChannel) or 800 Mbps (Fast EtherChannel) full duplex of bandwidth between switches. multicast. and servers Port Aggregation Protocol (PAgP) and Link Aggregation Control Protocol (LACP) for automatic creation of EtherChannel links Forwarding of Layer 2 and Layer 3 packets at Gigabit line rate Per-port storm control for preventing broadcast.

from DHCP clients DHCP server for automatic assignment of IP addresses and other DHCP options to IP hosts Directed unicast requests to a DNS server for identifying a switch through its IP address and its corresponding host name and to a TFTP server for administering software upgrades from a TFTP server Address Resolution Protocol (ARP) for identifying a switch through its IP address and its corresponding Media Access Control (MAC) address Unicast MAC address filtering to drop packets with specific source or destination MAC addresses Cisco Discovery Protocol (CDP) versions 1 and 2 for network topology discovery and mapping between the switch and other Cisco devices on the network Network Time Protocol (NTP) for providing a consistent time stamp to all switches from an external source Cisco IOS File System (IFS) for providing a single interface to all file systems that the switch uses In-band management access through CMS over a Netscape Communicator or Microsoft Internet Explorer browser session In-band management access for up to 16 simultaneous Telnet connections for multiple CLI-based sessions over the network In-band management access for up to five simultaneous.” CLI—The Cisco IOS CLI software is enhanced to support desktop. and Domain Name System [DNS] and Trivial File Transfer Protocol (TFTP) server names) DHCP relay for forwarding User Datagram Protocol (UDP) broadcasts.”
•
•
Manageability Features
Note
The encrypted Secure Shell (SSH) feature listed in this section is available only on the cryptographic (that is.and multilayer-switching features. host name. including IP address requests. “Using the Command-Line Interface. “Configuring SNMP. For more information about using SNMP. “Getting Started with CMS. see Chapter 2.” SNMP—SNMP management applications such as CiscoWorks2000 LAN Management Suite (LMS) and HP OpenView. The switch supports a comprehensive set of MIB extensions and four remote monitoring (RMON) groups. You can manage from an SNMP-compatible management station that is running platforms such as HP OpenView or SunNet Manager. see Chapter 26.
•
Dynamic Host Configuration Protocol (DHCP) for automating configuration of switch information (such as IP address. see Chapter 3. supports encryption) versions of the SMI and EMI. CMS is already installed on the switch. encrypted Secure Shell (SSH) connections for multiple CLI-based sessions over the network (requires the cryptographic [that is.Chapter 1 Features
Overview
Management Options
•
CMS—CMS is a GUI that can be launched from anywhere in your network through a web browser such as Netscape Communicator or Microsoft Internet Explorer. For more information about CMS. supports encryption] versions of the SMI and EMI)
• • •
• • • • • • • •
Catalyst 3560 Switch Software Configuration Guide
1-4
78-16156-01
. For more information about the CLI. You can access the CLI either by connecting your management station directly to the switch console port or by using Telnet from a remote management station. default gateway.

STP has these features:
– Up to 128 spanning-tree instances supported – Per-VLAN spanning-tree plus (PVST+) for balancing load across VLANs – Rapid PVST+ for balancing load across VLANs and providing rapid convergence of
spanning-tree instances
– UplinkFast and BackboneFast for fast convergence after a spanning-tree topology change and
for achieving load balancing between redundant uplinks.1W Rapid Spanning Tree Protocol (RSTP) for rapid convergence of the spanning tree by immediately transitioning root and designated ports to the forwarding state Optional spanning-tree features available in PVST+.Chapter 1
Overview Features
• •
In-band management access through SNMP versions 1 and 2c.1Q standard VLAN Query Protocol (VQP) for dynamic VLAN membership
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
1-5
. and 3 get and set requests Out-of-band management access through the switch console port to a directly attached terminal or to a remote terminal through a serial connection or a modem
Note
For additional descriptions of the management interfaces.1D Spanning Tree Protocol (STP) for redundant backbone connections and loop-free networks. rapid-PVST+. and MSTP mode:
– Port Fast for eliminating the forwarding delay by enabling a port to immediately transition from
•
the blocking state to the forwarding state
– BPDU guard for shutting down Port Fast-enabled ports that receive bridge protocol data units
(BPDUs)
– BPDU filtering for preventing a Port Fast-enabled port from sending or receiving BPDUs – Root guard for preventing switches outside the network core from becoming the spanning-tree
root
– Loop guard for preventing alternate or root ports from becoming designated ports because of a
failure that leads to a unidirectional link
• •
Equal-cost routing for link-level and switch-level redundancy RPS support through the Cisco RPS 300 and Cisco RPS 675 for enhancing power reliability
VLAN Features
• • •
Support for up to 1005 VLANs for assigning users to VLANs associated with appropriate network resources. see the “Network Configuration Examples” section on page 1-11.
Availability Features
• • •
HSRP for command switch and Layer 3 router redundancy UniDirectional Link Detection (UDLD) and aggressive UDLD for detecting and disabling unidirectional links on fiber-optic interfaces caused by incorrect fiber-optic wiring or port faults IEEE 802. and bandwidth Support for VLAN IDs in the full 1 to 4094 range allowed by the IEEE 802.1S Multiple Spanning Tree Protocol (MSTP) for grouping VLANs into a spanning-tree instance and for providing multiple forwarding paths for data traffic and load balancing and IEEE 802. including Gigabit uplinks
•
IEEE 802. traffic patterns.

• • • • • • • • • • • • •
Password-protected access (read-only and read-write access) to management interfaces (CMS and CLI) for protection against unauthorized configuration changes Multilevel security for a choice of security level. and TCP/User Datagram Protocol (UDP) headers Source and destination MAC-based ACLs for filtering non-IP traffic DHCP snooping to filter untrusted DHCP messages between untrusted hosts and DHCP servers IEEE 802.1Q or ISL) to be used VLAN Trunking Protocol (VTP) and VTP pruning for reducing network traffic by restricting flooded traffic to links destined for stations receiving the traffic Voice VLAN for creating subnets for voice traffic from Cisco IP Phones VLAN1 minimization for reducing the risk of spanning-tree loops or storms by allowing VLAN 1 to be disabled on any individual VLAN trunk link. IP.1X with port security for controlling access to 802. and resulting actions Static MAC addressing for ensuring security Protected port option for restricting the forwarding of traffic to designated ports on the same switch Port security option for limiting and identifying MAC addresses of the stations allowed to access the port Port security aging to set the aging time for secure addresses on a port BPDU guard for shutting down a Port Fast-configured port when an invalid configuration occurs Standard and extended IP access control lists (ACLs) for defining security policies in both directions on routed interfaces (router ACLs) and VLANs and inbound on Layer 2 interfaces (port ACLs) Extended MAC access control lists for defining security policies in the inbound direction on Layer 2 interfaces VLAN ACLs (VLAN maps) for providing intra-VLAN security by filtering traffic based on information in the MAC. supports encryption) versions of the SMI and EMI. and changes.1X-authenticated users to a specified VLAN – 802. a proprietary feature for managing network security through a TACACS server
Catalyst 3560 Switch Software Configuration Guide
1-6
78-16156-01
.Chapter 1 Features
Overview
•
Inter-Switch Link (ISL) and IEEE 802. adds. management and control of broadcast and multicast traffic.1X port-based authentication to prevent unauthorized devices (clients) from gaining access to the network
– 802.1Q trunking encapsulation on all ports for network moves.1X with VLAN assignment for restricting 802. and network security by establishing VLAN groups for high-security users and network resources Dynamic Trunking Protocol (DTP) for negotiating trunking on a link between two devices and for negotiating the type of trunking encapsulation (802. With this feature enabled.1X ports – 802.1X with guest VLAN to provide limited services to non-802. no user traffic is sent or received on the trunk.1X-compliant users •
Terminal Access Controller Access Control System Plus (TACACS+).
• • • •
Security Features
Note
The Kerberos feature listed in this section is available only on the cryptographic (that is. The switch CPU continues to send and receive control protocol frames.1X with voice VLAN to permit an IP phone access to the voice VLAN regardless of the
authorized or unauthorized state of the port
– 802. notification.

predefined rates
•
Out-of-Profile
– Out-of-profile markdown for packets that exceed bandwidth utilization limits
•
Ingress queueing and scheduling
– Two configurable ingress queues for user traffic (one queue can be the priority queue) – Weighted tail drop (WTD) as the congestion-avoidance mechanism for managing the queue
lengths and providing drop precedences for different traffic classifications
– Shaped round robin (SRR) as the scheduling service for determining the rate at which packets
are dequeued to the internal ring (sharing is the only supported mode on ingress queues)
•
Egress queues and scheduling
– Four egress queues per port – WTD as the congestion-avoidance mechanism for managing the queue lengths and providing
drop precedences for different traffic classifications
– SRR as the scheduling service for determining the rate at which packets are dequeued to the
egress interface (shaping or sharing is supported on egress queues). supports encryption] versions of the SMI and EMI)
•
QoS and CoS Features
• •
Automatic QoS (auto-QoS) to simplify the deployment of existing QoS features by classifying traffic and configuring egress queues (voice over IP only) Classification
– IP type-of-service/Differentiated Services Code Point (IP TOS/DSCP) and 802.Chapter 1
Overview Features
•
Remote Authentication Dial-In User Service (RADIUS) for verifying the identity of. and accounting (AAA) services Kerberos security system to authenticate requests for network resources by using a trusted third party (requires the cryptographic [that is. and ensuring port security
•
Policing
– Traffic-policing policies on the switch port for managing how much of the port bandwidth
should be allocated to a specific traffic flow
– Aggregate policing for policing traffic flows in aggregate to restrict specific applications or
traffic flows to metered.1P CoS marking
priorities on a per-port basis for protecting the performance of mission-critical applications
– IP TOS/DSCP and 802. DSCP. trusting the CoS value
received. IP. Shared egress queues are also guaranteed a configured share of bandwidth. allowing for differentiated service levels for different types of network traffic and for prioritizing mission-critical traffic in the network
– Trusted port states (CoS. and IP precedence) within a QoS domain and with a port
bordering another QoS domain
– Trusted boundary for detecting the presence of a Cisco IP phone.1P CoS marking based on flow-based packet classification
(classification based on information in the MAC. authorization. Shaped egress queues are guaranteed but limited to using a share of port bandwidth. and TCP/UDP headers) for high-performance quality of service at the network edge. and tracking the actions of remote users through authentication. granting access to. but can use more than the guarantee if other queues become empty and do not use their share of the bandwidth.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
1-7
.

including IP address requests.7 W of power at the same time.
• •
HSRP for Layer 3 router redundancy IP routing protocols for load balancing and for constructing scalable. (requires the EMI) Multicast Source Discovery Protocol (MSDP) for connecting multiple PIM-SM domains (requires the EMI) Distance Vector Multicast Routing Protocol (DVMRP) tunnelling for interconnecting two multicast-enabled networks across non-multicast networks (requires the EMI) DHCP relay for forwarding UDP broadcasts. 48-port PoE switch provides 15. routed backbones:
– RIP versions 1 and 2 – OSPF (requires the EMI) – Interior Gateway Routing Protocol (IGRP) and Enhanced IGRP (EIGRP) (requires the EMI) – Border Gateway Protocol (BGP) Version 4 (requires the EMI)
• • • • • •
IP routing between VLANs (inter-VLAN routing) for full Layer 3 routing between two or more VLANs.3af-compliant powered devices from all 10/100 Ethernet ports if the switch senses that there is no power on the circuit 24-port PoE switch provides 15. and PIM sparse-dense mode. Includes support for PIM sparse mode (PIM-SM). up to a maximum switch power output of 370 W Automatic detection and power budgeting. the switch maintains a power budget.Chapter 1 Features
Overview
Layer 3 Features
Note
Some features noted in this section are available only on the EMI. and grants power only when it is available
•
Catalyst 3560 Switch Software Configuration Guide
1-8
78-16156-01
.4 W of power on each 10/100 port. PIM dense mode (PIM-DM).4 W of power to any 24 of the 48 10/100 ports. allowing for devices in the network to receive the multicast feed requested and for switches not participating in the multicast to be pruned. from DHCP clients
•
• • •
Power over Ethernet (PoE) Features
• •
Ability to provide power to connected Cisco pre-standard and IEEE 802. or any combination of ports provide an average of 7. monitors and tracks requests for power. allowing each VLAN to maintain its own autonomous data-link domain Policy-based routing (PBR) for configuring defined policies for traffic flows Fallback bridging for forwarding non-IP traffic between two or more VLANs (requires the EMI) Static IP routing for manually building a routing table of network path information Equal-cost routing for load balancing and redundancy Internet Control Message Protocol (ICMP) and ICMP Router Discovery Protocol (IRDP) for using router advertisement and router solicitation messages to discover the addresses of routers on directly attached subnets Protocol-Independent Multicast (PIM) for multicast routing within the network.

and where to find more information about the features. the switch operates with the default settings listed in Table 1-1. and report network security violations Four groups (history. and time-out events Layer 2 traceroute to identify the physical path that a packet takes from a source device to a destination device
Default Settings After Initial Switch Configuration
The switch is designed for plug-and-play operation.0. resource issues. refer to the hardware installation guide. “Configuring 802. If you have specific network needs. and default gateway Domain name DHCP Switch cluster Passwords TACACS+ RADIUS System name and prompt NTP DNS 802.
Table 1-1 Default Settings After Initial Switch Configuration
Feature Switch IP address.. subnet mask. you can change the interface-specific and system-wide settings. “Clustering Switches” Chapter 6.Chapter 1
Overview Default Settings After Initial Switch Configuration
Monitoring Features
• • • • • • •
Switch LEDs that provide port. “Assigning the Switch IP Address and Default Gateway”
Chapter 5.1X
Default Setting 0.. repel. and events) of embedded RMON agents for network monitoring and traffic analysis Syslog facility for logging system messages about authentication or authorization errors. statistics. For information about setting up the initial switch configuration (using Express Setup or the CLI setup program) and assigning basic IP information to the switch.0. Chapter 4. their defaults.1X Port-Based Authentication”
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
1-9
. requiring only that you assign basic IP information to the switch and connect it to the other devices in your network. alarms. This table lists the key software features.and switch-level status MAC address notification traps and RADIUS accounting for tracking users on a network by storing the MAC addresses that the switch has learned or removed Switched Port Analyzer (SPAN) and Remote SPAN (RSPAN) for traffic monitoring on any port or VLAN SPAN and RSPAN support of Intrusion Detection Systems (IDS) to monitor. If you do not configure the switch at all.0 None DHCP client enabled Disabled None defined Disabled Disabled Switch Enabled Enabled Disabled
More information in. “Administering the Switch”
Chapter 9.

Use optional IP multicast routing to design networks better suited for multicast traffic. As your network traffic profiles evolve. and congestion avoidance to classify traffic with the appropriate priority level. and security. and use VLANs and IP subnets to place the network resources in the same logical network as the users who access those resources most. workstations.
Table 1-3 Providing Network Services
Network Demands Efficient bandwidth usage for multimedia applications and guaranteed bandwidth for critical applications
Suggested Design Methods
• •
Use IGMP snooping to efficiently forward multimedia and multicast traffic. unicast. Use VLAN trunks and BackboneFast for traffic-load balancing on the uplink ports so that the uplink port with a lower relative port cost is selected to carry the VLAN traffic. scheduling. Connect global resources—such as servers and routers to which the network users require equal access—directly to the high-speed switch ports so that they have their own high-speed segment. and multicast and multimedia applications. consider providing network services that can support applications for voice and data integration. Use MVR to continuously send multicast streams in a multicast VLAN but to isolate the streams from subscriber VLANs for bandwidth and security reasons. Table 1-3 describes some network demands and how you can meet them. application prioritization. thereby providing maximum flexibility and support for mission-critical. Use the EtherChannel feature between the switch and its connected servers and routers. marking. Use other QoS mechanisms such as packet classification.Chapter 1 Network Configuration Examples
Overview
Table 1-2
Increasing Network Performance
Network Demands Too many users on a single network segment and a growing number of users accessing the Internet
• •
Suggested Design Methods
•
Create smaller network segments so that fewer users share the bandwidth. multimedia integration. Use full-duplex operation between the switch and its connected workstations. Use Hot Standby Router Protocol (HSRP) for cluster command switch and router redundancy.
•
Increased power of new PCs.
• •
High demand on network redundancy and availability to provide always on mission-critical applications
• •
Catalyst 3560 Switch Software Configuration Guide
1-12
78-16156-01
. and servers High bandwidth demand from networked applications (such as e-mail with large attached files) and from bandwidth-intensive applications (such as multimedia)
•
•
Bandwidth alone is not the only consideration when designing your network.

1P/Q. such as an IP phone.
Small to Medium-Sized Network Using Catalyst 3560 Switches
Figure 1-1 shows a configuration for a network of up to 500 employees.3af-compliant powered devices connected to Catalyst Power over Ethernet (PoE) switches.or low-priority. only one VLAN can be configured per wiring closet. the switches are providing inter-VLAN routing. When an end station in one VLAN needs to communicate with an end station in another VLAN. can receive redundant power when it is also connected to an AC power source. a router or Layer 3 switch routes the traffic to the appropriate destination VLAN. For pre-standard and IEEE 802. such as existing telephone lines. Use switches that support at least two queues per port to prioritize voice and data traffic as either high. multimedia. The server farm includes a call-processing server running Cisco CallManager software. Catalyst PoE switch ports automatically detect any Cisco pre-standard and IEEE 802. and IEEE 802. local servers. If data.4 W of power per port. For network reliability and load balancing.
•
A growing demand for using existing Use the Catalyst Long-Reach Ethernet (LRE) switches to provide up to 15 Mb of IP infrastructure to transport data and connectivity over existing infrastructure. 802. Voice traffic from the Cisco IP Phones are configured on separate VVIDs. WAN. Data and multimedia traffic are configured on the same VLAN. In this network. this network has HSRP enabled on the routers and on the switches.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
1-13
. Each PoE switch port provides 15. VLAN access control lists (VLAN maps) on the switches provide intra-VLAN security and prevent unauthorized users from accessing critical pieces of the network. In addition to inter-VLAN routing. the multilayer switches provide QoS mechanisms such as DSCP priorities to prioritize the different types of network traffic and to deliver high-priority traffic in a predictable manner. This ensures connectivity to the Internet. Refer to the documentation sets specific to these switches for speeds LRE information. routing. Use voice VLAN IDs (VVIDs) to provide separate VLANs for voice traffic. QoS drops low-priority traffic to allow delivery of high-priority traffic. Powered devices not connected to Catalyst PoE switches must be connected to AC power sources to receive power. The switches are connected to workstations. Cisco CallManager controls call processing.3af compliant and noncompliant powered devices (such as Cisco IP Phones).1P/Q QoS gives voice traffic forwarding-priority over data traffic.3af-compliant powered devices that are connected. This network uses Catalyst 3560 Layer 3 switches with high-speed connections to two routers.Chapter 1
Overview Network Configuration Examples
Table 1-3
Providing Network Services (continued)
Network Demands An evolving demand for IP telephony
Suggested Design Methods
• •
Use QoS to prioritize applications such as IP telephony during congestion and to help control both delay and jitter within the network. The switches are using routed uplinks for faster failover. The switches are interconnected through Gigabit interfaces. The Catalyst 3560 switch supports at least four queues per port. and IP phone features and configuration. and mission-critical network resources in case one of the routers or switches fails. The powered device. based on 802. This network uses VLANs to logically segment the network into well-defined broadcast groups and for security management. voice from a home or office to the Note LRE is the technology used in the Catalyst 2900 LRE XL and Catalyst 2950 Internet or an intranet at higher LRE switches. If congestion occurs. and voice traffic are assigned to the same VLAN. They are also configured with equal-cost routing for load sharing and redundancy.

and IP phone features and configuration.Chapter 1 Network Configuration Examples
Overview
Cisco CallManager controls call processing. you can use an ACL to mark the frame in accordance with the network policy. Figure 1-2 shows a configuration for a network only using Catalyst 3560 multilayer switches in the wiring closets and two backbone switches. routing. each switch has IGMP snooping enabled to efficiently forward multimedia and multicast traffic. QoS features can limit bandwidth on a per-port or per-user basis. If you configure the port as untrusted. Using Cisco IP Phones. With the multilayer switches providing inter-VLAN routing and other network services. receive. Each switch provides inter-VLAN routing. or the IP precedence. but as network traffic profiles evolve. These switches also have redundant uplink connections to the backbone switches. and the IP network supports both voice and data. Network Address Translation (NAT) services. to aggregate up to ten wiring closets. Cisco CallManager software. voice-over-IP (VoIP) gateway services. and WAN and Internet access. switches in the wiring closet are increasingly employing multilayer services such as multicast management and traffic classification.
Catalyst 3560 Switch Software Configuration Guide
1-14
101388
IP
IP
78-16156-01
. QoS ACLs that either drop or mark nonconforming traffic based on bandwidth limits are also configured on each switch. the routers focus on firewall services. They provide proxy ARP services to determine IP and MAC address mapping. thereby removing this task from the routers and decreasing this type of traffic on the WAN links.
Figure 1-1 Catalyst 3560 Switches in a Collapsed Backbone Configuration
Internet
Cisco 2600 or 3700 routers
Gigabit servers
Cisco IP phones
Workstations running Cisco SoftPhone software
Aironet wireless access points
Large Network Using Catalyst 3560 Switches
Switches in the wiring closet have traditionally been Layer 2-only devices. You can configure a trusted port to trust the CoS value. such as the Catalyst 6500 switches. The switch ports are configured as either trusted or untrusted. with each uplink port configured as a trusted routed uplink to provide faster convergence in case of an uplink failure. VLAN maps provide intra-VLAN security and prevent unauthorized users from accessing critical pieces of the network. and Cisco SoftPhone software integrates telephony and IP networks. and control calls from their PCs. the DSCP value. In the wiring closet. Users with workstations running Cisco SoftPhone software can place.

For example. the prompt you see in that mode. Only a limited subset of the commands are available in user EXEC mode. you must enter a password to enter privileged EXEC mode.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
2-1
. such as show commands. you must start at global configuration mode. page 2-8 Accessing the CLI. you can enter any privileged EXEC command or enter global configuration mode. Enter a question mark (?) at the system prompt to obtain a list of commands available for each command mode. you must enter privileged EXEC mode. how to access each one. interface. It contains these sections:
• • • • • • • • •
Understanding Command Modes. Using the configuration modes (global. page 2-3 Understanding no and default Forms of Commands. and how to exit the mode. page 2-4 Understanding CLI Error Messages. page 2-9
Understanding Command Modes
The Cisco IOS user interface is divided into many different modes. From global configuration mode. From this mode. page 2-1 Understanding the Help System. The user EXEC commands are not saved when the switch reboots. which show the current configuration status. To access the various configuration modes. page 2-4 Using Editing Features. often called user EXEC mode. page 2-3 Understanding Abbreviated Commands. If you save the configuration. you can enter interface configuration mode and line configuration mode. The commands available to you depend on which mode you are currently in. and line). Table 2-1 describes the main command modes. When you start a session on the switch. which clear counters or interfaces. these commands are stored and used when the switch reboots. page 2-4 Using Command History. Normally. To have access to all commands. you begin in user mode.C H A P T E R
2
Using the Command-Line Interface
This chapter describes the Cisco IOS command-line interface (CLI) and how to use it to configure your Catalyst 3560 switch. and clear commands. page 2-6 Searching and Filtering Output of show and more Commands. you can make changes to the running configuration. most of the user EXEC commands are one-time commands. The examples in the table use the host name Switch.

enter exit. While in global configuration mode. Use a password to protect access to this mode. enter the enable command. To configure multiple interfaces with the same parameters. enter the exit command. press Ctrl-Z or enter end. enter the interface command (with a specific interface). you can create extended-range VLANs (VLAN IDs greater than 1005) and save configurations in the switch startup configuration file. parameters for the Ethernet ports. Use this mode to configure To exit to global configuration mode.Chapter 2 Understanding Command Modes
Using the Command-Line Interface
Table 2-1
Command Mode Summary
Mode User EXEC
Access Method Begin a session with your switch. enter parameters that apply to the exit or end. specify a line with the line vty or line console command. Use this mode to configure VLAN parameters. While in privileged EXEC mode.
Privileged EXEC
While in user EXEC mode. enter the vlan vlan-id command. Ctrl-Z. To exit to global configuration mode. To return to privileged EXEC mode. see the “Configuring a Range of Interfaces” section on page 10-8. Display system information.
Global configuration
Switch(config)#
To exit to privileged Use this mode to configure EXEC mode. enter the vlan database command.
Interface configuration
Switch(config-if)#
Line configuration
While in global configuration mode. 1 to 1005 in the VLAN database. Perform basic tests. To return to privileged EXEC mode. To return to privileged EXEC mode. enter VLAN parameters for VLANs exit.
Use this mode to verify commands that you have entered.
About This Mode Use this mode to
• • •
Change terminal settings. press Ctrl-Z or enter end. For information about defining interfaces. enter the configure command. or press entire switch.
Prompt
Switch>
Exit Method Enter logout or quit.
Config-vlan
Switch(config-vlan)#
VLAN configuration
While in privileged EXEC mode. see the “Using Interface Configuration Mode” section on page 10-6.
Switch(config-line)#
Use this mode to configure To exit to global configuration mode.
Catalyst 3560 Switch Software Configuration Guide
2-2
78-16156-01
. When VTP mode is transparent. parameters for the terminal line.
Switch#
Enter disable to exit. press Ctrl-Z or enter end. enter exit. While in global configuration mode.
Switch(vlan)#
To exit to privileged Use this mode to configure EXEC mode.

as shown in Table 2-2. For 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. For example:
Switch# di? dir disable disconnect
abbreviated-command-entry<Tab>
Complete a partial command name.Chapter 2
Using the Command-Line Interface Understanding the Help System
Understanding the Help System
You can enter a question mark (?) at the system prompt to display a list of commands available for each command mode. For example:
Switch> show ?
command keyword ?
List the associated arguments for a keyword.
Table 2-2 Help Summary
Command help abbreviated-command-entry?
Purpose Obtain a brief description of the help system in any command mode. You can also obtain a list of associated keywords and arguments for any command. For example:
Switch# sh conf<tab> Switch# show configuration
?
List all commands available for a particular command mode. Obtain a list of commands that begin with a particular character string. For example:
Switch> ?
command ?
List the associated keywords for a command. This example shows how to enter the show configuration privileged EXEC command in an abbreviated form:
Switch# show conf
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
2-3
.

Configuration commands can also have a default form. The possible keywords that you can enter with the command appear.
You did not enter all the keywords or Re-enter the command followed by a question mark (?) values required by this command.
How to Get Help Re-enter the command followed by a question mark (?) with a space between the command and the question mark. The default form of a command returns the command setting to its default. You can customize this feature to suit your needs as described in these sections:
• • •
Changing the Command History Buffer Size. so the default form is the same as the no form.
Table 2-3 Common CLI Error Messages
Error Message
% Ambiguous command: "show con"
Meaning You did not enter enough characters for your switch to recognize the command. Use the command without the keyword no to re-enable a disabled feature or to enable a feature that is disabled by default. page 2-5 (optional) Disabling the Command History Feature. The possible keywords that you can enter with the command appear. 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. However. the no shutdown interface configuration command reverses the shutdown of an interface.
Using Command History
The software provides a history or record of commands that you have entered. Most commands are disabled by default. some commands are enabled by default and have variables set to certain default values. use the no form to disable a feature or function or reverse the action of a command. In general.Chapter 2 Understanding no and default Forms of Commands
Using the Command-Line Interface
Understanding no and default Forms of Commands
Almost every configuration command also has a no form.
% Invalid input detected at ‘^’ marker.
You entered the command incorrectly. In these cases. page 2-5 (optional)
Catalyst 3560 Switch Software Configuration Guide
2-4
78-16156-01
. including access lists. The command history feature is particularly useful for recalling long or complex commands or entries. page 2-5 (optional) Recalling Commands. The caret (^) marks the point of the error. with a space between the command and the question mark.
% Incomplete command. the default command enables the command and sets variables to their default values.
Understanding CLI Error Messages
Table 2-3 lists some error messages that you might encounter while using the CLI to configure your switch. For example.

The number of commands that appear is controlled by the setting of the terminal history global configuration command and the history line configuration command. the switch records ten command lines in its history buffer. To disable the feature during the current terminal session. beginning with the most recent command.
Table 2-4 Recalling Commands
Action1 Press Ctrl-P or the up arrow key. These actions are optional. enter the no history line configuration command.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
2-5
.Chapter 2
Using the Command-Line Interface Using Command History
Changing the Command History Buffer Size
By default. enter this command to configure the number of command lines the switch records for all sessions on a particular line:
Switch(config-line)# history
[size
number-of-lines]
The range is from 0 to 256. Beginning in line configuration mode. list the last several commands that you just entered. Repeat the key sequence to recall successively older commands. These procedures are optional. Beginning in privileged EXEC mode.
Result Recall commands in the history buffer. While in privileged EXEC mode.
Recalling Commands
To recall commands from the history buffer.
Disabling the Command History Feature
The command history feature is automatically enabled.
show history
1. enter this command to change the number of command lines that the switch records during the current terminal session:
Switch# terminal history
[size
number-of-lines]
The range is from 0 to 256. The arrow keys function only on ANSI-compatible terminals such as VT100s. To disable command history for the line. You can alter this number for a current terminal session or for all sessions on a particular line. These procedures are optional. Press Ctrl-N or the down arrow key. You can disable it for the current terminal session or for the command line. Return 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. enter the terminal no history privileged EXEC command. perform one of the actions listed in Table 2-4.

page 2-6 (optional) Editing Command Lines that Wrap. Press Ctrl-E. Move the cursor to the beginning of the command line. enter this command in line configuration mode:
Switch(config-line)# editing
Editing Commands through Keystrokes
Table 2-5 shows the keystrokes that you need to edit command lines. Transpose the character to the left of the cursor with the character located at the cursor. To globally disable enhanced editing mode. These keystrokes are optional. enter this command in line configuration mode:
Switch (config-line)# no editing
To re-enable the enhanced editing mode for the current terminal session. page 2-8 (optional)
Enabling and Disabling Editing Features
Although enhanced editing mode is automatically enabled. Press Esc B. re-enable it.
Keystroke1
Purpose
Press Ctrl-B. Press Ctrl-A.Chapter 2 Using Editing Features
Using the Command-Line Interface
Using Editing Features
This section describes the editing features that can help you manipulate the command line. Recall the most recent entry in the buffer. you can disable it. Press Ctrl-F. It contains these sections:
• • •
Enabling and Disabling Editing Features. Move the cursor forward one word. or press the Move the cursor back one character. The switch provides a buffer with the last ten items that you deleted. Move the cursor forward one character. or press the right arrow key. page 2-6 (optional) Editing Commands through Keystrokes. These procedures are optional.
Catalyst 3560 Switch Software Configuration Guide
2-6
78-16156-01
. Move the cursor to the end of the command line. or configure a specific line to have enhanced editing. paste them in the command line. enter this command in privileged EXEC mode:
Switch# terminal editing
To reconfigure a specific line to have enhanced editing mode. left arrow key.
Table 2-5 Editing Commands through Keystrokes
Capability Move around the command line to make changes or corrections. Press Esc F. Press Ctrl-T.
Recall commands from the buffer and Press Ctrl-Y. Move the cursor back one word.

The More prompt is used for any output that has more lines than can be displayed on the terminal screen. Backspace key. Delete all characters from the cursor to the beginning of the command line. including show command output. Press Ctrl-L or Ctrl-R. Press Esc L. Capitalize letters from the cursor to the end of the word. The arrow keys function only on ANSI-compatible terminals such as VT100s. You can use the Return and Space bar keystrokes whenever you see the More prompt.
Scroll down one line.
Note
Erase the character to the left of the cursor. Change the word at the cursor to lowercase.Chapter 2
Using the Command-Line Interface Using Editing Features
Table 2-5
Editing Commands through Keystrokes (continued)
Capability
Keystroke1 Press Esc Y. Press the Space bar.
Delete entries if you make a mistake Press the Delete or or change your mind. The buffer contains only the last 10 items that you have deleted or cut. Press Ctrl-U or Ctrl-X. Delete the word to the left of the cursor. perhaps as a shortcut. you cycle to the first buffer entry.
Purpose Recall the next buffer entry. Scroll down a line or screen on displays that are longer than the terminal screen can display. Capitalize at the cursor.
Press the Return key. Press Esc C.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
2-7
. If you press Esc Y more than ten times. Redisplay the current command line. Scroll down one screen. Capitalize or lowercase words or capitalize a set of letters. Delete the character at the cursor.
Redisplay the current command line if the switch suddenly sends a message to your screen. Press Ctrl-W. Press Ctrl-D. Press Esc U. Delete all characters from the cursor to the end of the command line. Delete from the cursor to the end of the word. Designate a particular keystroke as an executable command.
1. Press Esc D. Press Ctrl-V or Esc Q. Press Ctrl-K.

20 255.0 131.1. Using these commands is optional.20 255. use the terminal width privileged EXEC command to set the width of your terminal. the lines that contain output are not displayed.255. the access-list global configuration command entry extends beyond one line.
Switch(config)# Switch(config)# Switch(config)# Switch(config)# access-list 101 permit tcp 131.0 131.255. If you have a width other than that.108. In this example. Each time the cursor reaches the end of the line.108.255. 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.0 eq $108.108.5 255. For example. To use this functionality.5 255.255.
Searching and Filtering Output of show and more Commands
You can search and filter the output for show and more commands.0 131.2.2.Chapter 2 Searching and Filtering Output of show and more Commands
Using the Command-Line Interface
Editing Command Lines that Wrap
You can use a wraparound feature for commands that extend beyond a single line on the screen. see the “Editing Commands through Keystrokes” section on page 2-6. but the lines that contain Output appear.108. the line is shifted ten spaces to the left and redisplayed. To scroll back to the beginning of the command entry.5 255. include. line protocol is up Vlan10 is up.255. Use line wrapping with the command history feature to recall and modify previous complex command entries. The keystroke actions are optional. For information about recalling previous command entries. enter a show or more command followed by the pipe character (|).1 $ 101 permit tcp 131. 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. if you enter | exclude output.0 131.255.2.5 255.5 255. The dollar sign ($) appears at the end of the line to show that the line has been scrolled to the right:
Switch(config)# access-list 101 permit tcp 131.255.2.255. line protocol is up
Catalyst 3560 Switch Software Configuration Guide
2-8
78-16156-01
. and an expression that you want to search for or filter out: command | {begin | include | exclude} regular-expression Expressions are case sensitive.25 $t tcp 131.108.255. press Ctrl-A to check the complete syntax before pressing the Return key to execute the command.255. line protocol is down GigabitEthernet0/2 is up. The dollar sign ($) shows that the line has been scrolled to the left. or exclude.255. line protocol is down GigabitEthernet0/1 is up. When the cursor reaches the right margin.108. the command line shifts ten spaces to the left.1$
The software assumes you have a terminal screen that is 80 columns wide. You can also press Ctrl-A to immediately move to the beginning of the line.20 255.0 131.255.255.108.0 eq 45
After you complete the entry. one of the keywords begin. You cannot see the first ten characters of the line.108.1.2.108. but you can scroll back and check the syntax at the beginning of the command.
Note
The arrow keys function only on ANSI-compatible terminals such as VT100s.1. press Ctrl-B or the left arrow key repeatedly. When the cursor first reaches the end of the line.255. the line is again shifted ten spaces to the left.

Use any Telnet TCP/IP or encrypted Secure Shell (SSH) package from a remote management station. see the “Setting a Telnet Password for a Terminal Line” section on page 8-6. click Telnet to start a Telnet session. and the switch must have an enable secret password configured. see Chapter 4. For information about configuring the switch for Telnet access. the command switch.
The user EXEC prompt appears on the management station. The switch must have network connectivity with the Telnet or SSH client.Chapter 2
Using the Command-Line Interface Accessing the CLI
Accessing the CLI
You can access the CLI through a console connection. or by using the browser. if clustering. you can access the CLI through a local console connection or through a remote Telnet session. to understand the boot process and the options available for assigning IP information.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
2-9
. Enter the switch password. see the “Setting a Telnet Password for a Terminal Line” section on page 8-6. refer to the switch hardware installation guide. The switch supports up to 16 simultaneous Telnet sessions. The switch supports up to five simultaneous secure SSH sessions. through Telnet. Then. make sure that you have met the software requirements (including browser and Java plug-in configurations) and have assigned IP information as described in the switch hardware installation guide. the command switch as described in “Setting a Telnet Password for a Terminal Line” section on page 8-6. For information about configuring the switch for SSH. You also must assign a Telnet password to the switch or. see the “Configuring the Switch for Secure Shell” section on page 8-37.” If your switch is already configured. When the Cisco Systems Access page appears. For more information. For information about connecting to the console port. 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.
Accessing the CLI through a Console Connection or through Telnet
Before you can access the CLI. if clustering. In the URL field.
After you connect through the console port. follow these steps:
Step 1 Step 2 Step 3 Step 4
Start one of the supported browsers. enter the IP address of the switch or.
Accessing the CLI from a Browser
Before performing this procedure. “Assigning the Switch IP Address and Default Gateway. but your switch must first be configured for this type of access. To access the CLI from a web browser. you must 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. the user EXEC prompt appears on the management station. Changes made by one Telnet user are reflected in all other Telnet sessions. through a Telnet session or through an SSH session.

A password is not required to redisplay these pages.HTML access to the command line interface from a cached copy of the Cisco Systems Access page. To prevent unauthorized access to the CLI or to the Cluster Management Suite (CMS). You can access the CLI by clicking Web Console . exit your browser to end the browser session.
Catalyst 3560 Switch Software Configuration Guide
2-10
78-16156-01
.Chapter 2 Accessing the CLI
Using the Command-Line Interface
Note
Copies of the HTML pages that you display are saved in your browser memory cache until you exit the browser session. including the Cisco Systems Access page.

For a list of new CMS features in this release. select Help > What’s New from the CMS menu bar. refer to the release notes for this switch. refer to the online help. a toolbar.C H A P T E R
3
Getting Started with CMS
This chapter contains these sections that describe the Cluster Management Suite (CMS) on the Catalyst 3560 switch:
• • • •
“Understanding CMS” section on page 3-1 “Configuring CMS” section on page 3-8 “Displaying CMS” section on page 3-11 “Where to Go Next” section on page 3-16
Refer to the appropriate switch documentation for descriptions of the browser-based management software used on other Catalyst switches. For more information about CMS. expert mode.
Understanding CMS
CMS provides these features for managing switch clusters and individual switches from web browsers such as Netscape Communicator or Microsoft Internet Explorer:
• • • • •
Front-panel and topology views of your network. and wizards—that control the presentation of some complex configuration options Two levels of access modes to the configuration options: read-write access for users who can change switch settings and read-only access for users who can only view switch settings
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
3-1
. For information about cluster configurations and which Catalyst switches can be command switches or member switches. as shown in Figure 3-6 on page 3-14. and a feature bar. to access configuration and management options Comprehensive online help that gives high-level concepts and procedures for performing CMS tasks Interactive modes—guide mode. that can be displayed at the same time A menu bar. as shown in Figure 3-7 on page 3-14 and Figure 3-8 on page 3-15.

the command switch. and click Install. shown in Figure 3-1. save CMS
cluster information on your PC or workstation.
•
The menu bar. and Feature Bar
The configuration and monitoring options for configuring switches and switch clusters are available from the menu bar. Toolbar. You can also display link information in the form of link reports and link graphs. and link types. see the “Displaying CMS” section on page 3-11.
CMS Menu Bar. cluster members.
Topology View
The Topology view displays a network map that uses icons representing switch clusters. select interaction modes. For more information. From this view. the toolbar. CMS is installed locally and loads faster the next time that you launch it. – Help—Launch the online help. neighboring devices that are not eligible to join a cluster. display CMS preferences. This view is available only when CMS is launched from a command switch. For more information. see the “Displaying CMS” section on page 3-11. you can select multiple ports or multiple switches and configure them with the same settings. cluster candidates. You can increase the speed at which CMS loads by permanently installing CMS on your PC or workstation. and show or hide the feature bar. and the feature bar.Chapter 3 Understanding CMS
Getting Started with CMS
Front Panel View
The Front Panel view displays the Front Panel image of a specific set of switches in a cluster. Figure 3-1 Menu Bar
Catalyst 3560 Switch Software Configuration Guide
3-2
78-16156-01
. Select CMS > Installation and Distributions.
Note
CMS is downloaded to your browser each time that you launch CMS. provides these options for managing a single switch and switch clusters:
– CMS—Choose printing options.
– Window—Choose from the currently open CMS windows.

such as polling intervals. assign ports to VLANs. Update the views with the latest status. Display the legend that describes the icons. and other information about a switch. You can also click Help from the active window or press the F1 key.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
3-3
. the software version. and change the administration mode. Upgrade the software for the cluster or a switch. Display the Front Panel view. Select the information to be displayed in the Topology view. Display the device type.Chapter 3
Getting Started with CMS Understanding CMS
•
The toolbar provides buttons for commonly used switch and cluster configuration options and information windows such as legends and online help. Table 3-1 lists the toolbar options from left to right on the toolbar. Available only from a cluster-management session. Save the configuration of the cluster or a switch to Flash memory. For more information about the read-only and read-write access modes. labels. Display VLAN membership. the views to open at CMS startup. 3.
1. and the color of administratively shutdown ports. Set CMS display properties. see the “Privilege Levels” section on page 3-7. 2. Save your arrangement of the cluster icons in the Topology view to Flash memory. and links. open window. Display the Topology view. Display and configure port parameters on a switch. Display the help for the active.
Table 3-1
Toolbar Buttons
Toolbar Option Print Preferences1 Save Configuration2 Software Upgrade2 Port Settings1 VLAN1 Inventory Refresh Front Panel Topology3 Topology Options3 Save Topology Layout 2 3 Legend Help for Active Window
Icon
Task Print a CMS window or help file. Not available in read-only mode. Some options from this menu option are not available in read-only mode. the IP address.

Catalyst 3560 Switch Software Configuration Guide
3-4
78-16156-01
. For more information about how access modes affect CMS. – To hide the feature bar. In this mode. Some CMS features are not available in read-only mode. click CMS > Feature Bar. and select Standard Mode. By default. click CMS > Feature Bar. and select Autohide Mode. In autohide mode.
Figure 3-2 shows the features available in a sample cluster. Access modes affect the availability of features from CMS. as shown in Figure 3-2. the feature bar is always visible. the feature bar is in standard mode.
– To enable the feature bar.Chapter 3 Understanding CMS
Getting Started with CMS
•
The feature bar shows the features available for the devices in your cluster.
Figure 3-2 Feature Bar and Search Window
1
Feature bar
2
Search window
Note
Only features supported by the devices in your cluster are displayed in the feature bar. and you can reduce or increase the width of the feature bar. the feature bar appears only when you move the cursor to the left edge of the CMS workspace. see the “Privilege Levels” section on page 3-7. You can search for features that are available for your cluster by clicking Search and entering a feature name.

the mode change does not take effect until you select another configuration option. Wizards are also available for some configuration options. you enter the information in each step until you click Finish in the last step. This mode is not available for all features. Guide mode takes you through each feature option and provides information about the parameter. Online help includes these features:
• • • •
Feature-specific help that gives background information and concepts on the features Dialog-specific help that gives procedures for performing tasks An index of online help topics A glossary of terms used in the online help
You can send us feedback about the information provided in the online help.Chapter 3
Getting Started with CMS Understanding CMS
Online Help
CMS provides comprehensive online help to assist you in understanding and performing configuration and monitoring tasks from the CMS windows. Expert mode displays a configuration window in which you configure the feature options. When you click Guide Mode and then select a feature that supports it. Click Feedback to display an online form. A person icon appears next to features that have guide mode available. After completing the form. Online help is available for features that are supported by devices in your cluster. To configure the feature. each labeled with the host names of the members it applies to. CMS displays a specific parameter of that feature and information about the parameter. you click Guide before selecting an option from the menu bar. In these cases. except that fewer options are available. These are similar to guide-mode configuration windows. click Submit to send your comments to Cisco Systems Inc.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
3-5
. tool bar. Sometimes the information in a topic differs for different cluster members.
Guide Mode
Guide mode is for users who want a step-by-step approach for completing a specific configuration task. If you change the interaction mode after selecting a configuration option. Clicking Cancel at any time ends the configuration task without applying any changes. If you select Guide Mode but you want to use Expert Mode instead.
Configuration Modes
You can change the CMS interaction mode to either expert or guide mode. the right pane contains all the versions of the topic. as shown in Figure 3-3. We appreciate and value your comments. or popup menu.

For more information about the read-only access mode. For more information about the read-only access mode. tool bar. see the “Privilege Levels” section on page 3-7. Instead. the mode change does not take effect until you select another configuration option. the wizard launches for that feature. a wizard does not prompt you to provide information for all of the feature options. You can view information about the parameter fields by clicking the Help button. as shown in Figure 3-3 on page 3-6. it prompts you to provide minimal information and then uses the default settings of the remaining options to set up default configurations. When you select a feature that has Wizard in the name. or popup menu. wizards provide a step-by-step approach for completing a specific configuration task. If you select Expert Mode but you want to use Guide Mode instead.Chapter 3 Understanding CMS
Getting Started with CMS
Figure 3-3
Guide Mode and Wizards
1 2
98673
1
Guide mode icon
2
Wizards
Guide mode is not available if your switch access level is read-only. see the “Privilege Levels” section on page 3-7.
Expert Mode
Expert mode is for users who prefer to display all the parameter fields of a feature in a single CMS window. Wizards are not available for all features or for read-only access levels. If you change the interaction mode after selecting a configuration option. you must click Guide before selecting an option from the menu bar.
Catalyst 3560 Switch Software Configuration Guide
3-6
78-16156-01
.
Wizards
Similar to guide mode. Unlike guide mode.

For example.Chapter 3
Getting Started with CMS Understanding CMS
Privilege Levels
CMS provides two levels of access to the configuration options: read-write access and read-only access. If you know your privilege level.0(5)WC2 or earlier
For more information about this limitation. see the “Preventing Unauthorized Access to Your Switch” section on page 8-1 and the “Configuring Multiple Privilege Levels” section on page 8-8. some configuration windows for those switches display incomplete information:
• •
Catalyst 2900 XL or Catalyst 3500 XL member switches running Cisco IOS Release 12. refer to the release notes.
Access to Older Switches In a Cluster
If your cluster has these member switches running earlier software releases and if you have read-only access to these member switches. the switch verifies whether you have privilege level 15. enter this URL: http://ip_address/level/13 Privilege levels 0 to 15 are supported. Any options in the CMS windows. and popup menus that change the switch or cluster configuration are not shown in read-only mode. For more information about privilege levels. you must specify it in the URL that you use to access the cluster.
• •
Privilege level 15 provides read-write access to CMS. you do not need to include the privilege level if it is 15.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
3-7
.0(5)WC2 or earlier Catalyst 2950 member switches running Cisco IOS Release 12. if your privilege level is 13.
•
If you do not specify a privilege level when you access CMS. you are granted read-write access. These switches do not support read-only mode on CMS:
• •
Catalyst 1900 and Catalyst 2820 switches Catalyst 2900 XL switches with 4-MB CPU DRAM
In read-only mode. If you do have privilege level 15. Privilege levels 1 to 14 provide read-only access to CMS. Entering zero denies access to CMS. you are denied access to CMS. If you do not. menu bar. Privilege level 0 denies access to CMS. toolbar. Therefore. This is the default. these switches appear as unavailable devices and cannot be configured from CMS.

see the “Software Compatibility” section in the release notes.
Windows
For Windows platforms.0 for the OS and Motif library patch 103461-24
1.5 or 6. the plug-in is not registered with the new browser. follow the instructions in the README_FIRST.
CMS Plug-In Requirements
You need to install a browser plug-in to run CMS.txt file to install the Java plug-in. including the URL.4.
Table 3-3 Supported Operating Systems and Browsers
Operating System Windows 98 Windows NT 4.Chapter 3
Getting Started with CMS Configuring CMS
Operating System and Browser Support
You can access the CMS interface by using the operating systems and browsers listed in Table 3-3. If you install the CMS plug-in and then upgrade your browser.1
Microsoft Internet Explorer2 5.pl/java On Solaris platforms.1 is required to run CMS. Netscape Communicator version 6.0 5. CMS checks the browser version when starting a session to ensure that the browser is supported.0 5. Java plug-in 1.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
3-9
.1 7.cisco. You need to close and restart your browser after installing a Java plug-in.0 is not supported.5 or 6.1 7.1 7.0 5.
Solaris
For Solaris. 2. Service Pack 1 or higher is required for Internet Explorer 5.0 Windows 2000 Windows XP Solaris 2. you must upgrade your browser first.
Note
Do not install the CMS plug-in on Solaris.5. For more information about the CMS plug-in.1 or later
Minimum Service Pack or Patch Second Edition Service Pack 3 or later None None
Netscape Communicator1 7.0 Not supported
Sun-recommended patch cluster 7.com/pcgi-bin/tablebuild.5.
Note
If you need to both upgrade your web browser and install the CMS plug-in. the CMS plug-in is required to run CMS.5 or 6.5 or 6. You can download the Java plug-in and installation instructions from this URL: http://www.

Here are examples of how CMS can differ between Cisco IOS releases and switch platforms:
•
On Catalyst switches running Cisco IOS Release 12. CMS on the Catalyst 1900 and Catalyst 2820 switches is referred to as Switch Manager.) You should write down the port number to which you are connected.
Specifying an HTTP Port (Nondefault Configuration Only)
If you change the HTTP port. the Topology view in this release is not the same as the Topology view or the Cluster View in those earlier software releases. If you have not configured a specific (nondefault) HTTP port and are using the enable password (or no password) for access to the switch. the CMS versions in those software releases might appear similar but are not the same as this release. you need to configure the HTTP server interface with the method of authentication used on the switch. Use care when changing the switch IP information.45:184 where 184 is the new HTTP port number. This is the earliest version of CMS.1. When you select Device > Device Manager for a cluster member.
HTTP Access to CMS
CMS uses the HTTP protocol (the default is port 80) and the default method of authentication (the enable password) to communicate with the switch through any of its Ethernet ports and to allow switch management from a standard web browser.
•
Refer to the documentation specific to the switch and its Cisco IOS release for descriptions of the CMS version. you must include the new port number when you enter the IP address in the browser Location or Address field (for example. a new browser session launches.126. remember that clusters can have a mix of switch models using different Cisco IOS releases and that CMS in earlier Cisco IOS releases and on different switch platforms might look and function differently from CMS in this Cisco IOS release. you can go to the “Displaying CMS” section on page 3-11. http://10.0(5)WC2 or earlier or Cisco IOS Release 12. and the CMS version for that switch appears.
Configuring an Authentication Method (Nondefault Configuration Only)
If you are not using the default method of authentication (the enable password).Chapter 3 Configuring CMS
Getting Started with CMS
Cross-Platform Considerations
When managing switch clusters through CMS.1(6)EA1 or earlier. Cluster management options are not available on these switches. For example.
Catalyst 3560 Switch Software Configuration Guide
3-10
78-16156-01
.

Chapter 3 Displaying CMS
Getting Started with CMS
Figure 3-4
Switch Home Page
The Switch Home Page has these tabs:
•
Express Setup—Opens the Express Setup page
Note
You can use Express Setup to assign an IP address to an unconfigured switch. refer to the hardware installation guide. such as Telnet. For more information. Extended Ping. and the show interfaces privileged EXEC command Help Resources—Provides links to the Cisco website. or if the plug-in is not enabled. The CMS Startup Report runs and verifies that your PC or workstation can correctly run CMS. CMS plug-in or Java plug-in. web browser. technical documentation. Cluster Management Suite—Launches CMS Tools—Accesses diagnostic and monitoring tools. If you are running an unsupported operating system.
Catalyst 3560 Switch Software Configuration Guide
3-12
78-16156-01
. as shown in Figure 3-5. the CMS Startup Report page appears. and the Cisco Technical Assistance Center (TAC)
• • • Step 3
Click Cluster Management Suite to launch the CMS interface.

the plug-in is not registered with the new browser. you must upgrade your browser first. If you install the CMS plug-in and then upgrade your browser. click the links.Chapter 3
Getting Started with CMS Displaying CMS
Figure 3-5
CMS Startup Report
The CMS Startup Report has links that instruct you how to correctly configure your PC or workstation.
Note
If your PC or workstation is correctly configured for CMS. and follow the instructions to configure your PC or workstation.
Note
If you are running Windows and need to both upgrade your web browser and install the CMS plug-in.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
3-13
. If the CMS Startup Report appears. When your PC or workstation is correctly configured. you do not see the CMS Startup Report. CMS launches.

as shown in Figure 3-6. and you can select more switches to be displayed. You can choose and configure the switches that appear in Front Panel view. You can right-click on a switch port to configure that port. the Front Panel view displays by default. as shown in Figure 3-7.Chapter 3 Displaying CMS
Getting Started with CMS
Front Panel View
When CMS is launched from a noncommand switch.
Figure 3-6 Toolbar
1 2
1 Front Panel view button 2 Topology view button
The Front Panel view displays the front-panel image of the command switch and other selected switches. and the front-panel view displays only the front panel of the specific switch.
Figure 3-7 Front Panel View and Port Popup Menu
1
2
3
4
1 2
Cluster tree Command switch
3 4
check boxes to show switches Port configuration popup menu
Catalyst 3560 Switch Software Configuration Guide
3-14
78-16156-01
98674
101011
. When CMS is launched from a command switch. you can display the Front Panel view by clicking the Front Panel button on the tool bar. You can drag the switches that appear and re-arrange them.

you launch a separate CMS session. the Topology view displays the command switch (indicated by the *CMD* label) and the devices that are connected to it. When you select Device Manager for a specific switch in the cluster.Chapter 3
Getting Started with CMS Displaying CMS
Note
Figure 3-7 shows a cluster with a Catalyst 3550 switch as the command switch. as shown in Figure 3-8. The Device Manager interface can vary among the Catalyst switch platforms. the Topology view appears by default.
Topology View
When CMS is launched from a command switch.) When you click the topology button on the tool bar.
Note
On Catalyst 1900 and Catalyst 2820 switches. (This view is available only when CMS is launched from a command switch. Device Manager is for configuring an individual switch.
Figure 3-8 Topology View and Device Popup Menus
1
2
3
4
1 2
Link popup menu Command switch
3 4
Command switch popup menu Cluster member popup menu
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
98675
3-15
. CMS is referred to as Device Manager (also referred to as Switch Manager). Refer to the release notes for a list of switches that can be members of a cluster with a Catalyst 3560 switch as the command switch. You can right-click on a switch or link icon to display a menu for that icon.

access points.” for more information about command and member switches. Only one popup menu at a time appears in the CMS. For CMS procedures and window descriptions.
Catalyst 3560 Switch Software Configuration Guide
3-16
78-16156-01
. IP phones. and so on). the cluster is collapsed and represented by a single icon.
The rest of this guide provides information about the command-line interface (CLI) procedures for the software features supported in this release. This view provides two levels of detail of the network topology:
•
Expand Cluster—When you right-click a cluster icon and select Expand Cluster. See Chapter 6.
CMS Icons
For a complete list of device and link icons available in CMS. the Topology view displays the switch cluster in detail.” for more information about administrative tasks. “Administering the Switch. candidate switches. and devices that are not eligible to join the cluster (such as routers. This view shows the command switch and member switches in a cluster. The Topology view shows how the devices within a switch cluster are connected and how the switch cluster is connected to other clusters and devices. refer to the online help. This view does not display the details of any neighboring switch clusters Collapse Cluster—When you right-click a command-switch icon and select Collapse Cluster.Chapter 3 Where to Go Next
Getting Started with CMS
Note
Figure 3-8 shows multiple popup menus. From this view. Click Help > What’s New in the online help for a list of new CMS features in this release. you need to access the command switch or member switch of that cluster.
Where to Go Next
• • •
See Chapter 5.
•
Note
The Topology view displays only the switch cluster and network neighborhood of the specific command or member switch that you access. To display a different switch cluster. It also shows candidate switches that can join the cluster. you can add and remove cluster members. The view shows how the cluster is connected to other clusters. “Clustering Switches. select Help > Legend from the CMS menu bar.

page 4-1 Assigning Switch Information. It also describes how to modify the switch startup configuration. The normal boot process involves the operation of the boot loader software. and so forth. page 4-16
Understanding the Boot Process
To start your switch.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
4-1
.C H A P T E R
4
Assigning the Switch IP Address and Default Gateway
This chapter describes how to create the initial switch configuration (for example. default gateway. It initializes the CPU registers. page 4-11 Scheduling a Reload of the Software Image. which control where physical memory is mapped. which performs these activities:
• • • •
Performs low-level CPU initialization. Loads a default operating system software image into memory and boots the switch. secret and Telnet passwords. you need to follow the procedures in the hardware installation guide about installing and powering on the switch. page 4-10 Modifying the Startup Configuration. It tests the CPU DRAM and the portion of the Flash device that makes up the Flash file system. page 4-2 Checking and Saving the Running Configuration. and setting up the initial configuration (IP address. and so forth) of the switch. Initializes the Flash file system on the system board. its quantity. subnet mask. refer to the command reference for this release. its speed. Performs power-on self-test (POST) for the CPU subsystem.
Note
For complete syntax and usage information for the commands used in this chapter. assigning the switch IP address and default gateway information) for the Catalyst 3560 switch by using a variety of automatic and manual methods. This chapter consists of these sections:
• • • • •
Understanding the Boot Process.

It gives you the option of assigning a Telnet password (to provide security during remote management) and configuring your switch as a command or member switch of a cluster or as a standalone switch. set the parity option to none. make sure you have connected a PC or terminal to the console port.
Stop bits default is 1.
Note
You can disable password recovery. Use the switch setup program if you want to be prompted for specific IP information. Normally. or manually. you can format the Flash file system.Chapter 4 Assigning Switch Information
Assigning the Switch IP Address and Default Gateway
The boot loader provides access to the Flash file system before the operating system is loaded. For more information about the setup program. For more information.
Catalyst 3560 Switch Software Configuration Guide
4-2
78-16156-01
.com. With this program. The boot loader also provides trap-door access into the system if the operating system has problems serious enough that it cannot be used. and configured the PC or terminal-emulation software baud rate and character format to match these of the switch console port:
• •
Baud rate default is 9600. and finally restart the operating system. see the “Disabling Password Recovery” section on page 8-5. Data bits default is 8. recover from a lost or forgotten password. through a Dynamic Host Configuration Protocol (DHCP) server.
Note
If you are using DHCP. refer to the release notes on Cisco. the boot loader is not active until the next system reset or power-on. do not respond to any of the questions in the setup program until the switch receives the dynamically assigned IP address and reads the configuration file. uncompress.
Note • •
If the data bits option is set to 8. For more information. and launch the operating system.
Assigning Switch Information
You can assign IP information through the switch setup program. the boot loader is used only to load. you can also configure a host name and an enable secret password. Parity settings default is none. Before you can assign switch information. reinstall the operating system software image by using the XMODEM Protocol. Use a DHCP server for centralized control and automatic assignment of IP information after the server is configured. After the boot loader gives the operating system control of the CPU. see the “Recovering from Corrupted Software By Using the XMODEM Protocol” section on page 35-2 and the “Recovering from a Lost or Forgotten Password” section on page 35-4. The trap-door mechanism provides enough access to the system so that if it is necessary.

A router does not forward broadcast packets. DHCP-based autoconfiguration replaces the BOOTP client functionality on your switch. Disabled. you might also need to configure a Trivial File Transfer Protocol (TFTP) server and a Domain Name System (DNS) server. This section contains this configuration information:
• • •
Default Switch Information.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
4-3
. no DHCP client-side configuration is needed on your switch. The switch can act as both a DHCP client and a DHCP server. No default gateway is defined. page 4-3 Understanding DHCP-Based Autoconfiguration. you should configure a DHCP relay.
Table 4-1 Default Switch Information
Feature IP address and subnet mask Default gateway Enable secret password Host name Telnet password Cluster command switch functionality Cluster name
Default Setting No IP address or subnet mask are defined. If the DHCP server is running on a different LAN. The DHCP server or the DHCP server feature running on your switch can be on the same LAN or on a different LAN than the switch. If you are using DHCP to relay the configuration file location on the network. During DHCP-based autoconfiguration. DHCP is built on a client-server model. However. Otherwise. you need to configure the DHCP server or the DHCP server feature on your switch for various lease options associated with IP addresses. in which designated DHCP servers allocate network addresses and deliver configuration parameters to dynamically configured devices. but it forwards packets based on the destination IP address in the received packet. The factory-assigned default host name is Switch. With DHCP-based autoconfiguration. use the setup program described earlier. A relay device forwards broadcast traffic between two directly connected LANs. This protocol consists of two components: one for delivering configuration parameters from a DHCP server to a device and a mechanism for allocating network addresses to devices. manually configure the switch.
Understanding DHCP-Based Autoconfiguration
The DHCP provides configuration information to Internet hosts and internetworking devices. page 4-9
Default Switch Information
Table 4-1 shows the default switch information. No password is defined. No cluster name is defined. page 4-3 Manually Assigning IP Information.Chapter 4
Assigning the Switch IP Address and Default Gateway Assigning Switch Information
If you are an experienced user familiar with the switch configuration steps. No password is defined. your switch (DHCP client) is automatically configured at startup with IP address information and a configuration file.

or that the client has been slow in responding to the DHCPOFFER message (the DHCP server assigned the parameters to another client). the client returns a DHCPDECLINE broadcast message to the DHCP server. that an error has occurred during the negotiation of the parameters. the switch broadcasts. and the client uses configuration information received from the server. page 4-6
Catalyst 3560 Switch Software Configuration Guide
4-4
78-16156-01
. For more information. a lease for the IP address. the client usually accepts the first offer it receives. The DHCP server offers configuration parameters (such as an IP address.
Configuring DHCP-Based Autoconfiguration
These sections describe how to configure DHCP-based autoconfiguration.Chapter 4 Assigning Switch Information
Assigning the Switch IP Address and Default Gateway
DHCP Client Request Process
When you boot your switch. broadcasts a DHCPDISCOVER message to locate a DHCP server. If the configuration parameters sent to the client in the DHCPOFFER unicast message are invalid (a configuration error exists). instead of unicasts. TFTP requests to obtain the switch configuration file. In a DHCPREQUEST broadcast message. page 4-5 Configuring the DNS.
Figure 4-1 DHCP Client and Server Message Exchange
DHCPDISCOVER (broadcast) Switch A DHCPOFFER (unicast) DHCPREQUEST (broadcast)
51807
DHCP server
DHCPACK (unicast)
The client. Switch A. and so forth) to the client in a DHCPOFFER unicast message.
• • •
Configuring the DHCP Server. Figure 4-1 shows the sequence of messages that are exchanged between the DHCP client and the DHCP server. however. With this message. If the switch accepts replies from a BOOTP server and configures itself. The amount of information the switch receives depends on how you configure the DHCP server. see the “Configuring the DHCP Server” section on page 4-5. the DHCP client is invoked and automatically requests configuration information from a DHCP server when the configuration file is not present on the switch. DNS IP address. The offer from the DHCP server is not a guarantee that the IP address is allocated to the client. the client and server are bound. the server usually reserves the address until the client has had a chance to formally request the address. The DHCP server confirms that the IP address has been allocated to the client by returning a DHCPACK unicast message to the client. The formal request is broadcast so that all other DHCP servers that received the DHCPDISCOVER broadcast message from the client can reclaim the IP addresses that they offered to the client. The DHCP server sends the client a DHCPNAK denial broadcast message. gateway IP address. A DHCP client might receive offers from multiple DHCP or BOOTP servers and can accept any of the offers. page 4-5 Configuring the TFTP Server. subnet mask. the client returns a formal request for the offered configuration information to the DHCP server. however. which means that the offered configuration parameters have not been assigned.

the Cisco IOS DHCP server and relay agent features are enabled on your switch. or if the configuration file could not be downloaded. see the “Configuring the Relay Device” section on page 4-6. the configuration file. it replies to client requests with only those parameters that are configured. TFTP requests. and if you configured the DHCP server with a TFTP server name.1 for additional information about configuring DHCP.Chapter 4
Assigning the Switch IP Address and Default Gateway Assigning Switch Information
• • •
Configuring the Relay Device. Unavailability of other lease options does not affect autoconfiguration. If you do not configure the DHCP server or the DHCP server feature running on your switch with the lease options described earlier. or both. the switch attempts to download one or more configuration files from the TFTP server. If you did not specify the configuration filename. The DHCP server or the DHCP server feature running on your switch can be on the same LAN or on a different LAN than the switch. or if you are configuring the switch as a DHCP server. address. the switch can receive IP address information. For more information.
Configuring the TFTP Server
Based on the DHCP server configuration. You should configure the DHCP server or the DHCP server feature running on your switch with reserved leases that are bound to each switch by the switch hardware address. If you want the switch to receive IP address information. you should configure a DHCP relay. you must configure the DHCP server with these lease options:
• • • •
IP address of the client (required) Subnet mask of the client (required) DNS server IP address (optional) Router IP address (default gateway address to be used by the switch) (required)
If you want the switch to receive the configuration file from a TFTP server. the switch might send broadcast. If the IP address and subnet mask are not in the reply. you must configure the DHCP server with these lease options:
• • •
TFTP server name (required) Boot filename (the name of the configuration file that the client needs) (recommended) Host name (optional)
Depending on the settings of the DHCP server. the switch attempts to download the specified configuration file from the specified TFTP server. and configuration filename. If the DHCP server is running on a different LAN. refer to the “IP Addressing and Services” section in the Cisco IOS IP and IP Routing Configuration Guide for Cisco IOS Release 12. The files include the specified configuration filename (if any) and
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
4-5
. instead of unicast. page 4-7 Example Configuration. If the router IP address or TFTP server name are not found. the switch attempts to download a configuration file by using various combinations of filenames and TFTP server addresses. the switch is not configured. If you configured the DHCP server to respond to the switch with all the options required for IP connectivity to the TFTP server. page 4-6 Obtaining Configuration Files. the TFTP server.
Configuring the DHCP Server
The switch can act as both the DHCP client and DHCP server. By default. page 4-8
If your DHCP server is a Cisco device.

255. the TFTP server must contain one or more configuration files in its base directory. You can enter up to two DNS server IP addresses in the lease database. DNS. cisconet. if the DHCP and TFTP servers are properly configured.2:
router(config-if)# ip helper-address 20. The files can include these files:
• • •
The configuration file named in the DHCP reply (the actual switch configuration file).0.2 router(config-if)# ip helper-address 20. If the TFTP server to be used is on a different LAN from the switch. Normally. or if it is to be accessed by the switch through the broadcast address (which occurs if the DHCP server response does not contain all the required information described earlier).0.cfg file (These files contain commands common to all switches.cfg.
Configuring the DNS
The DHCP server or the DHCP server feature running on your switch uses the DNS server to resolve the TFTP server name to an IP address.)
If you specify the TFTP server name in the DHCP server-lease database. you must also configure the TFTP server name-to-IP-address mapping in the DNS-server database.255. If the relay device is a Cisco router. The preferred solution is to configure the DHCP server or the DHCP server feature running on your switch with all the required information.Chapter 4 Assigning Switch Information
Assigning the Switch IP Address and Default Gateway
these files: network-config.4
On interface 20. where hostname is the switch’s current hostname. The router-confg or the ciscortr.0.1
Catalyst 3560 Switch Software Configuration Guide
4-6
78-16156-01
. in Figure 4-2. You must configure this relay device to forward received broadcast packets on an interface to the destination host.
Configuring the Relay Device
You must configure a relay device when a switch sends broadcast packets that need to be responded to by a host on a different LAN. You must configure the TFTP server name-to-IP address map on the DNS server. For more information.0. TFTP packets.255). these files are not accessed. and configure helper addresses by using the ip helper-address interface configuration command.cfg.config. the switch must be able to access it through a router.0.0.0. The DNS server can be on the same or on a different LAN as the switch. and in some cases.3 router(config-if)# ip helper-address 20.0.0. If it is on a different LAN. see the “Configuring the Relay Device” section on page 4-6. enable IP routing (ip routing global configuration command).0.0. Examples of broadcast packets that the switch might send are DHCP. The TFTP server addresses used include the specified TFTP server address (if any) and the broadcast address (255. The network-confg or the cisconet. hostname.0.1
router(config-if)# ip helper-address 10. You can configure the IP addresses of the DNS servers in the lease database of the DHCP server from where the DHCP replies will retrieve them. or hostname. a relay must be configured to forward the TFTP packets to the TFTP server. For the switch to successfully download a configuration file. For example.cfg file (known as the default configuration files). The TFTP server contains the configuration files for the switch. configure the router interfaces as follows: On interface 10.

If the host name is not specified in the DHCP reply.cfg file.) The default configuration file contains the host names-to-IP-address mapping for the switch. If the host name is not found in the file.4
49068
DHCP server
TFTP server
DNS server
Obtaining Configuration Files
Depending on the availability of the IP address and the configuration filename in the DHCP reserved lease. the switch uses the host name in the DHCP reply.0. The switch fills its host table with the information in the file and obtains its host name. The switch receives its IP address. TFTP server address.Chapter 4
Assigning the Switch IP Address and Default Gateway Assigning Switch Information
Note
If the switch is acting as the relay device. and upon receipt.0. and the TFTP server address from the DHCP server or the DHCP server feature running on your switch.0. see the “Routed Ports” section on page 10-3 and the “Configuring Layer 3 Interfaces” section on page 10-19.0. The configuration filename is not provided (two-file read method). subnet mask. and the configuration filename from the DHCP server or the DHCP server feature running on your switch. (If the network-confg file cannot be read.0.1
20. completes its boot-up process. the switch obtains its configuration information in these ways:
•
The IP address and the configuration filename is reserved for the switch and provided in the DHCP reply (one-file read method).3
20. and upon receipt.1
20. completes its boot-up process.
•
The IP address and the configuration filename is reserved for the switch.0. For more information. The switch sends a unicast message to the TFTP server to retrieve the named configuration file from the base directory of the server.
Figure 4-2 Relay Device Used in Autoconfiguration
Switch (DHCP client)
Cisco router (Relay) 10. subnet mask.0. the switch uses the default Switch as its host name. configure the interface as a routed port. The switch receives its IP address.0.2
10. The switch sends a unicast message to the TFTP server to retrieve the network-confg or cisconet.0.
•
Only the IP address is reserved for the switch and provided in the DHCP reply. and the configuration filename from the DHCP server. or the DHCP server feature running on your switch.0. The switch sends a broadcast message to a TFTP server to retrieve the named configuration file from the base directory of the server.2
20.0. but the TFTP server address is not provided in the DHCP reply (one-file read method).0. The switch receives its IP address. the switch reads the cisconet.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
4-7
. subnet mask.cfg default configuration file.

Enter the IP address and subnet mask.
Switches B through D retrieve their configuration files and IP addresses in the same way. and so forth) as shown in this display:
prompt> cd /tftpserver/work/ prompt> ls network-confg switcha-confg switchb-confg switchc-confg switchd-confg prompt> cat network-confg ip host switcha 10. The base directory also contains a configuration file for each switch (switcha-confg. it reads switch1-confg from the TFTP server. If no configuration filename is given in the DHCP server reply.21 from the DHCP server.0. Configuration Explanation In Figure 4-3.3.0.21 to its host name (switcha).0.0.Chapter 4
Assigning the Switch IP Address and Default Gateway Assigning Switch Information
DNS Server Configuration The DNS server maps the TFTP server name maritsu to IP address 10.22 ip host switchc 10. Switch A reads the network-confg file from the base directory of the TFTP server.0. Switch A reads its configuration file as follows:
• • • • •
It obtains its IP address 10. follow these steps to manually assign IP information to multiple switched virtual interfaces (SVIs) or ports: Command
Step 1 Step 2
Purpose Enter global configuration mode. Return to global configuration mode. and enter the VLAN to which the IP information is assigned. switchb-confg. The range is 1 to 4094.0.24
DHCP Client Configuration No configuration file is present on Switch A through Switch D.0.0. It adds the contents of the network-confg file to its host table. It reads the configuration file that corresponds to its host name. Enter interface configuration mode.0.
configure terminal interface vlan vlan-id
Step 3 Step 4
ip address ip-address subnet-mask exit
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
4-9
. for example.0. It reads its host table by indexing its IP address 10. This file contains the host name to be assigned to the switch based on its IP address.0.
Manually Assigning IP Information
Beginning in privileged EXEC mode.21 ip host switchb 10. do not enter leading zeros. TFTP Server Configuration (on UNIX) The TFTP server base directory is set to /tftpserver/work/.23 ip host switchd 10.0.0.0. This directory contains the network-confg file used in the two-file read method.

255. your connection to the switch will be lost.255. “Administering the Switch.$DMUvAUnZOAmvmgqBEzIxE0 ! .. use the no ip address interface configuration command.20.0 ! interface gigabitethernet0/2 mvr type source <output truncated> ..1 no service pad service timestamps debug uptime service timestamps log uptime no service password-encryption ! hostname Switch A ! enable secret 5 $1$ej9. For information on setting the switch system name.
To remove the switch IP address. see Chapter 6. and setting time and calendar services.50 255. use the no ip default-gateway global configuration command.. protecting access to privileged EXEC commands. the switch has connectivity to the remote networks with which a host needs to communicate. The default gateway receives IP packets with unresolved destination IP addresses from the switch. (Optional) Save your entries in the configuration file. To remove the default gateway address..Chapter 4 Checking and Saving the Running Configuration
Assigning the Switch IP Address and Default Gateway
Command
Step 5
Purpose Enter the IP address of the next-hop router interface that is directly connected to the switch where a default gateway is being configured. Verify your entries. <output truncated> .! interface VLAN1
Catalyst 3560 Switch Software Configuration Guide
4-10
78-16156-01
.
Step 6 Step 7 Step 8
end show running-config copy running-config startup-config
Return to privileged EXEC mode. Current configuration: 1363 bytes ! version 12.137. interface gigabitethernet0/1 no switchport ip address 172. If you are removing the address through a Telnet session. it does not need to have a default gateway set.”
Checking and Saving the Running Configuration
You can check the configuration settings you entered or changes you made by entering this privileged EXEC command:
Switch# show running-config Building configuration.
Note
ip default-gateway ip-address
When your switch is configured to route with IP. Once the default gateway is configured.

page 4-12 Booting Manually. To display information stored in the NVRAM section of Flash memory. “Working with the Cisco IOS File System. It contains this configuration information:
• • • • •
Default Boot Configuration. your configuration will be lost the next time you reload the system.137.
This command saves the configuration settings that you made. page 4-14
See also Appendix B. “Working with the Cisco IOS File System.20. and Software Images.255. For more information about alternative locations from which to copy the configuration file.137. Configuration Files. Configuration Files..20.0 no ip directed-broadcast ! ip default-gateway 172. page 4-12 Automatically Downloading a Configuration File. see Appendix B.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
4-11
. and Software Images. enter this privileged EXEC command:
Switch# copy running-config startup-config Destination filename [startup-config]? Building configuration. page 4-13 Controlling Environment Variables.50 255. use the show startup-config or more startup-config privileged EXEC command.”
Modifying the Startup Configuration
This section describes how to modify the switch startup configuration. page 4-13 Booting a Specific Software Image..” for information about switch configuration files. If you fail to do this.255.1 ! ! snmp-server community private RW snmp-server community public RO snmp-server community private@es0 RW snmp-server community public@es0 RO snmp-server chassis-id 0x12 ! end
To store the configuration or changes you have made to your startup configuration in Flash memory.Chapter 4
Assigning the Switch IP Address and Default Gateway Modifying the Startup Configuration
ip address 172.

If the variable is not set.
Configuration file
Configured switches use the config. Filenames and directory names are case sensitive. each encountered subdirectory is completely searched before continuing the search in the original directory. the Cisco IOS software uses the file config.
Step 5
copy running-config startup-config
(Optional) Save your entries in the configuration file. use the no boot config-file global configuration command. follow these steps to specify a different configuration filename: Command
Step 1 Step 2
Purpose Enter global configuration mode.
To return to the default setting.text to read and write a nonvolatile copy of the system configuration. However. For more information. Specify the configuration file to load during the next boot cycle. A new switch has no configuration file. see the “Understanding DHCP-Based Autoconfiguration” section on page 4-3. The Cisco IOS image is stored in a directory that has the same name as the image file (excluding the .
Automatically Downloading a Configuration File
You can automatically download a configuration file to your switch by using the DHCP-based autoconfiguration feature. the switch attempts to load and execute the first executable image it can by performing a recursive. In a depth-first search of a directory. The boot config-file global configuration command changes the setting of the CONFIG_FILE environment variable. Verify your entries.
Table 4-3 Default Boot Configuration
Feature Operating system software image
Default Setting The switch attempts to automatically boot the system using information in the BOOT environment variable.text file stored on the system board in Flash memory. which will be loaded during the next boot cycle.Chapter 4 Modifying the Startup Configuration
Assigning the Switch IP Address and Default Gateway
Default Boot Configuration
Table 4-3 shows the default boot configuration. depth-first search throughout the Flash file system. specify the path (directory) and the configuration filename.
Catalyst 3560 Switch Software Configuration Guide
4-12
78-16156-01
.bin extension). you can specify a different filename.
Specifying the Filename to Read and Write the System Configuration
By default. For file-url. Beginning in privileged EXEC mode.
configure terminal boot config-file flash:/file-url
Step 3 Step 4
end show boot
Return to privileged EXEC mode.

Enable the switch to manually boot during the next boot cycle. follow these steps to configure the switch to boot a specific image during the next boot cycle: Command
Step 1 Step 2
Purpose Enter global configuration mode. use the boot filesystem:/file-url boot loader command. specify the path (directory) and the name of the bootable image. follow these steps to configure the switch to manually boot during the next boot cycle: Command
Step 1 Step 2 Step 3 Step 4
Purpose Enter global configuration mode.
• •
configure terminal boot system filesystem:/file-url
For filesystem:. each encountered subdirectory is completely searched before continuing the search in the original directory. The boot manual global command changes the setting of the MANUAL_BOOT environment variable. the switch attempts to automatically boot the system using information in the BOOT environment variable. The next time you reboot the system. depth-first search throughout the Flash file system. Return to privileged EXEC mode. shown by the switch: prompt. use flash: for the system board Flash device.
Filenames and directory names are case sensitive. Beginning in privileged EXEC mode. the switch is in boot loader mode. For file-url. use the no boot manual global configuration command. Verify your entries. However. In a depth-first search of a directory.
Step 5
copy running-config startup-config
(Optional) Save your entries in the configuration file. the switch attempts to load and execute the first executable image it can by performing a recursive. specify the path (directory) and the name of the bootable image. however. To boot the system. Configure the switch to boot a specific image in Flash memory during the next boot cycle.
To disable manual booting. For file-url. you can configure it to manually boot. you can specify a specific image to boot.
Booting a Specific Software Image
By default. Beginning in privileged EXEC mode. use flash: for the system board Flash device. If this variable is not set.
• •
configure terminal boot manual end show boot
For filesystem:. the switch automatically boots.
Filenames and directory names are case sensitive.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
4-13
.Chapter 4
Assigning the Switch IP Address and Default Gateway Modifying the Startup Configuration
Booting Manually
By default.

the switch attempts to automatically boot the system using information in the BOOT environment variable. You can release the Mode button a second or two after the LED above port 1 turns off. The switch boot loader software provides support for nonvolatile environment variables. behaves. which can be used to control how the boot loader. “ ”) is a variable with a value. During the next boot cycle. use the no boot system global configuration command. the name of a boot loader helper file.Chapter 4 Modifying the Startup Configuration
Assigning the Switch IP Address and Default Gateway
Command
Step 3 Step 4
Purpose Return to privileged EXEC mode. or any other software running on the system. Environment variables store two kinds of data:
•
Data that controls code. Data that controls code. Boot loader environment variables are similar to environment variables that can be set on UNIX or DOS systems. refer to the command reference for this release. Under normal circumstances. Verify your entries. Then the boot loader switch: prompt appears.
end show boot
Step 5
copy running-config startup-config
(Optional) Save your entries in the configuration file. it has a value if it is listed in the file even if the value is a null string. A variable has no value if it is not listed in this file. Environment variables that have values are stored in Flash memory outside of the Flash file system. you enter the boot loader mode only through a switch console connection configured for 9600 bps. Each line in these files contains an environment variable name and an equal sign followed by the value of the variable.
Controlling Environment Variables
With a normally operating switch. which extends or patches the functionality of the boot loader can be stored as an environment variable.
Catalyst 3560 Switch Software Configuration Guide
4-14
78-16156-01
. For example.
To return to the default setting. and press the switch Mode button while reconnecting the power cord. A variable that is set to a null string (for example. it is not necessary to alter the setting of the environment variables. Unplug the switch power cord. The boot system global command changes the setting of the BOOT environment variable.
•
You can change the settings of the environment variables by accessing the boot loader or by using Cisco IOS commands. which is responsible for reading the Cisco IOS configuration file. Many environment variables are predefined and have default values. For example. the name of the Cisco IOS configuration file can be stored as an environment variable.
Note
For complete syntax and usage information for the boot loader commands and environment variables. which does not read the Cisco IOS configuration file.

yes. and specify the name of the bootable image. CONFIG_FILE set CONFIG_FILE flash:/file-url boot config-file flash:/file-url Changes the filename that Cisco IOS uses to read Specifies the filename that Cisco IOS uses to read and write a nonvolatile copy of the system and write a nonvolatile copy of the system configuration. configuration. the system attempts to boot the first bootable file that it can find in the Flash file system.
Table 4-4 Environment Variables
Variable BOOT
Boot Loader Command set BOOT filesystem:/file-url . If the BOOT variable is set but the specified images cannot be loaded. and no.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
4-15
. The configuration file cannot be larger than the buffer size allocation. This command changes the setting of the CONFIG_BUFSIZE environment variable. use the boot loader boot flash:filesystem:/file-url command. the boot loader attempts to automatically boot the system.
Cisco IOS Global Configuration Command boot system filesystem:/file-url
A semicolon-separated list of executable files to Specifies the Cisco IOS image to load during the next boot cycle. MANUAL_BOOT set MANUAL_BOOT yes boot manual Determines whether the switch automatically or Enables manually booting the switch during the next boot cycle and changes the setting of the manually boots.. Valid values are 1. 0. you must manually boot the switch from the boot loader mode.. CONFIG_BUFSIZE set CONFIG_BUFSIZE size Changes the buffer size that Cisco IOS uses to hold a copy of the configuration file in memory. To boot the system. If it is set to no MANUAL_BOOT environment variable. the system attempts to load and execute the first executable image it can find by using a recursive. set. If the BOOT environment variable is not setting of the BOOT environment variable. You must reload the switch by using the reload privileged EXEC command for this command to take effect. This command changes the CONFIG_FILE environment variable. or 0. The next time you reboot the system. depth-first search through the Flash file system. The buffer holds a copy of the configuration file in memory. the switch is in boot loader mode. boot buffersize size Specifies the size of the file system-simulated NVRAM in Flash memory. The range is from 4096 to 524288 bytes. This command changes the try to load and execute when automatically booting.Chapter 4
Assigning the Switch IP Address and Default Gateway Modifying the Startup Configuration
Table 4-4 describes the function of the most common environment variables. If it is set to anything else.

late at night or during the weekend when the switch is used less). If you do not specify the month and day. the system enters setup mode upon reload. If the system is not set to manually boot.
Configuring a Scheduled Reload
To configure your switch to reload the software image at a later time.
•
reload at hh:mm [month day | day month] [text] This command schedules a reload of the software to take place at the specified time (using a 24-hour clock). Use the reload command after you save the switch configuration information to the startup configuration (copy running-config startup-config).m:
Switch# reload at 19:30 Reload scheduled for 19:30:00 UTC Wed Jun 5 1996 (in 2 hours and 25 minutes) Proceed with reload? [confirm]
Catalyst 3560 Switch Software Configuration Guide
4-16
78-16156-01
. or you can synchronize a reload network-wide (for example. You can specify the reason for the reload in a string up to 255 characters in length. the reload takes place at the specified time on the current day (if the specified time is later than the current time) or on the next day (if the specified time is earlier than the current time). If you modify your configuration file. The time is relative to the configured time zone on the switch. or manually).
The reload command halts the system. the time on each switch must be synchronized with NTP. If you proceed in this situation. the switch prompts you to save the configuration before reloading. To schedule reloads across several switches to occur simultaneously. it reboots itself.
Note
A scheduled reload must take place within approximately 24 days.
Note
Use the at keyword only if the switch system clock has been set (through Network Time Protocol (NTP). to perform a software upgrade on all switches in the network). the reload is scheduled to take place at the specified time and date. the hardware calendar. do not reload it from a virtual terminal. During the save operation. If you specify the month and day. If your switch is configured for manual booting. The reload must take place within approximately 24 days. This example shows how to reload the software on the switch on the current day at 7:30 p. use one of these commands in privileged EXEC mode:
•
reload in [hh:]mm [text] This command schedules a reload of the software to take affect in the specified minutes or hours and minutes. Specifying 00:00 schedules the reload for midnight. the system requests whether you want to proceed with the save if the CONFIG_FILE environment variable points to a startup configuration file that no longer exists. This restriction prevents the switch from entering the boot loader mode and thereby taking it from the remote user’s control.Chapter 4 Scheduling a Reload of the Software Image
Assigning the Switch IP Address and Default Gateway
Scheduling a Reload of the Software Image
You can schedule a reload of the software image to occur on the switch at a later time (for example.

Chapter 4
Assigning the Switch IP Address and Default Gateway Scheduling a Reload of the Software Image
This example shows how to reload the software on the switch at a future time:
Switch# reload at 02:00 jun 20 Reload scheduled for 02:00:00 UTC Thu Jun 20 1996 (in 344 hours and 53 minutes) Proceed with reload? [confirm]
To cancel a previously scheduled reload. use the reload cancel privileged EXEC command. It displays reload information including the time the reload is scheduled to occur and the reason for the reload (if it was specified when the reload was scheduled).
Displaying Scheduled Reload Information
To display information about a previously scheduled reload or to find out if a reload has been scheduled on the switch.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
4-17
. use the show reload privileged EXEC command.

For complete cluster information for a specific Catalyst platform. It also includes guidelines and limitations for clusters mixed with other cluster-capable Catalyst switches. refer to the switch command reference. “Getting Started with CMS. information in this chapter focuses on using CMS to create a cluster. page 5-22
• • •
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
5-1
. page 5-16
Note
Configuring switch clusters is more easily done from the Cluster Management Suite (CMS) web-based interface than through the command-line interface (CLI). Verifying a Switch Cluster. but it does not provide complete descriptions of the cluster features for these other switches. page 5-4 Creating a Switch Cluster. page 5-20 Using the CLI to Manage Switch Clusters. For the CLI cluster commands. page 5-21 Using SNMP to Manage Switch Clusters.” for additional information about switch clusters and the clustering options.C H A P T E R
5
Clustering Switches
This chapter provides the concepts and procedures to create and manage Catalyst 3560 switch clusters. refer to the software configuration guide for that switch. See Chapter 3. For complete procedures about using CMS to configure switch clusters. page 5-2 Planning a Switch Cluster.
Note
This chapter focuses on Catalyst 3560 switch clusters. refer to the online help. Therefore. This chapter consists of these sections:
• • •
Understanding Switch Clusters.

Cluster members can belong to only one cluster at a time. For complete information about these switches in a switch-cluster environment. especially if you have a limited number of them. One or more switches can be designated as standby cluster command switches to avoid loss of contact with cluster members. and monitor the cluster member switches. or Catalyst 3750 switch as a Layer 3 router between the Layer 2 switches in the cluster) network.
•
Command-switch redundancy if a cluster command switch fails. The switches in the cluster use the switch clustering technology so that you can configure and troubleshoot a group of different Catalyst desktop switch platforms through a single IP address. and the required software versions. or they can be distributed across a Layer 2 or Layer 3 (if your cluster is using a Catalyst 3550. manage. 1 switch must be the cluster command switch and up to 15 other switches can be cluster member switches. Catalyst 3560. Catalyst 2820.
•
Refer to the release notes for the list of Catalyst switches eligible for switch clustering. All communication with the switch cluster is through the cluster command switch IP address. The switches can be in the same location. and Catalyst 3500 XL switches. page 5-3 Candidate Switch and Cluster Member Switch Characteristics. A cluster standby group is a group of standby cluster command switches. The benefits of clustering switches include:
•
Management of Catalyst switches regardless of their interconnection media and their physical locations. page 5-3 Standby Cluster Command Switch Characteristics. Catalyst 2900 XL. The total number of switches in a cluster cannot exceed 16 switches.Chapter 5 Understanding Switch Clusters
Clustering Switches
Understanding Switch Clusters
A switch cluster is a set of up to 16 connected. The cluster command switch is the single point of access used to configure. page 5-4
Catalyst 3560 Switch Software Configuration Guide
5-2
78-16156-01
. Cluster members are connected to the cluster command switch according to the connectivity guidelines described in the “Automatic Discovery of Cluster Candidates and Members” section on page 5-5. refer to the software configuration guide for that specific switch. Management of a variety of Catalyst switches through a single IP address. This section includes management VLAN considerations for the Catalyst 1900. These sections describe:
• • •
Cluster Command Switch Characteristics. Catalyst 2950. including which ones can be cluster command switches and which ones can only be cluster member switches. This conserves on IP addresses. In a switch cluster. cluster-capable Catalyst switches that are managed as a single entity.

It has CDP version 2 enabled. It is not a command or cluster member switch of another cluster.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
5-3
. the standby cluster command switches must also be Catalyst 3560 switches. It is redundantly connected to the cluster so that connectivity to cluster member switches is maintained. if the cluster command switch is a Catalyst 3560 switch. If the switch cluster has a Catalyst 3750 switch or switch stack. it should be the cluster command switch unless the cluster has a Catalyst 3750 switch or switch stack. that switch or switch stack must be the cluster command switch. It is connected to all other cluster member switches (except the cluster command and standby command switches) through a common VLAN. It is connected to the command switch and to other standby command switches through its management VLAN. It is connected to the standby cluster command switches through the management VLAN and to the cluster member switches through a common VLAN.1(19)EA1 or later. For example.
Standby Cluster Command Switch Characteristics
A standby cluster command switch must meet these requirements:
• • • • • • •
It is running Cisco IOS Release 12. It has an IP address.
Note
Standby cluster command switches must be the same type of switches as the cluster command switch. It has Cisco Discovery Protocol (CDP) version 2 enabled (the default). Refer to the switch configuration guide of other cluster-capable switches for their requirements on standby cluster command switches.1(19)EA1 or later. It is not a command or member switch of another cluster.
Note
If your switch cluster has a Catalyst 3560 switch. It has an IP address.Chapter 5
Clustering Switches Understanding Switch Clusters
Cluster Command Switch Characteristics
A cluster command switch must meet these requirements:
• • • • •
It is running Cisco IOS Release 12.

The VLAN to each standby cluster command switch can be different. it is connected to every standby cluster command switch through at least one common VLAN.Chapter 5 Planning a Switch Cluster
Clustering Switches
Candidate Switch and Cluster Member Switch Characteristics
Candidate switches are cluster-capable switches that have not yet been added to a cluster. see the “IP Addresses” section on page 5-13 and “Passwords” section on page 5-14).
Note
Catalyst 1900. This section describes these guidelines. Candidate and cluster member switches can connect through any VLAN in common with the cluster command switch. page 5-15 LRE Profiles. For complete information about these switches in a switch-cluster environment. Catalyst 3550. and Catalyst 3500 XL candidate and cluster member switches must be connected through their management VLAN to the cluster command switch and standby cluster command switches. a candidate or cluster member switch can have its own IP address and password (for related considerations. This requirement does not apply if you have a Catalyst 2970. and for the required software versions and browser and Java plug-in configurations. or Catalyst 3750 cluster command switch. Catalyst 2900 XL. page 5-14 TACACS+ and RADIUS. page 5-5 HSRP and Standby Cluster Command Switches. refer to the software configuration guide for that specific switch. Catalyst 3560. It has CDP version 2 enabled. To join a cluster.
Planning a Switch Cluster
Anticipating conflicts and compatibility issues is a high priority when you manage several switches through a cluster. Although not required. page 5-13 Host Names. and caveats that you should understand before you create the cluster:
• • • • • • • • • •
Automatic Discovery of Cluster Candidates and Members. It is connected to the cluster command switch through at least one common VLAN. requirements. page 5-10 IP Addresses. page 5-14 SNMP Community Strings. Catalyst 2820. page 5-15
Refer to the release notes for the list of Catalyst switches eligible for switch clustering. a candidate switch must meet these requirements:
• • • • •
It is running cluster-capable software. Catalyst 2950. page 5-13 Passwords. It is not a command or cluster member switch of another cluster.
Catalyst 3560 Switch Software Configuration Guide
5-4
78-16156-01
. page 5-15 Availability of Switch-Specific Features in Switch Clusters. including which ones can be cluster command switches and which ones can only be cluster member switches. Cluster member switches are switches that have actually been added to a switch cluster. page 5-14 Access Modes in CMS. If a cluster standby group exists.

page 5-8 Discovery of Newly Installed Switches. The edge of the cluster is where the last cluster member switches are connected to the cluster and to candidate switches.” Following these connectivity guidelines ensures automatic discovery of the switch cluster. In Figure 5-1. The cluster command switch discovers switches 11. 12. neighboring switch clusters. 13. the cluster command switch has ports assigned to VLANs 16 and 62. and 14 because they are within three hops from the edge of the cluster. and neighboring edge devices:
• • • • • •
Discovery Through CDP Hops. connected switch clusters. For more information about CDP.Chapter 5
Clustering Switches Planning a Switch Cluster
Automatic Discovery of Cluster Candidates and Members
The cluster command switch uses Cisco Discovery Protocol (CDP) to discover cluster member switches. page 5-5 Discovery Through Non-CDP-Capable and Noncluster-Capable Devices. page 5-9
Discovery Through CDP Hops
By using CDP. The CDP hop count is three.
Note
Do not disable CDP on the cluster command switch. You can set the number of hops the cluster command switch searches for candidate and cluster member switches by selecting Cluster > Hop Count. page 5-6 Discovery Through Different VLANs. cluster member switches 9 and 10 in Figure 5-1 are at the edge of the cluster. and edge devices across multiple VLANs and in star or cascaded topologies. the cluster command switch discovers them and adds them to the list of candidate switches. page 5-7 Discovery Through Routed Ports. It does not discover switch 15 because it is four hops from the edge of the cluster. cluster candidates. or on any cluster-capable switches that you might want a cluster command switch to discover. see Chapter 21. “Configuring CDP. When new candidate switches are added to the network. candidate switches. For example. on cluster members. page 5-7 Discovery Through Different Management VLANs.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
5-5
. a cluster command switch can discover switches up to seven CDP hops away (the default is three hops) from the edge of the cluster.

Note
If the switch cluster has a Catalyst 3750 switch or switch stack. and Catalyst 3500 XL cluster member switches must be connected to the cluster command switch through their management VLAN. As cluster member switches. For information about discovery through management VLANs. see Chapter 12. and 62 and therefore discovers the switches in those VLANs. Catalyst 2900 XL.Chapter 5
Clustering Switches Planning a Switch Cluster
Discovery Through Different VLANs
If the cluster command switch is a Catalyst 2970. The cluster command switch in Figure 5-3 has ports assigned to VLANs 9. They do not need to be connected to the cluster command switch through their management VLAN. they must be connected through at least one VLAN in common with the cluster command switch. the “Discovery Through Different Management VLANs” section on page 5-7. “Configuring VLANs.16
VLAN 16
VLAN trunk 4. Catalyst 3550. or Catalyst 3750 cluster command switches can discover and manage cluster member switches in different VLANs and different management VLANs. they must be connected through at least one VLAN in common with the cluster command switch. As cluster member switches.”
Figure 5-3 Discovery Through Different VLANs
Command switch
VLAN 62
VLAN trunk 9. It also does not discover the switch in VLAN 16 in the first column because the cluster command switch has no VLAN connectivity to it. Catalyst 3560. or Catalyst 3750 switch.16 VLAN 50
VLAN 62
VLAN trunk 9. the cluster can have cluster member switches in different VLANs. Catalyst 2950.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
5-7
. It does not discover the switch in VLAN 50.16
101322
Discovery Through Different Management VLANs
Catalyst 2970. 16. Catalyst 3560. The default management VLAN is VLAN 1. Catalyst 3550. that switch or switch stack must be the cluster command switch. For more information about VLANs.

the new switch and its access ports are assigned to VLAN 1. An access port (AP) carries the traffic of and belongs to only one VLAN. When the new switch joins a cluster. its default VLAN changes to the VLAN of the immediately upstream neighbor. The cluster command switch in Figure 5-6 belongs to VLANs 9 and 16. the new. When new cluster-capable switches join the cluster:
• •
One cluster-capable switch and its access port are assigned to VLAN 9.Chapter 5
Clustering Switches Planning a Switch Cluster
Figure 5-5
Discovery Through Routed Ports
Command switch VLAN 9 RP VLAN 62 VLAN 9 VLAN 62 (management VLAN 62) VLAN 4
101324
RP
VLAN 9 Member switch 7
Discovery of Newly Installed Switches
To join a cluster. By default. The other cluster-capable switch and its access port are assigned to management VLAN 16. The new switch also configures its access port to belong to the VLAN of the immediately upstream neighbor. out-of-the-box switch must be connected to the cluster through one of its access ports.
Discovery of Newly Installed Switches
Figure 5-6
Command switch
VLAN 9 Switch A AP VLAN 9 New (out-of-box) candidate switch
VLAN 16 Switch B AP VLAN 16
101325
New (out-of-box) candidate switch
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
5-9
.

For the limitations to automatic discovery. configure a standby cluster command switch to take over if the primary cluster command switch fails. The other switches in the cluster standby group are the passive cluster command switches (PC). The HSRP standby priority interface configuration commands are the same for changing the priority of cluster standby group members and router-redundancy group members. The switches in the cluster standby group are ranked according to HSRP priorities. For information about changing HSRP priority values. If the switch cluster has a Catalyst 3750 switch or switch stack. cluster candidates. page 5-11 Automatic Recovery of Cluster Configuration. page 5-11 Other Considerations for Cluster Standby Groups. Only one cluster standby group can be assigned per cluster. However.Chapter 5 Planning a Switch Cluster
Clustering Switches
HSRP and Standby Cluster Command Switches
The switch supports Hot Standby Router Protocol (HSRP) so that you can configure a group of standby cluster command switches.
Note
The HSRP standby hold time interval should be greater than or equal to three times the hello time interval. the passive cluster command switch with the highest priority becomes the active cluster command switch. that switch or switch stack must be the cluster command switch. These topics also provide more detail about standby cluster command switches:
• • •
Virtual IP Addresses. If the active cluster command switch and the standby cluster command switch become disabled at the same time. we strongly recommend the following:
•
For a cluster command switch stack. The default HSRP standby hello time interval is 3 seconds.
•
A cluster standby group is a group of command-capable switches that meet the requirements described in the “Standby Cluster Command Switch Characteristics” section on page 5-3. connected switch clusters. The default HSRP standby hold time interval is 10 seconds. see the “Configuring HSRP Authentication and Timers” section on page 31-8. see the “Configuring HSRP Priority” section on page 31-6. the switch stack elects a new stack master and resumes its role as the cluster command switch stack.
Note
If your switch cluster has a Catalyst 3560 switch. a standby cluster command switch is necessary if the entire switch stack fails. These connectivity guidelines ensure automatic discovery of the switch cluster.
Note
The cluster standby group is an HSRP group. it should be the cluster command switch unless the cluster has a Catalyst 3750 switch or switch stack. see the “Automatic Recovery of Cluster Configuration” section on page 5-12. if only the stack master in the command switch stack fails. page 5-12
Catalyst 3560 Switch Software Configuration Guide
5-10
78-16156-01
. and neighboring edge devices. For a cluster command switch that is a standalone switch. Because a cluster command switch manages the forwarding of all communication and configuration information to all the cluster member switches. The switch with the next highest priority is the standby cluster command switch (SC). For more information about the standby hold time and standby hello time intervals. The switch with the highest priority in the group is the active cluster command switch (AC). Disabling HSRP disables the cluster standby group.

“Configuring HSRP. You can re-enable it by using the CLI.”
•
All standby-group members must be members of the cluster. and cluster member switches—cannot be more than 16. the cluster command switch and standby cluster command switches are Catalyst 2970. This is in case the IP address of the active cluster command switch is different from the virtual IP address of the cluster standby group. not through the command-switch IP address. you must access the active cluster command switch through the virtual IP address. the standby cluster command switches must also be Catalyst 3560 switches. To manage the cluster. An HSRP group can be both a cluster standby group and a router-redundancy group. if the cluster command switch is a Catalyst 3560 switch.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
5-11
. it should be the cluster command switch unless the cluster has a Catalyst 3750 switch or switch stack. However.
•
Only one cluster standby group can be assigned to a cluster. that switch or switch stack must be the cluster command switch. This information must be configured on a specific VLAN or routed port on the active cluster command switch. router redundancy becomes disabled on that group. In this example. For example. For more information about HSRP and router redundancy. and the current active cluster command switch becomes the standby cluster command switch again. Catalyst 3550.
Note
There is no limit to the number of switches that you can assign as standby cluster command switches. Refer to the switch configuration guide of other cluster-capable switches for their requirements on standby cluster command switches. You can have more than one router-redundancy standby group. the standby cluster command switch assumes ownership of the virtual IP address and becomes the active cluster command switch. Catalyst 3560. the total number of switches in the cluster—which would include the active cluster command switch. standby-group members. The passive switches in the cluster standby group compare their assigned priorities to decide the new standby cluster command switch. Each standby-group member must also be redundantly connected to each other through at least one VLAN in common with the switch cluster. The active cluster command switch receives traffic destined for the virtual IP address. If your switch cluster has a Catalyst 3560 switch. If the switch cluster has a Catalyst 3750 switch or switch stack.
•
Each standby-group member (Figure 5-7) must be connected to the cluster command switch through the same VLAN. if a router-redundancy group becomes a cluster standby group. If the active cluster command switch fails. see the “IP Addresses” section on page 5-13.Chapter 5
Clustering Switches Planning a Switch Cluster
Virtual IP Addresses
You need to assign a unique virtual IP address and group number and name to the cluster standby group. However. or Catalyst 3750 cluster command switches. The passive standby switch with the highest priority then becomes the standby cluster command switch.
Other Considerations for Cluster Standby Groups
These requirements also apply:
•
Standby cluster command switches must be the same type of switches as the cluster command switch. see Chapter 31. For more information about IP address in switch clusters. When the previously active cluster command switch becomes active again. it resumes its role as the active cluster command switch.

This limitation applies to all clusters: If the active cluster command switch fails and becomes active again. However. Catalyst 3550.16 VLANs 9. the new cluster command switch does not discover any Catalyst 1900. and Catalyst 2916M XL cluster member switches. and Catalyst 3500 XL cluster member switches must be connected to the cluster standby group through their management VLANs. You must re-add these cluster member switches to the cluster. the previous cluster command switch did not forward cluster-configuration information to it. Catalyst 3560. and Catalyst 3750 command and standby cluster command switches: If the active cluster command switch and standby cluster command switch become disabled at the same time. the passive cluster command switch with the highest priority becomes the active cluster command switch. Automatic discovery has these limitations:
•
This limitation applies only to clusters that have Catalyst 2950.16 Management VLAN 16
VLAN 9
Management VLAN 9
VLAN 9
Management VLAN 16
VLAN 16
Member switches
Automatic Recovery of Cluster Configuration
The active cluster command switch continually forwards cluster-configuration information (but not device-configuration information) to the standby cluster command switch. Catalyst 2820. it does not discover any Catalyst 1900.Chapter 5 Planning a Switch Cluster
Clustering Switches
Catalyst 1900. see these sections:
– “Discovery Through Different VLANs” section on page 5-7 – “Discovery Through Different Management VLANs” section on page 5-7 Figure 5-7 VLAN Connectivity between Standby-Group Members and Cluster Members
Command switch
Standby Passive command switch command switch VLANs 9. because it was a passive standby cluster command switch. This limitation applies to all clusters: If the active cluster command switch fails and there are more than two switches in the cluster standby group. For more information about VLANs in switch clusters. and Catalyst 2916M XL cluster member switches. This ensures that the standby cluster command switch can take over the cluster immediately after the active cluster command switch fails. Catalyst 2820. Catalyst 2950. Catalyst 2900 XL.
•
•
Catalyst 3560 Switch Software Configuration Guide
5-12
101326
78-16156-01
. You must therefore rebuild the cluster. You must again add these cluster member switches to the cluster. Catalyst 2820. The active cluster command switch only forwards cluster-configuration information to the standby cluster command switch.

a host name assigned to the cluster command switch can help to identify the switch cluster. and you can access the cluster through any of the command-switch IP addresses. the cluster command switch appends a unique member number to its own host name and assigns it sequentially as each switch joins the cluster. see Chapter 4. it receives a copy of the latest cluster configuration from the active cluster command switch. the old host name (such as eng-cluster-5) is overwritten with the host name of the cluster command switch in the new cluster (such as mkg-cluster-5). it retains that name when it joins a cluster. The number means the order in which the switch was added to the cluster. If a switch has a host name. was removed from a cluster.Chapter 5
Clustering Switches Planning a Switch Cluster
When the previously active cluster command switch resumes its active role.
IP Addresses
You must assign IP information to a cluster command switch. You can assign an IP address to a cluster-capable switch. the switch retains the previous name (eng-cluster-5).
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
5-13
. as described in the release notes. However. you must use the standby-group virtual IP address to manage the cluster from the active cluster command switch. For example.
Note
Changing the cluster command switch IP address ends your CMS session on the switch. including members that were added while it was down. and kept the same member number (such as 5). The active cluster command switch sends a copy of the cluster configuration to the cluster standby group. Using the virtual IP address ensures that you retain connectivity to the cluster if the active cluster command switch fails and that a standby cluster command switch becomes the active cluster command switch. If a switch received its host name from the cluster command switch. It retains that host name even after it leaves the cluster. If the active cluster command switch fails and the standby cluster command switch takes over. you must either use the standby-group virtual IP address or any of the IP addresses available on the new active cluster command switch to access the cluster. The default host name for the switch is Switch. you then must assign IP information to it to manage it as a standalone switch. but it is not necessary.”
Host Names
You do not need to assign a host name to either a cluster command switch or an eligible cluster member. A cluster member switch is managed and communicates with other cluster member switches through the command-switch IP address. If a switch joins a cluster and it does not have a host name. If the switch member number changes in the new cluster (such as 3). If the cluster member switch leaves the cluster and it does not have its own IP address. If you configure a cluster standby group. You can assign more than one IP address to the cluster command switch. For more information about IP addresses. “Assigning the Switch IP Address and Default Gateway. Restart your CMS session by entering the new IP address in the browser Location field (Netscape Communicator) or Address field (Internet Explorer). a cluster command switch named eng-cluster could name the fifth cluster member eng-cluster-5. was then added to a new cluster.

where N is the member-switch number. For password considerations specific to the Catalyst 1900 and Catalyst 2820 switches. see Chapter 26. Cluster member switches only inherit the command-switch password.” For SNMP considerations specific to the Catalyst 1900 and Catalyst 2820 switches. “Configuring SNMP.Chapter 5 Planning a Switch Cluster
Clustering Switches
Passwords
You do not need to assign passwords to an individual switch if it will be a cluster member.
SNMP Community Strings
A cluster member switch inherits the command-switch first read-only (RO) and read-write (RW) community strings with @esN appended to the community strings:
• •
command-switch-readonly-community-string@esN. The switches support an unlimited number of community strings and string lengths. When a switch joins a cluster. For more information about SNMP and community strings. where N is the member-switch number. the cluster member switch inherits a null password. Similarly. command-switch-readwrite-community-string@esN. see the “Controlling Switch Access with TACACS+” section on page 8-10. it inherits the command-switch password and retains it when it leaves the cluster. Further. refer to the installation and configuration guides specific to those switches. the switch is not manageable by the cluster command switch until you change the member-switch password to match the command-switch password. For more information about TACACS+. For more information about passwords. the same switch cluster cannot have some members configured with TACACS+ and other members configured with RADIUS. it must be configured on all cluster members. If no command-switch password is configured. Rebooting the member switch does not revert the password back to the command-switch password. it must be configured on all cluster members. refer to the installation and configuration guides for those switches. We recommend that you do not change the member-switch password after it joins a cluster. If you change the member-switch password to be different from the command-switch password and save the change. If Terminal Access Controller Access Control System Plus (TACACS+) is configured on a cluster member. see the “Controlling Switch Access with RADIUS” section on page 8-18. if Remote Authentication Dial-In User Service (RADIUS) is configured on a cluster member. For more information about RADIUS.
If the cluster command switch has multiple read-only or read-write community strings.
Catalyst 3560 Switch Software Configuration Guide
5-14
78-16156-01
.
TACACS+ and RADIUS
Inconsistent authentication configurations in switch clusters cause CMS to continually prompt for a user name and password. see the “Preventing Unauthorized Access to Your Switch” section on page 8-1. only the first read-only and read-write strings are propagated to the cluster member switch.

0(5)WC2 or earlier Catalyst 3550 cluster member switches running Cisco IOS Release 12. make sure that you assign it the same public profile used by other LRE switches in the cluster. all LRE switches in that cluster must have that same public profile. For more information about CMS access modes.1(6)EA1 or earlier
These switches do not support read-only mode on CMS:
• •
Catalyst 1900 and Catalyst 2820 Catalyst 2900 XL switches with 4-MB CPU DRAM
In read-only mode.
LRE Profiles
A configuration conflict occurs if a switch cluster has Long-Reach Ethernet (LRE) switches that use both private and public profiles. these switches appear as unavailable devices and cannot be configured from CMS. Device > LRE Profile appears in the command-switch menu bar when at least one Catalyst 2900 LRE XL switch is in the cluster. features specific to a cluster member switch are available from the command-switch menu bar. For example. A cluster can have a mix of LRE switches that use different private profiles. see the “Access to Older Switches In a Cluster” section on page 3-7.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
5-15
.Chapter 5
Clustering Switches Planning a Switch Cluster
Access Modes in CMS
If your cluster has these cluster member switches running earlier software releases and if you have read-only access to these cluster member switches. If one LRE switch in a cluster is assigned a public profile. Therefore.
Availability of Switch-Specific Features in Switch Clusters
The menu bar on the cluster command switch displays all options available from the switch cluster.0(5)WC2 or earlier Catalyst 2950 cluster member switches running Cisco IOS Release 12. Before you add an LRE switch to a cluster. some configuration windows for those switches display incomplete information:
• • •
Catalyst 2900 XL or Catalyst 3500 XL cluster member switches running Cisco IOS Release 12.

including which ones can be cluster command switches and which ones can only be cluster member switches. If you did not enable a cluster command switch during initial switch setup.Chapter 5 Creating a Switch Cluster
Clustering Switches
Creating a Switch Cluster
Using CMS to create a cluster is easier than using the CLI commands. you can use the cluster enable global configuration command. This section provides this information:
• • •
Enabling a Cluster Command Switch. page 5-19
This section assumes you have already connected the switches.
Figure 5-8 Create Cluster Window
C3750-24TS Enter up to 31 characters to name the cluster. If the switch cluster has a Catalyst 3750 switch or switch stack.
Note
If your switch cluster has a Catalyst 3560 switch. it should be the cluster command switch unless the cluster has a Catalyst 3750 switch or switch stack. and for the required software versions and browser and Java plug-in configurations. as described in the switch hardware installation guide. that switch or switch stack must be the cluster command switch. page 5-16 Adding Cluster Member Switches. and followed the guidelines described in the “Planning a Switch Cluster” section on page 5-4. the “Planning a Switch Cluster” section on page 5-4.
93333
Catalyst 3560 Switch Software Configuration Guide
5-16
78-16156-01
. and assign an IP address and a password to the cluster command switch when you run the setup program during initial switch setup. Enter a cluster number (the default is 0). For information about using the setup program.
Enabling a Cluster Command Switch
The switch you designate as the cluster command switch must meet the requirements described in the “Cluster Command Switch Characteristics” section on page 5-3.
Note
Refer to the release notes for the list of Catalyst switches eligible for switch clustering. launch Device Manager from a command-capable switch. and select Cluster > Create Cluster. refer to the release notes. You can enable a cluster command switch. name the cluster. page 5-17 Creating a Cluster Standby Group. Instead of using CMS to enable a cluster command switch. and the release notes. and use up to 31 characters to name the cluster (Figure 5-8).

there are two ways to add switches to a cluster:
•
Select Cluster > Add to Cluster. see the “Passwords” section on page 5-14. and add them at the same time. it inherits the command-switch password. only that specific candidate switch is not added to the cluster. or follow these steps:
1. Display the Topology view. click Add. If a password has been configured on a candidate switch. If multiple candidates switches have the same password. For more information about setting passwords. To display an updated cluster candidates list from the Add to Cluster window (Figure 5-9). You can select 1 or more switches as long as the total number of switches in the cluster does not exceed 16 (this includes the cluster command switch).
•
Instead of using CMS to add members to the cluster. To add more than one candidate switch. and select Add to Cluster (Figure 5-10). and left-click the candidates that you want to add. press Ctrl. In this case. If a candidate switch in the group has a password different from the group.Chapter 5
Clustering Switches Creating a Switch Cluster
Adding Cluster Member Switches
As explained in the “Automatic Discovery of Cluster Candidates and Members” section on page 5-5. and make your choices. you must remove a cluster member switch before adding a new one. If the candidate switch does not have a password. select a candidate switch from the list. When you add new cluster-capable switches to the network. the cluster command switch automatically discovers candidate switches. the cluster command switch discovers them and adds them to a list of candidate switches. and click OK. Select View > Refresh. Use the password option in this command if the candidate switch has a password. and choose the first and last switch in a range. the Add to Cluster option is not available for that cluster. When a cluster has 16 members. or press Shift.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
5-17
. any entry is ignored. Select Cluster > Add to Cluster to redisplay the Add to Cluster window.
Close the Add to Cluster window. 2. either relaunch CMS and redisplay this window. In the Topology view. When a candidate switch joins a cluster. you can select them as a group. For additional authentication considerations in switch clusters. see the “TACACS+ and RADIUS” section on page 5-14. To add more than one candidate switch. candidate switches are cyan. right-click a candidate-switch icon. you are prompted to enter it before it can be added it to the cluster. and cluster member switches are green. 3. press Ctrl. you can use the cluster member global configuration command from the cluster command switch.
From CMS.

This address must be in the same subnet as the IP addresses of the switch. If you use this window to create the standby group. and the default is 0. These abbreviations are appended to the switch host names in the Standby Command Group list to show their eligibility or status in the cluster standby group:
• • • • •
AC—Active cluster command switch SC—Standby cluster command switch PC—Member of the cluster standby group but not the standby cluster command switch HC—Candidate switch that can be added to the cluster standby group CC—Cluster command switch when HSRP is disabled
You must enter a virtual IP address for the cluster standby group. all switches in the group have the preempt command enabled. Instead of using CMS to add switches to a standby group and to bind the standby group to a cluster. The group name can have up to 31 characters. if the cluster command switch is a Catalyst 3560 switch. The default HSRP standby hold time interval is 10 seconds.
Note
Standby cluster command switches must be the same type of switches as the cluster command switch. the standby cluster command switches must also be Catalyst 3560 switches. You must also provide a name for the group. and the standby priority interface configuration commands and the cluster standby group global configuration command. Refer to the switch configuration guide of other cluster-capable switches for their requirements on standby cluster command switches. To create a cluster standby group. you can use the standby ip.Chapter 5
Clustering Switches Creating a Switch Cluster
Creating a Cluster Standby Group
The cluster standby group members must meet the requirements described in the “Standby Cluster Command Switch Characteristics” section on page 5-3 and “HSRP and Standby Cluster Command Switches” section on page 5-10.
Note
The HSRP standby hold time interval should be greater than or equal to three times the hello time interval. For example. The Standby Command Configuration window uses the default values for the preempt and name commands that you have set by using the CLI.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
5-19
. see the “Configuring HSRP Authentication and Timers” section on page 31-8. The default HSRP standby hello time interval is 3 seconds. The group number must be unique within the IP subnet. select Cluster > Standby Command Switches (Figure 5-11). the standby name. For more information about the standby hold time and standby hello time intervals. It can be from 0 to 255.

0) G-M-C3550-24 (cisco WS-C3550-24.
Step 4
Instead of using CMS to verify the cluster. HC. HC. CC. For complete information about the Topology view. you can use the show cluster members user EXEC command from the cluster command switch or use the show cluster user EXEC command from the cluster command switch or from a cluster member switch. You can also display port and switch statistics from Reports > Port Statistics and Port > Port Settings > Runtime Status. Once entered. see the “Topology View” section on page 3-2.)
stack1 (cisco WS-3750-48. Standby command switch. links. Enter the command-switch password. Select Reports > Inventory to display an inventory of the switches in the cluster (Figure 5-12). serial numbers. this information cannot be changed.Chapter 5 Verifying a Switch Cluster
Clustering Switches
Figure 5-11 Standby Command Configuration Window
stack10 (cisco WS-C3750-24TS.. and colors. H
Active command switch..
93336
Verifying a Switch Cluster
When you finish adding cluster members. TRS (cisco WS-C37xx-24.
Catalyst 3560 Switch Software Configuration Guide
5-20
78-16156-01
.. follow these steps to verify the cluster:
Step 1 Step 2 Step 3
Enter the cluster command switch IP address in the browser Location field (Netscape Communicator) or Address field (Microsoft Internet Explorer) to access all switches in the cluster. Select View > Topology to display the cluster topology and to view link information (Figure 3-8 on page 3-15).
Must be a valid IP address in the same subnet as the active command switch. including descriptions of the icons. and location. IP information. . software versions. . The summary includes information such as switch model numbers.

see the cluster-related recovery procedures in Chapter 35. For information about the cluster commands. The command mode changes. refer to the switch command reference. “Troubleshooting. The Cisco IOS commands then operate as usual. and the Cisco IOS commands operate as usual. For instructions on configuring the switch for a Telnet session. The Telnet session accesses the member-switch CLI at the same privilege level as on the cluster command switch. refer to the online help.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
5-21
. refer to the switch command reference. enter the show cluster members privileged EXEC command on the cluster command switch. This example shows how to log into member-switch 3 from the command-switch CLI:
switch# rcommand 3
If you do not know the member-switch number.Chapter 5
Clustering Switches Using the CLI to Manage Switch Clusters
Figure 5-12 Inventory Window
If you lose connectivity with a cluster member switch or if a cluster command switch fails. Enter the rcommand user EXEC command and the cluster member switch number to start a Telnet session (through a console or Telnet connection) and to access the cluster member switch CLI. see the “Disabling Password Recovery” section on page 8-5. Enter the exit privileged EXEC command on the cluster member switch to return to the command-switch CLI. For more information about the rcommand command and all other cluster commands.” For more information about creating and managing clusters.
Using the CLI to Manage Switch Clusters
You can configure cluster member switches from the CLI by first logging into the cluster command switch.

SNMP is enabled if you enter the IP information by using the setup program and accept its proposed configuration. the Telnet session accesses the management console (a menu-driven interface) if the cluster command switch is at privilege level 15. you can enable it as described in the “Configuring SNMP” section on page 26-6. without going through the cluster command switch. sets. where N is the switch number) to the first configured read-write and read-only community strings on the cluster command switch and propagates them to the cluster member switch. and get-next messages between the SNMP management station and the cluster member switches. the cluster member switch is accessed at privilege level 1. as shown in Figure 5-13.
Note
The Catalyst 1900 and Catalyst 2820 CLI is available only on switches running Enterprise Edition Software. If the cluster member switch does not have an IP address. If the command-switch privilege level is 15. you are prompted for the password to access the menu console. For more information about SNMP and community strings. the cluster member switch is accessed at privilege level 15. When you create a cluster.
Note
When a cluster standby group is configured. The cluster software on the cluster command switch appends the cluster member switch number (@esN. the cluster command switch manages the exchange of messages between cluster member switches and an SNMP application. SNMP is enabled by default. they can be used in addition to the access provided by the cluster command switch. Use the first read-write and read-only community strings to communicate with the cluster command switch if there is a cluster standby group configured for the cluster. On Catalyst 1900 and Catalyst 2820 switches. For more information about the Catalyst 1900 and Catalyst 2820 switches. If a cluster member switch has its own IP address and community strings. the cluster command switch redirects traps from the cluster member switch to the management station. If a cluster member switch has its own IP address and community strings.
Using SNMP to Manage Switch Clusters
When you first power on the switch. see Chapter 26. “Configuring SNMP. Command-switch privilege levels map to the Catalyst 1900 and Catalyst 2820 cluster member switches running standard and Enterprise Edition Software as follows:
• •
If the command-switch privilege level is 1 to 14. refer to the installation and configuration guides for those switches.”
Catalyst 3560 Switch Software Configuration Guide
5-22
78-16156-01
. the cluster command switch can change without your knowledge. The cluster command switch uses this community string to control the forwarding of gets. If the cluster command switch is at privilege level 1 to 14.Chapter 5 Using SNMP to Manage Switch Clusters
Clustering Switches
Catalyst 1900 and Catalyst 2820 CLI Considerations
If your switch cluster has Catalyst 1900 and Catalyst 2820 switches running standard edition software. the cluster member switch can send traps directly to the management station. If you did not use the setup program to enter the IP information and SNMP was not enabled.

Administering the Switch
This chapter describes how to perform one-time operations to administer the Catalyst 3560 switch. This chapter consists of these sections:
• • • • •

Managing the System Time and Date, page 6-1 Configuring a System Name and Prompt, page 6-15 Creating a Banner, page 6-18 Managing the MAC Address Table, page 6-21 Managing the ARP Table, page 6-28

Managing the System Time and Date
You can manage the system time and date on your switch using automatic configuration, such as the Network Time Protocol (NTP), or manual configuration methods.

Note

For complete syntax and usage information for the commands used in this section, refer to the Cisco IOS Configuration Fundamentals Command Reference for Release 12.1. This section contains this configuration information:
• • • •

Understanding the System Clock
The heart of the time service is the system clock. This clock runs from the moment the system starts up and keeps track of the date and time. The system clock can then be set from these sources:
• •

Network Time Protocol Manual configuration

The system clock can provide time to these services:
• •

User show commands Logging and debugging messages

The system clock keeps track of time internally based on Universal Time Coordinated (UTC), also known as Greenwich Mean Time (GMT). You can configure information about the local time zone and summer time (daylight saving time) so that the time appears correctly for the local time zone. The system clock keeps track of whether the time is authoritative or not (that is, whether it has been set by a time source considered to be authoritative). If it is not authoritative, the time is available only for display purposes and is not redistributed. For configuration information, see the “Configuring Time and Date Manually” section on page 6-11.

Understanding Network Time Protocol
The NTP is designed to time-synchronize a network of devices. NTP runs over User Datagram Protocol (UDP), which runs over IP. NTP is documented in RFC 1305. An NTP network usually gets its time from an authoritative time source, such as a radio clock or an atomic clock attached to a time server. NTP then distributes this time across the network. NTP is extremely efficient; no more than one packet per minute is necessary to synchronize two devices to within a millisecond of one another. NTP uses the concept of a stratum to describe how many NTP hops away a device is from an authoritative time source. A stratum 1 time server has a radio or atomic clock directly attached, a stratum 2 time server receives its time through NTP from a stratum 1 time server, and so on. A device running NTP automatically chooses as its time source the device with the lowest stratum number with which it communicates through NTP. This strategy effectively builds a self-organizing tree of NTP speakers. NTP avoids synchronizing to a device whose time might not be accurate by never synchronizing to a device that is not synchronized. NTP also compares the time reported by several devices and does not synchronize to a device whose time is significantly different than the others, even if its stratum is lower. The communications between devices running NTP (known as associations) are usually statically configured; each device is given the IP address of all devices with which it should form associations. Accurate timekeeping is possible by exchanging NTP messages between each pair of devices with an association. However, in a LAN environment, NTP can be configured to use IP broadcast messages instead. This alternative reduces configuration complexity because each device can simply be configured to send or receive broadcast messages. However, in that case, information flow is one-way only. The time kept on a device is a critical resource; you should use the security features of NTP to avoid the accidental or malicious setting of an incorrect time. Two mechanisms are available: an access list-based restriction scheme and an encrypted authentication mechanism.

Catalyst 3560 Switch Software Configuration Guide

6-2

78-16156-01

Chapter 6

Administering the Switch Managing the System Time and Date

Cisco’s implementation of NTP does not support stratum 1 service; it is not possible to connect to a radio or atomic clock. We recommend that the time service for your network be derived from the public NTP servers available on the IP Internet. Figure 6-1 shows a typical network example using NTP. Switch A is the NTP master, with Switches B, C, and D configured in NTP server mode, in server association with Switch A. Switch E is configured as an NTP peer to the upstream and downstream switches, Switch B and Switch F.
Figure 6-1 Typical NTP Network Configuration

Switch A Local workgroup servers Switch B Switch C Switch D

Switch E

Workstations Switch F

Workstations

If the network is isolated from the Internet, Cisco’s implementation of NTP allows a device to act as though it is synchronized through NTP, when in fact it has determined the time by using other means. Other devices then synchronize to that device through NTP. When multiple sources of time are available, NTP is always considered to be more authoritative. NTP time overrides the time set by any other method. Several manufacturers include NTP software for their host systems, and a publicly available version for systems running UNIX and its various derivatives is also available. This software allows host systems to be time-synchronized as well.

Catalyst 3560 Switch Software Configuration Guide 78-16156-01

101349

6-3

Chapter 6 Managing the System Time and Date

Administering the Switch

Configuring NTP
The switch does not have a hardware-supported clock and cannot function as an NTP master clock to which peers synchronize themselves when an external NTP source is not available. The switch also has no hardware support for a calendar. As a result, the ntp update-calendar and the ntp master global configuration commands are not available. This section contains this configuration information:
• • • • • • •

Default Setting Disabled. No authentication key is specified. None configured. Disabled; no interface sends or receives NTP broadcast packets. No access control is specified. The source address is determined by the outgoing interface.

NTP is enabled on all interfaces by default. All interfaces receive NTP packets.

Catalyst 3560 Switch Software Configuration Guide

6-4

78-16156-01

Chapter 6

Administering the Switch Managing the System Time and Date

Configuring NTP Authentication
This procedure must be coordinated with the administrator of the NTP server; the information you configure in this procedure must be matched by the servers used by the switch to synchronize its time to the NTP server. Beginning in privileged EXEC mode, follow these steps to authenticate the associations (communications between devices running NTP that provide for accurate timekeeping) with other devices for security purposes: Command
Step 1 Step 2 Step 3

For number, specify a key number. The range is 1 to 4294967295. md5 specifies that message authentication support is provided by using the message digest algorithm 5 (MD5). For value, enter an arbitrary string of up to eight characters for the key.

The switch does not synchronize to a device unless both have one of these authentication keys, and the key number is specified by the ntp trusted-key key-number command.
Step 4

ntp trusted-key key-number

Specify one or more key numbers (defined in Step 3) that a peer NTP device must provide in its NTP packets for this switch to synchronize to it. By default, no trusted keys are defined. For key-number, specify the key defined in Step 3. This command provides protection against accidentally synchronizing the switch to a device that is not trusted.

To disable NTP authentication, use the no ntp authenticate global configuration command. To remove an authentication key, use the no ntp authentication-key number global configuration command. To disable authentication of the identity of a device, use the no ntp trusted-key key-number global configuration command. This example shows how to configure the switch to synchronize only to devices providing authentication key 42 in the device’s NTP packets:
Switch(config)# ntp authenticate Switch(config)# ntp authentication-key 42 md5 aNiceKey Switch(config)# ntp trusted-key 42

Catalyst 3560 Switch Software Configuration Guide 78-16156-01

6-5

Chapter 6 Managing the System Time and Date

Administering the Switch

Configuring NTP Associations
An NTP association can be a peer association (this switch can either synchronize to the other device or allow the other device to synchronize to it), or it can be a server association (meaning that only this switch synchronizes to the other device, and not the other way around). Beginning in privileged EXEC mode, follow these steps to form an NTP association with another device: Command
Step 1 Step 2

Purpose Enter global configuration mode. Configure the switch system clock to synchronize a peer or to be synchronized by a peer (peer association). or

ntp server ip-address [version number] Configure the switch system clock to be synchronized by a time server [key keyid] [source interface] [prefer] (server association). No peer or server associations are defined by default.
•

For ip-address in a peer association, specify either the IP address of the peer providing, or being provided, the clock synchronization. For a server association, specify the IP address of the time server providing the clock synchronization. (Optional) For number, specify the NTP version number. The range is 1 to 3. By default, version 3 is selected. (Optional) For keyid, enter the authentication key defined with the ntp authentication-key global configuration command. (Optional) For interface, specify the interface from which to pick the IP source address. By default, the source IP address is taken from the outgoing interface. (Optional) Enter the prefer keyword to make this peer or server the preferred one that provides synchronization. This keyword reduces switching back and forth between peers and servers.

You need to configure only one end of an association; the other device can automatically establish the association. If you are using the default NTP version (version 3) and NTP synchronization does not occur, try using NTP version 2. Many NTP servers on the Internet run version 2. To remove a peer or server association, use the no ntp peer ip-address or the no ntp server ip-address global configuration command. This example shows how to configure the switch to synchronize its system clock with the clock of the peer at IP address 172.16.22.44 using NTP version 2:
Switch(config)# ntp server 172.16.22.44 version 2

Catalyst 3560 Switch Software Configuration Guide

6-6

78-16156-01

Chapter 6

Administering the Switch Managing the System Time and Date

Configuring NTP Broadcast Service
The communications between devices running NTP (known as associations) are usually statically configured; each device is given the IP addresses of all devices with which it should form associations. Accurate timekeeping is possible by exchanging NTP messages between each pair of devices with an association. However, in a LAN environment, NTP can be configured to use IP broadcast messages instead. This alternative reduces configuration complexity because each device can simply be configured to send or receive broadcast messages. However, the information flow is one-way only. The switch can send or receive NTP broadcast packets on an interface-by-interface basis if there is an NTP broadcast server, such as a router, broadcasting time information on the network. The switch can send NTP broadcast packets to a peer so that the peer can synchronize to it. The switch can also receive NTP broadcast packets to synchronize its own clock. This section provides procedures for both sending and receiving NTP broadcast packets. Beginning in privileged EXEC mode, follow these steps to configure the switch to send NTP broadcast packets to peers so that they can synchronize their clock to the switch: Command
Step 1 Step 2 Step 3

ntp broadcast [version number] [key keyid] Enable the interface to send NTP broadcast packets to a peer. [destination-address] By default, this feature is disabled on all interfaces.
• • •

(Optional) For number, specify the NTP version number. The range is 1 to 3. If you do not specify a version, version 3 is used. (Optional) For keyid, specify the authentication key to use when sending packets to the peer. (Optional) For destination-address, specify the IP address of the peer that is synchronizing its clock to this switch.

Step 4 Step 5 Step 6 Step 7

end show running-config copy running-config startup-config

Return to privileged EXEC mode. Verify your entries. (Optional) Save your entries in the configuration file. Configure the connected peers to receive NTP broadcast packets as described in the next procedure. To disable the interface from sending NTP broadcast packets, use the no ntp broadcast interface configuration command. This example shows how to configure a port to send NTP version 2 packets:
Switch(config)# interface gigabitethernet0/1 Switch(config-if)# ntp broadcast version 2

To disable an interface from receiving NTP broadcast packets, use the no ntp broadcast client interface configuration command. To change the estimated round-trip delay to the default, use the no ntp broadcastdelay global configuration command. This example shows how to configure a port to receive NTP broadcast packets:
Switch(config)# interface gigabitethernet0/1 Switch(config-if)# ntp broadcast client

Configuring NTP Access Restrictions
You can control NTP access on two levels as described in these sections:
• •

query-only—Allows only NTP control queries. serve-only—Allows only time requests. serve—Allows time requests and NTP control queries, but does not allow the switch to synchronize to the remote device. peer—Allows time requests and NTP control queries and allows the switch to synchronize to the remote device.

For access-list-number, enter a standard IP access list number from 1 to 99.
Step 3

access-list access-list-number permit source [source-wildcard]

Create the access list.
• • • • Note

For access-list-number, enter the number specified in Step 2. Enter the permit keyword to permit access if the conditions are matched. For source, enter the IP address of the device that is permitted access to the switch. (Optional) For source-wildcard, enter the wildcard bits to be applied to the source. When creating an access list, remember that, by default, the end of the access list contains an implicit deny statement for everything if it did not find a match before reaching the end.

The access group keywords are scanned in this order, from least restrictive to most restrictive:
1. 2. 3. 4.

peer—Allows time requests and NTP control queries and allows the switch to synchronize itself to a device whose address passes the access list criteria. serve—Allows time requests and NTP control queries, but does not allow the switch to synchronize itself to a device whose address passes the access list criteria. serve-only—Allows only time requests from a device whose address passes the access list criteria. query-only—Allows only NTP control queries from a device whose address passes the access list criteria.

If the source IP address matches the access lists for more than one access type, the first type is granted. If no access groups are specified, all access types are granted to all devices. If any access groups are specified, only the specified access types are granted.

Disabling NTP Services on a Specific Interface
NTP services are enabled on all interfaces by default. Beginning in privileged EXEC mode, follow these steps to disable NTP packets from being received on an interface: Command
Step 1 Step 2 Step 3

To re-enable receipt of NTP packets on an interface, use the no ntp disable interface configuration command.

Configuring the Source IP Address for NTP Packets
When the switch sends an NTP packet, the source IP address is normally set to the address of the interface through which the NTP packet is sent. Use the ntp source global configuration command when you want to use a particular source IP address for all NTP packets. The address is taken from the specified interface. This command is useful if the address on an interface cannot be used as the destination for reply packets. Beginning in privileged EXEC mode, follow these steps to configure a specific interface from which the IP source address is to be taken: Command
Step 1 Step 2

Purpose Enter global configuration mode. Specify the interface type and number from which the IP source address is taken. By default, the source address is determined by the outgoing interface. Return to privileged EXEC mode. Verify your entries. (Optional) Save your entries in the configuration file.

configure terminal ntp source type number

Step 3 Step 4 Step 5

end show running-config copy running-config startup-config

Catalyst 3560 Switch Software Configuration Guide

6-10

78-16156-01

Chapter 6

Administering the Switch Managing the System Time and Date

The specified interface is used for the source address for all packets sent to all destinations. If a source address is to be used for a specific association, use the source keyword in the ntp peer or ntp server global configuration command as described in the “Configuring NTP Associations” section on page 6-6.

Displaying the NTP Configuration
You can use two privileged EXEC commands to display NTP information:
• •

show ntp associations [detail] show ntp status

For detailed information about the fields in these displays, refer to the Cisco IOS Configuration Fundamentals Command Reference for Release 12.1.

Configuring Time and Date Manually
If no other source of time is available, you can manually configure the time and date after the system is restarted. The time remains accurate until the next system restart. We recommend that you use manual configuration only as a last resort. If you have an outside source to which the switch can synchronize, you do not need to manually set the system clock. This section contains this configuration information:
• • • •

Setting the System Clock
If you have an outside source on the network that provides time services, such as an NTP server, you do not need to manually set the system clock. Beginning in privileged EXEC mode, follow these steps to set the system clock: Command
Step 1

Purpose Manually set the system clock using one of these formats.
•

clock set hh:mm:ss day month year or clock set hh:mm:ss month day year

For hh:mm:ss, specify the time in hours (24-hour format), minutes, and seconds. The time specified is relative to the configured time zone. For day, specify the day by date in the month. For month, specify the month by name. For year, specify the year (no abbreviation).

• • •

This example shows how to manually set the system clock to 1:32 p.m. on July 23, 2001:
Switch# clock set 13:32:00 23 July 2001

Catalyst 3560 Switch Software Configuration Guide 78-16156-01

6-11

Chapter 6 Managing the System Time and Date

Administering the Switch

Displaying the Time and Date Configuration
To display the time and date configuration, use the show clock [detail] privileged EXEC command. The system clock keeps an authoritative flag that shows whether the time is authoritative (believed to be accurate). If the system clock has been set by a timing source such as NTP, the flag is set. If the time is not authoritative, it is used only for display purposes. Until the clock is authoritative and the authoritative flag is set, the flag prevents peers from synchronizing to the clock when the peers’ time is invalid. The symbol that precedes the show clock display has this meaning:
• • •

*—Time is not authoritative. (blank)—Time is authoritative. .—Time is authoritative, but NTP is not synchronized.

Configuring the Time Zone
Beginning in privileged EXEC mode, follow these steps to manually configure the time zone: Command
Step 1 Step 2

Purpose Enter global configuration mode. Set the time zone. The switch keeps internal time in universal time coordinated (UTC), so this command is used only for display purposes and when the time is manually set.
• • •

configure terminal clock timezone zone hours-offset [minutes-offset]

For zone, enter the name of the time zone to be displayed when standard time is in effect. The default is UTC. For hours-offset, enter the hours offset from UTC. (Optional) For minutes-offset, enter the minutes offset from UTC.

The minutes-offset variable in the clock timezone global configuration command is available for those cases where a local time zone is a percentage of an hour different from UTC. For example, the time zone for some sections of Atlantic Canada (AST) is UTC-3.5, where the 3 means 3 hours and .5 means 50 percent. In this case, the necessary command is clock timezone AST -3 30. To set the time to UTC, use the no clock timezone global configuration command.

Catalyst 3560 Switch Software Configuration Guide

6-12

78-16156-01

Chapter 6

Administering the Switch Managing the System Time and Date

Configuring Summer Time (Daylight Saving Time)
Beginning in privileged EXEC mode, follow these steps to configure summer time (daylight saving time) in areas where it starts and ends on a particular day of the week each year: Command
Step 1 Step 2

Purpose Enter global configuration mode.

configure terminal

clock summer-time zone recurring Configure summer time to start and end on the specified days every year. [week day month hh:mm week day month Summer time is disabled by default. If you specify clock summer-time hh:mm [offset]] zone recurring without parameters, the summer time rules default to the United States rules.
• • • • • •

For zone, specify the name of the time zone (for example, PDT) to be displayed when summer time is in effect. (Optional) For week, specify the week of the month (1 to 5 or last). (Optional) For day, specify the day of the week (Sunday, Monday...). (Optional) For month, specify the month (January, February...). (Optional) For hh:mm, specify the time (24-hour format) in hours and minutes. (Optional) For offset, specify the number of minutes to add during summer time. The default is 60.

The first part of the clock summer-time global configuration command specifies when summer time begins, and the second part specifies when it ends. All times are relative to the local time zone. The start time is relative to standard time. The end time is relative to summer time. If the starting month is after the ending month, the system assumes that you are in the southern hemisphere. This example shows how to specify that summer time starts on the first Sunday in April at 02:00 and ends on the last Sunday in October at 02:00:
Switch(config)# clock summer-time PDT recurring 1 Sunday April 2:00 last Sunday October 2:00

Catalyst 3560 Switch Software Configuration Guide 78-16156-01

6-13

Chapter 6 Managing the System Time and Date

Administering the Switch

Beginning in privileged EXEC mode, follow these steps if summer time in your area does not follow a recurring pattern (configure the exact date and time of the next summer time events): Command
Step 1 Step 2

Purpose Enter global configuration mode.

configure terminal

Configure summer time to start on the first date and end on the second clock summer-time zone date [month date year hh:mm month date year hh:mm date. [offset]] Summer time is disabled by default. or • For zone, specify the name of the time zone (for example, PDT) to be clock summer-time zone date [date displayed when summer time is in effect. month year hh:mm date month year • (Optional) For week, specify the week of the month (1 to 5 or last). hh:mm [offset]] • (Optional) For day, specify the day of the week (Sunday, Monday...).
• • •

(Optional) For month, specify the month (January, February...). (Optional) For hh:mm, specify the time (24-hour format) in hours and minutes. (Optional) For offset, specify the number of minutes to add during summer time. The default is 60.

The first part of the clock summer-time global configuration command specifies when summer time begins, and the second part specifies when it ends. All times are relative to the local time zone. The start time is relative to standard time. The end time is relative to summer time. If the starting month is after the ending month, the system assumes that you are in the southern hemisphere. To disable summer time, use the no clock summer-time global configuration command. This example shows how to set summer time to start on October 12, 2000, at 02:00, and end on April 26, 2001, at 02:00:
Switch(config)# clock summer-time pdt date 12 October 2000 2:00 26 April 2001 2:00

Catalyst 3560 Switch Software Configuration Guide

6-14

78-16156-01

Chapter 6

Administering the Switch Configuring a System Name and Prompt

Configuring a System Name and Prompt
You configure the system name on the switch to identify it. By default, the system name and prompt are Switch. If you have not configured a system prompt, the first 20 characters of the system name are used as the system prompt. A greater-than symbol [>] is appended. The prompt is updated whenever the system name changes, unless you manually configure the prompt by using the prompt global configuration command.

Note

For complete syntax and usage information for the commands used in this section, refer to the Cisco IOS Configuration Fundamentals Command Reference and the Cisco IOS IP and IP Routing Command Reference for Release 12.1. This section contains this configuration information:
• • • •

Default System Name and Prompt Configuration
The default switch system name and prompt is Switch.

Configuring a System Name
Beginning in privileged EXEC mode, follow these steps to manually configure a system name: Command
Step 1 Step 2

Purpose Enter global configuration mode. Manually configure a system name. The default setting is switch. The name must follow the rules for ARPANET host names. They must start with a letter, end with a letter or digit, and have as interior characters only letters, digits, and hyphens. Names can be up to 63 characters.

When you set the system name, it is also used as the system prompt. You can override the prompt setting by using the prompt global configuration command. To return to the default hostname, use the no hostname global configuration command.

Catalyst 3560 Switch Software Configuration Guide 78-16156-01

6-15

Chapter 6 Configuring a System Name and Prompt

Administering the Switch

Configuring a System Prompt
Beginning in privileged EXEC mode, follow these steps to manually configure a system prompt: Command
Step 1 Step 2

Purpose Enter global configuration mode. Configure the command-line prompt to override the setting from the hostname command. The default prompt is either switch or the name defined with the hostname global configuration command, followed by an angle bracket (>) for user EXEC mode or a pound sign (#) for privileged EXEC mode. The prompt can consist of all printing characters and escape sequences.

To return to the default prompt, use the no prompt [string] global configuration command.

Understanding DNS
The DNS protocol controls the Domain Name System (DNS), a distributed database with which you can map host names to IP addresses. When you configure DNS on your switch, you can substitute the host name for the IP address with all IP commands, such as ping, telnet, connect, and related Telnet support operations. IP defines a hierarchical naming scheme that allows a device to be identified by its location or domain. Domain names are pieced together with periods (.) as the delimiting characters. For example, Cisco Systems is a commercial organization that IP identifies by a com domain name, so its domain name is cisco.com. A specific device in this domain, for example, the File Transfer Protocol (FTP) system is identified as ftp.cisco.com. To keep track of domain names, IP has defined the concept of a domain name server, which holds a cache (or database) of names mapped to IP addresses. To map domain names to IP addresses, you must first identify the host names, specify the name server that is present on your network, and enable the DNS. This section contains this configuration information:
• • •

Setting Up DNS
Beginning in privileged EXEC mode, follow these steps to set up your switch to use the DNS: Command
Step 1 Step 2

Purpose Enter global configuration mode. Define a default domain name that the software uses to complete unqualified host names (names without a dotted-decimal domain name). Do not include the initial period that separates an unqualified name from the domain name. At boot time, no domain name is configured; however, if the switch configuration comes from a BOOTP or Dynamic Host Configuration Protocol (DHCP) server, then the default domain name might be set by the BOOTP or DHCP server (if the servers were configured with this information).

configure terminal ip domain-name name

Step 3

ip name-server server-address1 [server-address2 ... server-address6]

Specify the address of one or more name servers to use for name and address resolution. You can specify up to six name servers. Separate each server address with a space. The first server specified is the primary server. The switch sends DNS queries to the primary server first. If that query fails, the backup servers are queried. (Optional) Enable DNS-based host name-to-address translation on your switch. This feature is enabled by default. If your network devices require connectivity with devices in networks for which you do not control name assignment, you can dynamically assign device names that uniquely identify your devices by using the global Internet naming scheme (DNS).

) in the hostname.).
Displaying the DNS Configuration
To display the DNS configuration information. The default domain name is the value set by the ip domain-name global configuration command. page 6-18 Configuring a Message-of-the-Day Login Banner. The login banner also displays on all connected terminals. use the no ip domain-lookup global configuration command. the Cisco IOS software looks up the IP address without appending any default domain name to the hostname.
Catalyst 3560 Switch Software Configuration Guide
6-18
78-16156-01
. The MOTD banner displays on all connected terminals at login and is useful for sending messages that affect all network users (such as impending system shutdowns). a period followed by the default domain name is appended to the hostname before the DNS query is made to map the name to an IP address.Chapter 6 Creating a Banner
Administering the Switch
If you use the switch IP address as its hostname. the IP address is used and no DNS query occurs. This section contains this configuration information:
• • •
Default Banner Configuration. refer to the Cisco IOS Configuration Fundamentals Command Reference for Release 12. use the no ip domain-name name global configuration command. use the no ip name-server server-address global configuration command.1. If there is a period (.
Creating a Banner
You can configure a message-of-the-day (MOTD) and a login banner.
Note
For complete syntax and usage information for the commands used in this section. To disable DNS on the switch. page 6-19 Configuring a Login Banner. It appears after the MOTD banner and before the login prompts. If you configure a hostname that contains no periods (. use the show running-config privileged EXEC command. To remove a name server address. To remove a domain name. page 6-20
Default Banner Configuration
The MOTD and login banners are not configured.

This example shows how to configure a MOTD banner for the switch by using the pound sign (#) symbol as the beginning and ending delimiter:
Switch(config)# banner motd # This is a secure site.2.. Connected to 172. Escape character is '^]'.
To delete the MOTD banner.4 Trying 172.2. follow these steps to configure a MOTD login banner: Command
Step 1 Step 2
Purpose Enter global configuration mode. a pound sign (#). Only authorized users are allowed. Specify the message of the day.4.. enter a banner message up to 255 characters.
configure terminal banner motd c message c
Step 3 Step 4 Step 5
end show running-config copy running-config startup-config
Return to privileged EXEC mode.4.Chapter 6
Administering the Switch Creating a Banner
Configuring a Message-of-the-Day Login Banner
You can create a single or multiline message banner that appears on the screen when someone logs in to the switch. You cannot use the delimiting character in the message. Characters after the ending delimiter are discarded.5. and press the Return key. For access. For message.5. User Access Verification Password:
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
6-19
. Verify your entries. for example. # Switch(config)#
This example shows the banner that appears from the previous configuration:
Unix> telnet 172. (Optional) Save your entries in the configuration file. This is a secure site. contact technical support.5. enter the delimiting character of your choice. use the no banner motd global configuration command. Beginning in privileged EXEC mode.2. contact technical support. The delimiting character signifies the beginning and end of the banner text. For c. Only authorized users are allowed. For access.

follow these steps to configure a login banner: Command
Step 1 Step 2
Purpose Enter global configuration mode. Please enter your username and password. Characters after the ending delimiter are discarded. You cannot use the delimiting character in the message. For c. This banner appears after the MOTD banner and before the login prompt.
To delete the login banner. This example shows how to configure a login banner for the switch by using the dollar sign ($) symbol as the beginning and ending delimiter:
Switch(config)# banner login $ Access for authorized users only. $ Switch(config)#
Catalyst 3560 Switch Software Configuration Guide
6-20
78-16156-01
. The delimiting character signifies the beginning and end of the banner text. enter a login message up to 255 characters. For message. Beginning in privileged EXEC mode. a pound sign (#). (Optional) Save your entries in the configuration file. for example. enter the delimiting character of your choice. use the no banner login global configuration command.
configure terminal banner login c message c
Step 3 Step 4 Step 5
end show running-config copy running-config startup-config
Return to privileged EXEC mode. and press the Return key. Specify the login message. Verify your entries.Chapter 6 Creating a Banner
Administering the Switch
Configuring a Login Banner
You can configure a login banner to be displayed on all connected terminals.

based on the destination address of the received packet. page 6-28
Building the Address Table
With multiple MAC addresses supported on all ports. As stations are added or removed from the network. The aging interval is globally configured. If the destination address is on the port that sent the packet.
The address table lists the destination MAC address. Using the MAC address table. page 6-23 Configuring MAC Address Notification Traps. the switch forwards the packet only to the port associated with the destination address. All MAC addresses in the address table are associated with one or more ports. adding new dynamic addresses and aging out those that are not in use. The switch sends packets between any combination of ports. page 6-22 Removing Dynamic Address Entries. The address table includes these types of addresses:
• •
Dynamic address: a source MAC address that the switch learns and then ages when it is not in use. page 6-21 MAC Addresses and VLANs. The switch always uses the store-and-forward method: complete packets are stored and checked for errors before transmission. page 6-22 Changing the Address Aging Time. you can connect any port on the switch to individual workstations. refer to the command reference for this release. page 6-25 Configuring Unicast MAC Address Filtering. The switch provides dynamic addressing by learning the source address of packets it receives on each port and adding the address and its associated port number to the address table. Static address: a manually entered unicast address that does not age and that is not lost when the switch resets.Chapter 6
Administering the Switch Managing the MAC Address Table
Managing the MAC Address Table
The MAC address table contains address information that the switch uses to forward traffic between ports. page 6-23 Adding and Removing Static Address Entries. the switch updates the address table. switches.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
6-21
. and STP can accelerate the aging interval on a per-VLAN basis. or other network devices. routers. page 6-22 Default MAC Address Table Configuration. repeaters. the packet is filtered and not forwarded. and port number associated with the address and the type (static or dynamic). However. the associated VLAN ID.
Note
For complete syntax and usage information for the commands used in this section. page 6-26 Displaying Address Table Entries. the switch maintains an address table for each VLAN. This section contains this configuration information:
• • • • • • • • •
Building the Address Table.

10. for example.
Default MAC Address Table Configuration
Table 6-3 shows the default MAC address table configuration.
Catalyst 3560 Switch Software Configuration Guide
6-22
78-16156-01
. Flooding results. could be forwarded to port 1 in VLAN 1 and ports 9.
Note
Multiport static addresses are not supported. Unicast addresses. which can impact switch performance.Chapter 6 Managing the MAC Address Table
Administering the Switch
MAC Addresses and VLANs
All addresses are associated with a VLAN. An address can exist in more than one VLAN and have different destinations in each. This unnecessary flooding can impact performance.
Table 6-3 Default MAC Address Table Configuration
Feature Aging time Dynamic addresses Static addresses
Default Setting 300 seconds Automatically learned None configured
Changing the Address Aging Time
Dynamic addresses are source MAC addresses that the switch learns and then ages when they are not in use. Setting too long an aging time can cause the address table to be filled with unused addresses. Setting too short an aging time can cause addresses to be prematurely removed from the table. it floods the packet to all ports in the same VLAN as the receiving port. Each VLAN maintains its own logical address table. A known address in one VLAN is unknown in another until it is learned or statically associated with a port in the other VLAN. Then when the switch receives a packet for an unknown destination. which prevents new addresses from being learned. You can change the aging time setting for all VLANs or for a specified VLAN. and 1 in VLAN 5.

Whenever the switch learns or removes a MAC address. remove all addresses on the specified physical port or port channel (clear mac address-table dynamic interface interface-id).
configure terminal mac address-table aging-time [0 | 10-1000000] [vlan vlan-id]
Step 3 Step 4 Step 5
end show mac address-table aging-time copy running-config startup-config
Return to privileged EXEC mode. use the show mac address-table dynamic privileged EXEC command.
Configuring MAC Address Notification Traps
MAC address notification enables you to track users on a network by storing the MAC address activity on the switch. The default is 300. or other static addresses. follow these steps to configure the dynamic address table aging time: Command
Step 1 Step 2
Purpose Enter global configuration mode. use the no mac address-table aging-time global configuration command. The range is 10 to 1000000 seconds. or remove all addresses on a specified VLAN (clear mac address-table dynamic vlan vlan-id). valid IDs are 1 to 4094. If you have many users coming and going from the network. The MAC notification history table stores the MAC address activity for each hardware port for which the trap is enabled. which disables aging.
To return to the default value. You can also remove a specific MAC address (clear mac address-table dynamic address mac-address). an SNMP notification can be generated and sent to the NMS. Set the length of time that a dynamic entry remains in the MAC address table after the entry is used or updated. To verify that dynamic entries have been removed. multicast addresses. MAC address notifications are generated for dynamic and secure MAC addresses. use the clear mac address-table dynamic command in privileged EXEC mode. Verify your entries. For vlan-id. you can set a trap interval time to bundle the notification traps and reduce network traffic.Chapter 6
Administering the Switch Managing the MAC Address Table
Beginning in privileged EXEC mode. events are not generated for self addresses. Do not enter leading zeros.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
6-23
. You can also enter 0.
Removing Dynamic Address Entries
To remove all dynamic entries. Static address entries are never aged or removed from the table. (Optional) Save your entries in the configuration file.

Enable the MAC address notification trap. The range is 0 to 500. The range is 0 to 2147483647 seconds. specify the notification trap interval in seconds between each set of traps that are generated to the NMS. For notification-type. follow these steps to configure the switch to send MAC address notification traps to an NMS host: Command
Step 1 Step 2
Purpose Enter global configuration mode. we recommend that you define this string by using the snmp-server community command before using the snmp-server host command. specify the string to send with the notification operation.
• •
• Step 3 Step 4 Step 5
snmp-server enable traps mac-notification mac address-table notification mac address-table notification [interval value] | [history-size value]
Enable the switch to send MAC address traps to the NMS. the default.
• •
Step 7
snmp trap mac-notification {added | removed}
Enable the MAC notification trap whenever a MAC address is added on this interface.
•
Step 6
interface interface-id
Enter interface configuration mode.
•
Specify traps (the default) to send SNMP traps to the host. the default is 1. Enter the trap interval time and the history table size. specify the name or address of the NMS. Though you can set this string by using the snmp-server host command. Enable the MAC address notification feature.Chapter 6 Managing the MAC Address Table
Administering the Switch
Beginning in privileged EXEC mode.
Step 8
end
Return to privileged EXEC mode.
•
(Optional) For interval value. specify the maximum number of entries in the MAC notification history table. Specify the SNMP version to support. Specify informs to send SNMP informs to the host. the default is 1 second.
configure terminal
snmp-server host host-addr {traps | informs} {version {1 Specify the recipient of the trap message. | 2c | 3}} community-string notification-type • For host-addr. Enable the MAC notification trap whenever a MAC address is removed from this interface. For community-string. and specify the Layer 2 interface on which to enable the SNMP MAC address notification trap. Version 1. use the mac-notification keyword.
Catalyst 3560 Switch Software Configuration Guide
6-24
78-16156-01
. (Optional) For history-size value. is not available with informs.

10. (Optional) Save your entries in the configuration file.20. use the no snmp trap mac-notification {added | removed} interface configuration command.Chapter 6
Administering the Switch Managing the MAC Address Table
Command
Step 9
Purpose Verify your entries.
Switch(config)# snmp-server host 172. use the no snmp-server enable traps mac-notification global configuration command. The forwarding behavior determines how a port that receives a packet forwards it to another port for transmission. You add a static address to the address table by specifying the destination MAC unicast address and the VLAN from which it is received. enable the MAC address notification feature.20. set the history-size to 100 entries. It can be a unicast address.
show mac address-table notification interface show running-config copy running-config startup-config
Step 10
To disable the switch from sending MAC address notification traps. set the interval time to 60 seconds. use the no mac address-table notification global configuration command. enable the switch to send MAC address notification traps to the NMS. It does not age and is retained when the switch restarts. Packets received with this destination address are forwarded to the interface specified with the interface-id option. This example shows how to specify 172.10 traps private Switch(config)# snmp-server enable traps mac-notification Switch(config)# mac address-table notification Switch(config)# mac address-table notification interval 60 Switch(config)# mac address-table notification history-size 100 Switch(config)# interface gigabitethernet0/2 Switch(config-if)# snmp trap mac-notification added
You can verify the previous commands by entering the show mac address-table notification interface and the show mac address-table notification privileged EXEC commands. and enable traps whenever a MAC address is added on the specified port. To disable the MAC address notification feature.10.
Adding and Removing Static Address Entries
A static address has these characteristics:
• • •
It is manually entered in the address table and must be manually removed.
You can add and remove static addresses and define the forwarding behavior for them. To disable the MAC address notification traps on a specific interface. Because all ports are associated with at least one VLAN. the switch acquires the VLAN ID for the address from the ports that you specify.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
6-25
. A packet with a static address that arrives on a VLAN where it has not been statically entered is flooded to all ports and not learned.10 as the NMS.

Packets with this destination address received in the specified VLAN are forwarded to the specified interface. Add a static address to the MAC address table. This feature is disabled by default and only supports unicast static addresses. specify the interface to which the received packet is forwarded. (Optional) Save your entries in the configuration file.
•
• Step 3 Step 4 Step 5
end show mac address-table static copy running-config startup-config
Return to privileged EXEC mode. broadcast MAC addresses. use the no mac address-table static mac-addr vlan vlan-id [interface interface-id] global configuration command. one of these messages appears:
% Only unicast addresses can be configured to be dropped % CPU destined address cannot be configured as drop address
•
Packets that are forwarded to the CPU are also not supported. do not enter leading zeros. specify the destination MAC unicast address to add to the address table. the packet is forwarded to the specified port:
Switch(config)# mac address-table static c2f3.
•
configure terminal mac address-table static mac-addr vlan vlan-id interface interface-id
For mac-addr. This example shows how to add the static address c2f3.. Valid VLAN IDs are 1 to 4094. follow these steps to add a static address: Command
Step 1 Step 2
Purpose Enter global configuration mode.
To remove static entries from the address table. Verify your entries.220a.Chapter 6 Managing the MAC Address Table
Administering the Switch
Beginning in privileged EXEC mode. and router MAC addresses are not supported. When a packet is received in VLAN 4 with this MAC address as its destination address. For interface-id. If you specify one of these addresses when entering the mac address-table static mac-addr vlan vlan-id drop global configuration command.12f4 to the MAC address table. the switch drops packets with specific source or destination MAC addresses. Follow these guidelines when using this feature:
•
Multicast MAC addresses.
Catalyst 3560 Switch Software Configuration Guide
6-26
78-16156-01
.12f4 vlan 4 interface gigabitethernet0/1
Configuring Unicast MAC Address Filtering
When unicast MAC address filtering is enabled. For vlan-id.. Valid interfaces include physical ports..220a. specify the VLAN for which the packet with the specified MAC address is received.

• •
configure terminal mac address-table static mac-addr vlan vlan-id drop
For mac-addr. the switch either adds the MAC address as a static address or drops packets with that MAC address. (Optional) Save your entries in the configuration file. the switch adds the MAC address as a static address. Verify your entries. follow these steps to configure the switch to drop a source or destination unicast static address: Command
Step 1 Step 2
Purpose Enter global configuration mode. use the no mac address-table static mac-addr vlan vlan-id global configuration command. specify a source or destination unicast MAC address. the packet is dropped:
Switch(config)# mac address-table static c2f3. Valid VLAN IDs are 1 to 4094.
To disable unicast MAC address filtering. Enable unicast MAC address filtering and configure the switch to drop a packet with the specified source or destination unicast static address. depending on which command was entered last. For vlan-id. if you enter the mac address-table static mac-addr vlan vlan-id interface interface-id global configuration command followed by the mac address-table static mac-addr vlan vlan-id drop command. This example shows how to enable unicast MAC address filtering and to configure the switch to drop packets that have a source or destination address of c2f3. For example.
Step 3 Step 4 Step 5
end show mac address-table static copy running-config startup-config
Return to privileged EXEC mode.
You enable unicast MAC address filtering and configure the switch to drop packets with a specific address by specifying the source or destination unicast MAC address and the VLAN from which it is received.12f4. Beginning in privileged EXEC mode. the switch drops packets with the specified MAC address as a source or destination.12f4 vlan 4 drop
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
6-27
. specify the VLAN for which the packet with the specified MAC address is received. When a packet is received in VLAN 4 with this MAC address as its source or destination.Chapter 6
Administering the Switch Managing the MAC Address Table
•
If you add a unicast MAC address as a static address and configure unicast MAC address filtering. The second command that you entered overrides the first command.220a.220a. Packets with this MAC address are dropped. If you enter the mac address-table static mac-addr vlan vlan-id drop global configuration command followed by the mac address-table static mac-addr vlan vlan-id interface interface-id command.

Displays only dynamic MAC address table entries. Encapsulation of IP datagrams and ARP requests and replies on IEEE 802 networks other than Ethernet is specified by the Subnetwork Access Protocol (SNAP). Displays the MAC address table information for the specified VLAN. standard Ethernet-style ARP encapsulation (represented by the arpa keyword) is enabled on the IP interface. Displays the aging time in all VLANs or the specified VLAN. Displays the Layer 2 multicast entries for all VLANs or the specified VLAN. Then the IP datagram is encapsulated in a link-layer frame and sent over the network. the IP-MAC address association is stored in an ARP cache for rapid retrieval. By default.Chapter 6 Managing the ARP Table
Administering the Switch
Displaying Address Table Entries
You can display the MAC address table by using one or more of the privileged EXEC commands described in Table 6-4:
Table 6-4 Commands for Displaying the MAC Address Table
Command show mac address-table address show mac address-table aging-time show mac address-table count show mac address-table dynamic show mac address-table interface show mac address-table multicast show mac address-table notification show mac address-table static show mac address-table vlan
Description Displays MAC address table information for the specified MAC address.
Managing the ARP Table
To communicate with a device (over Ethernet. the software first must determine the 48-bit MAC or the local data link address of that device. for example).com.1 documentation on Cisco. The process of determining the local data link address from an IP address is called address resolution. The Address Resolution Protocol (ARP) associates a host IP address with the corresponding media or MAC addresses and the VLAN ID. Displays the number of addresses present in all VLANs or the specified VLAN. ARP entries added manually to the table do not age and must be manually removed. For CLI procedures.
Catalyst 3560 Switch Software Configuration Guide
6-28
78-16156-01
. Displays only static MAC address table entries. ARP determines the associated MAC address. refer to the Cisco IOS Release 12. Displays the MAC notification parameters and history table. Displays the MAC address table information for the specified interface. Taking an IP address as input. Once a MAC address is determined.

This chapter consists of these sections:
• • •
Understanding the SDM Templates. refer to the command reference for this release. It would typically be selected for a Layer 2 switch.C H A P T E R
7
Configuring SDM Templates
This chapter describes how to configure the Switch Database Management (SDM) templates on the Catalyst 3560 switch. Default—The default template gives balance to all functions. page 7-4
Understanding the SDM Templates
You can use SDM templates to configure system resources in the switch to optimize support for specific features.
Note
For complete syntax and usage information for the commands used in this chapter. page 7-1 Configuring the Switch SDM Template. typically required for a router or aggregator in the center of a network. The templates prioritize system resources to optimize support for these types of features:
• • •
Routing—The routing template maximizes system resources for unicast routing. page 7-2 Displaying the SDM Templates. depending on how the switch is used in the network. VLANs—The VLAN template disables routing and supports the maximum number of unicast MAC addresses.
Table 7-1 lists the approximate numbers of each resource supported in each of the three templates for a desktop switch. You can select a template to provide maximum system usage for some functions or to use the default template to balance resources.
Table 7-1 Approximate Number of Feature Resources Allowed by Each Template
Resource Unicast MAC addresses IGMP groups and multicast routes
Default 6K 1K
Routing 3K 1K
VLAN 12 K 1K
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
7-1
.

no system resources are reserved for routing entries. page 7-2 SDM Template Configuration Guidelines. If a section of a hardware resource is full. all processing overflow is sent to the CPU. Do not use the routing template if you do not have routing enabled on your switch. and any routing is done through software. page 7-2 Setting the SDM Template. When you use the VLAN template. Use the sdm prefer vlan global configuration command only on switches intended for Layer 2 switching with no routing. page 7-3
Default SDM Template
The default template is the default desktop template. seriously impacting switch performance. The last row is a guideline used to calculate hardware resource consumption related to the number of Layer 2 VLANs on the switch.
Catalyst 3560 Switch Software Configuration Guide
7-2
78-16156-01
.
Configuring the Switch SDM Template
This section describes how to configure the SDM template to be used on the switch.
SDM Template Configuration Guidelines
You must reload the switch for the configuration to take effect.Chapter 7 Configuring the Switch SDM Template
Configuring SDM Templates
Table 7-1
Approximate Number of Feature Resources Allowed by Each Template (continued)
Resource Unicast routes
• •
Default 8K 6K 2K 0 512 1K 1K
Routing 11 K 3K 8K 512 512 1K 1K
VLAN 0 0 0 0 512 1K 1K
Directly connected hosts Indirect routes
Policy-based routing ACEs QoS classification ACEs Security ACEs Layer 2 VLANs
The first eight rows in the tables (unicast MAC addresses through security ACEs) represent approximate hardware boundaries set when a template is selected. The sdm prefer routing global configuration command prevents other features from using the memory allocated to unicast routing in the routing template. This section contains this configuration information:
• • •
Default SDM Template. This overloads the CPU and severely degrades routing performance.

number of unicast mac addresses: number of igmp groups + multicast routes: number of unicast routes: number of directly connected hosts: number of indirect routes: number of qos aces: number of security aces: 3K 1K 11K 3K 8K 512 1K
On next reload. you can use the show sdm prefer privileged EXEC command to verify the new template configuration. routing—Maximizes routing on the switch.
To return to the default template. The selected template optimizes the resources in the switch to support this level of features for 8 routed interfaces and 1024 VLANs. Reload the operating system. If you enter the show sdm prefer command before you enter the reload privileged EXEC command. vlan—Maximizes VLAN configuration on the switch with no routing supported in hardware. Specify the SDM template to be used on the switch: The keywords have these meanings:
• • •
configure terminal sdm prefer {default | routing | vlan}
default—Gives balance to all functions. template will be "desktop vlan" template.
Step 3 Step 4
end reload
Return to privileged EXEC mode. The default template balances the use of system resources. follow these steps to use the SDM template to maximize feature usage: Command
Step 1 Step 2
Purpose Enter global configuration mode. the show sdm prefer command shows the template currently in use and the template that will become active after a reload. This example shows how to configure a switch with the routing template. use the no sdm prefer global configuration command.Chapter 7
Configuring SDM Templates Configuring the Switch SDM Template
Setting the SDM Template
Beginning in privileged EXEC mode. After the system reboots.
Switch(config)# sdm prefer routing Switch(config)# end Switch# reload Proceed with reload? [confirm]
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
7-3
. This is an example of an output display when you have changed the template and have not reloaded the switch:
Switch# show sdm prefer The current template is "desktop routing" template.
Use the no sdm prefer command to set the switch to the default desktop template.

number of unicast mac addresses: number of igmp groups + multicast routes: number of unicast routes: number of directly connected hosts: number of indirect routes: number of policy based routing aces: number of qos aces: number of security aces: 6K 1K 8K 6K 2K 0 512 1K
This is an example of output from the show sdm prefer routing command entered on a switch:
Switch# show sdm prefer routing "desktop routing" template: The selected template optimizes the resources in the switch to support this level of features for 8 routed interfaces and 1024 VLANs.Chapter 7 Displaying the SDM Templates
Configuring SDM Templates
Displaying the SDM Templates
Use the show sdm prefer privileged EXEC command with no parameters to display the active template. Use the show sdm prefer [default | routing | vlan] privileged EXEC command to display the resource numbers supported by the specified template. number of unicast mac addresses: number of igmp groups + multicast routes: number of unicast routes: number of directly connected hosts: number of indirect routes: number of policy based routing aces: number of qos aces: number of security aces: 3K 1K 11K 3K 8K 512 512 1K
Catalyst 3560 Switch Software Configuration Guide
7-4
78-16156-01
.
Switch# show sdm prefer The current template is "desktop default" template. displaying the template in use. This is an example of output from the show sdm prefer command. The selected template optimizes the resources in the switch to support this level of features for 8 routed interfaces and 1024 VLANs.

or connect through a terminal or workstation from within the local network. For more information. you can also assign a specific privilege level (with associated rights and privileges) to each username and password pair.C H A P T E R
8
Configuring Switch-Based Authentication
This chapter describes how to configure switch-based authentication on the Catalyst 3560 switch. you should configure passwords and privileges at each switch port. you should configure one or more of these security features:
•
At a minimum. page 8-32 Configuring the Switch for Local Authentication and Authorization. This chapter consists of these sections:
• • • • • • •
Preventing Unauthorized Access to Your Switch. page 8-37
Preventing Unauthorized Access to Your Switch
You can prevent unauthorized users from reconfiguring your switch and viewing configuration information. page 8-36 Configuring the Switch for Secure Shell. For more information. page 8-2 Controlling Switch Access with TACACS+. if necessary. you can also configure username and password pairs. For more information. see the “Configuring Username and Password Pairs” section on page 8-7. When users attempt to access the switch through a port or line. but you want to store them centrally on a server instead of locally. These pairs are assigned to lines or ports and authenticate each user before that user can access the switch. connect from outside the network through a serial port. Multiple networking devices can then use the same database to obtain user authentication (and. which are locally stored on the switch.
•
•
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
8-1
. Typically. you want network administrators to have access to your switch while you restrict access to users who dial from outside the network through an asynchronous port. These passwords are locally stored on the switch. they must enter the password specified for the port or line before they can access the switch. see the “Protecting Access to Privileged EXEC Commands” section on page 8-2. If you want to use username and password pairs. If you have defined privilege levels. page 8-10 Controlling Switch Access with RADIUS. you can store them in a database on a security server. For an additional layer of security. page 8-18 Controlling Switch Access with Kerberos. page 8-1 Protecting Access to Privileged EXEC Commands. To prevent unauthorized access into your switch. authorization) information. see the “Controlling Switch Access with TACACS+” section on page 8-10.

you need not precede the question mark with the Ctrl-v. For password. Beginning in privileged EXEC mode. Enter Crtl-v. follow these steps to set or change a static enable password: Command
Step 1 Step 2
Purpose Enter global configuration mode. is case sensitive. The enable password is not encrypted and can be read in the switch configuration file. specify a string from 1 to 25 alphanumeric characters. Define a new password or change an existing password for access to privileged EXEC mode. no password is defined. Verify your entries. This example shows how to change the enable password to l1u2c3k4y5. do this: Enter abc. It can contain the question mark (?) character if you precede the question mark with the key combination Crtl-v when you create the password. to create the password abc?123. for example. use the no enable password global configuration command. you can simply enter abc?123 at the password prompt. Enter ?123. The password is not encrypted and provides access to level 15 (traditional privileged EXEC mode access):
Switch(config)# enable password l1u2c3k4y5
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
8-3
. To remove the password. When the system prompts you to enter the enable password.Chapter 8
Configuring Switch-Based Authentication Protecting Access to Privileged EXEC Commands
Setting or Changing a Static Enable Password
The enable password controls access to the privileged EXEC mode.
configure terminal enable password password
Step 3 Step 4 Step 5
end show running-config copy running-config startup-config
Return to privileged EXEC mode. The string cannot start with a number. (Optional) Save your entries in the configuration file. and allows spaces but ignores leading spaces. By default.

Chapter 8 Protecting Access to Privileged EXEC Commands
Configuring Switch-Based Authentication
Protecting Enable and Enable Secret Passwords with Encryption
To provide an additional layer of security. the range is from 0 to 15. If you specify an encryption type.
•
configure terminal enable password [level level] {password | encryption-type encrypted-password} or enable secret [level level] {password | encryption-type encrypted-password}
(Optional) For level.
•
•
Note
Step 3
service password-encryption
(Optional) Encrypt the password when the password is defined or when the configuration is written. If you specify an encryption type and then enter a clear text password. you can establish an encrypted password that users must enter to access privileged EXEC mode (the default) or any privilege level you specify. which is saved using a nonreversible encryption method. The string cannot start with a number. Define a new password or change an existing password for access to privileged EXEC mode. specify a string from 1 to 25 alphanumeric characters.
Catalyst 3560 Switch Software Configuration Guide
8-4
78-16156-01
. only type 5. If you configure the enable secret command. is case sensitive. particularly for passwords that cross the network or that are stored on a Trivial File Transfer Protocol (TFTP) server. or Define a secret password.
Step 4 Step 5
end copy running-config startup-config
Return to privileged EXEC mode. Encryption prevents the password from being readable in the configuration file. you can not re-enter privileged EXEC mode. You cannot recover a lost encrypted password by any method. is available. that is. it takes precedence over the enable password command. We recommend that you use the enable secret command because it uses an improved encryption algorithm. Level 1 is normal user EXEC mode privileges. and allows spaces but ignores leading spaces. follow these steps to configure encryption for enable and enable secret passwords: Command
Step 1 Step 2
Purpose Enter global configuration mode. you must provide an encrypted password—an encrypted password that you copy from another switch configuration. For password. (Optional) For encryption-type. By default. The default level is 15 (privileged EXEC mode privileges). you can use either the enable password or enable secret global configuration commands. Beginning in privileged EXEC mode. the two commands cannot be in effect simultaneously. a Cisco proprietary encryption algorithm. Both commands accomplish the same thing. (Optional) Save your entries in the configuration file. no password is defined.

users must enter the enable secret password. see the “Recovering from a Lost or Forgotten Password” section on page 35-4. For more information. we recommend that you also keep a backup copy of the VLAN database file on a secure server. After you specify the level and set a password. follow these steps to disable password recovery:
Command
Step 1 Step 2
Purpose Enter global configuration mode.Chapter 8
Configuring Switch-Based Authentication Protecting Access to Privileged EXEC Commands
If both the enable and enable secret passwords are defined. we recommend that you keep a backup copy of the configuration file on a secure server in case the end user interrupts the boot process and sets the system back to default values.dat) are deleted. the end user can interrupt the boot process only by agreeing to set the system back to the default configuration. This setting is saved in an area of the Flash memory that is accessible by the boot loader and the Cisco IOS image. authentication key passwords. With password recovery disabled. but the configuration file (config. see the “Configuring Multiple Privilege Levels” section on page 8-8. When this feature is enabled. Disable password recovery. To disable password encryption. the privileged command password. Use the level keyword to define a password for a specific privilege level. use the no service password-encryption global configuration command. but it is not part of the file system and is not accessible by any user.text) and the VLAN database file (vlan. give the password only to users who need to have access at this level. If the switch is operating in VTP transparent mode. any end user with physical access to the switch can recover from a lost password by interrupting the boot process while the switch is powering on and then by entering a new password.
configure terminal no service password-recovery
Step 3 Step 4
end show version
Return to privileged EXEC mode.
Note
If you disable password recovery. and console and virtual terminal line passwords. Do not keep a backup copy of the configuration file on the switch. Verify the configuration by checking the last few lines of the command output. The password-recovery disable feature protects access to the switch password by disabling part of this functionality. When the switch is returned to the default system configuration. This example shows how to configure the encrypted password $1$FaD0$Xyti5Rkls3LoyxzS8 for privilege level 2:
Switch(config)# enable secret level 2 5 $1$FaD0$Xyti5Rkls3LoyxzS8
Disabling Password Recovery
By default. Use the privilege level global configuration command to specify commands accessible at various levels. you can still interrupt the boot process and change the password. Beginning in privileged EXEC mode. use the no enable password [level level] or no enable secret [level level] global configuration command. If you enable password encryption. it applies to all passwords including username passwords. For more information. you can download the saved files to the switch by using the XMODEM protocol. To remove a password and level.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
8-5
.

follow these steps to configure your switch for Telnet access: Command
Step 1
Purpose Attach a PC or workstation with emulation software to the switch console port. The string cannot start with a number. By default. and enter line configuration mode.
Note
Disabling password recovery will not work if you have set the switch to boot manually by using the boot manual global configuration command. The setup program also prompts you to configure your switch for Telnet access through a password. Enter global configuration mode. you can configure it now through the command-line interface (CLI). The default data characteristics of the console port are 9600. no password is defined. is case sensitive.
Step 2 Step 3 Step 4
enable password password configure terminal line vty 0 15
Enter privileged EXEC mode. an automatic setup program runs to assign IP information and to create a default configuration for continued use. specify a string from 1 to 25 alphanumeric characters. 8.
Step 6 Step 7
end show running-config copy running-config startup-config
Return to privileged EXEC mode.Chapter 8 Protecting Access to Privileged EXEC Commands
Configuring Switch-Based Authentication
To re-enable password recovery. (Optional) Save your entries in the configuration file. The password is listed under the command line vty 0 15. This example shows how to set the Telnet password to let45me67in89:
Switch(config)# line vty 10 Switch(config-line)# password let45me67in89
Catalyst 3560 Switch Software Configuration Guide
8-6
78-16156-01
. For password. The 0 and 15 mean that you are configuring all 16 possible Telnet sessions. You might need to press the Return key several times to see the command-line prompt. If you did not configure this password during the setup program. use the no password global configuration command. no parity. Configure the number of Telnet sessions (lines). This command produces the boot loader prompt (switch:) after the switch is power cycled. Verify your entries. There are 16 possible sessions on a command-capable switch.
Setting a Telnet Password for a Terminal Line
When you power-up your switch for the first time. Beginning in privileged EXEC mode. 1. and allows spaces but ignores leading spaces.
Step 5
password password
Enter a Telnet password for the line or lines.
Step 8
To remove the password. use the service password-recovery global configuration command.

These pairs are assigned to lines or ports and authenticate each user before that user can access the switch.Chapter 8
Configuring Switch-Based Authentication Protecting Access to Privileged EXEC Commands
Configuring Username and Password Pairs
You can configure username and password pairs. specify the user ID as one word. The range is 0 to 15. privilege level. (Optional) For level. For encryption-type.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
8-7
. Spaces and quotation marks are not allowed.
• •
Step 3
line console 0 or line vty 0 15
Enter line configuration mode. Beginning in privileged EXEC mode. and must be the last option specified in the username command. and password for each user. specify the privilege level the user has after gaining access.
• •
configure terminal username name [privilege level] {password encryption-type password}
For name. can contain embedded spaces. and configure the console port (line 0) or the VTY lines (line 0 to 15). For password. use the no login line configuration command. Level 1 gives user EXEC mode access. If you have defined privilege levels. which are locally stored on the switch. The password must be from 1 to 25 characters. Enter 7 to specify that a hidden password will follow. enter 0 to specify that an unencrypted password will follow.
To disable username authentication for a specific user. To disable password checking and allow connections without a password. Enter the username. Return to privileged EXEC mode. use the no username name global configuration command.
Step 4 Step 5 Step 6 Step 7
login local end show running-config copy running-config startup-config
Enable local password checking at login time. (Optional) Save your entries in the configuration file. Authentication is based on the username specified in Step 2. Verify your entries. Level 15 gives privileged EXEC mode access. specify the password the user must enter to gain access to the switch. follow these steps to establish a username-based authentication system that requests a login username and a password: Command
Step 1 Step 2
Purpose Enter global configuration mode. you can also assign a specific privilege level (with associated rights and privileges) to each username and password pair.

you can allow different sets of users to have access to specified commands. For password. (Optional) Save your entries in the configuration file. The first command shows the password and access level configuration. Set the privilege level for a command.
Step 6
copy running-config startup-config
Catalyst 3560 Switch Software Configuration Guide
8-8
78-16156-01
. is case sensitive. But if you want more restricted access to the configure command. Verify your entries.
•
• Step 3
enable password level level password
Specify the enable password for the privilege level. enter configure for global configuration mode. if you want many users to have access to the clear line command. Level 1 is for normal user EXEC mode privileges. the range is from 0 to 15. The string cannot start with a number.
•
configure terminal privilege mode level level command
For mode. follow these steps to set the privilege level for a command mode: Command
Step 1 Step 2
Purpose Enter global configuration mode. For command. Level 1 is for normal user EXEC mode privileges. page 8-10
Setting the Privilege Level for a Command
Beginning in privileged EXEC mode. You can configure up to 16 hierarchical levels of commands for each mode. Level 15 is the level of access permitted by the enable password. page 8-8 Changing the Default Privilege Level for Lines. you can assign it level 2 security and distribute the level 2 password fairly widely.
• •
Step 4 Step 5
end show running-config or show privilege
Return to privileged EXEC mode. the Cisco IOS software has two modes of password security: user EXEC and privileged EXEC. By default. For level. page 8-9 Logging into and Exiting a Privilege Level. The second command shows the privilege level configuration. specify the command to which you want to restrict access. you can assign it level 3 security and distribute that password to a more restricted group of users. or line for line configuration mode. specify a string from 1 to 25 alphanumeric characters. By configuring multiple passwords. no password is defined.Chapter 8 Protecting Access to Privileged EXEC Commands
Configuring Switch-Based Authentication
Configuring Multiple Privilege Levels
By default. exec for EXEC mode. and allows spaces but ignores leading spaces. For example. For level. the range is from 0 to 15. This section includes this configuration information:
• • •
Setting the Privilege Level for a Command. interface for interface configuration mode.

the show commands and show ip commands are automatically set to privilege level 15 unless you set them individually to different levels. The first command shows the password and access level configuration. Change the default privilege level for the line. they can use that password to enable the higher privilege level. You might specify a high level or privilege level for your console line to restrict line usage. Level 15 is the level of access permitted by the enable password. Verify your entries. (Optional) Save your entries in the configuration file. They can lower the privilege level by using the disable command. the range is from 0 to 15. if you set the show ip traffic command to level 15.
Step 6
copy running-config startup-config
Users can override the privilege level you set using the privilege level line configuration command by logging in to the line and enabling a different privilege level. For example. For level. To return to the default privilege for a given command. The second command shows the privilege level configuration. Level 1 is for normal user EXEC mode privileges. all commands whose syntax is a subset of that command are also set to that level.
configure terminal line vty line privilege level level
Step 4 Step 5
end show running-config or show privilege
Return to privileged EXEC mode. use the no privilege level line configuration command. If users know the password to a higher privilege level.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
8-9
. This example shows how to set the configure command to privilege level 14 and define SecretPswd14 as the password users must enter to use level 14 commands:
Switch(config)# privilege exec level 14 configure Switch(config)# enable password level 14 SecretPswd14
Changing the Default Privilege Level for Lines
Beginning in privileged EXEC mode. follow these steps to change the default privilege level for a line: Command
Step 1 Step 2 Step 3
Purpose Enter global configuration mode.Chapter 8
Configuring Switch-Based Authentication Protecting Access to Privileged EXEC Commands
When you set a command to a privilege level. Select the virtual terminal line on which to restrict access. To return to the default line privilege level. use the no privilege mode level level command global configuration command.

TACACS+ is facilitated through authentication. follow these steps to log in to a specified privilege level and to exit to a specified privilege level: Command
Step 1
Purpose Log in to a specified privilege level. You should have access to and should configure a TACACS+ server before the configuring TACACS+ features on your switch. page 8-12 Configuring TACACS+. A network access server provides connections to a single user. Each service can be tied into its own database to take advantage of other services available on that server or on the network. and accounting—independently.
Catalyst 3560 Switch Software Configuration Guide
8-10
78-16156-01
. page 8-17
Understanding TACACS+
TACACS+ is a security application that provides centralized validation of users attempting to gain access to your switch. This section contains this configuration information:
• • • •
Understanding TACACS+. TACACS+ services are maintained in a database on a TACACS+ daemon typically running on a UNIX or Windows NT workstation.Chapter 8 Controlling Switch Access with TACACS+
Configuring Switch-Based Authentication
Logging into and Exiting a Privilege Level
Beginning in privileged EXEC mode. refer to the Cisco IOS Security Command Reference for Release 12. TACACS+ provides for separate and modular authentication. authorization. and accounting facilities. the range is 0 to 15. For level. For level. The goal of TACACS+ is to provide a method for managing multiple network access points from a single management service. Your switch can be a network access server along with other Cisco routers and access servers. the range is 0 to 15. Exit to a specified privilege level. depending on the capabilities of the daemon. page 8-13 Displaying the TACACS+ Configuration.1. to a network or subnetwork. authorization.
enable level disable level
Step 2
Controlling Switch Access with TACACS+
This section describes how to enable and configure Terminal Access Controller Access Control System Plus (TACACS+). authorization.
Note
For complete syntax and usage information for the commands used in this section. page 8-10 TACACS+ Operation. and to interconnected networks as shown in Figure 8-1. which provides detailed accounting information and flexible administrative control over authentication and authorization processes. TACACS+ allows for a single access control server (the TACACS+ daemon) to provide each service—authentication. accounting (AAA) and can be enabled only through AAA commands.

Catalyst 3560 Switch Software Configuration Guide 78-16156-01
101230
8-11
. The authentication facility can conduct a dialog with the user (for example. Create a login authentication method list.10. challenge and response. including but not limited to setting autocommands. Accounting records include user identities. For example.20. can provide these services:
•
Authentication—Provides complete control of authentication through login and password dialog. You can also enforce restrictions on what commands a user can execute with the TACACS+ authorization feature. after a username and password are provided. Network managers can use the accounting facility to track user activity for a security audit or to provide information for user billing. administered through the AAA security services. a message could notify users that their passwords must be changed because of the company’s password aging policy. Create an authorization and accounting Workstations method list as required.. and social security number). The TACACS+ authentication service can also send messages to user screens. access control. number of packets. start and stop times.Chapter 8
Configuring Switch-Based Authentication Controlling Switch Access with TACACS+
Figure 8-1
Typical TACACS+ Network Configuration
UNIX workstation (TACACS+ server 1)
Catalyst 6500 series switch
171.7 UNIX workstation (TACACS+ server 2)
171.9CS+ protocol provides authentication between the switch and the TACACS+ daemon.8
Workstations
Configure the switches with the TACACS+ server addresses. and messaging support. executed commands (such as PPP). Accounting—Collects and sends information used for billing. and number of bytes.
TACACS+. to challenge a user with several questions. and it ensures confidentiality because all protocol exchanges between the switch and the TACACS+ daemon are encrypted. session duration.
•
The TACA. such as home address. Enable AAA. You need a system running the TACACS+ daemon software to use TACACS+ on your switch. or protocol support. auditing. service type. mother’s maiden name..10. Apply the list to the terminal lines. and reporting to the TACACS+ daemon. Set an authentication key (also configure the same key on the TACACS+ servers).20.
•
Authorization—Provides fine-grained control over user capabilities for the duration of the user’s session.

Chapter 8 Controlling Switch Access with TACACS+
Configuring Switch-Based Authentication
TACACS+ Operation
When a user attempts a simple ASCII login by authenticating to a switch using TACACS+. rlogin. If an ACCEPT response is returned. the switch contacts the TACACS+ daemon to obtain a username prompt to show to the user. this process occurs:
1. and the password is then sent to the TACACS+ daemon. The user enters a username. Secure Shell (SSH). the TACACS+ daemon is again contacted. access list. or privileged EXEC services Connection parameters. and the switch then contacts the TACACS+ daemon to obtain a password prompt. ERROR—An error occurred at some time during authentication with the daemon or in the network connection between the daemon and the switch.
2. CONTINUE—The user is prompted for additional authentication information. the user enters a password. the response contains data in the form of attributes that direct the EXEC or NETWORK session for that user and the services that the user can access:
• •
Telnet.
•
After authentication.
The switch eventually receives one of these responses from the TACACS+ daemon:
• • •
ACCEPT—The user is authenticated and service can begin. TACACS+ allows a dialog between the daemon and the user until the daemon receives enough information to authenticate the user. and it returns an ACCEPT or REJECT authorization response. such as the user’s mother’s maiden name. The daemon prompts for a username and password combination. The user can be denied access or is prompted to retry the login sequence.
If TACACS+ authorization is required.
3. including the host or client IP address. If the switch is configured to require authorization. depending on the TACACS+ daemon. and user timeouts
Catalyst 3560 Switch Software Configuration Guide
8-12
78-16156-01
. but can include other items. the user undergoes an additional authorization phase if authorization has been enabled on the switch. authorization begins at this time. The switch displays the password prompt to the user. REJECT—The user is not authenticated.
When the connection is established. If an ERROR response is received. the switch typically tries to use an alternative method for authenticating the user. Users must first successfully complete TACACS+ authentication before proceeding to TACACS+ authorization.

This process continues until there is successful communication with a listed method or the method list is exhausted. page 8-16 Starting TACACS+ Accounting. A method list defines the sequence and methods to be used to authenticate. page 8-13 Identifying the TACACS+ Server Host and Setting the Authentication Key. page 8-13 Configuring TACACS+ Login Authentication. if that method does not respond. page 8-14 Configuring TACACS+ Authorization for Privileged EXEC Access and Network Services. you cannot configure TACACS+ through a network management application.Chapter 8
Configuring Switch-Based Authentication Controlling Switch Access with TACACS+
Configuring TACACS+
This section describes how to configure your switch to support TACACS+. page 8-17
Default TACACS+ Configuration
TACACS+ and AAA are disabled by default. The software uses the first method listed to authenticate. thus ensuring a backup system if the initial method fails. to authorize. the software selects the next method in the list. the TACACS+ server authenticates HTTP connections that have been configured with a privilege level of 15. or to keep accounts on a user. The server group is used with a global server-host list and contains the list of IP addresses of the selected server hosts. This section contains this configuration information:
• • • • •
Default TACACS+ Configuration. You can optionally define method lists for TACACS+ authorization and accounting. to authorize. You can group servers to select a subset of the configured server hosts and use them for a particular service.
Note
Although TACACS+ configuration is performed through the CLI. You can use method lists to designate one or more security protocols to be used.
Identifying the TACACS+ Server Host and Setting the Authentication Key
You can configure the switch to use a single server or AAA server groups to group existing server hosts for authentication. To prevent a lapse in security. TACACS+ can authenticate users accessing the switch through the CLI. When enabled.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
8-13
. At a minimum. you must identify the host or hosts maintaining the TACACS+ daemon and define the method lists for TACACS+ authentication. or to keep accounts on users.

The default is 5 seconds. The software searches for hosts in the order in which you specify them. To remove the IP address of a TACACS+ server. Each server in the group must be previously defined in Step 2. This command puts the switch in a server group subconfiguration mode. you define a named list of authentication methods and then apply that list to various ports. (Optional) For key string. You must configure the same key on the TACACS+ daemon for encryption to be successful. (Optional) For timeout integer. specify a server port number. it must be applied to a specific port before any of the defined authentication methods are performed. The only exception is the default method list (which. Enter this command multiple times to create a list of preferred hosts. specify the name or IP address of the host. specify the encryption key for encrypting and decrypting all traffic between the switch and the TACACS+ daemon. The software uses the first method listed to
Catalyst 3560 Switch Software Configuration Guide
8-14
78-16156-01
. (Optional) For port integer. Verify your entries. by coincidence. A method list describes the sequence and authentication methods to be queried to authenticate a user. specify a time in seconds the switch waits for a response from the daemon before it times out and declares an error. thus ensuring a backup system for authentication in case the initial method fails. You can designate one or more security protocols to be used for authentication. The default method list is automatically applied to all ports except those that have a named method list explicitly defined. Return to privileged EXEC mode. The default is port 49.
• • •
configure terminal tacacs-server host hostname [port integer] [timeout integer] [key string]
For hostname. use the no tacacs-server host hostname global configuration command. (Optional) Associate a particular TACACS+ server with the defined server group. use the no server ip-address server group subconfiguration command.
Configuring TACACS+ Login Authentication
To configure AAA authentication.
Step 5
Step 6 Step 7 Step 8
end show tacacs copy running-config startup-config
To remove the specified TACACS+ server name or address.Chapter 8 Controlling Switch Access with TACACS+
Configuring Switch-Based Authentication
Beginning in privileged EXEC mode. Repeat this step for each TACACS+ server in the AAA server group. (Optional) Save your entries in the configuration file.
•
Step 3 Step 4
aaa new-model aaa group server tacacs+ group-name server ip-address
Enable AAA. The range is 1 to 1000 seconds. The range is 1 to 65535. Identify the IP host or hosts maintaining a TACACS+ server. The method list defines the types of authentication to be performed and the sequence in which they are performed. A defined method list overrides the default method list. follow these steps to identify the IP host or host maintaining TACACS+ server and optionally set the encryption key: Command
Step 1 Step 2
Purpose Enter global configuration mode. use the no aaa group server tacacs+ group-name global configuration command. is named default). (Optional) Define the AAA server-group with a group name. To remove a server group from the configuration list.

and configure the lines to which you want to apply the authentication list. Create a login authentication method list. not if it fails. the software selects the next authentication method in the method list. Before you can use this authentication method. specify the actual method the authentication algorithm tries.
•
configure terminal aaa new-model aaa authentication login {default | list-name} method1 [method2. For method1. you must configure the TACACS+ server.
• •
Select one of these methods:
•
enable—Use the enable password for authentication. Before you can use this authentication method. You must enter username information in the database. specify a character string to name the list you are creating. The additional methods of authentication are used only if the previous method returns an error.
•
•
•
•
• Step 4
line [console | tty | vty] line-number [ending-line-number]
Enter line configuration mode.. Beginning in privileged EXEC mode. For more information.. group tacacs+—Uses TACACS+ authentication.Chapter 8
Configuring Switch-Based Authentication Controlling Switch Access with TACACS+
authenticate users. This process continues until there is successful communication with a listed authentication method or until all defined methods are exhausted. For list-name. The default method list is automatically applied to all ports..]
To create a default list that is used when a named list is not specified in the login authentication command. and no other authentication methods are attempted.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
8-15
. line—Use the line password for authentication. If authentication fails at any point in this cycle—meaning that the security server or local username database responds by denying the user access—the authentication process stops. use the default keyword followed by the methods that are to be used in default situations. Before you can use this authentication method. you must define an enable password by using the enable password global configuration command. Use the password password line configuration command. you must define a line password. Enable AAA. follow these steps to configure login authentication: Command
Step 1 Step 2 Step 3
Purpose Enter global configuration mode. local-case—Use a case-sensitive local username database for authentication. none—Do not use any authentication for login.. if that method fails to respond. see the “Identifying the TACACS+ Server Host and Setting the Authentication Key” section on page 8-13. Use the username password global configuration command.. You must enter username information in the database by using the username name password global configuration command. local—Use the local username database for authentication.

Chapter 8 Controlling Switch Access with TACACS+
Configuring Switch-Based Authentication
Command
Step 5
Purpose Apply the authentication list to a line or set of lines.
Configuring TACACS+ Authorization for Privileged EXEC Access and Network Services
AAA authorization limits the services available to a user.
To disable AAA.
Note
Authorization is bypassed for authenticated users who log in through the CLI even if authorization has been configured.. Use the local database if authentication was not performed by using TACACS+.
Step 6 Step 7 Step 8
end show running-config copy running-config startup-config
Return to privileged EXEC mode. Beginning in privileged EXEC mode. use the default list created with the aaa authentication login command. specify the list created with the aaa authentication login command. When AAA authorization is enabled. use the no aaa authentication login {default | list-name} method1 [method2. (Optional) Save your entries in the configuration file. follow these steps to specify TACACS+ authorization for privileged EXEC access and network services:
Command
Step 1 Step 2 Step 3
Purpose Enter global configuration mode. Configure the switch for user TACACS+ authorization for all network-related service requests.
• •
login authentication {default | list-name}
If you specify default. the switch uses information retrieved from the user’s profile. Configure the switch for user TACACS+ authorization if the user has privileged EXEC access. To disable AAA authentication. which is located either in the local user database or on the security server. The exec keyword might return user profile information (such as autocommand information). To either disable TACACS+ authentication for logins or to return to the default value. For list-name.] global configuration command. Verify your entries. You can use the aaa authorization global configuration command with the tacacs+ keyword to set parameters that restrict a user’s network access to privileged EXEC mode.
configure terminal aaa authorization network tacacs+ aaa authorization exec tacacs+
Step 4
end
Return to privileged EXEC mode. The user is granted access to a requested service only if the information in the user profile allows it. The aaa authorization exec tacacs+ local command sets these authorization parameters:
• •
Use TACACS+ for privileged EXEC access authorization if authentication was performed by using TACACS+.. to configure the user’s session. use the no login authentication {default | list-name} line configuration command.
Catalyst 3560 Switch Software Configuration Guide
8-16
78-16156-01
. use the no aaa new-model global configuration command.

which provides detailed accounting information and flexible administrative control over authentication and authorization processes. An Internet service provider might use a freeware-based version of RADIUS access control and accounting software to meet special security and billing needs. such as in an access environment that uses a smart card access control system. The RADIUS host is normally a multiuser system running RADIUS server software from Cisco (Cisco Secure Access Control Server version 3. packets. Using RADIUS.1. You can use RADIUS accounting independently of RADIUS authentication or authorization. page 8-20 Displaying the RADIUS Configuration. or to the network through a protocol such as IEEE 802. and so forth) used during the session. access servers from several vendors use a single RADIUS server-based security database. showing the amount of resources (such as time. Network in which the user must only access a single service. For example. Turnkey network security environments in which applications support the RADIUS protocol.1X. Microsoft. “Configuring 802. Networks already using RADIUS. each supporting RADIUS. see Chapter 9. to a single utility such as Telnet. refer to the RADIUS server documentation. which contains all user authentication and network service access information. In one case. For more information.
Note
For complete syntax and usage information for the commands used in this section. RADIUS clients run on supported Cisco routers and switches. dial-in users are authenticated through a RADIUS server that has been customized to work with the Kerberos security system. This might be the first step when you make a transition to a TACACS+ server. page 8-19 Configuring RADIUS.
•
•
•
•
Catalyst 3560 Switch Software Configuration Guide
8-18
78-16156-01
. RADIUS is facilitated through AAA and can be enabled only through AAA commands. For more information about this protocol. This section contains this configuration information:
• • • •
Understanding RADIUS. bytes. See Figure 8-2 on page 8-19. page 8-18 RADIUS Operation. You can add a Cisco switch containing a RADIUS client to the network. Livingston. Use RADIUS in these network environments that require access security:
•
Networks with multiple-vendor access servers.” Networks that require resource accounting.Chapter 8 Controlling Switch Access with RADIUS
Configuring Switch-Based Authentication
Controlling Switch Access with RADIUS
This section describes how to enable and configure the Remote Authentication Dial-In User Service (RADIUS).1X Port-Based Authentication. Clients send authentication requests to a central RADIUS server. or another software provider.0). page 8-31
Understanding RADIUS
RADIUS is a distributed client/server system that secures networks against unauthorized access. RADIUS has been used with Enigma’s security cards to validates users and to grant access to network resources. Merit. refer to the Cisco IOS Security Command Reference for Release 12. In an IP-based network with multiple vendors’ access servers. you can control user access to a single host. The RADIUS accounting functions allow data to be sent at the start and end of services.

The username and encrypted password are sent over the network to the RADIUS server. NetBIOS Frame Control Protocol (NBFCP). RADIUS does not provide two-way authentication. b. and user timeouts
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
86891
8-19
.25 PAD connections. The additional data included with the ACCEPT or REJECT packets includes these items:
• •
Telnet. Users must first successfully complete RADIUS authentication before proceeding to RADIUS authorization. CHALLENGE—A challenge requires additional data from the user. or access is denied.Chapter 8
Configuring Switch-Based Authentication Controlling Switch Access with RADIUS
RADIUS is not suitable in these network security situations:
•
Multiprotocol access environments. if it is enabled.
The user is prompted to enter a username and password. Switch-to-switch or router-to-router situations. ACCEPT—The user is authenticated. including the host or client IP address. or privileged EXEC services Connection parameters.
The ACCEPT or REJECT response is bundled with additional data that is used for privileged EXEC or network authorization.
Transitioning from RADIUS to TACACS+ Services
•
•
Figure 8-2
R1
RADIUS server RADIUS server TACACS+ server TACACS+ server
R2
T1
Remote PC
T2
Workstation
RADIUS Operation
When a user attempts to log in and authenticate to a switch that is access controlled by a RADIUS server. Networks using a variety of services. 3. The user receives one of these responses from the RADIUS server:
a. CHALLENGE PASSWORD—A response requests the user to select a new password. or X. RADIUS does not support AppleTalk Remote Access (ARA). RADIUS generally binds a user to one service model. SSH. these events occur:
1. NetWare Asynchronous Services Interface (NASI). rlogin. 2.
c. RADIUS can be used to authenticate from one device to a non-Cisco device if the non-Cisco device requires authentication. d. access list. REJECT—The user is either not authenticated and is prompted to re-enter the username and
password.

Chapter 8 Controlling Switch Access with RADIUS
Configuring Switch-Based Authentication
Configuring RADIUS
This section describes how to configure your switch to support RADIUS. RADIUS can authenticate users accessing the switch through the CLI. The software uses the first method listed to authenticate. You can use method lists to designate one or more security protocols to be used (such as TACACS+ or local username lookup). to authorize. When enabled. you must identify the host or hosts that run the RADIUS server software and define the method lists for RADIUS authentication. the software selects the next method in the list. page 8-31 (optional)
Default RADIUS Configuration
RADIUS and AAA are disabled by default. You should have access to and should configure a RADIUS server before configuring RADIUS features on your switch. if that method does not respond. At a minimum. This section contains this configuration information:
• • • • • • • • •
Default RADIUS Configuration. You can optionally define method lists for RADIUS authorization and accounting. page 8-21 (required) Configuring RADIUS Login Authentication. To prevent a lapse in security. or to keep accounts on a user. page 8-20 Identifying the RADIUS Server Host. to authorize. or to keep accounts on users.
Catalyst 3560 Switch Software Configuration Guide
8-20
78-16156-01
. you cannot configure RADIUS through a network management application. page 8-27 (optional) Starting RADIUS Accounting. page 8-25 (optional) Configuring RADIUS Authorization for User Privileged Access and Network Services. page 8-23 (required) Defining AAA Server Groups. A method list defines the sequence and methods to be used to authenticate. page 8-29 (optional) Configuring the Switch for Vendor-Proprietary RADIUS Server Communication. page 8-29 (optional) Configuring the Switch to Use Vendor-Specific RADIUS Attributes. thus ensuring a backup system if the initial method fails. page 8-28 (optional) Configuring Settings for All RADIUS Servers. This process continues until there is successful communication with a listed method or the method list is exhausted.

Note
If you configure both global and per-server functions (timeout. To configure RADIUS to use the AAA security commands. The combination of the IP address and the UDP port number creates a unique identifier. accounting—the second host entry configured acts as a fail-over backup to the first one. see the “Configuring Settings for All RADIUS Servers” section on page 8-29. retransmission. retransmission. If two different host entries on the same RADIUS server are configured for the same service—for example. retransmission. or in some combination of global and per-server settings. To apply these settings globally to all RADIUS servers communicating with the switch.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
8-21
. you must specify the host running the RADIUS server daemon and a secret text (key) string that it shares with the switch. use the three unique global configuration commands: radius-server timeout. host name and specific UDP port numbers. and encryption key values can be configured globally for all RADIUS servers. To apply these values on a specific RADIUS server. see the “Defining AAA Server Groups” section on page 8-25. The timeout. on a per-server basis.) A RADIUS server and the switch use a shared secret text string to encrypt passwords and exchange responses. allowing different ports to be individually defined as RADIUS hosts providing a specific AAA service. use the radius-server host global configuration command. radius-server retransmit. You can configure the switch to use AAA server groups to group existing server hosts for authentication. the per-server timer. For information on configuring these setting on all RADIUS servers. the switch tries the second host entry configured on the same device for accounting services. and key value commands override global timer. (The RADIUS host entries are tried in the order that they are configured. and key commands) on the switch. and radius-server key. retransmission. if the first host entry fails to provide accounting services. or their IP address and specific UDP port numbers.Chapter 8
Configuring Switch-Based Authentication Controlling Switch Access with RADIUS
Identifying the RADIUS Server Host
Switch-to-RADIUS-server communication involves several components:
• • • • • •
Host name or IP address Authentication destination port Accounting destination port Key string Timeout period Retransmission value
You identify RADIUS security servers by their host name or IP address. This unique identifier enables RADIUS requests to be sent to multiple UDP ports on a server at the same IP address. For more information. Using this example. and key value commands.

The range is 1 to 1000. retransmit. This setting overrides the radius-server timeout global configuration command setting. Always configure the key as the last item in the radius-server host command. but spaces within and at the end of the key are used. enter this command as many times as necessary. Set the timeout.
•
•
Note
To configure the switch to recognize more than one host entry associated with a single IP address. If no timeout is set with the radius-server host command. If you use spaces in your key. follow these steps to configure per-server RADIUS server communication. If no retransmit value is set with the radius-server host command. (Optional) For retransmit retries. Leading spaces are ignored. Command
Step 1 Step 2
Purpose Enter global configuration mode. do not enclose the key in quotation marks unless the quotation marks are part of the key. specify the UDP destination port for authentication requests. The switch software searches for hosts in the order in which you specify them. (Optional) Save your entries in the configuration file. the setting of the radius-server timeout command is used. making sure that each UDP port number is different. specify the time interval that the switch waits for the RADIUS server to reply before resending. (Optional) For acct-port port-number. specify the authentication and encryption key used between the switch and the RADIUS daemon running on the RADIUS server. the setting of the radius-server retransmit global configuration command is used. specify the UDP destination port for accounting requests. (Optional) For key string. (Optional) For timeout seconds. specify the number of times a RADIUS request is resent to a server if that server is not responding or responding slowly.
Step 3 Step 4 Step 5
end show running-config copy running-config startup-config
Return to privileged EXEC mode. and encryption key values to use with the specific RADIUS host. This procedure is required. Verify your entries. Specify the IP address or host name of the remote RADIUS server host.
• • •
configure terminal radius-server host {hostname | ip-address} [auth-port port-number] [acct-port port-number] [timeout seconds] [retransmit retries] [key string]
(Optional) For auth-port port-number. The range is 1 to 1000. The key is a text string that must match the encryption key used on the RADIUS server.Chapter 8 Controlling Switch Access with RADIUS
Configuring Switch-Based Authentication
Beginning in privileged EXEC mode.
Catalyst 3560 Switch Software Configuration Guide
8-22
78-16156-01
.

This process continues until there is successful communication with a listed authentication method or until all defined methods are exhausted. is named default). If authentication fails at any point in this cycle—meaning that the security server or local username database responds by denying the user access—the authentication process stops.20.29. The only exception is the default method list (which. by coincidence. and no other authentication methods are attempted. You can designate one or more security protocols to be used for authentication. if that method fails to respond. The default method list is automatically applied to all ports except those that have a named method list explicitly defined. For more information.Chapter 8
Configuring Switch-Based Authentication Controlling Switch Access with RADIUS
To remove the specified RADIUS server. The method list defines the types of authentication to be performed and the sequence in which they are performed.36.50 acct-port 1618 key rad2
This example shows how to configure host1 as the RADIUS server and to use the default ports for both authentication and accounting:
Switch(config)# radius-server host host1
Note
You also need to configure some settings on the RADIUS server. you define a named list of authentication methods and then apply that list to various ports. The software uses the first method listed to authenticate users.
Configuring RADIUS Login Authentication
To configure AAA authentication.49 auth-port 1612 key rad1 Switch(config)# radius-server host 172.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
8-23
. These settings include the IP address of the switch and the key string to be shared by both the server and the switch. A method list describes the sequence and authentication methods to be queried to authenticate a user. use the no radius-server host hostname | ip-address global configuration command.36. the software selects the next authentication method in the method list. it must be applied to a specific port before any of the defined authentication methods are performed. refer to the RADIUS server documentation. This example shows how to configure one RADIUS server to be used for authentication and another to be used for accounting:
Switch(config)# radius-server host 172. thus ensuring a backup system for authentication in case the initial method fails.

. Before you
• •
can use this authentication method. and configure the lines to which you want to apply the authentication list.Chapter 8 Controlling Switch Access with RADIUS
Configuring Switch-Based Authentication
Beginning in privileged EXEC mode. see the “Identifying the RADIUS Server Host” section on page 8-21. Select one of these methods:
– enable—Use the enable password for authentication.
Catalyst 3560 Switch Software Configuration Guide
8-24
78-16156-01
. Use the password password line configuration command. The default method list is automatically applied to all ports. Create a login authentication method list.
– local—Use the local username database for authentication.
– local-case—Use a case-sensitive local username database for
authentication. Command
Step 1 Step 2 Step 3
Purpose Enter global configuration mode. For more information. For method1.
– line—Use the line password for authentication. specify the actual method the authentication algorithm tries.. You
must enter username information in the database. you must define an enable password by using the enable password global configuration command.
– group radius—Use RADIUS authentication. not if it fails. For list-name. use the default keyword followed by the methods that are to be used in default situations. Use the username name password global configuration command. you must configure the RADIUS server.... You must enter username information in the database by using the username password global configuration command.
– none—Do not use any authentication for login. specify a character string to name the list you are creating. Enable AAA.]
To create a default list that is used when a named list is not specified in the login authentication command. you must define a line password.
•
configure terminal aaa new-model aaa authentication login {default | list-name} method1 [method2. follow these steps to configure login authentication. Step 4
line [console | tty | vty] line-number [ending-line-number]
Enter line configuration mode. This procedure is required. Before you can use
this authentication method. Before you can
use this authentication method. The additional methods of authentication are used only if the previous method returns an error.

To disable AAA. the second configured host entry acts as a fail-over backup to the first one. For list-name. You use the server group server configuration command to associate a particular server with a defined group server. You select a subset of the configured server hosts and use them for a particular service.Chapter 8
Configuring Switch-Based Authentication Controlling Switch Access with RADIUS
Command
Step 5
Purpose Apply the authentication list to a line or set of lines.
Defining AAA Server Groups
You can configure the switch to use AAA server groups to group existing server hosts for authentication. The server group is used with a global server-host list. allowing different ports to be individually defined as RADIUS hosts providing a specific AAA service. use the default list created with the aaa authentication login command. If you configure two different host entries on the same RADIUS server for the same service. (for example.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
8-25
. specify the list created with the aaa authentication login command. accounting).
• •
login authentication {default | list-name}
If you specify default. use the no login authentication {default | list-name} line configuration command.. which lists the IP addresses of the selected server hosts. Verify your entries.] global configuration command. use the no aaa authentication login {default | list-name} method1 [method2.. You can either identify the server by its IP address or identify multiple host instances or entries by using the optional auth-port and acct-port keywords. To either disable RADIUS authentication for logins or to return to the default value. (Optional) Save your entries in the configuration file. Server groups also can include multiple host entries for the same server if each entry has a unique identifier (the combination of the IP address and UDP port number).
Step 6 Step 7 Step 8
end show running-config copy running-config startup-config
Return to privileged EXEC mode. To disable AAA authentication. use the no aaa new-model global configuration command.

but spaces within and at the end of the key are used. do not enclose the key in quotation marks unless the quotation marks are part of the key. Return to privileged EXEC mode. Each server in the group must be previously defined in Step 2. specify the authentication and encryption key used between the switch and the RADIUS daemon running on the RADIUS server. retransmit. Repeat this step for each RADIUS server in the AAA server group. specify the UDP destination port for authentication requests. making sure that each UDP port number is different. (Optional) For timeout seconds. specify the UDP destination port for accounting requests. Leading spaces are ignored. This command puts the switch in a server group configuration mode. This setting overrides the radius-server timeout global configuration command setting. Associate a particular RADIUS server with the defined server group.Chapter 8 Controlling Switch Access with RADIUS
Configuring Switch-Based Authentication
Beginning in privileged EXEC mode. follow these steps to define the AAA server group and associate a particular RADIUS server with it: Command
Step 1 Step 2
Purpose Enter global configuration mode. If no retransmit value is set with the radius-server host command. (Optional) For retransmit retries.
•
•
Note
To configure the switch to recognize more than one host entry associated with a single IP address. The range is 1 to 1000.
• • •
configure terminal radius-server host {hostname | ip-address} [auth-port port-number] [acct-port port-number] [timeout seconds] [retransmit retries] [key string]
(Optional) For auth-port port-number. and encryption key values to use with the specific RADIUS host. specify the time interval that the switch waits for the RADIUS server to reply before resending. (Optional) For acct-port port-number. Define the AAA server-group with a group name. The range is 1 to 1000. specify the number of times a RADIUS request is resent to a server if that server is not responding or responding slowly. Always configure the key as the last item in the radius-server host command. (Optional) For key string. The switch software searches for hosts in the order in which you specify them.
Step 5
Step 6 Step 7
end show running-config
Catalyst 3560 Switch Software Configuration Guide
8-26
78-16156-01
. If you use spaces in your key. If no timeout is set with the radius-server host command. Set the timeout. the setting of the radius-server retransmit global configuration command is used. The key is a text string that must match the encryption key used on the RADIUS server.
Step 3 Step 4
aaa new-model aaa group server radius group-name server ip-address
Enable AAA. the setting of the radius-server timeout command is used. Verify your entries. enter this command as many times as necessary. Specify the IP address or host name of the remote RADIUS server host.

To remove the IP address of a RADIUS server.Chapter 8
Configuring Switch-Based Authentication Controlling Switch Access with RADIUS
Command
Step 8 Step 9
Purpose (Optional) Save your entries in the configuration file.20. When AAA authorization is enabled.1 auth-port 1645 acct-port 1646 Switch(config)# aaa new-model Switch(config)# aaa group server radius group1 Switch(config-sg-radius)# server 172. The aaa authorization exec radius local command sets these authorization parameters:
• •
Use RADIUS for privileged EXEC access authorization if authentication was performed by using RADIUS.20. use the no radius-server host hostname | ip-address global configuration command. To remove a server group from the configuration list. use the no aaa group server radius group-name global configuration command. which is in the local user database or on the security server. Use the local database if authentication was not performed by using RADIUS.0.0. the switch is configured to recognize two different RADIUS group servers (group1 and group2). In this example.
Switch(config)# radius-server host 172.1 auth-port 2000 acct-port 2001 Switch(config-sg-radius)# exit
copy running-config startup-config
Configuring RADIUS Authorization for User Privileged Access and Network Services
AAA authorization limits the services available to a user.1 auth-port 1000 acct-port 1001 Switch(config)# radius-server host 172.
Note
Authorization is bypassed for authenticated users who log in through the CLI even if authorization has been configured. See the “Configuring RADIUS Login Authentication” section on page 8-23. You can use the aaa authorization global configuration command with the radius keyword to set parameters that restrict a user’s network access to privileged EXEC mode. The second host entry acts as a fail-over backup to the first entry.0.1 auth-port 1000 acct-port 1001 Switch(config-sg-radius)# exit Switch(config)# aaa group server radius group2 Switch(config-sg-radius)# server 172.20. to configure the user’s session.0. The user is granted access to a requested service only if the information in the user profile allows it. the switch uses information retrieved from the user’s profile. To remove the specified RADIUS server.10. Enable RADIUS login authentication.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
8-27
. Group1 has two different host entries on the same RADIUS server configured for the same services. use the no server ip-address server group configuration command.

and deadtime.
Note
configure terminal radius-server key string
The key is a text string that must match the encryption key used on the RADIUS server. Vendor-specific attributes (VSAs) allow vendors to support their own extended attributes not suitable for general use. use the no forms of these commands.
Configuring the Switch to Use Vendor-Specific RADIUS Attributes
The Internet Engineering Task Force (IETF) draft standard specifies a method for communicating vendor-specific information between the switch and the RADIUS server by using the vendor-specific attribute (attribute 26). Attribute and value are an appropriate attribute-value (AV) pair defined in the Cisco TACACS+ specification. Leading spaces are ignored. do not enclose the key in quotation marks unless the quotation marks are part of the key.
Step 3 Step 4
radius-server retransmit retries radius-server timeout seconds
Specify the number of times the switch sends each RADIUS request to the server before giving up. Verify your settings. which is not responding to authentication requests. The default is 0. and the supported option has vendor-type 1.Chapter 8
Configuring Switch-Based Authentication Controlling Switch Access with RADIUS
Configuring Settings for All RADIUS Servers
Beginning in privileged EXEC mode. If you use spaces in your key.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
8-29
. the range is 1 to 1440 minutes. (Optional) Save your entries in the configuration file. follow these steps to configure global communication settings between the switch and all RADIUS servers: Command
Step 1 Step 2
Purpose Enter global configuration mode.
Step 5
radius-server deadtime minutes
Step 6 Step 7 Step 8
end show running-config copy running-config startup-config
To return to the default setting for the retransmit. and sep is = for mandatory attributes and is * for optional attributes. The default is 3. but spaces within and at the end of the key are used. The default is 5 seconds. Specify the number of minutes a RADIUS server. Cisco’s vendor-ID is 9. Specify the shared secret text string used between the switch and all RADIUS servers. The value is a string with this format:
protocol : attribute sep value *
Protocol is a value of the Cisco protocol attribute for a particular type of authorization. the range is 1 to 1000. The full set of features available for TACACS+ authorization can then be used for RADIUS. timeout. the range 1 to 1000. Specify the number of seconds a switch waits for a reply to a RADIUS request before resending the request. The Cisco RADIUS implementation supports one vendor-specific option by using the format recommended in the specification. Return to privileged EXEC mode. to be skipped. thus avoiding the wait for the request to timeout before trying the next configured server. which is named cisco-avpair.

0” cisco-avpair= “ip:inacl#2=deny ip 10.255. this AV pair activates Cisco’s multiple named ip address pools feature during IP authorization (during PPP IPCP address assignment):
cisco-avpair= ”ip:addr-pool=first“
This example shows how to provide a user logging in from a switch with immediate access to privileged EXEC commands:
cisco-avpair= ”shell:priv-lvl=15“
This example shows how to specify an authorized VLAN in the RADIUS server database:
cisco-avpair= ”tunnel-type(#64)=VLAN(13)” cisco-avpair= ”tunnel-medium-type(#65)=802 media(6)” cisco-avpair= ”tunnel-private-group-ID(#81)=vlanid”
This example shows how to apply an input ACL in ASCII format to an interface for the duration of this connection:
cisco-avpair= “ip:inacl#1=deny ip 10.255.0.
For a complete list of RADIUS attributes or more information about vendor-specific attribute 26.0.10 0.1.10.255 any” cisco-avpair= “mac:inacl#3=deny any any decnet-iv”
This example shows how to apply an output ACL in ASCII format to an interface for the duration of this connection:
cisco-avpair= “ip:outacl#2=deny ip 10.
Step 3 Step 4 Step 5
end show running-config copy running-config startup-config
Return to privileged EXEC mode.255.10. (Optional) Save your entries in the configuration file.
• •
configure terminal radius-server vsa send [accounting | authentication]
(Optional) Use the accounting keyword to limit the set of recognized vendor-specific attributes to only accounting attributes.0.
Catalyst 3560 Switch Software Configuration Guide
8-30
78-16156-01
.255 any”
Other vendors have their own unique vendor-IDs.255 20.0.20. Enable the switch to recognize and use VSAs as defined by RADIUS IETF attribute 26.” Beginning in privileged EXEC mode. Verify your settings.
If you enter this command without keywords.10. both accounting and authentication vendor-specific attributes are used.10 0.20 255.255. and associated VSAs. follow these steps to configure the switch to recognize and use VSAs: Command
Step 1 Step 2
Purpose Enter global configuration mode. options. “Remote Authentication Dial-In User Service (RADIUS).10. (Optional) Use the authentication keyword to limit the set of recognized vendor-specific attributes to only authentication attributes.Chapter 8 Controlling Switch Access with RADIUS
Configuring Switch-Based Authentication
For example.10 0. For more information about vendor-IDs and VSAs.10.10. refer to RFC 2138.20. refer to the “RADIUS Attributes” appendix in the Cisco IOS Security Configuration Guide for Release 12.

15 nonstandard Switch(config)# radius-server key rad124
Displaying the RADIUS Configuration
To display the RADIUS configuration. use the no radius-server host {hostname | ip-address} non-standard global configuration command. This example shows how to specify a vendor-proprietary RADIUS host and to use a secret key of rad124 between the switch and the server:
Switch(config)# radius-server host 172. you must specify the host running the RADIUS server daemon and the secret text string it shares with the switch. (Optional) Save your entries in the configuration file. Specify the shared secret text string used between the switch and the vendor-proprietary RADIUS server.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
8-31
. Verify your settings.Chapter 8
Configuring Switch-Based Authentication Controlling Switch Access with RADIUS
Configuring the Switch for Vendor-Proprietary RADIUS Server Communication
Although an IETF draft standard for RADIUS specifies a method for communicating vendor-proprietary information between the switch and the RADIUS server. but spaces within and at the end of the key are used. follow these steps to specify a vendor-proprietary RADIUS server host and a shared secret text string: Command
Step 1 Step 2
Purpose Enter global configuration mode. Specify the IP address or host name of the remote RADIUS server host and identify that it is using a vendor-proprietary implementation of RADIUS.20. use the no radius-server key global configuration command. You specify the RADIUS host and secret text string by using the radius-server global configuration commands. Cisco IOS software supports a subset of vendor-proprietary RADIUS attributes. As mentioned earlier. Leading spaces are ignored.30. The switch and the RADIUS server use this text string to encrypt passwords and exchange responses.
To delete the vendor-proprietary RADIUS host. use the show running-config privileged EXEC command. To disable the key.
Note
configure terminal radius-server host {hostname | ip-address} non-standard
Step 3
radius-server key string
The key is a text string that must match the encryption key used on the RADIUS server.
Step 4 Step 5 Step 6
end show running-config copy running-config startup-config
Return to privileged EXEC mode. some vendors have extended the RADIUS attribute set in a unique way. If you use spaces in your key. to configure RADIUS (whether vendor-proprietary or IETF draft-compliant). do not enclose the key in quotation marks unless the quotation marks are part of the key. Beginning in privileged EXEC mode.

cisco.1. Release 12. The Kerberos credential scheme uses a process called single logon.
Catalyst 3560 Switch Software Configuration Guide
8-32
78-16156-01
. which was developed at the Massachusetts Institute of Technology (MIT).com/univercd/cc/td/doc/product/software/ios121/121cgcr/secur_r/srprt2/srdkerb. It uses the Data Encryption Standard (DES) cryptographic algorithm for encryption and authentication and authenticates requests for network resources. For more information. Kerberos uses the concept of a trusted third party to perform secure verification of users and services.
Note
For complete syntax and usage information for the commands used in this section.htm. the cryptographic (that is. refer to the “Kerberos Configuration Examples” section in the “Security Server Protocols” chapter of the Cisco IOS Security Configuration Guide. To do this. Release 12. and that can authenticate users by using the Kerberos protocol. page 8-34 Configuring Kerberos. These tickets.com/univercd/cc/td/doc/product/software/ios121/121cgcr/secur_c/scprt2/.1. The Kerberos server uses the tickets instead of usernames and passwords to authenticate users and network services.
Note
A Kerberos server can be a Catalyst 3560 switch that is configured as a network security server and that can authenticate users by using the Kerberos protocol. the trusted third party can be a Catalyst 3560 switch that supports Kerberos. Kerberos verifies that users are who they claim to be and the network services that they use are what the services claim to be. that is configured as a network security server. refer to the “Kerberos Commands” section in the “Security Server Protocols” chapter of the Cisco IOS Security Command Reference. Release 12. which authenticates requests for network resources by using a trusted third party. To use this feature. refer to the release notes for this release.1. This section consists of these topics:
• • •
Understanding Kerberos.com. page 8-32 Kerberos Operation. at this URL: http://www. You must obtain authorization to use this feature and to download the cryptographic software files from Cisco.Chapter 8 Controlling Switch Access with Kerberos
Configuring Switch-Based Authentication
Controlling Switch Access with Kerberos
This section describes how to enable and configure the Kerberos security system. supports encryption) versions of the switch software must be installed on your switch. at this URL: http://www. a KDC or trusted Kerberos server issues tickets to users.
Note
In the Kerberos configuration examples and in the Cisco IOS Security Command Reference.cisco.
Understanding Kerberos
Kerberos is a secret-key network authentication protocol. which have a limited lifespan. page 8-36
For Kerberos configuration examples. This process authenticates a user once and then allows secure authentication (without encrypting another password) wherever that user credential is accepted. are stored in user credential caches. This trusted third party is called the key distribution center (KDC).

The Kerberos instance can be used to specify the authorization level for the user if authentication is successful. Users and network services register their identity with the Kerberos server. A means by which the switch identifies what privileges the user has in a network or on the switch and what actions the user can perform. Network services query the Kerberos server to authenticate to other network services. A general term that refers to authentication tickets.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
8-33
.Chapter 8
Configuring Switch-Based Authentication Controlling Switch Access with Kerberos
This software release supports Kerberos 5. The Kerberos server is trusted to verify the identity of a user or network service to another user or network service. A Kerberos principal with a Kerberos instance has the form user/instance@REALM (for example. Kerberos supports these network services:
• • •
Telnet rlogin rsh (Remote Shell Protocol)
Table 8-2 lists the common Kerberos-related terms and definitions:
Table 8-2 Kerberos Terms
Term Authentication
Definition A process by which a user or service identifies itself to another service. Credentials have a default lifespan of eight hours.
Note
KDC2 Kerberized Kerberos realm
Key distribution center that consists of a Kerberos server and database program that is running on a network host. and network services that are registered to a Kerberos server.
Note
The Kerberos realm name must be in all uppercase characters.
Kerberos server
A daemon that is running on a network host. it can be used in place of re-entering a username and password. hosts. An authorization level label for Kerberos principals. For example.
Note
Authorization Credential
Instance
The Kerberos principal and instance names must be in all lowercase characters. which allows organizations that are already using Kerberos 5 to use the same Kerberos authentication database on the KDC that they are already using on their other network hosts (such as UNIX servers and PCs). If a network service decides to trust the Kerberos server that issued a ticket. A term that describes applications and services that have been modified to support the Kerberos credential infrastructure. smith@EXAMPLE. Kerberos credentials verify the identity of a user or service. such as TGTs1 and service credentials. Most Kerberos principals are of the form user@REALM (for example. smith/admin@EXAMPLE. The Kerberos realm name must be in all uppercase characters. In this software release. a client can authenticate to a switch or a switch can authenticate to another switch.COM). A domain consisting of users. The server of each network service might implement and enforce the authorization mappings of Kerberos instances but is not required to do so.COM).

Note
Principal
The Kerberos principal name must be in all lowercase characters. TGT = ticket granting ticket 2. 3. the network service authenticates an encrypted service credential by using the KEYTAB to decrypt it. 2. this credential is encrypted with the password shared by the network service and the KDC.
SRVTAB TGT
1. KEYTAB = key table 4. Although you can customize Kerberos in a number of ways.Chapter 8 Controlling Switch Access with Kerberos
Configuring Switch-Based Authentication
Table 8-2
Kerberos Terms (continued)
Term KEYTAB
3
Definition A password that a network service shares with the KDC. In Kerberos 5 and later Kerberos versions. Ticket granting ticket that is a credential that the KDC issues to authenticated users. page 8-35 Authenticating to Network Services. A password that a network service shares with the KDC. When users receive a TGT. remote users must follow these steps:
1.
Service credential
A credential for a network service. they can authenticate to network services within the Kerberos realm represented by the KDC. When issued from the KDC. remote users attempting to access network services must pass through three layers of security before they can access network services. SRVTAB is referred to as KEYTAB. In Kerberos 5 or later Kerberos versions. In Kerberos versions earlier than Kerberos 5. To authenticate to network services by using a Catalyst 3560 switch as a Kerberos server. page 8-35 Obtaining a TGT from a KDC. page 8-35
Catalyst 3560 Switch Software Configuration Guide
8-34
78-16156-01
. KEYTAB is referred to as SRVTAB 4.
Authenticating to a Boundary Switch. Also known as a Kerberos identity. KDC = key distribution center 3. this is who you are or what a service is according to the Kerberos server. SRVTAB = server table
Kerberos Operation
A Kerberos server can be a Catalyst 3560 switch that is configured as a network security server and that can authenticate remote users by using the Kerberos protocol. The password is also shared with the user TGT.

cisco. The user with a TGT must now authenticate to the network services in a Kerberos realm.
The user opens an un-Kerberized Telnet connection to the boundary switch.com/univercd/cc/td/doc/product/software/ios121/121cgcr/secur_c/scprt2/scdkerb. at this URL: http://www. refer to the “Authenticating to Network Services” section in the “Security Server Protocols” chapter of the Cisco IOS Security Configuration Guide.htm #xtocid154006. 2. The switch prompts the user for a username and password. The KDC sends an encrypted TGT that includes the user identity to the switch. For instructions about how to authenticate to a network service. 5. but the user must still authenticate directly to the KDC before getting access to the network services.
Obtaining a TGT from a KDC
This section describes the second layer of security through which a remote user must pass. the user repeats Step 2 either by re-entering the username and password (noting if Caps Lock or Num Lock is on or off) or by entering a different username and password.1. This process then occurs:
1. If the decryption is not successful. The user must first authenticate to the boundary switch. Release 12. The user must authenticate to the KDC because the TGT that the KDC issues is stored on the switch and cannot be used for additional authentication until the user logs on to the switch.
A remote user who initiates a un-Kerberized Telnet session and authenticates to a boundary switch is inside the firewall.com/univercd/cc/td/doc/product/software/ios121/121cgcr/secur_c/scprt2/scdkerb.1. refer to the “Obtaining a TGT from a KDC” section in the “Security Server Protocols” chapter of the Cisco IOS Security Configuration Guide. The user must now authenticate to a KDC and obtain a TGT from the KDC to access network services.htm #xtocid154005.
• •
If the decryption is successful. The switch requests a TGT from the KDC for this user.
Authenticating to Network Services
This section describes the third layer of security through which a remote user must pass.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
8-35
. 3. the user is authenticated to the switch.Chapter 8
Configuring Switch-Based Authentication Controlling Switch Access with Kerberos
Authenticating to a Boundary Switch
This section describes the first layer of security through which a remote user must pass. at this URL: http://www. Release 12. The switch attempts to decrypt the TGT by using the password that the user entered. 4.cisco. For instructions about how to authenticate to a KDC.

follow these steps:
• •
Configure the KDC by using Kerberos commands. To do this. you must identify them to each other. No accounting is available in this configuration. follow these steps to configure the switch for local AAA: Command
Step 1 Step 2 Step 3
Purpose Enter global configuration mode.cisco. The Kerberos instance name must be in all lowercase characters. Set the login authentication to use the local username database.
For instructions. Configure user AAA authorization for all network-related service requests. You also create entries for the users in the KDC database.htm #xtocid154007. To set up a Kerberos-authenticated server-client system.Chapter 8 Configuring the Switch for Local Authentication and Authorization
Configuring Switch-Based Authentication
Configuring Kerberos
So that remote users can authenticate to network services. at this URL: http://www.1. follow these guidelines:
• • •
The Kerberos principal name must be in all lowercase characters.
configure terminal aaa new-model aaa authentication login default local
Step 4 Step 5
aaa authorization exec local aaa authorization network local
Catalyst 3560 Switch Software Configuration Guide
8-36
78-16156-01
. Configure the switch to use the Kerberos protocol. Enable AAA. you must configure the hosts and the KDC in the Kerberos realm to communicate and mutually authenticate users and network services. The switch then handles authentication and authorization. refer to the “Kerberos Configuration Task List” section in the “Security Server Protocols” chapter of the Cisco IOS Security Configuration Guide. The default keyword applies the local user database authentication to all ports. You add entries for the hosts to the Kerberos database on the KDC and add KEYTAB files generated by the KDC to all hosts in the Kerberos realm. and allow the user to run an EXEC shell. Configure user AAA authorization. Release 12. When you add or create entries for the hosts and users.
Note
A Kerberos server can be a Catalyst 3560 switch that is configured as a network security server and that can authenticate users by using the Kerberos protocol.com/univercd/cc/td/doc/product/software/ios121/121cgcr/secur_c/scprt2/scdkerb.
Configuring the Switch for Local Authentication and Authorization
You can configure AAA to operate without a server by setting the switch to implement AAA in local mode. Beginning in privileged EXEC mode. check the local database. The Kerberos realm name must be in all uppercase characters.

page 8-39 Displaying the SSH Configuration and Status. Spaces and quotation marks are not allowed.cisco. For encryption-type. Repeat this command for each user. Cisco IOS Release 12. page 8-38 Configuring SSH. page 8-41
For SSH configuration examples.
To disable AAA. This section contains this information:
• • •
Understanding SSH. the cryptographic (encrypted) software image must be installed on your switch. at this URL: http://www. To use this feature. use the no aaa new-model global configuration command. To disable authorization. and establish a username-based authentication system. and must be the last option specified in the username command. The range is 0 to 15. (Optional) Save your entries in the configuration file.
• •
username name [privilege level] {password encryption-type password}
For name.Chapter 8
Configuring Switch-Based Authentication Configuring the Switch for Secure Shell
Command
Step 6
Purpose Enter the local database.
Configuring the Switch for Secure Shell
This section describes how to configure the Secure Shell (SSH) feature. You must obtain authorization to use this feature and to download the cryptographic software files from Cisco.2. use the no aaa authorization {network | exec} method1 global configuration command. refer to the “SSH Configuration Examples” section in the “Configuring Secure Shell” chapter of the Cisco IOS Security Configuration Guide.com/univercd/cc/td/doc/product/software/ios122/122cgcr/index. can contain embedded spaces. For more information.
• •
Step 7 Step 8 Step 9
end show running-config copy running-config startup-config
Return to privileged EXEC mode.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
8-37
.htm.com/univercd/cc/td/doc/product/software/ios122/122cgcr/fsecur_c/fothersf/ scfssh.cisco. Verify your entries. Level 15 gives privileged EXEC mode access.htm
Note
For complete syntax and usage information for the commands used in this section. The password must be from 1 to 25 characters. Enter 7 to specify that a hidden password follows.2 at this URL: http://www. For password.com. specify the password the user must enter to gain access to the switch. (Optional) For level. refer to the release notes for this release. specify the user ID as one word. Level 0 gives user EXEC mode access. enter 0 to specify that an unencrypted password follows. specify the privilege level the user has after gaining access. refer to the command reference for this release and the command reference for Cisco IOS Release 12.

the Triple DES (3DES) encryption algorithm. The switch supports an SSHv1 or an SSHv2 server. SSH also supports these user authentication methods:
• • •
TACACS+ (for more information. This software release supports SSH version 1 (SSHv1) and SSH version 2 (SSHv2). which are applications that run on the switch. The SSH server works with the SSH client supported in this release and with non-Cisco SSH clients. and Supported Versions
The SSH feature has an SSH server and an SSH integrated client. SSH provides more security for remote connections than Telnet does by providing strong encryption when a device is authenticated. see the “Configuring the Switch for Local Authentication and Authorization” section on page 8-36)
Note
This software release does not support IP Security (IPSec). SSH supports the Data Encryption Standard (DES) encryption algorithm. page 8-38
SSH Servers. and Supported Versions. This section consists of these topics:
• •
SSH Servers. The SSH client also works with the SSH server supported in this release and with non-Cisco SSH servers.
Limitations
These limitations apply to SSH:
• • • •
The switch supports Rivest. see the “Controlling Switch Access with TACACS+” section on page 8-10) RADIUS (for more information. and password-based user authentication. SSH supports only the execution-shell application. You can use an SSH client to connect to a switch running the SSH server. and Adelman (RSA) authentication. The switch does not support the Advanced Encryption Standard (AES) symmetric encryption algorithm. Integrated Clients. Integrated Clients. remote connection to a device.Chapter 8 Configuring the Switch for Secure Shell
Configuring Switch-Based Authentication
Understanding SSH
SSH is a protocol that provides a secure.
Catalyst 3560 Switch Software Configuration Guide
8-38
78-16156-01
. The switch supports an SSHv1 client. page 8-38 Limitations. see the “Controlling Switch Access with RADIUS” section on page 8-18) Local authentication and authorization (for more information. Shamir. The SSH server and the SSH client are supported only on DES (56-bit) and 3DES (168-bit) data encryption software.

page 8-40 (required only if you are configuring the switch as an SSH server)
Configuration Guidelines
Follow these guidelines when configuring the switch as an SSH server or SSH client:
• •
An RSA key pair generated by a SSHv1 server can be used by an SSHv2 server. Command
Step 1 Step 2 Step 3
Purpose Enter global configuration mode. page 8-39 Setting Up the Switch to Run SSH. refer to the release notes for this release. see the “Setting Up the Switch to Run SSH” section on page 8-39. When generating the RSA key pair. This procedure is required if you are configuring the switch as an SSH server. 2. If it does. Configure a host domain for your switch. When generating the RSA key pair. see the “Configuring the Switch for Local Authentication and Authorization” section on page 8-36. the message No domain specified might appear. Follow this procedure only if you are configuring the switch as an SSH server. and the reverse.
configure terminal hostname hostname ip domain-name domain_name
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
8-39
. Generate an RSA key pair for the switch. make sure that AAA is disabled on the console. 3. This step is required. you must configure a host name by using the hostname global configuration command. page 8-39 (required) Configuring the SSH Server. and then enter the crypto key generate rsa command. If you get CLI error messages after entering the crypto key generate rsa global configuration command. If it does. Reconfigure the host name and domain.com.
Beginning in privileged EXEC mode.
Download the cryptographic software image from Cisco. Configure a host name for your switch. Follow this procedure only if you are configuring the switch as an SSH server.Chapter 8
Configuring Switch-Based Authentication Configuring the Switch for Secure Shell
Configuring SSH
This section has this configuration information:
• • •
Configuration Guidelines.
• • •
Setting Up the Switch to Run SSH
Follow these steps to set up your switch to run SSH:
1. 4. For more information. This step is required. the message No host name specified might appear. follow these steps to configure a host name and an IP domain name and to generate an RSA key pair. When configuring the local authentication and authorization authentication method. which automatically enables SSH. Configure user authentication for local or remote access. For more information. For more information. Configure a host name and IP domain name for the switch. you must configure an IP domain name by using the ip domain-name global configuration command. an RSA key pair has not been generated.

Show the status of the SSH server on the switch. (Optional) Save your entries in the configuration file. the range is 0 to 5.
Catalyst 3560 Switch Software Configuration Guide
8-40
78-16156-01
. After the RSA key pair is deleted. We recommend that a minimum modulus size of 1024 bits.
If you do not enter this command or do not specify a keyword. For example.
crypto key generate rsa
Step 5 Step 6
end show ip ssh or show ssh
Return to privileged EXEC mode. After the execution shell starts.
•
Specify the number of times that a client can re-authenticate to the server. follow these steps to configure the SSH server: Command
Step 1 Step 2
Purpose Enter global configuration mode. When you generate RSA keys. the switch uses the default time-out values of the CLI-based sessions. the CLI-based session time-out value returns to the default of 10 minutes. After the connection is established.
Step 3
ip ssh {timeout seconds | authentication-retries number}
Configure the SSH control parameters:
•
Specify the time-out value in seconds.
Repeat this step when configuring both parameters. A longer modulus length might be more secure. Show the version and configuration information for your SSH server. The range is 0 to 120 seconds. use the crypto key zeroize rsa global configuration command. encrypted SSH connections for multiple CLI-based sessions over the network are available (session 0 to session 4). you are prompted to enter a modulus length.
• •
configure terminal ip ssh version [1 | 2]
1—Configure the switch to run SSH version 1. up to five simultaneous. the SSH server selects SSHv2.
Configuring the SSH Server
Beginning in privileged EXEC mode. This parameter applies to the SSH negotiation phase. the SSH server is automatically disabled. but it takes longer to generate and to use. (Optional) Configure the switch to run SSH version 1 or SSH version 2. the SSH server selects the latest SSH version supported by the SSH client. 2—Configure the switch to run SSH version 2.Chapter 8 Configuring the Switch for Secure Shell
Configuring Switch-Based Authentication
Command
Step 4
Purpose Enable the SSH server for local and remote authentication on the switch and generate an RSA key pair. the default is 120 seconds.
Step 4
end
Return to privileged EXEC mode. By default. The default is 3. if the SSH client supports SSHv1 and SSHv2.
Step 7
copy running-config startup-config
To delete the RSA key pair.

Catalyst 3560 Switch Software Configuration Guide 78-16156-01
8-41
.Chapter 8
Configuring Switch-Based Authentication Configuring the Switch for Secure Shell
Command
Step 5
Purpose Show the version and configuration information for your SSH server.
Displaying the SSH Configuration and Status
To display the SSH server configuration and status.
For more information about these commands. Shows the status of the SSH server.
show ip ssh or show ssh
Show the status of the SSH server connections on the switch. at this URL: http://www.htm. refer to the “Secure Shell Commands” section in the “Other Security Features” chapter of the Cisco IOS Security Command Reference.
Step 6
copy running-config startup-config
To return to the default SSH control parameters.com/univercd/cc/td/doc/product/software/ios122/122cgcr/fsecur_r/fothercr/ srfssh. (Optional) Save your entries in the configuration file.cisco. Cisco IOS Release 12. use one or more of the privileged EXEC commands in Table 8-3:
Table 8-3 Commands for Displaying the SSH Server Configuration and Status
Command show ip ssh show ssh
Purpose Shows the version and configuration information for the SSH server. use the no ip ssh {timeout | authentication-retries} global configuration command.2.

Catalyst 2940 switches. read the Microsoft Knowledge Base article at this URL: http://support. Because the switch acts as the proxy. which is responsible for encapsulating and decapsulating the EAP frames and interacting with the authentication server.Chapter 9 Understanding 802. When the switch receives EAPOL frames and relays them to the authentication server. which is then encapsulated for Ethernet and sent to the client.1X Port-Based Authentication
Device Roles
With 802. and relaying a response to the client. Catalyst 2970. In this release.ASP
•
Authentication server—performs the actual authentication of the client. The switch includes the RADIUS client. Catalyst 3550. The workstation must be running 802.0 or later. The switch acts as an intermediary (proxy) between the client and the authentication server. the Remote Authentication Dial-In User Service (RADIUS) security system with Extensible Authentication Protocol (EAP) extensions is the only supported authentication server.1X port-based authentication.1X. the Ethernet header is stripped and the remaining EAP frame is re-encapsulated in the RADIUS format. Catalyst 2950. verifying that information with the authentication server.
•
Catalyst 3560 Switch Software Configuration Guide
9-2
101229
78-16156-01
. requesting identity information from the client.
Figure 9-1 802. the authentication service is transparent to the client.1X Port-Based Authentication
Configuring 802.1X specification. or a wireless access point. The authentication server validates the identity of the client and notifies the switch whether or not the client is authorized to access the LAN and switch services. leaving the EAP frame. (The client is the supplicant in the IEEE 802.1X authentication issues.)
Note
To resolve Windows XP network connectivity and 802. Catalyst 3560. Catalyst 2955. the devices in the network have specific roles as shown in Figure 9-1. When the switch receives frames from the authentication server. These devices must be running software that supports the RADIUS client and 802. It is available in Cisco Secure Access Control Server version 3. The EAP frames are not modified or examined during encapsulation. the server’s frame header is removed.microsoft. Switch (edge switch or wireless access point)—controls the physical access to the network based on the authentication status of the client.com/support/kb/articles/Q303/5/97.1X Device Roles
Authentication server (RADIUS) Workstations (clients)
•
Client—the device (workstation) that requests access to the LAN and switch services and responds to requests from the switch.1X-compliant client software such as that offered in the Microsoft Windows XP operating system. The devices that can act as intermediaries include the Catalyst 3750. RADIUS operates in a client/server model in which secure authentication information is exchanged between the RADIUS server and one or more RADIUS clients. and the authentication server must support EAP within the native frame format.

Figure 9-2 shows a message exchange initiated by the client using the One-Time-Password (OTP) authentication method with a RADIUS server. if during bootup. Upon receipt of the frame. passing EAP frames between the client and the authentication server until authentication succeeds or fails. If the client does not receive an EAP-request/identity frame after three attempts to start authentication.1X is not enabled or supported on the network access device. If the authentication succeeds. When the client supplies its identity. For more information.1X Port-Based Authentication Understanding 802.1X Port-Based Authentication
Authentication Initiation and Message Exchange
The switch or the client can initiate authentication. The specific exchange of EAP frames depends on the authentication method being used. which prompts the switch to request the client’s identity. the client responds with an EAP-response/identity frame. see the “Ports in Authorized and Unauthorized States” section on page 9-4. see the “Ports in Authorized and Unauthorized States” section on page 9-4. the client can initiate authentication by sending an EAPOL-start frame. the switch begins its role as the intermediary. For more information. It then sends an EAP-request/identity frame to the client to request its identity (typically. the client sends frames as if the port is in the authorized state. However.Chapter 9
Configuring 802. If you enable authentication on a port by using the dot1x port-control auto interface configuration command.
Figure 9-2 Message Exchange
Client
Authentication server (RADIUS)
EAPOL-Start EAP-Request/Identity EAP-Response/Identity EAP-Request/OTP EAP-Response/OTP EAP-Success RADIUS Access-Request RADIUS Access-Challenge RADIUS Access-Request RADIUS Access-Accept Port Authorized EAPOL-Logoff
101228
Port Unauthorized
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
9-3
. the switch sends an initial identity/request frame followed by one or more requests for authentication information). any EAPOL frames from the client are dropped. A port in the authorized state effectively means that the client has been successfully authenticated.
Note
If 802. the client does not receive an EAP-request/identity frame from the switch. the switch must initiate authentication when the link state transitions from down to up. the switch port becomes authorized.

the switch requests the client’s identity. When no response is received. the port remains in the unauthorized state. The switch requests the identity of the client and begins relaying authentication messages between the client and the authentication server.1X protocol. allowing only EAPOL frames to be sent and received through the port.1X authentication and causes the port to begin in the unauthorized state. but authentication can be retried. the port returns to the unauthorized state.1X Port-Based Authentication
Ports in Authorized and Unauthorized States
Depending on the switch port state. the client does not respond to the request. In this situation.
•
•
If the client is successfully authenticated (receives an Accept frame from the authentication server). it sends an EAPOL-logoff message. or if an EAPOL-logoff frame is received.1X port-based authentication is supported in two topologies:
• •
Point-to-point Wireless LAN
Catalyst 3560 Switch Software Configuration Guide
9-4
78-16156-01
. the port remains in the unauthorized state. The port starts in the unauthorized state. If a client that does not support 802. ignoring all attempts by the client to authenticate. the client initiates the authentication process by sending the EAPOL-start frame. CDP. The authentication process begins when the link state of the port transitions from down to up or when an EAPOL-start frame is received. force-unauthorized—causes the port to remain in the unauthorized state.
Supported Topologies
The 802. Each client attempting to access the network is uniquely identified by the switch by using the client MAC address. the client begins sending frames as if the port is in the authorized state. the switch can resend the request. When a client logs off. You control the port authorization state by using the dot1x port-control interface configuration command and these keywords:
•
force-authorized—disables 802. When a client is successfully authenticated. and STP protocol packets.1X port.1X authentication and causes the port to transition to the authorized state without any authentication exchange required. authentication fails.1X-based authentication of the client. Because no response is received.1X is connected to an unauthorized 802.1X.Chapter 9 Understanding 802. While in this state. the switch can grant a client access to the network. when an 802. the port transitions to the authorized state. If the authentication server cannot be reached. In contrast. If the link state of a port transitions from up to down. and all frames from the authenticated client are allowed through the port. If no response is received from the server after the specified number of attempts. The port sends and receives normal traffic without 802. The switch cannot provide authentication services to the client through the port. causing the switch port to transition to the unauthorized state. allowing all traffic for the client to flow normally. the port state changes to authorized. and network access is not granted. auto—enables 802. the client sends the request for a fixed number of times. the port disallows all ingress and egress traffic except for 802. This is the default setting.1X-enabled client connects to a port that is not running the 802. and the client is not granted access to the network. If the authentication fails.1X Port-Based Authentication
Configuring 802.

(You also must configure port security on the port by using the switchport port-security interface configuration command. the port becomes error-disabled and immediately shuts down. it is guaranteed an entry in the secure host table (unless port security static aging has been enabled).
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
101227
9-5
. and port security manages network access for all MAC addresses.Chapter 9
Configuring 802. see the “Security Violations” section on page 20-9. the wireless access point is responsible for authenticating the clients attached to it. If the client address is aged. When the port is authorized. and the port security table is not full. These are some examples of the interaction between 802. The 802. The switch detects the client when the port link state changes to the up state.1X port is configured as a multiple-hosts port that becomes authorized as soon as one client is authenticated. The port security violation modes determine the action for security violations. its place in the secure host table can be taken by another host.
Figure 9-3 Wireless LAN Example
Access point Wireless clients
Authentication server (RADIUS)
Using 802. If the security violation is caused by the first authenticated host. The port then proceeds to come up normally. You can then limit the number or group of clients that can access the network through an 802.1X Port-Based Authentication
In a point-to-point configuration (see Figure 9-1 on page 9-2).1X authenticates the port. all other hosts indirectly attached to the port are granted access to the network.1X and port security on the switch:
•
When a client is authenticated. the switch changes the port link state to down.1X Port-Based Authentication Understanding 802. and the wireless access point acts as a client to the switch.1X with Port Security
You can configure 802. only one client can be connected to the 802. including that of the client. 802. but the port security table is full. the switch denies access to the network to all of the attached clients.1X-enabled switch port. For more information.) When you enable port security and 802. When a client is authenticated and manually configured for port security. Figure 9-3 shows 802.1X port. and the port returns to the unauthorized state.1X port and port security in either single-host or multiple-hosts mode. If a client leaves or is replaced with another client.1X on a port. A security violation occurs if the client is authenticated. This can happen if the maximum number of secure hosts has been statically configured or if the client ages out of the secure host table. the client MAC address is added to the port security list of secure hosts. If the port becomes unauthorized (re-authentication fails or an EAPOL-logoff message is received). In this topology.1X port-based authentication in a wireless LAN.

Using 802.1X with Voice VLAN Ports
A voice VLAN port is a special access port associated with two VLAN identifiers:
• •
VVID to carry voice traffic to and from the IP phone. This configuration allows voice traffic and data traffic to be separated onto different VLANs. The VVID is used to configure the IP phone connected to the port. the switch drops packets from unrecognized IP phones more than one hop away. and all dynamic entries in the secure host table are cleared. see the “Configuring Port Security” section on page 20-7.1X client logs off. The RADIUS server database maintains the username-to-VLAN mappings.1X Port-Based Authentication
Configuring 802. This allows the phone to work independently of 802. Port security applies to both the voice VLAN identifier (VVID) and the port VLAN identifier (PVID). For more information about voice VLANs. The IP phone uses the VVID for its voice traffic regardless of the authorized or unauthorized state of the port. A voice VLAN port becomes active when there is link.1X authentication succeeds on the primary VLAN.Chapter 9 Understanding 802.1X is enabled on a voice VLAN port. You can use this feature to limit network access for certain users. assigning the VLAN based on the username of the client connected to the switch port. including the entry for the client. and the device MAC address appears after the first CDP message from the IP phone.1X authentication. multiple IP phones are allowed on the VVID. When an 802.1X with VLAN Assignment
The RADIUS server sends the VLAN assignment to configure the switch port. The PVID is the native VLAN of the port.”
Using 802.
•
• •
For more information about enabling port security on your switch. When 802. When you enable the multiple-hosts mode and when an 802.1X client by using the dot1x re-authenticate interface interface-id privileged EXEC command. If the port is administratively shut down.1X Port-Based Authentication
•
When you manually remove an 802.1X client address from the port security table by using the no switchport port-security mac-address mac-address interface configuration command.1X port that is in either single-host or multiple-hosts mode. When you enable the single-host mode. When 802. Cisco IP phones do not relay CDP messages from other devices. PVID to carry the data traffic to and from the workstation connected to the switch through the IP phone. only one 802. the port becomes unauthenticated. As a result. Normal authentication then takes place.1X user is authenticated on the primary VLAN.1X is enabled on a port. additional clients on the voice VLAN are unrestricted after 802. if several IP phones are connected in series. you should re-authenticate the 802. see Chapter 14. “Configuring Voice VLAN. the port transitions to an unauthenticated state. and all dynamic entries are removed from the secure host table. the switch recognizes only the one directly connected to it. Port security and a voice VLAN can be configured simultaneously on an 802.
Each port that you configure for a voice VLAN is associated with a PVID and a VVID.
Catalyst 3560 Switch Software Configuration Guide
9-6
78-16156-01
.1X client is allowed on the PVID. you cannot configure a port VLAN that is equal to a voice VLAN.

unauthorized.1X is disabled on the port. all hosts are placed in the same VLAN (specified by the RADIUS server) as the first authenticated host.Chapter 9
Configuring 802. This prevents ports from appearing unexpectedly in an inappropriate VLAN because of a configuration error.
• • • •
If 802. If an 802.1X port. To configure VLAN assignment you need to perform these tasks:
• • •
Enable AAA authorization by using the network keyword to allow interface configuration from the RADIUS server. force unauthorized. If 802. a nonexistent VLAN ID.1X Port-Based Authentication
When configured on the switch and the RADIUS server. Configuration errors could include specifying a malformed VLAN ID. the port is placed in the specified VLAN after authentication.1X-authenticated user. or an attempted assignment to a voice VLAN ID. Assign vendor-specific tunnel attributes in the RADIUS server. it is put into the configured access VLAN. Enable 802.1X on an access port). the port is placed in RADIUS server assigned VLAN. If 802.1X with VLAN assignment feature is not supported on trunk ports.1X authorization is enabled and all information from the RADIUS server is valid. The 802. Attribute [81] specifies the VLAN name or VLAN ID assigned to the 802. dynamic ports. Attribute [65] must contain the value 802 (type 6). 802. the port returns to the unauthorized state and remains in the configured access VLAN. see the “Configuring the Switch to Use Vendor-Specific RADIUS Attributes” section on page 8-29.1X with VLAN assignment has these characteristics:
• •
If no VLAN is supplied by the RADIUS server or if 802.1X. any change to the port access VLAN configuration does not take effect.1X port is authenticated and put in the RADIUS server assigned VLAN.1X Port-Based Authentication Understanding 802.1X authorization is enabled but the VLAN information from the RADIUS server is not valid. the port is configured in its access VLAN after successful authentication.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
9-7
. For examples of tunnel attributes.1X and port security are enabled on a port. If 802. If the multiple-hosts mode is enabled on an 802. or with dynamic-access port assignment through a VLAN Membership Policy Server (VMPS). The RADIUS server must return these attributes to the switch:
– [64] Tunnel-Type = VLAN – [65] Tunnel-Medium-Type = 802 – [81] Tunnel-Private-Group-ID = VLAN name or VLAN ID
Attribute [64] must contain the value VLAN (type 13). (The VLAN assignment feature is automatically enabled when you configure 802. or shutdown state.
When the port is in the force authorized. it is returned to the configured access VLAN.1X authorization is disabled.

1X with Guest VLAN
You can configure a guest VLAN for each 802. Any number of hosts are allowed access when the switch port is moved to the guest VLAN. see Chapter 27. These clients might be upgrading their system for 802.1X Port-Based Authentication
Using 802. or if a link-down condition occurs.Chapter 9 Understanding 802. if one is configured.1X-authenticated user. For more information. The attribute contains the ACL number followed by . the Filter-Id attribute is supported only for IP ACLs numbered 1 to 199 and 1300 to 2699 (IP standard and IP extended ACLs).in for ingress filtering or . RADIUS supports per-user attributes. how to download the 802.
Catalyst 3560 Switch Software Configuration Guide
9-8
78-16156-01
.
Using 802. It does not support port ACLs in the egress direction on Layer 2 ports. the switch removes the ACL from the port. you should carefully plan the user profiles stored on the RADIUS server. Because of limited support of Cisco IOS access lists on the switch. However.1X port. When the authentication server does not receive a response to its EAPOL request/identity frame. might not be 802. the server does not grant 802. You can configure router ACLs and input port ACLs on the same Catalyst 3560 switch.1X port on the switch to provide limited services to clients (for example. clients that are not 802.1X client).1X-capable host joins the same port on which the guest VLAN is configured.” Use only the extended ACL syntax style to define the per-user configuration stored on the RADIUS server. If an 802. You can configure any active VLAN except an RSPAN VLAN or a voice VLAN as an 802. The switch does not save RADIUS-specified ACLs in the running configuration.1X with Per-User ACLs
You can enable per-user access control lists (ACLs) to provide different levels of network access and service to an 802. The Catalyst 3560 switch supports VSAs only in the ingress direction.out syntax.1X ports in single-host or multiple-hosts mode. These vendor-specific attributes (VSAs) are in octet-string format and are passed to the switch during the authentication process. the access list is applied to the outbound ACL by default. However. such as Windows 98 systems. it is supported only on access ports. If the RADIUS server does not allow the . including vendor-specific attributes.1X Port-Based Authentication
Configuring 802.in or . see the “Configuring a Guest VLAN” section on page 9-18.1X guest VLAN. However. a port ACL takes precedence over a router ACL. Guest VLANs are supported on 802. MAC ACLs are supported only in the ingress direction. When the definitions are passed from the RADIUS server. When the port is unauthorized. it can point to a standard ACL.1X-capable.1X-capable clients that fail authentication access to the network. Outgoing routed packets are filtered by the router ACL. To avoid configuration conflicts. If you apply input port ACL to an interface that belongs to a VLAN.1X authentication. if authentication fails. The VSAs used for per-user ACLs are inacl#<n> for the ingress direction and outacl#<n> for the egress direction. For more information. The guest VLAN feature is not supported on trunk ports. You can use the Filter-Id attribute to specify an inbound or outbound ACL that is already configured on the switch.out for egress filtering.1X-capable are put into the guest VLAN for the port. “Configuring Network Security with ACLs. they are created by using the extended naming convention. and some hosts. Incoming routed packets received on other ports are filtered by the router ACL. the port ACL takes precedence over an input router ACL applied to the VLAN interface. and authentication is restarted. The switch removes the per-user ACL configuration when the session is over. it retrieves the ACL attributes based on the user identity and sends them to the switch. When the RADIUS server authenticates a user connected to an 802.1X port for the duration of the user session. The switch applies the attributes to the 802. if you use the Filter-Id attribute. Incoming packets received on the port to which a port ACL is applied are filtered by the port ACL. the port is put into the unauthorized state in the user-configured access VLAN.

Chapter 9 Configuring 802. 30 seconds (when relaying a request from the authentication server to the client.1X configuration. authorization. Disabled (force-authorized).1X Port-Based Authentication
Default 802.1X Authentication
Configuring 802.
Table 9-1 Default 802.1X enable state
Disabled. 3600 seconds. the amount of time the switch waits for a reply before resending the response to the server.
Periodic re-authentication Number of seconds between re-authentication attempts Quiet period
Disabled. 2 times (number of times that the switch will send an EAP-request/identity frame before restarting the authentication process). None specified.1X Configuration
Feature Authentication. the amount of time the switch waits for a response before resending the request to the client.1X-based authentication of the client. None specified. 30 seconds (number of seconds that the switch should wait for a response to an EAP request/identity frame from the client before resending the request). Single-host mode.
IP address UDP authentication port Key
• • •
None specified. 60 seconds (number of seconds that the switch remains in the quiet state following a failed authentication exchange with the client).)
Retransmission time
Maximum retransmission number
Host mode Guest VLAN Client timeout period
Authentication server timeout period
Catalyst 3560 Switch Software Configuration Guide
9-10
78-16156-01
. and accounting (AAA) RADIUS server
• • •
Default Setting Disabled. The port sends and receives normal traffic without 802.1X enable state Per-port 802.) 30 seconds (when relaying a response from the client to the authentication server. This setting is not configurable.1X Configuration
Table 9-1 shows the default 802.
Switch 802. 1812.

it is supported only on access ports. You can enable 802. To allow per-user ACLs or VLAN assignment. an error message appears. The software uses the first method listed to authenticate users. However. A method list describes the sequence and authentication methods to be queried to authenticate a user.1X-enabled port to dynamic VLAN assignment. and the port mode is not changed.1X on a dynamic-access (VLAN Query
Protocol [VQP]) port. and 802.1X is not enabled. you must enable AAA and specify the authentication method list.1X is not enabled. This process continues until there is successful communication with a listed authentication method or until all defined methods are exhausted. If you try to change the mode of an 802.
– EtherChannel port—Do not configure a port that is an active member of an EtherChannel as an
802.1X authentication configuration guidelines:
– Trunk port—If you try to enable 802. the authentication process stops.1X is disabled until the port is removed as a SPAN or RSPAN destination port.1X on a dynamic port. an error message appears.1X-enabled port to dynamic. and 802. If 802. the software selects the next authentication method in the method list. The guest VLAN feature is not supported on trunk ports. you cannot configure a port VLAN that is equal to a voice VLAN. The 802. you must enable AAA authorization to configure the switch for all network-related service requests.1X
is not enabled.
Configuring 802.1X port. When 802. an error message appears. or with dynamic-access port assignment through a VMPS. If you try to change an 802.1X Configuration Guidelines
These are the 802.1X on a SPAN or RSPAN source port. 802.1X Port-Based Authentication Configuring 802.1X with VLAN assignment feature is not supported on trunk ports. and 802. If you try to enable 802.1X is enabled on a not-yet active port of an EtherChannel.1X-enabled port to trunk.
– Dynamic-access ports—If you try to enable 802.1X Authentication
To configure 802. an error message appears.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
9-11
.1X is enabled on a port. an error message appears.
• • •
You can configure any VLAN except an RSPAN VLAN or a voice VLAN as an 802. If authentication fails at any point in this cycle. the port does not join the EtherChannel. and the VLAN configuration is not changed.1X port-based authentication.Chapter 9
Configuring 802.1X on a trunk port.1X on a port that is a SPAN or RSPAN destination port.
– Dynamic ports—A port in dynamic mode can negotiate with its neighbor to become a trunk
port. and the port mode is not changed.1X Authentication
802. an error message appears. dynamic ports.
– Switched Port Analyzer (SPAN) and Remote SPAN (RSPAN) destination ports—You can
enable 802. If that method fails to respond. If you try to change the mode of an 802. and no other authentication methods are attempted.1X guest VLAN.

Chapter 9 Configuring 802. use the no aaa new-model global configuration command. single-host mode must be configured. Enable 802.1X Port-Based Authentication
Beginning in privileged EXEC mode. To disable 802.1X Authentication
Configuring 802. use the default keyword followed by the methods that are to be used in default situations. use the no aaa authorization global configuration command.]
group radius—Use the list of all RADIUS servers for authentication. such as per-user ACLs or VLAN assignment. use the no dot1x system-auth-control global configuration command.
Step 6 Step 7
interface interface-id dot1x port-control auto
Specify the port connected to the client that is to be enabled for 802.1X authentication on the port... For feature interaction information. To disable 802. Command
Step 1 Step 2 Step 3
Purpose Enter global configuration mode.1X port-based authentication. This procedure is required.1X authentication on the switch. Create an 802. Enable AAA.1X authentication globally on the switch. Enter at least one of these keywords:
• •
configure terminal aaa new-model aaa authentication dot1x {default} method1 [method2.
Note
For per-user ACLs. (Optional) Save your entries in the configuration file. Verify your entries. (Optional) Configure the switch for user RADIUS authorization for all network-related service requests. follow these steps to configure 802. This example shows how to enable AAA and 802. and enter interface configuration mode. none—Use no authentication.1X:
Switch# configure terminal Switch(config)# aaa new-model Switch(config)# aaa authentication dot1x default group radius Switch(config)# dot1x system-auth-control Switch(config)# interface gigabitethernet0/1 Switch(config)# switchport mode access Switch(config-if)# dot1x port-control auto Switch(config-if)# end
Catalyst 3560 Switch Software Configuration Guide
9-12
78-16156-01
.1X authentication. To create a default list that is used when a named list is not specified in the authentication command. The client is automatically authenticated by the switch without using the information supplied by the client. The default method list is automatically applied to all ports. see the “802.1X Configuration Guidelines” section on page 9-11.1X AAA authentication.
To disable AAA.1X authentication method list.
Step 8 Step 9 Step 10
end show dot1x copy running-config startup-config
Return to privileged EXEC mode. To disable 802. This setting is the default.
Step 4 Step 5
dot1x system-auth-control aaa authorization network {default} group radius
Enable 802.1X AAA authorization. use the no aaa authentication dot1x {default | list-name} global configuration command.

1X Authentication
Configuring the Switch-to-RADIUS-Server Communication
RADIUS security servers are identified by their host name or IP address. Beginning in privileged EXEC mode. The RADIUS host entries are tried in the order that they were configured.
Note
Always configure the key as the last item in the radius-server host command syntax because leading spaces are ignored.
To delete the specified RADIUS server. (Optional) Save your entries in the configuration file. do not enclose the key in quotation marks unless the quotation marks are part of the key. The combination of the IP address and UDP port number creates a unique identifier. follow these steps to configure the RADIUS server parameters on the switch. and the radius-server key global configuration commands.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
9-13
. use the radius-server timeout. retransmission. The range is 0 to 65536.46 auth-port 1612 key rad123
You can globally configure the timeout.
If you want to use multiple RADIUS servers. This key must match the encryption used on the RADIUS daemon. use the no radius-server host {hostname | ip-address} global configuration command.46 as the RADIUS server.39. see the “Configuring Settings for All RADIUS Servers” section on page 8-29. If you use spaces in the key. or IP address and specific UDP port numbers.1X Port-Based Authentication Configuring 802. This procedure is required. and encryption key values for all RADIUS servers by using the radius-server host global configuration command.
configure terminal
radius-server host {hostname | Configure the RADIUS server parameters.39.20. For key string. The default is 1812. and to set the encryption key to rad123. For auth-port port-number. but spaces within and at the end of the key are used. authentication—the second host entry configured acts as the fail-over backup to the first one. re-enter this command. host name and specific UDP port numbers. specify the authentication and encryption key used between the switch and the RADIUS daemon running on the RADIUS server. ip-address} auth-port port-number key For hostname | ip-address. matching the key on the RADIUS server:
Switch(config)# radius-server host 172. Verify your entries. For more information. This example shows how to specify the server with IP address 172.
Step 3 Step 4 Step 5
end show running-config copy running-config startup-config
Return to privileged EXEC mode. to use port 1612 as the authorization port. The key is a text string that must match the encryption key used on the RADIUS server. Command
Step 1 Step 2
Purpose Enter global configuration mode.l20.Chapter 9
Configuring 802. If you want to configure these options on a per-server basis. which enables RADIUS requests to be sent to multiple UDP ports on a server at the same IP address. If two different host entries on the same RADIUS server are configured for the same service—for example. specify the host name or IP address of the string remote RADIUS server. radius-server retransmit. specify the UDP destination port for authentication requests.

If you want to enable or disable periodic re-authentication. (Optional) Save your entries in the configuration file. Set the number of seconds between re-authentication attempts. use the no dot1x timeout reauth-period interface configuration command. follow these steps to enable periodic re-authentication of the client and to configure the number of seconds between re-authentication attempts. For more information. This command affects the behavior of the switch only if periodic re-authentication is enabled.1X Authentication
Configuring 802. and enter interface configuration mode. Specify the port to be configured.1X client re-authentication and specify how often it occurs. To return to the default number of seconds between re-authentication attempts. refer to the RADIUS server documentation. This step is optional. see the “Configuring Periodic Re-Authentication” section on page 9-14. Enable periodic re-authentication of the client. Verify your entries.
configure terminal interface interface-id dot1x reauthentication dot1x timeout reauth-period seconds
Step 5 Step 6 Step 7
end show dot1x interface interface-id copy running-config startup-config
Return to privileged EXEC mode. the number of seconds between re-authentication attempts is 3600. Beginning in privileged EXEC mode. the default is 3600 seconds.
Configuring Periodic Re-Authentication
You can enable periodic 802. This procedure is optional. If you do not specify a time period before enabling re-authentication. The range is 1 to 65535.
To disable periodic re-authentication. This example shows how to enable periodic re-authentication and set the number of seconds between re-authentication attempts to 4000:
Switch(config-if)# dot1x reauthentication Switch(config-if)# dot1x timeout reauth-period 4000
Manually Re-Authenticating a Client Connected to a Port
You can manually re-authenticate the client connected to a specific port at any time by entering the dot1x re-authenticate interface interface-id privileged EXEC command. Command
Step 1 Step 2 Step 3 Step 4
Purpose Enter global configuration mode. use the no dot1x reauthentication interface configuration command. This example shows how to manually re-authenticate the client connected to a port:
Switch# dot1x re-authenticate interface gigabitethernet0/1
Catalyst 3560 Switch Software Configuration Guide
9-14
78-16156-01
. which is disabled by default. These settings include the IP address of the switch and the key string to be shared by both the server and the switch.Chapter 9 Configuring 802.1X Port-Based Authentication
You also need to configure some settings on the RADIUS server.

The range is 1 to 65535 seconds.1X Port-Based Authentication Configuring 802. the switch remains idle for a set period of time and then tries again. Specify the port to be configured. follow these steps to change the amount of time that the switch waits for client notification. Verify your entries. the default is 60. The range is 1 to 65535 seconds. If the switch does not receive this response. Command
Step 1 Step 2 Step 3
Purpose Enter global configuration mode. use the no dot1x timeout quiet-period interface configuration command. Set the number of seconds that the switch waits for a response to an EAP-request/identity frame from the client before resending the request. A failed authentication of the client might occur because the client provided an invalid password. Set the number of seconds that the switch remains in the quiet state following a failed authentication exchange with the client. This procedure is optional.1X Authentication
Changing the Quiet Period
When the switch cannot authenticate the client. Beginning in privileged EXEC mode. The dot1x timeout quiet-period interface configuration command controls the idle period. Return to privileged EXEC mode. (Optional) Save your entries in the configuration file. This procedure is optional. follow these steps to change the quiet period. You can provide a faster response time to the user by entering a smaller number than the default.Chapter 9
Configuring 802. the default is 30.
Note
You should change the default value of this command only to adjust for unusual circumstances such as unreliable links or specific behavioral problems with certain clients and authentication servers.
configure terminal interface interface-id dot1x timeout tx-period seconds
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
9-15
. and enter interface configuration mode. and enter interface configuration mode. it waits a set period of time (known as the retransmission time) and then resends the frame. This example shows how to set the quiet time on the switch to 30 seconds:
Switch(config-if)# dot1x timeout quiet-period 30
Changing the Switch-to-Client Retransmission Time
The client responds to the EAP-request/identity frame from the switch with an EAP-response/identity frame.
Command
Step 1 Step 2 Step 3
Purpose Enter global configuration mode. Beginning in privileged EXEC mode.
configure terminal interface interface-id dot1x timeout quiet-period seconds
Step 4 Step 5 Step 6
end show dot1x interface interface-id copy running-config startup-config
To return to the default quiet time. Specify the port to be configured.

1X Port-Based Authentication
Command
Step 4 Step 5 Step 6
Purpose Return to privileged EXEC mode. Return to privileged EXEC mode. the default is 2.1X Authentication
Configuring 802.
configure terminal interface interface-id dot1x max-req count
Step 4 Step 5 Step 6
end show dot1x interface interface-id copy running-config startup-config
To return to the default retransmission number. This example shows how to set 5 as the number of times that the switch sends an EAP-request/identity request before restarting the authentication process:
Switch(config-if)# dot1x max-req 5
Catalyst 3560 Switch Software Configuration Guide
9-16
78-16156-01
. This example shows how to set 60 as the number of seconds that the switch waits for a response to an EAP-request/identity frame from the client before resending the request:
Switch(config-if)# dot1x timeout tx-period 60
Setting the Switch-to-Client Frame-Retransmission Number
In addition to changing the switch-to-client retransmission time.Chapter 9 Configuring 802. Beginning in privileged EXEC mode. you can change the number of times that the switch sends an EAP-request/identity frame (assuming no response is received) to the client before restarting the authentication process. Set the number of times that the switch sends an EAP-request/identity frame to the client before restarting the authentication process. use the no dot1x timeout tx-period interface configuration command. follow these steps to set the switch-to-client frame-retransmission number. (Optional) Save your entries in the configuration file. Specify the port to be configured.
Note
You should change the default value of this command only to adjust for unusual circumstances such as unreliable links or specific behavioral problems with certain clients and authentication servers. The range is 1 to 10. This procedure is optional. Verify your entries.
Command
Step 1 Step 2 Step 3
Purpose Enter global configuration mode.
end show dot1xinterface interface-id copy running-config startup-config
To return to the default retransmission time. and enter interface configuration mode. Verify your entries. (Optional) Save your entries in the configuration file. use the no dot1x max-req interface configuration command.

Specify the port to which multiple hosts are indirectly attached.1X to authenticate the port and port security to manage network access for all MAC addresses. use the no dot1x host-mode multi-host interface configuration command. If the port becomes unauthorized (re-authentication fails or an EAPOL-logoff message is received). In this mode. This procedure is optional.1X-authorized port that has the dot1x port-control interface configuration command set to auto.1X port for single-host or for multiple-hosts mode. all attached clients are denied access to the network. Command
Step 1 Step 2 Step 3
Purpose Enter global configuration mode. Verify your entries. the port is placed in the authorized state.
To disable multiple hosts on the port.1X Port-Based Authentication Configuring 802.Chapter 9
Configuring 802.
configure terminal interface interface-id dot1x host-mode multi-host
Step 4 Step 5 Step 6
end show dot1x interface interface-id copy running-config startup-config
Return to privileged EXEC mode. Beginning in privileged EXEC mode.1X-authorized port. This example shows how to enable 802. In single-host mode.1X and to allow multiple hosts:
Switch(config)# interface gigabitethernet0/1 Switch(config-if)# dot1x port-control auto Switch(config-if)# dot1x host-mode multi-host
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
9-17
. Make sure that the dot1x port-control interface configuration command set is set to auto for the specified interface. With the multiple-hosts mode enabled. only one host is allowed on an 802. follow these steps to allow multiple hosts (clients) on an 802.1X-enabled port as shown in Figure 9-3 on page 9-5. When the host leaves the port. including that of the client. you can use 802. When the host is authenticated. Allow multiple hosts (clients) on an 802. Packets from hosts other than the authenticated one are dropped. only one of the attached hosts must be successfully authorized for all hosts to be granted network access.1X Authentication
Configuring the Host Mode
You can configure an 802. and enter interface configuration mode. (Optional) Save your entries in the configuration file. You can attach multiple hosts to a single 802.1X port. the port becomes unauthorized.

Catalyst 3560 Switch Software Configuration Guide 78-16156-01
9-19
.1X statistics for all ports.1X administrative and operational status for the switch.1X Port-Based Authentication Displaying 802. To display the 802.1X statistics for a specific port. For detailed information about the fields in these displays.1X Statistics and Status
To display 802. use the show dot1x all privileged EXEC command. refer to the command reference for this release. use the show dot1x statistics interface interface-id privileged EXEC command. use the show dot1x interface interface-id privileged EXEC command. To display 802.1X Statistics and Status
Displaying 802.Chapter 9
Configuring 802. use the show dot1x all statistics privileged EXEC command. To display the 802.1X administrative and operational status for a specific port.

A switch port can be an access port or a trunk port. Switch ports belong to one or more VLANs. or when a user creates a VLAN. For an access port. A VLAN comes into existence when a local port is configured to be associated with the VLAN. VLAN partitions provide hard firewalls for traffic in the VLAN. “Configuring VLANs. the packet is dropped. and if desired. Add ports to a VLAN by using the switchport interface configuration commands:
• • •
Identify the interface. Traffic arriving on an access port is assumed to belong to the VLAN assigned to the port. and each VLAN has its own MAC address table. To configure extended-range VLANs (VLAN IDs 1006 to 4094). For a trunk port.Chapter 10 Understanding Interface Types
Configuring Interface Characteristics
Port-Based VLANs
A VLAN is a switched network that is logically segmented by function. The VLAN configurations for VLAN IDs 1 to 1005 are saved in the VLAN database. Switch ports are used for managing the physical interface and associated Layer 2 protocols and do not handle routing or bridging. Network devices in different VLANs cannot communicate with one another without a Layer 3 device to route traffic between the VLANs. and the source address is not learned. “Configuring VLANs. you must use config-vlan mode with VTP mode set to transparent.”
Access Ports
An access port belongs to and carries the traffic of only one VLAN (unless it is configured as a voice VLAN port). and you can save it in the switch startup configuration file by entering the copy running-config startup-config privileged EXEC command. define the VLANs to which it can belong. the VTP and VLAN configuration is saved in the switch running configuration. For detailed information about configuring access port and trunk port characteristics.
Switch Ports
Switch ports are Layer 2-only interfaces associated with a physical port. Traffic is received and sent in native formats with no VLAN tagging. For more information about VLANs. use the vlan vlan-id global configuration command to enter config-vlan mode or the vlan database privileged EXEC command to enter VLAN database configuration mode.1Q tagged). Extended-range VLANs are not added to the VLAN database. You can configure a port as an access port or trunk port or let the Dynamic Trunking Protocol (DTP) operate on a per-port basis to determine the switchport mode by negotiating with the port on the other end of the link. see Chapter 12. team. or application.” Packets received on a port are forwarded only to ports that belong to the same VLAN as the receiving port. If an access port receives a tagged packet (Inter-Switch Link [ISL] or 802. see Chapter 12. when the VLAN Trunking Protocol (VTP) learns of its existence from a neighbor on a trunk. set trunk characteristics. To configure normal-range VLANs (VLAN IDs 1 to 1005). set and define the VLAN to which it belongs. When VTP mode is transparent. without regard to the physical location of the users. Configure switch ports by using the switchport interface configuration commands.
Catalyst 3560 Switch Software Configuration Guide
10-2
78-16156-01
.

see Chapter 14. A packet with a VLAN ID equal to the outgoing port default PVID is sent untagged.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
10-3
. For more information about trunk ports. Native (non-tagged) frames received from an ISL trunk port are dropped. enabled VLAN and the VLAN is in the allowed list for a trunk port. Dynamic access ports on the switch are assigned to a VLAN by a VLAN Membership Policy Server (VMPS). By default. Configure routed ports by putting the interface into Layer 3 mode with the no switchport interface configuration command. Then assign an IP address to the port. and all transmitted packets are sent with an ISL header.Chapter 10
Configuring Interface Characteristics Understanding Interface Types
Two types of access ports are supported:
• •
Static access ports are manually assigned to a VLAN. the port does not become a member of the VLAN. A trunk port can only become a member of a VLAN if VTP knows of the VLAN and the VLAN is in the enabled state.”
Trunk Ports
A trunk port carries the traffic of multiple VLANs and by default is a member of all VLANs in the VLAN database. as is an access port. “Configuring VLANs.1Q trunk port supports simultaneous tagged and untagged traffic. such as DTP and STP. An IEEE 802. the trunk port automatically becomes a member of that VLAN and traffic is forwarded to and from the trunk port for that VLAN. The VMPS can be a Catalyst 6500 series switch. a trunk port is a member of every VLAN known to the VTP. For more information about voice VLAN ports.”
Routed Ports
A routed port is a physical port that acts like a port on a router. and all untagged traffic travels on the port default PVID.1Q trunk port is assigned a default Port VLAN ID (PVID). except that it does not support VLAN subinterfaces. all received packets are expected to be encapsulated with an ISL header. all possible VLANs (VLAN ID 1 to 4094) are in the allowed list. enabled VLAN that is not in the allowed list for a trunk port. The list of allowed VLANs does not affect any other port but the associated trunk port. a dynamic access port is a member of no VLAN. which might generate messages on the device to which the interface is connected. and no traffic for the VLAN is forwarded to or from the port. the Catalyst 3560 switch cannot be a VMPS server. enable routing.
•
Although by default. see Chapter 12. A routed port is a Layer 3 interface only and does not support Layer 2 protocols. and assign routing protocol characteristics by using the ip routing and router protocol global configuration commands. If VTP learns of a new.
Caution
Entering a no switchport interface configuration command shuts down the interface and then re-enables it. Routed ports can be configured with a Layer 3 routing protocol. you can limit VLAN membership by configuring an allowed list of VLANs for each trunk port. By default.
You can also configure an access port with an attached Cisco IP Phone to use one VLAN for voice traffic and another VLAN for data traffic from a device attached to the phone. An 802. All other traffic is sent with a VLAN tag. VLAN membership of dynamic access ports is learned through incoming packets. “Configuring Voice VLAN. and forwarding to and from the port is enabled only when the VLAN membership of the port is discovered. A routed port is not associated with a particular VLAN. A routed port behaves like a regular router interface. Two types of trunk ports are supported:
•
In an ISL trunk port. it does not have to be connected to a router. If VTP learns of a new. All untagged traffic and tagged traffic with a NULL VLAN ID are assumed to belong to the port default PVID.

For more information. Only one SVI can be associated with a VLAN. See the “Configuring Layer 3 Interfaces” section on page 10-19 for information about what happens when hardware resource limitations are reached. “Configuring Fallback Bridging.”
Note
The standard multilayer software image (SMI) supports static routing and the Routing Information Protocol (RIP).
Switch Virtual Interfaces
A switch virtual interface (SVI) represents a VLAN of switch ports as one interface to the routing or bridging function in the system. For more information about IP unicast and multicast routing and routing protocols.
Note
When you create an SVI. For full Layer 3 routing or for fallback bridging. The VLAN corresponds to the VLAN tag associated with data frames on an ISL or 802. Although the switch supports a total or 1005 VLANs (and SVIs). you must have the EMI installed on the switch. for more advanced routing or for fallback bridging. “Configuring IP Unicast Routing. see Chapter 30. the interrelationship between this number and the number of other features being configured might impact CPU performance because of hardware limitations. you must have the enhanced multilayer image (EMI) installed on the switch. see the “Manually Assigning IP Information” section on page 4-9.”
Note
The SMI supports static routing and RIP. By default. “Configuring IP Multicast Routing. For more information about configuring IP routing. Additional SVIs must be explicitly configured. but you need to configure an SVI for a VLAN only when you wish to route between VLANs. However.” Chapter 32. to fallback-bridge nonroutable protocols between VLANs.Chapter 10 Understanding Interface Types
Configuring Interface Characteristics
The number of routed ports that you can configure is not limited by software. the interrelationship between the number of SVIs and routed ports and the number of other features being configured might impact CPU performance because of hardware limitations. SVIs are created the first time that you enter the vlan interface configuration command for a VLAN interface.
Catalyst 3560 Switch Software Configuration Guide
10-4
78-16156-01
. SVIs provide IP host connectivity only to the system. “Configuring IP Multicast Routing. see Chapter 30. Configure a VLAN interface for each VLAN for which you want to route traffic. it does not become active until it is associated with a physical port. in Layer 3 mode. an SVI is created for the default VLAN (VLAN 1) to permit remote switch administration.1Q encapsulated trunk or the VLAN ID configured for an access port. “Configuring IP Unicast Routing” and Chapter 32. you can configure routing across SVIs. and assign it an IP address. See the “Configuring Layer 3 Interfaces” section on page 10-19 for information about what happens when hardware resource limitations are reached. SVIs support routing protocols and bridging configurations.”and Chapter 34. or to provide IP host connectivity to the switch.

you manually create the logical interface by using the interface port-channel global configuration command. In the configuration shown in Figure 10-1. traffic previously carried over the failed link changes to the remaining links. For more information. For Layer 3 interfaces. Most protocols operate over either single ports or aggregated switch ports and do not recognize the physical ports within the port group. Exceptions are the DTP. when you configure VLAN 20 and VLAN 30 each with an SVI to which an IP address is assigned. With a standard Layer 2 switch. see Chapter 29. the Cisco Discovery Protocol (CDP). For Layer 2 interfaces.
Figure 10-1 Connecting VLANs with Layer 2 Switches
Cisco router
Switch
Host A
Host B
VLAN 20
VLAN 30
By using the switch with routing enabled. it must go from Host A to the switch. and then to Host B. when Host A in VLAN 20 sends data to Host B in VLAN 30. Ports in different VLANs cannot exchange data without going through a routing device.Chapter 10
Configuring Interface Characteristics Understanding Interface Types
EtherChannel Port Groups
EtherChannel port groups provide the ability to treat multiple switch ports as one switch port.”
Connecting Interfaces
Devices within a single VLAN can communicate directly through any switch. ports in different VLANs have to exchange information through a router. “Configuring EtherChannels. you create a port-channel logical interface and assign an interface to the EtherChannel. which operate only on physical ports. An EtherChannel balances the traffic load across the links in the channel. You can group multiple trunk ports into one logical trunk port. packets can be sent from Host A to Host B directly through the switch with no need for an external router (Figure 10-2). back to the switch. or group multiple routed ports into one logical routed port. These port groups act as a single logical port for high-bandwidth connections between switches or between switches and servers. group multiple access ports into one logical access port. to the router. and the Port Aggregation Protocol (PAgP).
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
46647
10-5
. This command binds the physical and logical ports together. Then you manually assign an interface to the EtherChannel by using the channel-group interface configuration command. If a link within the EtherChannel fails. use the channel-group interface configuration command to dynamically create the port-channel logical interface. When you configure an EtherChannel.

•
The routing function can be enabled on all SVIs and routed ports.” and Chapter 33. “Configuring IP Multicast Routing. such as DECnet. only basic routing (static routing and RIP) is supported. Non-IP traffic and traffic with other encapsulation methods can be fallback-bridged by hardware. When IP routing protocol parameters and address configuration are added to an SVI or routed port. forwarding is done by the switch hardware. When configuring fallback bridging.20. to maintain high performance. see Chapter 34. Whenever possible. All interfaces in the same group belong to the same bridge domain. The switch routes only IP traffic.” Chapter 32. “Configuring MSDP.20.” Fallback bridging forwards traffic that the switch does not route or traffic belonging to a nonroutable protocol. For more information. see Chapter 30. any IP traffic received from these ports is routed.1
Host A
Host B
VLAN 20
VLAN 30
When the EMI is running on the switch. However.
Catalyst 3560 Switch Software Configuration Guide
10-6
101350
78-16156-01
. “Configuring Fallback Bridging. If the SMI is on the switch. you assign SVIs or routed ports to bridge groups with each SVI or routed port assigned to only one bridge group. “Configuring IP Unicast Routing.Chapter 10 Using Interface Configuration Mode
Configuring Interface Characteristics
Figure 10-2 Connecting VLANs with the Catalyst 3560 Switch
Layer 3 switch with routing enabled
172.129. only IP version 4 packets with Ethernet II encapsulation can be routed in hardware. Fallback bridging connects multiple VLANs into one bridge domain by bridging between two or more SVIs or routed ports.”
•
Using Interface Configuration Mode
The switch supports these interface types:
• • •
Physical ports—including switch ports and routed ports VLANs—switch virtual interfaces Port-channels—EtherChannel of interfaces
You can also configure a range of interfaces (see the “Configuring a Range of Interfaces” section on page 10-8). For more information. the switch supports two methods of forwarding traffic between interfaces: routing and fallback bridging.128.1
SVI 1
SVI 2
172.

10/100 ports and SFP module ports). or gi0/1. Switch(config)#
Step 2
Enter the interface global configuration command. and switch port number. gi 0/1.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
10-7
. fastethernet 0/2. fastethernet 0/1. The remainder of this chapter primarily provides physical interface configuration procedures.
Step 3
Follow each interface command with the interface configuration commands that the interface requires.Chapter 10
Configuring Interface Characteristics Using Interface Configuration Mode
To configure a physical interface (port). A report is provided for each interface that the device supports or for the specified interface. gigabitethernet0/1.
You can identify physical interfaces by physically checking the interface location on the switch. The port numbers always begin at 1. you can specify either gigabitethernet 0/1. In this example. Identify the interface type and the number of the connector. Interfaces configured in a range must be the same type and must be configured with the same feature options. If there is more than one media type (for example. For example.
Step 4
After you configure an interface.
Step 1
Enter the configure terminal command at the privileged EXEC prompt:
Switch# configure terminal Enter configuration commands.
• • •
Type—Fast Ethernet (fastethernet or fa) for 10/100 Mbps Ethernet or Gigabit Ethernet (gigabitethernet or gi) for small form-factor pluggable (SFP) Gigabit Ethernet interfaces. Port number—The interface number on the switch. Gigabit Ethernet port 1 is selected:
Switch(config)# interface gigabitethernet0/1 Switch(config-if)#
Note
You do not need to add a space between the interface type and interface number. and specify the interface type.
Enter the show interfaces privileged EXEC command to see a list of all interfaces on or configured for the switch.
Procedures for Configuring Interfaces
These general instructions apply to all interface configuration processes. starting at the left when facing the front of the switch. module number. The commands are collected and applied to the interface when you enter another interface command or enter end to return to privileged EXEC mode. End with CNTL/Z. enter interface configuration mode. You can also use the Cisco IOS show privileged EXEC commands to display information about a specific interface or all the interfaces on the switch. the SFP port numbers start again from 1: gigabitethernet0/1. for example. gigabitethernet 0/2. one per line. verify its status by using the show privileged EXEC commands listed in the “Monitoring and Maintaining the Interfaces” section on page 10-22. in the preceding line. The commands that you enter define the protocols and applications that will run on the interface. You can also configure a range of interfaces by using the interface range or interface range macro global configuration commands. Module number—The module or slot number on the switch (always 0 on the Catalyst 3560 switch).

{last port}. The show running-config privileged EXEC command displays the configured VLAN interfaces.4 is a valid range. The macro variable is explained in the “Configuring and Using Interface Range Macros” section on page 10-9. where the VLAN ID is from 1 to 4094 – fastethernet module/{first port} . In a comma-separated port-range.Chapter 10 Using Interface Configuration Mode
Configuring Interface Characteristics
Configuring a Range of Interfaces
You can use the interface range global configuration command to configure multiple interfaces with the same configuration parameters. where the module is always 0 – port-channel port-channel-number . VLAN interfaces not displayed by the show running-config command cannot be used with the interface range command.
•
You must add a space between the first interface number and the hyphen when using the interface range command. where the module is always 0 – gigabitethernet module/{first port} .{last port}. follow these steps to configure a range of interfaces with the same parameters: Command
Step 1 Step 2
Purpose Enter global configuration mode. the command interface range fastgigabitethernet 0/1 . all command parameters that you enter are attributed to all interfaces within that range until you exit this mode. For example. you do not need to re-enter the interface type. where the port-channel-number is
from 1 to 12
Note
When you use the interface range command with port channels. the first and last port channel number must be active port channels. (Optional) Save your entries in the configuration file. Beginning in privileged EXEC mode.
• • • •
configure terminal interface range {port-range | macro macro_name}
You can use the interface range command to configure up to five port ranges or a previously defined macro.
Step 3 Step 4 Step 5 Step 6
You can now use the normal configuration commands to apply the configuration parameters to all interfaces in the range.port-channel-number. end show interfaces [interface-id] copy running-config startup-config Return to privileged EXEC mode.
•
Catalyst 3560 Switch Software Configuration Guide
10-8
78-16156-01
. When you enter the interface range configuration mode. Enter interface range configuration mode by entering the range of interfaces (VLANs or physical ports) to be configured. but you must enter a space before the hyphen.vlan-ID.
When using the interface range global configuration command. you must enter the interface type for each entry and enter spaces before and after the comma. The interface range command only works with VLAN interfaces that have been configured with the interface vlan command. note these guidelines:
•
Valid entries for port-range:
– vlan vlan-ID . the command interface range fastgigabitethernet 0/1-4 is not a valid range. In a hyphen-separated port-range. Verify the configuration of the interfaces in the range.

• • •
configure terminal define interface-range macro_name interface-range
The macro_name is a 32-character maximum character string. Before you can use the macro keyword in the interface range macro global configuration command string.Chapter 10
Configuring Interface Characteristics Using Interface Configuration Mode
•
All interfaces defined as in a range must be the same type (all Fast Ethernet ports.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
10-9
. You can now use the normal configuration commands to apply the configuration to all interfaces in the defined macro.4 Switch(config-if-range)# speed 100
This example shows how to use a comma to add different interface type strings to the range to enable Fast Ethernet interfaces in the range 1 to 3 and Gigabit Ethernet interfaces 1 and 2 to receive flow control pause frames:
Switch# configure terminal Switch(config)# interface range fastethernet0/1 . Each interface-range must consist of the same port type. and save it in NVRAM. all Gigabit Ethernet ports.3 . Wait until the command prompt reappears before exiting interface range configuration mode. some commands might not be executed on all interfaces in the range. If you exit interface range configuration mode while the commands are being executed. Define the interface-range macro. or all VLANs). A macro can contain up to five comma-separated interface ranges.
Configuring and Using Interface Range Macros
You can create an interface range macro to automatically select a range of interfaces for configuration. gigabitethernet0/1 . but you can enter multiple ranges in a command. all EtherChannel ports. (Optional) Save your entries in the configuration file.2 Switch(config-if-range)# flowcontrol receive on
If you enter multiple configuration commands while you are in interface range mode. you must use the define interface-range global configuration command to define the macro. follow these steps to define an interface range macro: Command
Step 1 Step 2
Purpose Enter global configuration mode.
Step 3
interface range macro macro_name
Select the interface range to be configured using the values saved in the interface-range macro called macro_name. Show the defined interface range macro configuration.
Step 4 Step 5 Step 6
end show running-config | include define copy running-config startup-config
Return to privileged EXEC mode. The commands are not batched together and executed after you exit interface range mode.
This example shows how to use the interface range global configuration command to set the speed on ports 1 to 4 to 100 Mbps:
Switch# configure terminal Switch(config)# interface range fastgigabittethernet0/1 . each command is executed as it is entered. Beginning in privileged EXEC mode.

2
This example shows how to create a multiple-interface macro named macro1:
Switch# configure terminal Switch(config)# define interface-range macro1 fastethernet0/1 . gigabitethernet0/1 .Chapter 10 Using Interface Configuration Mode
Configuring Interface Characteristics
Use the no define interface-range macro_name global configuration command to delete a macro.2 Switch(config)# end
This example shows how to enter interface range configuration mode for the interface-range macro enet_list:
Switch# configure terminal Switch(config)# interface range macro enet_list Switch(config-if-range)#
This example shows how to delete the interface-range macro enet_list and to verify that it was deleted. where the port-channel-number is
from 1 to 12. All interfaces defined as in a range must be the same type (all Fast Ethernet ports.2 Switch(config)# end Switch# show running-config | include define define interface-range enet_list GigabitEthernet0/1 . where the module is always 0 – gigabitethernet module/{first port} .{last port}. all Gigabit Ethernet ports. fastgigabitethernet 0/1-4 is not a valid range. VLAN interfaces not displayed by the show running-config command cannot be used as interface-ranges. The show running-config privileged EXEC command displays the configured VLAN interfaces.
•
You must add a space between the first interface number and the hyphen when entering an interface-range. where the VLAN ID is from 1 to 4094 – fastethernet module/{first port} .4 is a valid range. When using the define interface-range global configuration command.
•
•
This example shows how to define an interface-range named enet_list to include ports 1 and 2 and to verify the macro configuration:
Switch# configure terminal Switch(config)# define interface-range enet_list gigabitethernet0/1 .2. note these guidelines:
•
Valid entries for interface-range:
– vlan vlan-ID . The VLAN interfaces must have been configured with the interface vlan command. For example. all EtherChannel ports.{last port}. where the module is always 0 – port-channel port-channel-number .vlan-ID.
Switch# configure terminal Switch(config)# no define interface-range enet_list Switch(config)# end Switch# show run | include define Switch#
Catalyst 3560 Switch Software Configuration Guide
10-10
78-16156-01
. or all VLANs).port-channel-number.
Note
When you use the interface ranges with port channels. fastgigabitethernet 0/1 . but you can combine multiple interface types in a macro. the first and last port channel number must be active port channels.

You cannot configure speed or duplex mode on SFP ports.Chapter 10 Configuring Ethernet Interfaces
Configuring Interface Characteristics
Table 10-1 Default Layer 2 Ethernet Interface Configuration (continued)
Feature Broadcast. or 1000 Mbps. In full-duplex mode. Normally. Switch models include combinations of Fast Ethernet (10/100-Mbps) ports or Gigabit Ethernet small form-factor pluggable (SFP) module slots supporting Gigabit SFP modules. or 1000 Mbps and in either full. page 10-13 Setting the Interface Speed and Duplex Parameters. and you can configure duplex mode to auto or full. half. You can configure duplex mode to full. multicast. L2 Disabled. page 10-13
Catalyst 3560 Switch Software Configuration Guide
10-12
78-16156-01
. which means that stations can either receive or send traffic. Disabled (Layer 2 interfaces only). However.
Note
The switch might not support a pre-standard powered device—such as Cisco IP phones and access points that do not fully support IEEE 802. You can configure Gigabit Ethernet ports to full-duplex mode or to autonegotiate. See the “Configuring Protected Ports” section on page 20-5. but you can configure speed to not negotiate (nonegotiate) if connected to a device that does not support autonegotiation. two stations can send and receive traffic at the same time.3af—if that powered device is connected to the switch through a crossover cable.
•
These sections describe how to configure the interface speed and duplex mode:
• •
Configuration Guidelines. 10-Mbps ports operate in half-duplex mode. This is regardless of whether Auto-MIDX is enabled on the switch port. or autonegotiate on Fast Ethernet interfaces. 100. or auto. See the “Default Storm Control Configuration” section on page 20-3.
•
You can configure interface speed on Fast Ethernet (10/100-Mbps) ports. you can configure speed as 10. you cannot configure half-duplex mode on Gigabit Ethernet ports. 100. and unicast storm control Protected port Port security Port Fast Auto-MDIX
Default Setting Disabled. Disabled. See the “Default Port Security Configuration” section on page 20-10.
Power over Ethernet
Enabled (auto)
Configuring Interface Speed and Duplex Mode
Ethernet interfaces on the switch operate at 10. Disabled (Layer 2 interfaces only). when a 1000BASE-T SFP module is in the SFP module port.or half-duplex mode.

Setting the Interface Speed and Duplex Parameters
Beginning in privileged EXEC mode. do not use the auto setting on the supported side. You cannot configure duplex mode on SFP module ports. For 10/100/1000 Mbps ports. configure duplex and speed on both interfaces.Chapter 10
Configuring Interface Characteristics Configuring Ethernet Interfaces
Configuration Guidelines
When configuring an interface speed and duplex mode. except to nonegotiate. When STP is enabled and a port is reconfigured. but not nonegotiate. you can configure the duplex mode to full or auto and half-duplex mode is supported with the auto configuration. the speed can be configured to 10. they operate in full-duplex mode. The port LED is amber while STP reconfigures. or auto. the switch can take up to 30 seconds to check for loops. However.
•
•
Caution
Changing the interface speed and duplex mode configuration might shut down and re-enable the interface during the reconfiguration.
configure terminal interface interface-id
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
10-13
. when a 1000BASE-T SFP module is inserted in an SFP module port. follow these steps to set the speed and duplex mode for a physical interface: Command
Step 1 Step 2
Purpose Enter global configuration mode. For 10/100 Mbps ports. we highly recommend the default setting of auto negotiation. the link operates at the negotiated speed and duplex value. However. autonegotiation is disabled. 1000. 100. If one interface supports autonegotiation and the other end does not. if both speed and duplex are set to specific values. when a 1000BASE-T SFP module is in the SFP module port. You cannot configure speed on SFP module ports. note these guidelines:
• • • • •
If both ends of the line support autonegotiation. if both the speed and duplex mode are set to specific values. Enter interface configuration mode and the physical interface identification.

If one port experiences congestion and cannot receive any more traffic.
• •
Note
Step 4
duplex {auto | full | half}
Enter the duplex parameter for the interface. off. or desired. or auto.
Note
Catalyst 3560 ports are capable of receiving. The 1000 keyword is available only for SFP module ports with a 1000BASE-T SFP module. which prevents any loss of data packets during the congestion period. Upon receipt of a pause frame. 100.
Step 5 Step 6 Step 7
end show interfaces interface-id copy running-config startup-config
Return to privileged EXEC mode.Chapter 10 Configuring Ethernet Interfaces
Configuring Interface Characteristics
Command
Step 3
Purpose
•
speed {10 | 100 | 1000 | auto | nonegotiate} Enter the appropriate speed parameter for the interface: Enter 10 or 100 to set a specific speed for the interface. Enter auto to enable the interface to autonegotiate speed with the device connected to the interface. 1000. SFP module ports operate only at 1000 Mbps but can be configured to not negotiate if connected to a device that does not support autonegotiation.3X Flow Control
Flow control enables connected Ethernet ports to control traffic rates during congestion by allowing congested nodes to pause link operation at the other end. The nonegotiate keyword is available only for SFP module ports. it notifies the other port to stop sending until the condition clears by sending a pause frame. Display the interface speed and duplex mode configuration. the sending device stops sending any data packets. but not sending. pause frames.
Catalyst 3560 Switch Software Configuration Guide
10-14
78-16156-01
. When a 1000BASE-T SFP module is in the SFP module port. The default state is off. use the default interface interface-id interface configuration command. To return all interface settings to the defaults. You use the flowcontrol interface configuration command to set the interface’s ability to receive pause frames to on. (Optional) Save your entries in the configuration file. This example shows how to set the interface speed to 10 Mbps and the duplex mode to half on a 10/100 Mbps port:
Switch# configure terminal Switch(config)# interface fasttethernet0/3 Switch(config-if)# speed 10 Switch(config-if)# duplex half
Configuring IEEE 802. the speed can be configured to 10. This command is not available on SFP module ports unless a 1000BASE-T SFP module is inserted.
Use the no speed and no duplex interface configuration commands to return the interface to the default speed and duplex settings (autonegotiate). but not nonegotiate. when the mode can then be configured to auto or full.

Return to privileged EXEC mode.
Note
For details on the command settings and the resulting flow control resolution on local and remote ports. Verify the interface flow control settings. and no pause frames are sent or received by either device. When you enable Auto-MDIX. use the flowcontrol receive off interface configuration command. you must also set the speed and duplex on the interface to auto in order for the feature to operate correctly. Table 10-2 shows the link states that results from Auto-MDIX settings and correct and incorrect cabling.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
10-15
. you must use straight-through cables to connect to devices such as servers. no indication is given to the link partner. With Auto-MDIX enabled. an interface can operate with an attached device that is required to send flow-control packets or with an attached device that is not required to but can send flow-control packets. the interface automatically detects the required cable connection type (straight through or crossover) and configures the connection appropriately. For more information about cabling requirements. When connecting switches without the Auto-MDIX feature. refer to the hardware installation guide. In case of congestion. Configure the flow control mode for the port. or routers and crossover cables to connect to other switches or repeaters. and the interface automatically corrects for any incorrect cabling. (Optional) Save your entries in the configuration file.
configure terminal interface interface-id flowcontrol {receive} {on | off | desired} end show interfaces interface-id copy running-config startup-config
To disable flow control. These rules apply to flow control settings on the device:
• •
receive on (or desired): The port cannot send pause frames but can operate with an attached device that is required to or can send pause frames. workstations.Chapter 10
Configuring Interface Characteristics Configuring Ethernet Interfaces
When set to desired. Beginning in privileged EXEC mode. Auto-MDIX is supported on all 10/100 Mbps interfaces and on 10/100/1000 BASE-T/TX SFP interfaces. This example shows how to turn on flow control on a port:
Switch# configure terminal Switch(config)# interface gigabitethernet0/1 Switch(config-if)# flowcontrol receive on Switch(config-if)# end
Configuring Auto-MDIX on an Interface
When automatic medium-dependent interface crossover (Auto-MDIX) is enabled on an interface. follow these steps to configure flow control on an interface:
Command
Step 1 Step 2 Step 3 Step 4 Step 5 Step 6
Purpose Enter global configuration mode Enter interface configuration mode and the physical interface to be configured. receive off: Flow control does not operate in either direction. It is not supported on 1000 BASE-SX or -LX SFP interfaces. the port can receive pause frames. Auto-MDIX is disabled by default. refer to the flowcontrol interface configuration command in the command reference for this release. you can use either type of cable to connect to other devices.

4 W of power.7 W of power at the same time. and IEEE 802. each 10/100 port provides 15.
configure terminal interface interface-id speed auto duplex auto mdix auto end
show controllers ethernet-controller Verify the operational state of the Auto-MDIX feature on the interface. any 24 of the 48 10/100 ports provide 15.
To disable Auto-MDIX.3af PoE standard. up to a maximum switch power output of 370 W. If a device being powered by the switch is then connected to wall power. The switch continues to report that it is still powering the device whether the device is being powered by the switch or receiving power from an AC power source. The switches automatically supply power to connected pre-standard powered devices (such as Cisco IP Phones and Cisco Aironet Access Points). This example shows how to enable Auto-MDIX on a port:
Switch# configure terminal Switch(config)# interface fastethernet0/1 Switch(config-if)# speed auto Switch(config-if)# duplex auto Switch(config-if)# mdix auto Switch(config-if)# end
Configuring Power over Ethernet on an Interface
The switch supports both the Cisco pre-standard PoE method and the IEEE 802.3af-compliant powered devices if the switch senses that there is no power on the circuit. Return to privileged EXEC mode. use the no mdix auto interface configuration command. the switch might continue to power the device. interface-id phy copy running-config startup-config (Optional) Save your entries in the configuration file. follow these steps to configure Auto-MDIX on an interface: Command
Step 1 Step 2 Step 3 Step 4 Step 5 Step 6 Step 7 Step 8
Purpose Enter global configuration mode Enter interface configuration mode for the physical interface to be configured. On a 24-port PoE switch. or any combination of ports provide an average of 7.4 W of power. Enable Auto-MDIX on the interface.Chapter 10 Configuring Ethernet Interfaces
Configuring Interface Characteristics
Table 10-2 Link Conditions and Auto-MDIX Settings
Local Side Auto-MDIX On On Off Off
Remote Side Auto-MDIX With Correct Cabling On Off On Off Link up Link up Link up Link up
With Incorrect Cabling Link up Link up Link up Link down
Beginning in privileged EXEC mode. Configure the interface to autonegotiate duplex mode with the connected device. Configure the interface to autonegotiate speed with the connected device. On a 48-port PoE switch.
Catalyst 3560 Switch Software Configuration Guide
10-16
78-16156-01
. A powered device can receive redundant power when it is connected to a PoE switch port and to an AC power source.

generates a syslog message. and the switch adjusts the power budget accordingly. the switch determines the device power requirements based on its type or uses an initial allocation of 15. Display PoE status for a switch or for the specified interface. the switch detects when the connected device is not being powered by an AC adaptor. and a pre-standard or IEEE-compliant powered device is connected to the interface. If enough power is available for all powered devices connected to a switch. and in LED displays. If there is not enough available PoE. Command
Step 1 Step 2 Step 3
Purpose Enter global configuration mode. power is turned on to all devices. oscillator-fault. and updates the power budget and LEDs. After power has been denied. (Optional) Save your entries in the configuration file. updates the power budget.4 W for power budgeting. which devices are granted or denied power cannot be predetermined. or if a device is disconnected and reconnected while other devices are waiting for power. the switch periodically rechecks the power budget and continues to attempt to grant the request for power. by sending a syslog error message. refer to the command reference for this release.
• Step 4 Step 5 Step 6
end show power inline [interface-id] copy running-config startup-config
Return to privileged EXEC mode. Enter interface configuration mode for the physical interface to be configured. and the switch provides this information in the CLI show command messages.
For information about the output of the show power inline user EXEC command. see the “Troubleshooting Power over Ethernet Switch Ports” section on page 35-12. If the switch cannot supply the required power. follow these steps to enable or disable PoE on an interface on a PoE-capable switch. turns on power to the interface. If the switch detects a fault caused by an undervoltage. and grants power only when it is available.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
10-17
. Refer to the hardware installation guide for LED information. Enter never to disable power detection and supply for the interface. the switch denies power. monitors and tracks requests for power. the new device is not powered. This does not apply to third-party PoE devices. When a PoE-capable interface is in the no-shutdown state with PoE enabled (the default). generates a syslog message.Chapter 10
Configuring Interface Characteristics Configuring Ethernet Interfaces
The switch detects the power required by any new device that is connected and decides whether the device requires more power than is currently available. it turns off power to the port. When a device needing power is detected. overvoltage. overtemperature. Beginning in privileged EXEC mode. The switch automatically maintains a power budget. the switch grants power. makes sure that power to the interface is turned off. For more information about PoE-related commands. and updates the LEDs. or short-circuit condition.
• •
If enough power is available.
•
After power is applied to an interface. and updates the LEDs. Configure PoE on the interface:
•
configure terminal interface interface-id power inline {auto | never}
Enter auto (the default) to set the interface to automatically detect if a connected device requires power and to supply power to the device if enough power is available. the switch uses Cisco Discovery Protocol (CDP) to determine the power requirement of the connected Cisco PoE (standard and pre-standard) devices. If granting power would exceed the system power budget.

follow these steps to add a description for an interface: Command
Step 1 Step 2 Step 3 Step 4 Step 5
Purpose Enter global configuration mode.3 Cisco IP Phone 7960 Class 2 Admin Oper
Adding a Description for an Interface
You can add a description about an interface to help you remember its function.------------------. End with CNTL/Z.
Use the no description interface configuration command to delete the description. The description appears in the output of these privileged EXEC commands: show configuration. and enter the interface for which you are adding a description. Beginning in privileged EXEC mode.----------Fa0/1 auto on 6. one per line.
Step 6
copy running-config startup-config
(Optional) Save your entries in the configuration file. Switch(config)# interface gigabitethernet0/2 Switch(config-if)# description Connects to Marketing Switch(config-if)# end Switch# show interfaces gigabitethernet0/2 description Interface Status Protocol Description Gi0/2 admin down down Connects to Marketing
Catalyst 3560 Switch Software Configuration Guide
10-18
78-16156-01
.----. Enter interface configuration mode.Chapter 10 Configuring Ethernet Interfaces
Configuring Interface Characteristics
This example shows how to enable automatic PoE on a port and the response from the show power inline command for the interface when a Cisco IEEE-compliant IP Phone is being supplied with power:
Switch# configure terminal Switch(config)# interface fastethernet0/1 Switch(config-if)# power inline auto Switch(config-if)# end Switch# show power inline fastethernet0/1 Interface Power Device Class (Watts) ---------. Return to privileged EXEC mode. Add a description (up to 240 characters) for an interface.
configure terminal interface interface-id description string end or show running-config
show interfaces interface-id description Verify your entry. and show interfaces. show running-config. This example shows how to add a description on a port and how to verify the description:
Switch# config terminal Enter configuration commands.---------.------.

the interrelationship between the number of SVIs and routed ports and the number of other features being configured might have an impact on CPU usage because of hardware limitations. “Configuring VLANs. an error message is generated. The output of the show vlan user EXEC command shows the VLAN in a suspended state. If you try to create an extended-range VLAN.
configure terminal
interface {{fastethernet | gigabitethernet} interface-id} Enter interface configuration mode. the switch generates a message that there are not enough resources to convert the interface to a routed port.”
• •
Routed ports: Routed ports are physical ports configured to be in Layer 3 mode by using the no switchport interface configuration command. but the routed ports are shut down. This procedure shows how to configure an interface as a Layer 3 interface and how to assign an IP address to an interface. and the switch sends a message that this was due to insufficient hardware resources.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
10-19
. and the interface remains as a switchport. EtherChannel port interfaces are described in Chapter 29. To delete an SVI. which might generate messages on the device to which the interface is connected. Entering a no switchport command disables and then re-enables the interface. Layer 3 EtherChannel ports: EtherChannel interfaces made up of routed ports. If the switch is using maximum hardware resources. SVIs are created when you enter a VLAN ID following the interface vlan global configuration command. use the no interface vlan global configuration command. Beginning in privileged EXEC mode. and enter the | {vlan vlan-id} | {port-channel port-channel-number} interface to be configured as a Layer 3 interface.
•
All Layer 3 interfaces require an IP address to route traffic. and the extended-range VLAN is rejected.
Note
If the physical port is in Layer 2 mode (the default). For information about assigning Layer 2 ports to VLANs. “Configuring EtherChannels.Chapter 10
Configuring Interface Characteristics Configuring Layer 3 Interfaces
Configuring Layer 3 Interfaces
The Catalyst 3560 switch supports these types of Layer 3 interfaces:
•
SVIs: You should configure SVIs for any VLANs for which you want to route traffic. follow these steps to configure a Layer 3 interface:
Command
Step 1 Step 2
Purpose Enter global configuration mode. However. attempts to create a routed port or SVI have these results:
• • •
If you try to create a new routed port.”
A Layer 3 switch can have an IP address assigned to each routed port and SVI. the VLANs are created. see Chapter 12. it sends a message that there are not enough hardware resources available and shuts down the VLAN. If the switch is notified by VLAN Trunking Protocol (VTP) of a new VLAN.
Note
When you create an SVI. If the switch attempts to boot up with a configuration that has more VLANs and routed ports than hardware can support. you must enter the no switchport interface configuration command to put the interface into Layer 3 mode. it does not become active until it is associated with a physical port. There is no defined limit to the number of SVIs and routed ports that can be configured in a switch.

Note
If Gigabit Ethernet interfaces are configured to accept frames greater than the 10/100 interfaces. Gigabit Ethernet ports are not affected by the system mtu command. you set it for all 10/100 or all Gigabit Ethernet interfaces on the switch. one per line. such as traffic sent to control traffic.255. Configure the IP address and IP subnet.255.21 255.
Catalyst 3560 Switch Software Configuration Guide
10-20
78-16156-01
. Switch(config)# interface gigabitethernet0/2 Switch(config-if)# no switchport Switch(config-if)# ip address 192. Telnet.
no switchport ip address ip_address subnet_mask no shutdown end show interfaces [interface-id] show ip interface [interface-id] show running-config interface [interface-id]
Step 8
copy running-config startup-config
(Optional) Save your entries in the configuration file. The size of frames that can be received by the switch CPU is limited to 1500 bytes.0 Switch(config-if)# no shutdown
Configuring the System MTU
The default maximum transmission unit (MTU) size for frames received and transmitted on all interfaces on the switch is 1500 bytes. you must reset the switch before the new configuration takes effect. jumbo frames ingressing on a Gigabit Ethernet interface and egressing on a 10/100 interface are dropped. Enable the interface. This example shows how to configure a port as a routed port and to assign it an IP address:
Switch# configure terminal Enter configuration commands. Return to privileged EXEC mode.20. Although frames that are forwarded or routed typically are not received by the CPU. You can increase the MTU size to support jumbo frames on all Gigabit Ethernet interfaces by using the system mtu jumbo global configuration command. SNMP. When you change the MTU size. or routing protocols.Chapter 10 Configuring the System MTU
Configuring Interface Characteristics
Command
Step 3 Step 4 Step 5 Step 6 Step 7
Purpose For physical ports only. Verify the configuration. You can increase the MTU size for all interfaces operating at 10 or 100 Mbps by using the system mtu global configuration command.135.
To remove an IP address from an interface. in some cases packets are sent to the CPU. use the no ip address interface configuration command. End with CNTL/Z. enter Layer 3 mode. 10/100 ports are not affected by the system jumbo mtu command. You cannot set the MTU size for an individual interface. no matter what value was entered with the system mtu or system mtu jumbo commands.

Save your entries in the configuration file. the default is 1500 bytes. (Optional) Change the MTU size for all Gigabit Ethernet interfaces on the switch. the default is 1500 bytes. follow these steps to change MTU size for all 10/100 or Gigabit Ethernet interfaces: Command
Step 1 Step 2
Purpose Enter global configuration mode. you can verify your settings by entering the show system mtu privileged EXEC command. Once the switch reloads. (Optional) Change the MTU size for all interfaces on the switch that are operating at 10 or 100 Mbps.Chapter 10
Configuring Interface Characteristics Configuring the System MTU
Beginning in privileged EXEC mode. The range is from 1500 to 9000 bytes. This example shows how to set the maximum packet size for a Gigabit Ethernet port to 1800 bytes:
Switch(config)# system jumbo mtu 1800 Switch(config)# exit Switch# reload
configure terminal system mtu bytes
Step 3
system mtu jumbo bytes
Step 4 Step 5 Step 6
end copy running-config startup-config reload
This example shows the response when you try to set Gigabit Ethernet interfaces to an out-of-range number:
Switch(config)# system mtu jumbo 2500 ^ % Invalid input detected at '^' marker. Return to privileged EXEC mode. Reload the operating system. the value is not accepted. If you enter a value that is outside the allowed range for the specific type of interface.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
10-21
. The range is from 1500 to 1546 bytes.

Table 10-3 lists some of these interface monitoring commands. page 10-23
Monitoring Interface Status
Commands entered at the privileged EXEC prompt display information about the interface. Display administrative and operational status of switching (nonrouting) ports. Display the description configured on an interface or all interfaces and the interface status. and the boot images.
Table 10-3 Show Commands for Interfaces
Command show interfaces [interface-id] show interfaces interface-id status [err-disabled] show interfaces [interface-id] switchport
Purpose Display the status and configuration of all interfaces or a specific interface.) These commands are fully described in the Cisco IOS Interface Command Reference for Release 12. You can use this command to find out if a port is in routing or switching mode. (You can display the full list of show commands by using the show ? command at the privileged EXEC prompt.Chapter 10 Monitoring and Maintaining the Interfaces
Configuring Interface Characteristics
Monitoring and Maintaining the Interfaces
You can perform the tasks in these sections to monitor and maintain interfaces:
• • •
Monitoring Interface Status. page 10-22 Clearing and Resetting Interfaces and Counters. the configuration. Display interface status or a list of interfaces in an error-disabled state. Display the running configuration in RAM for the interface. including the versions of the software and the hardware. Display PoE status for a switch or for an interface.
show interfaces [interface-id] description show ip interface [interface-id] show running-config interface [interface-id] show version show controllers ethernet-controller interface-id phy show power inline [interface-id]
Catalyst 3560 Switch Software Configuration Guide
10-22
78-16156-01
. and statistics about the interfaces. Display the hardware configuration. the names and sources of configuration files. Display the usability status of all interfaces configured for IP routing or the specified interface.1. page 10-23 Shutting Down and Restarting the Interface. software version. Verify the operational state of the Auto-MDIX feature on the interface.

follow these steps to shut down an interface: Command
Step 1 Step 2 Step 3 Step 4 Step 5
Purpose Enter global configuration mode. To verify that an interface is disabled. Reset the hardware logic on an interface.
Note
The clear counters privileged EXEC command does not clear counters retrieved by using Simple Network Management Protocol (SNMP). This information is communicated to other network servers through all dynamic routing protocols. enter the show interfaces privileged EXEC command.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
10-23
. Beginning in privileged EXEC mode. A disabled interface is shown as administratively down in the show interface command display. interface-id} | {port-channel port-channel-number} shutdown end show running-config Shut down an interface.Chapter 10
Configuring Interface Characteristics Monitoring and Maintaining the Interfaces
Clearing and Resetting Interfaces and Counters
Table 10-4 lists the privileged EXEC mode clear commands that you can use to clear counters and reset interfaces.
Table 10-4 Clear Commands for Interfaces
Command clear counters [interface-id] clear interface interface-id clear line [number | console 0 | vty number]
Purpose Clear interface counters. but only those seen with the show interface privileged EXEC command.
To clear the interface counters shown by the show interfaces privileged EXEC command. Return to privileged EXEC mode. The clear counters command clears all current interface counters from the interface unless optional arguments are specified to clear only a specific interface type from a specific interface number. The interface is not mentioned in any routing updates. use the clear counters privileged EXEC command.
Shutting Down and Restarting the Interface
Shutting down an interface disables all functions on the specified interface and marks the interface as unavailable on all monitoring command displays. Reset the hardware logic on an asynchronous serial line.
Use the no shutdown interface configuration command to restart the interface. Verify your entry.
configure terminal
interface {vlan vlan-id} | {{fastethernet | gigabitethernet} Select the interface to be configured.

SmartPort macros do not contain new CLI commands. When you apply a SmartPort macro on an interface. they are simply a group of existing CLI commands. the existing interface configurations are not lost.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
11-1
. page 11-4
Understanding SmartPort Macros
SmartPort macros provide a convenient way to save and share common configurations. The new commands are added to the interface and are saved in the running configuration file.C H A P T E R
11
Configuring SmartPort Macros
This chapter describes how to configure and apply SmartPort macros on the Catalyst 3560 switch. You can use SmartPort macros to enable features and settings based on the location of a switch in the network and for mass configuration deployments across the network. When the macro is applied to an interface. This chapter consists of these sections:
• • •
Understanding SmartPort Macros. refer to the command reference for this release. page 11-2 Displaying SmartPort Macros. the CLI commands within the macro are configured on the interface. Each SmartPort macro is a set of CLI commands that you define. page 11-1 Configuring Smart-Port Macros.
Note
For complete syntax and usage information for the commands used in this chapter.

This is helpful when applying an incremental configuration to an interface.
• •
• • •
Catalyst 3560 Switch Software Configuration Guide
11-2
78-16156-01
. If a command fails when you apply a macro. it is still applied to the remaining interfaces. the changes are not reflected on the interface where the original macro was applied. page 11-2 Creating and Applying SmartPort Macros.
SmartPort Macro Configuration Guidelines
Follow these guidelines when configuring macros on your switch:
• • •
Do not use exit or end commands when creating a macro. When you use an interface range. Some CLI commands are specific to certain interface types. You need to reapply the updated macro on the interface to apply the new or changed commands. The macro will fail the syntax check or the configuration check. If you modify a macro definition by adding or deleting commands. If a macro command fails on one interface. and the switch will return an error message if it is applied to an interface that does not accept the configuration. This section includes information about:
• • •
Default SmartPort Macro Configuration. page 11-2 SmartPort Macro Configuration Guidelines. you can apply it to an interface or range of interfaces. page 11-3
Default SmartPort Macro Configuration
There are no default SmartPort macros configured on the switch. either due to a syntax error or a to configuration error. When creating a macro. This could cause commands that follow exit or end to execute in a different command mode. When a macro is applied to an interface. After you create the macro.Chapter 11 Configuring Smart-Port Macros
Configuring SmartPort Macros
Configuring Smart-Port Macros
You can create a new SmartPort macro or use an existing macro as a template to create a new macro that is specific to your application. the macro continues to apply the remaining commands to the interface. all CLI commands should be interface configuration mode commands. all existing configuration on the interface is retained. You can use the macro trace macro-name interface configuration command to show what macros are running on an interface or to debug the macro to determine any syntax or configuration errors. Applying a macro to an interface range is the same as applying a macro to a single interface. the macro is applied sequentially to each individual interface within the range.

Specify macro trace macro-name to apply and print each command before it is applied to the interface. You can delete a macro-applied configuration on an interface by entering the default interface interface-id interface configuration command. Create a macro definition. and specify the interface on which to apply the macro. Enter the macro commands with one command per line. (Optional) Save your entries in the configuration file. Return to privileged EXEC mode. Verify that the macro is applied to an interface. For best results. all commands in a macro should be interface configuration mode commands. and enter a macro name. (Optional) Enter a description about the macro that is applied to the interface. This could cause any commands following exit or end to execute in a different command mode. Verify that the macro was created. We recommend that you do not use the exit or end commands in a macro. Use the @ character to end the macro.Chapter 11
Configuring SmartPort Macros Configuring Smart-Port Macros
Creating and Applying SmartPort Macros
Beginning in privileged EXEC mode. Alternatively. follow these steps to create and apply a SmartPort macro: Command
Step 1 Step 2
Purpose Enter global configuration mode. Apply each individual command defined in the macro to the interface by entering macro apply macro-name. A macro definition can contain up to 3000 characters. It does not affect the configuration of those interfaces on which the macro is already applied. Use the # character at the beginning of a line to enter comment text within the macro.
configure terminal macro name macro-name
Step 3 Step 4
interface interface-id macro {apply | trace} macro-name
Enter interface configuration mode. Then apply the anti-macro to the interface.
Step 5 Step 6 Step 7 Step 8 Step 9
macro description text end show parser macro show running-config interface interface-id copy running-config startup-config
The no form of the macro name global configuration command only deletes the macro definition.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
11-3
. you can create an anti-macro for an existing macro that contains the no form of all the corresponding commands in the original macro.

Because a VLAN is considered a separate logical network. or application. See Chapter 15. refer to the command reference for this release.”
Note
Before you create VLANs. see Chapter 13. and multicast packets are forwarded and flooded only to end stations in the VLAN. as shown in Figure 12-1. “Configuring STP. page 12-4 Configuring Extended-Range VLANs.”
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
12-1
. Each VLAN is considered a logical network.C H A P T E R
12
Configuring VLANs
This chapter describes how to configure normal-range VLANs (VLAN IDs 1 to 1005) and extended-range VLANs (VLAN IDs 1006 to 4094) on the Catalyst 3560 switch. VLANs have the same attributes as physical LANs. but you can group end stations even if they are not physically located on the same LAN segment. page 12-27
Understanding VLANs
A VLAN is a switched network that is logically segmented by function. project team. VLAN configuration modes. page 12-16 Configuring VLAN Trunks. and dynamic VLAN assignment from a VLAN Membership Policy Server (VMPS). For more information on VTP. and packets destined for stations that do not belong to the VLAN must be forwarded through a router or a switch supporting fallback bridging. It includes information about VLAN membership modes. page 12-16 Configuring VMPS. without regard to the physical locations of the users.
Note
For complete syntax and usage information for the commands used in this chapter. The chapter includes these sections:
• • • • • •
Understanding VLANs. page 12-1 Configuring Normal-Range VLANs. it contains its own bridge Management Information Base (MIB) information and can support its own implementation of spanning tree. VLAN trunks. “Configuring VTP. and unicast. Any switch port can belong to a VLAN. page 12-12 Displaying VLANs. broadcast. you must decide whether to use VLAN Trunking Protocol (VTP) to maintain global VLAN configuration for your network.

For more information on the SDM templates. you can use the sdm prefer vlan global configuration command to set the Switch Database Management (sdm) feature to the VLAN template. An SVI must be explicitly configured and assigned an IP address to route traffic between VLANs. all the end stations in a particular IP subnet belong to the same VLAN.
Catalyst 3560 Switch Software Configuration Guide
12-2
78-16156-01
. see Chapter 7. “Configuring SDM Templates. see the “Switch Virtual Interfaces” section on page 10-4 and the “Configuring Layer 3 Interfaces” section on page 10-19. The switch can route traffic between VLANs by using switch virtual interfaces (SVIs). When you assign switch interfaces to VLANs by using this method.
Figure 12-1 VLANs as Logically Defined Networks
Engineering VLAN Cisco router Marketing VLAN Accounting VLAN
Floor 3 Gigabit Ethernet
Floor 2
Floor 1
90571
VLANs are often associated with IP subnetworks.Chapter 12 Understanding VLANs
Configuring VLANs
Figure 12-1 shows an example of VLANs segmented into logically defined networks. or static. For example. For more information. Interface VLAN membership on the switch is assigned manually on an interface-by-interface basis.” or refer to the sdm prefer command in the command reference for this release. it is known as interface-based. VLAN membership.
Note
If you plan to configure many VLANs on the switch and to not enable routing. which configures system resources to support the maximum number of unicast MAC addresses. Traffic between VLANs must be routed or fallback bridged.

One spanning-tree instance is allowed per VLAN. If you do not want VTP to globally propagate information. and transparent modes. The switch supports per-VLAN spanning-tree plus (PVST+) or rapid PVST+ with a maximum of 128 spanning-tree instances. see the “Assigning Static-Access Ports to a VLAN” section on page 12-11.1Q trunking methods for sending VLAN traffic over Ethernet ports. set the VTP mode to transparent to disable VTP. To participate in VTP. See the “Normal-Range VLAN Configuration Guidelines” section on page 12-6 for more information about the number of spanning-tree instances and the number of VLANs. Although the switch supports a total of 1005 (normal-range and extended-range) VLANs.Chapter 12
Configuring VLANs Understanding VLANs
Supported VLANs
The switch supports 1005 VLANs in VTP client.
VLAN Port Membership Modes
You configure a port to belong to a VLAN by assigning a membership mode that determines the kind of traffic the port carries and the number of VLANs to which it can belong. server. the number of routed ports. SVIs. VTP maintains VLAN configuration consistency by managing the addition. The switch supports both Inter-Switch Link (ISL) and IEEE 802. For more information. deletion. You can also modify the pruning-eligible list to block flooded traffic to VLANs on trunk ports that are included in the list. there must be at least one trunk port on the switch connected to a trunk port of a second switch. and other configured features affects the use of the switch hardware.1Q)
A trunk port is a member of all VLANs by default.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
12-3
. but membership can be limited by configuring the allowed-VLAN list. VTP only learns normal-range VLANs. with VLAN IDs 1 to 1005. For information about configuring trunk ports.
Table 12-1 Port Membership Modes
Membership Mode Static-access
VLAN Membership Characteristics A static-access port can belong to one VLAN and is manually assigned to that VLAN. VLANs are identified with a number from 1 to 4094. VLAN IDs 1002 through 1005 are reserved for Token Ring and FDDI VLANs.
Trunk (ISL or IEEE 802. VTP is recommended but not required. The switch must be in VTP transparent mode when you create VLAN IDs from 1006 to 4094. including extended-range VLANs.
VTP Characteristics VTP is not required. and renaming of VLANs on a network-wide basis. see the “Configuring an Ethernet Interface as a Trunk Port” section on page 12-19. VLAN IDs greater than 1005 are extended-range VLANs and are not stored in the VLAN database. Table 12-1 lists the membership modes and membership and VTP characteristics. VTP exchanges VLAN configuration messages with other switches over trunk links.

When a port belongs to a VLAN. see Chapter 13. but you must connect the dynamic-access switch. Configure the VMPS and the client with the same VTP domain name. there must be at least one trunk port on the switch You can have dynamic-access ports and trunk ports on the connected to a trunk port of a second same switch. To change the VTP configuration. If the switch is in VTP server or transparent mode.dat file.
Caution
You can cause inconsistency in the VLAN database if you attempt to manually delete the vlan. use the commands described in these sections and in the command reference for this release. see the “Configuring Dynamic-Access Ports on VMPS Clients” section on page 12-30. The results of these commands are written to the running-configuration file. The vlan. for example. and you can display the file by entering the show running-config privileged EXEC command. but never a Catalyst 3560 switch. you can add. it has no affect on voice VLAN. The Catalyst 3560 switch is a VMPS client. modify or remove configurations for VLANs 2 to 1001 in the VLAN database. For more information about voice VLAN ports. port to an end station or hub and not to another switch.)
Note
When the switch is in VTP transparent mode. For configuration information. “Configuring VTP.
Voice VLAN
A voice VLAN port is an access port attached to a Cisco VTP is not required.dat (VLAN database).” For more detailed definitions of the modes and their functions.Chapter 12 Configuring Normal-Range VLANs
Configuring VLANs
Table 12-1 Port Membership Modes (continued)
Membership Mode Dynamic access
VLAN Membership Characteristics A dynamic-access port can belong to one VLAN (VLAN ID 1 to 4094) and is dynamically assigned by a VMPS.” You use the interface configuration mode to define the port membership mode and to add and remove ports from VLANs. IP Phone. you can also create extended-range VLANs (VLANs with IDs from 1006 to 4094).
VTP Characteristics VTP is required. configured to use one VLAN for voice traffic and another VLAN for data traffic from a device attached to the phone. “Configuring Voice VLAN. See the “Configuring Extended-Range VLANs” section on page 12-12. For more information.
Catalyst 3560 Switch Software Configuration Guide
12-4
78-16156-01
. (VLAN IDs 1 and 1002 to 1005 are automatically created and cannot be removed. the switch learns and manages the addresses associated with the port on a per-VLAN basis.
To participate in VTP. see the “Managing the MAC Address Table” section on page 6-21. see Chapter 14. The VMPS can be a Catalyst 5000 or Catalyst 6500 series switch. Configurations for VLAN IDs 1 to 1005 are written to the file vlan. and you can display them by entering the show vlan privileged EXEC command. see Table 12-4 on page 12-17. If you want to modify the VLAN configuration.dat file is stored in Flash memory. but these VLANs are not saved in the VLAN database.
Configuring Normal-Range VLANs
Normal-range VLANs are VLANs with VLAN IDs 1 to 1005.

and transparent modes. we recommend that you configure the IEEE 802.Chapter 12 Configuring Normal-Range VLANs
Configuring VLANs
Normal-Range VLAN Configuration Guidelines
Follow these guidelines when creating and modifying normal-range VLANs in your network:
• • • •
The switch supports 1005 VLANs in VTP client. VTP and VLAN configuration is also saved in the switch running configuration file. particularly if there are several adjacent switches that all have run out of spanning-tree instances. FDDI-Net.
•
VLAN Configuration in VLAN Database Configuration Mode. see Chapter 16. See the “Configuring Extended-Range VLANs” section on page 12-12. The switch does not support Token Ring or FDDI media. The switch also supports VLAN IDs 1006 through 4094 in VTP transparent mode (VTP disabled). If VTP mode is transparent. If the switch is a VTP server. the new VLAN is carried on all trunk ports. or TrBRF traffic. but it does propagate the VLAN configuration through VTP. server. For more information about MSTP. If a switch has more active VLANs than supported spanning-tree instances. You can prevent this possibility by setting allowed lists on the trunk ports of switches that have used up their allocation of spanning-tree instances. If the number of VLANs on the switch exceeds the number of supported spanning tree instances. this could create a loop in the new VLAN that would not be broken. page 12-7 You access VLAN database configuration mode by entering the vlan database privileged EXEC command. VLAN numbers 1002 through 1005 are reserved for Token Ring and FDDI VLANs. page 12-7 You access config-vlan mode by entering the vlan vlan-id global configuration command. Depending on the topology of the network.”
• • •
VLAN Configuration Mode Options
You can configure normal-range VLANs (with VLAN IDs 1 to 1005) by using these two configuration modes:
•
VLAN Configuration in config-vlan Mode. the switch must be in VTP server mode or VTP transparent mode. VLAN configuration for VLANs 1 to 1005 are always saved in the VLAN database. The switch supports 128 spanning-tree instances.1S Multiple STP (MSTP) on your switch to map multiple VLANs to a single STP instance. TrCRF. These are extended-range VLANs and configuration options are limited. Before you can create a VLAN. If you have the default allowed list on the trunk ports of that switch (which is to allow all VLANs). adding another VLAN anywhere in the VTP domain creates a VLAN on that switch that is not running spanning-tree. “Configuring MSTP. Normal-range VLANs are identified with a number between 1 and 1001. If you have already used all available spanning-tree instances on a switch.
Catalyst 3560 Switch Software Configuration Guide
12-6
78-16156-01
. The switch does not forward FDDI. Extended-range VLANs are not saved in the VLAN database. spanning tree can be enabled on 128 VLANs and is disabled on the remaining VLANs. you must define a VTP domain or VTP will not function.

the domain name and VTP mode and configuration for the first 1005 VLANs use the VLAN database information. or enter an existing VLAN ID to modify the VLAN.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
12-7
. or enter an existing VLAN ID to modify the VLAN.
VLAN Configuration in VLAN Database Configuration Mode
To access VLAN database configuration mode. refer to the vlan VLAN database configuration command description in the command reference for this release. Enter a new VLAN ID to create a VLAN. If VTP mode is transparent. they are also saved in the switch running configuration file and you can enter the copy running-config startup-config privileged EXEC command to save the configuration in the startup configuration file. Then enter the vlan command with a new VLAN ID to create a VLAN. If VTP mode is server. VTP messages are sent to other switches in the VTP domain. enter the show vlan privileged EXEC command. The VLAN database revision number remains unchanged in the VLAN database. enter the show vlan privileged EXEC command. See the “Configuring Extended-Range VLANs” section on page 12-12. When you have finished the configuration. you must exit config-vlan mode for the configuration to take effect. When you save VLAN and VTP information (including extended-range VLAN configuration information) in the startup configuration file and reboot the switch. For more information about keywords available in this mode. To display the VLAN configuration. You must use this config-vlan mode when creating extended-range VLANs (VLAN IDs greater than 1005). and the VTP and VLAN configurations in the startup configuration file are used. You can use the default VLAN configuration (Table 12-2) or enter multiple commands to configure the VLAN. enter the vlan global configuration command with a VLAN ID. it applies all commands and updates the VLAN database. you must enter apply or exit for the configuration to take effect. To display the VLAN configuration. and the VLAN database and the VTP domain name from the VLAN database matches that in the startup configuration file.dat file). this information is lost when the system boots up. If the VTP mode or domain name in the startup configuration does not match the VLAN database. the domain name and VLAN configuration for the first 1005 VLANs use the VLAN database information
•
•
Caution
If the VLAN database configuration is used at startup and the startup configuration file contains extended-range VLAN configuration. the switch configuration is determined as follows:
•
If the VTP mode is transparent in the startup configuration. When you have finished the configuration. You can use the default VLAN configuration (Table 12-2) or enter multiple commands to configure the VLAN. refer to the vlan global configuration command description in the command reference for this release. and the privileged EXEC mode prompt appears. For more information about commands available in this mode. enter the vlan database privileged EXEC command.
Saving VLAN Configuration
The configurations of VLAN IDs 1 to 1005 are always saved in the VLAN database (vlan. When you enter the exit command. the VLAN database is ignored (cleared).Chapter 12
Configuring VLANs Configuring Normal-Range VLANs
VLAN Configuration in config-vlan Mode
To access config-vlan mode.

See the “Configuring Extended-Range VLANs” section on page 12-12. Because FDDI and Token Ring VLANs are not locally supported.Chapter 12 Configuring Normal-Range VLANs
Configuring VLANs
Default Ethernet VLAN Configuration
Table 12-2 shows the default configuration for Ethernet VLANs. you can assign VLAN IDs greater than 1006. suspend enabled. you only configure FDDI and Token Ring media-specific characteristics for VTP global advertisements to other switches. To create a normal-range VLAN to be added to the VLAN database.
Note
When the switch is in VTP transparent mode.
Note
The switch supports Ethernet interfaces exclusively. 4-digit ID that can be a number from 1 to 1001. For the list of default parameters that are assigned when you add a VLAN. where xxxx represents four numeric digits (including leading zeros) equal to the VLAN ID number 100001 (100000 plus the VLAN ID) 1500 0 0 active disabled 1–4294967294 1500–18190 0–1005 0–1005 active. see the “Configuring Normal-Range VLANs” section on page 12-4. assign a number and name to the VLAN. VLAN IDs 1002 to 1005 are reserved for Token Ring and FDDI VLANs.10 SAID MTU size Translational bridge 1 Translational bridge 2 VLAN state Remote SPAN
Creating or Modifying an Ethernet VLAN
Each Ethernet VLAN in the VLAN database has a unique. disabled
802. but they are not added to the VLAN database.
Table 12-2 Ethernet VLAN Defaults and Ranges
Parameter VLAN ID
Default 1
Range 1 to 4094.
Catalyst 3560 Switch Software Configuration Guide
12-8
78-16156-01
.
Note
Extended-range VLANs (VLAN IDs 1006 to 4094) are not saved in the VLAN database.
VLAN name
No range VLANxxxx.

Step 4 Step 5
mtu mtu-size remote-span
Step 6 Step 7 Step 8
end copy running-config startup config
show vlan {name vlan-name | id vlan-id} Verify your entries. the default is to append the vlan-id with leading zeros to the word VLAN. the VLAN configuration is saved in the running configuration file as well as in the VLAN database.” Return to privileged EXEC mode. and enter config-vlan mode. (Optional) Change the MTU size (or other VLAN characteristic).
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
12-9
. If no name is entered for the VLAN.
Note
VLAN database configuration mode does not support RSPAN VLAN configuration or extended-range VLANs. For more information on remote SPAN. “Configuring SPAN and RSPAN. or no remote-span config-vlan commands.
To return the VLAN name to the default settings. name it test20. no mtu. Enter a VLAN ID. see Chapter 23. VLAN0004 is a default VLAN name for VLAN 4. This saves the configuration in the switch startup configuration file. For information about adding VLAN IDs greater than 1005 (extended-range VLANs).
Step 3
name vlan-name
(Optional) Enter a name for the VLAN. (Optional) If the switch is in VTP transparent mode. This example shows how to use config-vlan mode to create Ethernet VLAN 20. use the no name.
Note
configure terminal vlan vlan-id
The available VLAN ID range for this command is 1 to 4094. and add it to the VLAN database:
Switch# configure terminal Switch(config)# vlan 20 Switch(config-vlan)# name test20 Switch(config-vlan)# end
You can also create or modify Ethernet VLANs by using the VLAN database configuration mode. For example. Enter a new VLAN ID to create a VLAN. or enter an existing VLAN ID to modify a VLAN. see the “Configuring Extended-Range VLANs” section on page 12-12. (Optional) Configure the VLAN as the RSPAN VLAN for a remote SPAN session. follow these steps to use config-vlan mode to create or modify an Ethernet VLAN: Command
Step 1 Step 2
Purpose Enter global configuration mode.Chapter 12
Configuring VLANs Configuring Normal-Range VLANs
Beginning in privileged EXEC mode.

VLAN0004 is a default VLAN name for VLAN 4. use the no vlan vlan-id name or no vlan vlan-id mtu VLAN database configuration command. Exiting. the VLAN is removed from the VLAN database for all switches in the VTP domain.
To return the VLAN name to the default settings. For example. They remain associated with the VLAN (and thus inactive) until you assign them to a new VLAN.
Catalyst 3560 Switch Software Configuration Guide
12-10
78-16156-01
.
Deleting a VLAN
When you delete a VLAN from a switch that is in VTP server mode. and return to privileged EXEC mode.
Step 3 Step 4 Step 5 Step 6
vlan vlan-id mtu mtu-size exit show vlan {name vlan-name | id vlan-id} copy running-config startup config
(Optional) To modify a VLAN. and add it to the VLAN database:
Switch# vlan database Switch(vlan)# vlan 20 name test20 Switch(vlan)# exit APPLY completed. propagate it throughout the administrative domain. You can create or modify a range of consecutive VLANs by entering vlan first-vlan-id end last-vlan-id.. The range is 1 to 1001. the VLAN is deleted only on that specific switch. any ports assigned to that VLAN become inactive. This example shows how to use VLAN configuration mode to create Ethernet VLAN 20.
Note
vlan database vlan vlan-id name vlan-name
When entering a VLAN ID in VLAN database configuration mode. Add an Ethernet VLAN by assigning a number to it.
If no name is entered for the VLAN. Verify your entries. This saves the configuration in the switch startup configuration file.. When you delete a VLAN from a switch that is in VTP transparent mode. Update the VLAN database.
Caution
When you delete a VLAN. follow these steps to use VLAN database configuration mode to create or modify an Ethernet VLAN: Command
Step 1 Step 2
Purpose Enter VLAN database configuration mode. (Optional) If the switch is in VTP transparent mode. You cannot delete the default VLANs for the different media types: Ethernet VLAN 1 and FDDI or Token Ring VLANs 1002 to 1005.Chapter 12 Configuring Normal-Range VLANs
Configuring VLANs
Beginning in privileged EXEC mode. identify the VLAN and change a characteristic. such as the MTU size. the default is to append the vlan-id with leading zeros to the word VLAN. name it test20. do not enter leading zeros.. the VLAN configuration is saved in the running configuration file as well as in the VLAN database.

configure terminal interface interface-id switchport mode access switchport access vlan vlan-id end show running-config interface interface-id show interfaces interface-id switchport copy running-config startup-config
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
12-11
. first use the rcommand privileged EXEC command to log in to the cluster member switch. Return to privileged EXEC mode.) Beginning in privileged EXEC mode. Valid VLAN IDs are 1 to 4094. Remove the VLAN by entering the VLAN ID. This saves the configuration in the switch startup configuration file. Define the VLAN membership mode for the port (Layer 2 access port). Verify the VLAN membership mode of the interface. follow these steps to delete a VLAN on the switch by using global configuration mode: Command
Step 1 Step 2 Step 3 Step 4 Step 5
Purpose Enter global configuration mode. Verify your entries in the Administrative Mode and the Access Mode VLAN fields of the display. (See the “Creating or Modifying an Ethernet VLAN” section on page 12-8.Chapter 12
Configuring VLANs Configuring Normal-Range VLANs
Beginning in privileged EXEC mode. the VLAN configuration is saved in the running configuration file as well as in the VLAN database. the new VLAN is created.
Assigning Static-Access Ports to a VLAN
You can assign a static-access port to a VLAN without having VTP globally propagate VLAN configuration information by disabling VTP (VTP transparent mode). (Optional) Save your entries in the configuration file. Assign the port to a VLAN.
Note
If you assign an interface to a VLAN that does not exist. use the vlan database privileged EXEC command to enter VLAN database configuration mode and the no vlan vlan-id VLAN database configuration command. If you are assigning a port on a cluster member switch to a VLAN. (Optional) If the switch is in VTP transparent mode. Return to privileged EXEC mode. follow these steps to assign a port to a VLAN in the VLAN database:
Command
Step 1 Step 2 Step 3 Step 4 Step 5 Step 6 Step 7 Step 8
Purpose Enter global configuration mode Enter the interface to be added to the VLAN.
configure terminal no vlan vlan-id end show vlan brief copy running-config startup config
To delete a VLAN by using VLAN database configuration mode. Verify the VLAN removal.

use the default interface interface-id interface configuration command. see the “Supported VLANs” section on page 12-3 for the actual number of VLANs supported. all other characteristics must remain at the default state. page 12-13 Creating an Extended-Range VLAN. Extended-range VLAN configurations are not stored in the VLAN database. you can create extended-range VLANs (in the range 1006 to 4094). This section includes this information about extended-range VLANs:
• • • •
Default VLAN Configuration. This example shows how to configure a port as an access port in VLAN 2:
Switch# configure terminal Enter configuration commands. End with CNTL/Z. You can change only the MTU size and remote SPAN configuration state on extended-range VLANs. The extended-range VLAN IDs are allowed for any switchport commands that allow VLAN IDs. You always use config-vlan mode (accessed by entering the vlan vlan-id global configuration command) to configure extended-range VLANs.
Catalyst 3560 Switch Software Configuration Guide
12-12
78-16156-01
. but because VTP mode is transparent. and you can save the configuration in the startup configuration file by using the copy running-config startup-config privileged EXEC command. page 12-12 Extended-Range VLAN Configuration Guidelines.Chapter 12 Configuring Extended-Range VLANs
Configuring VLANs
To return an interface to its default configuration. one per line. page 12-15
Default VLAN Configuration
See Table 12-2 on page 12-8 for the default configuration for Ethernet VLANs.
Note
Although the switch supports 4094 VLAN IDs. The extended range is not supported in VLAN database configuration mode (accessed by entering the vlan database privileged EXEC command). they are stored in the switch running configuration file. Switch(config)# interface gigabitethernet0/1 Switch(config-if)# switchport mode access Switch(config-if)# switchport access vlan 2 Switch(config-if)# end
Configuring Extended-Range VLANs
When the switch is in VTP transparent mode (VTP disabled). page 12-14 Creating an Extended-Range VLAN with an Internal VLAN ID. Extended-range VLANs enable service providers to extend their infrastructure to a greater number of customers.

When the maximum number of spanning-tree instances (128) are on the switch. you must use the vlan vlan-id global configuration command and access config-vlan mode.” Each routed port on the switch creates an internal VLAN for its use.
•
Although the switch supports a total of 1005 (normal-range and extended-range) VLANs. and then create the extended-range VLAN and re-enable the port. If you try to create an extended-range VLAN with a VLAN ID that is already allocated as an internal VLAN. See the “Creating an Extended-Range VLAN with an Internal VLAN ID” section on page 12-15. and the command is rejected. we recommend that you configure the IEEE 802. You should save this configuration to the startup configuration so that the switch boots up in VTP transparent mode. VLAN IDs in the extended range are not saved in the VLAN database and are not recognized by VTP. an error message is generated. See the “Disabling VTP (VTP Transparent Mode)” section on page 13-12.1S Multiple STP (MSTP) on your switch to map multiple VLANs to a single STP instance. If you try to create an extended-range VLAN and there are not enough hardware resources available.
– If necessary.
– Because internal VLAN IDs are in the lower part of the extended range. see Chapter 16. For more information about MSTP. These internal VLANs use extended-range VLAN numbers. “Configuring MSTP. an error message is generated. which frees up
the internal VLAN. You cannot add extended-range VLANs in VLAN database configuration mode (accessed by entering the vlan database privileged EXEC command). Otherwise. which then uses another VLAN as its internal VLAN. The switch must be in VTP transparent mode when you create extended-range VLANs. an error message is generated. If VTP mode is server or client. spanning tree is disabled on any newly created VLANs.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
12-13
. STP is enabled by default on extended-range VLANs. but you can disable it by using the no spanning-tree vlan vlan-id global configuration command. you can shut down the routed port assigned to the internal VLAN. You can set the VTP mode to transparent in global configuration mode or in VLAN database configuration mode. If the number of VLANs on the switch exceeds the maximum number of spanning tree instances.Chapter 12
Configuring VLANs Configuring Extended-Range VLANs
Extended-Range VLAN Configuration Guidelines
Follow these guidelines when creating extended-range VLANs:
•
To add an extended-range VLAN. and the extended-range VLAN is rejected. and other configured features affects the use of the switch hardware. the number of routed ports. enter the show vlan internal usage privileged
EXEC command to see which VLANs have been allocated as internal VLANs. and the extended-range VLAN is rejected.
– Before configuring extended-range VLANs. SVIs. we recommend that you
• • • •
•
•
create extended-range VLANs beginning from the highest number (4094) and moving to the lowest (1006) to reduce the possibility of using an internal VLAN ID. You cannot include extended-range VLANs in the pruning eligible range. and the internal VLAN ID cannot be used for an extended-range VLAN. you lose the extended-range VLAN configuration if the switch resets.

an error message is generated when you exit from config-vlan mode.
To delete an extended-range VLAN. Extended-range VLANs are not saved in the VLAN database. use the no vlan vlan-id global configuration command. only the mtu mtu-size and remote-span commands are supported for extended-range VLANs. If you enter an extended-range VLAN ID when the switch is not in VTP transparent mode.
Note
Before you create an extended-range VLAN. The range is 1006 to 4094. go to the“Creating an Extended-Range VLAN with an Internal VLAN ID” section on page 12-15 before creating the extended-range VLAN. Refer to the description of the vlan global configuration command in the command reference for defaults of all parameters. if the switch resets. it will default to VTP server mode. Enter an extended-range VLAN ID and enter config-vlan mode. (Optional) Modify the VLAN by changing the MTU size. The extended-range VLAN has the default Ethernet VLAN characteristics (see Table 12-2) and the MTU size and RSPAN configuration are the only parameters you can change.Chapter 12 Configuring Extended-Range VLANs
Configuring VLANs
Creating an Extended-Range VLAN
You create an extended-range VLAN in global configuration mode by entering the vlan global configuration command with a VLAN ID from 1006 to 4094. If the VLAN ID is used internally and you want to free it up. Beginning in privileged EXEC mode. Verify that the VLAN has been created. This command accesses the config-vlan mode. See the “Assigning Static-Access Ports to a VLAN” section on page 12-11. The procedure for assigning static-access ports to an extended-range VLAN is the same as for normal-range VLANs. disabling VTP. Configure the switch for VTP transparent mode.
Step 5 Step 6 Step 7 Step 8
remote-span end show vlan id vlan-id copy running-config startup config
(Optional) Configure the VLAN as the RSPAN VLAN. Otherwise. See the “Configuring a VLAN as an RSPAN VLAN” section on page 23-17. and the extended-range VLAN is not created. To save extended-range VLAN configurations. Return to privileged EXEC mode. you need to save the VTP transparent mode configuration and the extended-range VLAN configuration in the switch startup configuration file. they are saved in the switch running configuration file. you can verify that the VLAN ID is not used internally by entering the show vlan internal usage privileged EXEC command. and the extended-range VLAN IDs will not be saved.
Catalyst 3560 Switch Software Configuration Guide
12-14
78-16156-01
.
Note
configure terminal vtp mode transparent vlan vlan-id mtu mtu-size
Although all VLAN commands appear in the CLI help in config-vlan mode. You can save the extended-range VLAN configuration in the switch startup configuration file by using the copy running-config startup-config privileged EXEC command. Save your entries in the switch startup configuration file. follow these steps to create an extended-range VLAN:
Command
Step 1 Step 2 Step 3 Step 4
Purpose Enter global configuration mode.

To manually free an internal VLAN ID. Otherwise.Chapter 12
Configuring VLANs Configuring Extended-Range VLANs
This example shows how to create a new extended-range VLAN with all default characteristics. Return to global configuration mode. you need to save the VTP transparent mode configuration and the extended-range VLAN configuration in the switch startup configuration file. Save your entries in the switch startup configuration file. Enter the interface ID for the routed port that is using the VLAN ID. If the VLAN ID that you want to use is an internal VLAN. To save an extended-range VLAN configuration. an error message is generated. Beginning in privileged EXEC mode. Return to privileged EXEC mode. the display shows the routed port that is using the VLAN ID. Set the VTP mode to transparent for creating extended-range VLANs. enter config-vlan mode. and save the new VLAN in the switch startup configuration file:
Switch(config)# vtp mode transparent Switch(config)# vlan 2000 Switch(config-vlan)# end Switch# copy running-config startup config
Creating an Extended-Range VLAN with an Internal VLAN ID
If you enter an extended-range VLAN ID that is already assigned to an internal VLAN. Enter the interface ID for the routed port that you shut down in Step 4. Shut down the port to free the internal VLAN ID. and the extended-range VLAN is rejected. follow these steps to release a VLAN ID that is assigned to an internal VLAN and to create an extended-range VLAN with that ID: Command
Step 1
Purpose Display the VLAN IDs being used internally by the switch. Exit from config-vlan mode. Enter global configuration mode.
show vlan internal usage
Step 2 Step 3 Step 4 Step 5 Step 6 Step 7 Step 8 Step 9 Step 10 Step 11 Step 12
configure terminal interface interface-id shutdown exit vtp mode transparent vlan vlan-id exit interface interface-id no shutdown end copy running-config startup config
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
12-15
. Enter the new extended-range VLAN ID. it will default to VTP server mode. and return to global configuration mode. you must temporarily shut down the routed port that is using the internal VLAN ID. Enter that port number in Step 3. Re-enable the routed port. and the extended-range VLAN IDs will not be saved. It will be assigned a new internal VLAN ID. if the switch resets. and enter config-vlan mode.

including extended-range VLANs. Display status of all or the specified VLAN in the VLAN database. use the show VLAN database configuration command (accessed by entering the vlan database privileged EXEC command). To view normal-range VLANs in the VLAN database (1 to 1005). and you can extend the VLANs across an entire network.
For more details about the show command options and explanations of output fields.1Q—802. The display includes VLAN status. page 12-24
Trunking Overview
A trunk is a point-to-point link between one or more Ethernet switch interfaces and another networking device such as a router or a switch. page 12-19 Configuring Trunk Ports for Load Sharing.1Q is industry-standard trunking encapsulation. Ethernet trunks carry the traffic of multiple VLANs over a single link. Display parameters for all VLANs or the specified VLAN on the switch.
Table 12-3 VLAN Monitoring Commands
Command show show current [vlan-id] show interfaces [vlan vlan-id] show vlan [id vlan-id]
Command Mode VLAN database configuration VLAN database configuration Privileged EXEC Privileged EXEC
Purpose Display status of VLANs in the VLAN database. refer to the command reference for this release.
Configuring VLAN Trunks
These sections describe how VLAN trunks function on the switch:
• • • • •
Trunking Overview.Chapter 12 Displaying VLANs
Configuring VLANs
Displaying VLANs
Use the show vlan privileged EXEC command to display a list of all VLANs on the switch. page 12-16 Encapsulation Types. and configuration information. page 12-18 Default Layer 2 Ethernet Interface VLAN Configuration. Display characteristics for all interfaces or for the specified VLAN configured on the switch. page 12-19 Configuring an Ethernet Interface as a Trunk Port. ports. 802. Table 12-3 lists the commands for monitoring VLANs. Two trunking encapsulations are available on all Ethernet interfaces:
• •
Inter-Switch Link (ISL)—ISL is Cisco-proprietary trunking encapsulation.
Catalyst 3560 Switch Software Configuration Guide
12-16
78-16156-01
.
Figure 12-2 shows a network of switches that are connected by ISL trunks.

Chapter 12
Configuring VLANs Configuring VLAN Trunks
Figure 12-2 Switches in an ISL Trunking Environment
Catalyst 6500 series switch
ISL trunk Switch
ISL trunk
ISL trunk
ISL trunk Switch
Switch
Switch
VLAN1
VLAN3
VLAN2
VLAN2
VLAN1
VLAN3
45828
You can configure a trunk on a single Ethernet interface or on an EtherChannel bundle. you should configure interfaces connected to devices that do not support DTP to not forward DTP frames. To enable trunking to a device that does not support DTP. Trunk negotiation is managed by the Dynamic Trunking Protocol (DTP). The interface becomes a nontrunk interface regardless of whether or not the neighboring interface is a trunk interface. For more information about EtherChannel. You can set an interface as trunking or nontrunking or to negotiate trunking with the neighboring interface.1Q encapsulation or if the encapsulation type is autonegotiated.
Table 12-4 Layer 2 Interface Modes
Mode switchport mode access
Function Puts the interface (access port) into permanent nontrunking mode and negotiates to convert the link into a nontrunk link. that is. To avoid this. which is a Point-to-Point Protocol. use the switchport mode access interface configuration command to disable trunking. The DTP supports autonegotiation of both ISL and 802. The default switchport mode for all Ethernet interfaces is dynamic auto. which could cause misconfigurations. Use the switchport trunk encapsulation isl or switchport trunk encapsulation dot1q interface to select the encapsulation type on the trunk port.
• •
If you do not intend to trunk across those links. see Chapter 29. To autonegotiate trunking. However.” Ethernet trunk interfaces support different trunking modes (see Table 12-4). use the switchport mode trunk and switchport nonegotiate interface configuration commands to cause the interface to become a trunk but to not generate DTP frames. some internetworking devices might forward DTP frames improperly.
You can also specify on DTP interfaces whether the trunk uses ISL or 802.
switchport mode dynamic auto
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
12-17
. The interface becomes a trunk interface if the neighboring interface is set to trunk or desirable mode.1Q trunks. “Configuring EtherChannels. to turn off DTP. Makes the interface able to convert the link to a trunk link. the interfaces must be in the same VTP domain.

1Q trunks impose these limitations on the trunking strategy for a network:
•
In a network of Cisco switches connected through 802. The trunking mode. Specifies 802.1Q trunk.1Q Configuration Considerations
802.
switchport trunk encapsulation negotiate Specifies that the interface negotiate with the neighboring interface to become an ISL (preferred) or 802. You can use this command only when the interface switchport mode is access or trunk.1Q switches. However.1Q switch. or auto mode. Puts the interface into permanent trunking mode and negotiates to convert the neighboring link into a trunk link. The non-Cisco 802.1Q encapsulation on the trunk link. You must manually configure the neighboring interface as a trunk interface to establish a trunk link. spanning-tree information for each VLAN is maintained by Cisco switches separated by a cloud of non-Cisco 802.1Q trunk.
switchport nonegotiate
Encapsulation Types
Table 12-5 lists the Ethernet trunk encapsulation types and keywords. When you connect a Cisco switch to a non-Cisco device through an 802. Prevents the interface from generating DTP frames.
802. the Cisco switch combines the spanning-tree instance of the VLAN of the trunk with the spanning-tree instance of the non-Cisco 802.1Q cloud separating the Cisco switches is treated as a single trunk link between the switches. which provide equivalent capabilities.
Note
The switch does not support Layer 3 trunks. depending on the configuration and capabilities of the neighboring interface.Chapter 12 Configuring VLAN Trunks
Configuring VLANs
Table 12-4 Layer 2 Interface Modes (continued)
Mode switchport mode dynamic desirable switchport mode trunk
Function Makes the interface actively attempt to convert the link to a trunk link. the trunk encapsulation type. and the hardware capabilities of the two connected interfaces determine whether a link becomes an ISL or 802. the switches maintain one instance of spanning tree for each VLAN allowed on the trunks. The switch does support Layer 2 trunks and Layer 3 VLAN interfaces.
Table 12-5 Ethernet Trunk Encapsulation Types
Encapsulation switchport trunk encapsulation isl switchport trunk encapsulation dot1q
Function Specifies ISL encapsulation on the trunk link. The interface becomes a trunk interface even if the neighboring interface is not a trunk interface. This is the default for the switch. The interface becomes a trunk interface if the neighboring interface is set to trunk. desirable. you cannot configure subinterfaces or use the encapsulation keyword on Layer 3 interfaces.
Catalyst 3560 Switch Software Configuration Guide
12-18
78-16156-01
. Non-Cisco devices might support one spanning-tree instance for all VLANs.1Q trunk.1Q trunks.

an interface is in Layer 2 mode. If the native VLAN on one end of the trunk is different from the native VLAN on the other end. Otherwise. page 12-22 Configuring the Native VLAN for Untagged Traffic. if the interface is in Layer 3 mode.
Table 12-6 Default Layer 2 Ethernet Interface VLAN Configuration
Feature Interface mode Trunk encapsulation Allowed VLAN range VLAN range eligible for pruning Default VLAN (for access ports) Native VLAN (for 802. page 12-23
Note
By default.1Q encapsulation and both interfaces are set to negotiate the encapsulation type.1Q trunks)
Default Setting switchport mode dynamic auto switchport trunk encapsulation negotiate VLANs 1 to 4094 VLANs 2 to 1001 VLAN 1 VLAN 1
Configuring an Ethernet Interface as a Trunk Port
Because trunk ports send and receive VTP advertisements. Disabling spanning tree on the native VLAN of an 802. If the neighboring interface supports ISL and 802. the link is a Layer 2 trunk or. If the neighboring interface supports trunking and is configured to allow trunking.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
12-19
.1Q trunk without disabling spanning tree on every VLAN in the network can potentially cause spanning-tree loops. The default mode for Layer 2 interfaces is switchport mode dynamic auto. to use VTP you must ensure that at least one trunk port is configured on the switch and that this trunk port is connected to the trunk port of a second switch. We recommend that you leave spanning tree enabled on the native VLAN of an 802. By default. page 12-21 Changing the Pruning-Eligible List. page 12-20 Defining the Allowed VLANs on a Trunk. the switch cannot receive any VTP advertisements.1Q trunk is the same on both ends of the trunk link. it becomes a Layer 2 trunk when you enter the switchport interface configuration command. This section includes these procedures for configuring an Ethernet interface as a trunk port on the switch:
• • • •
Interaction with Other Features. the trunk uses ISL encapsulation. spanning-tree loops might result.
•
Default Layer 2 Ethernet Interface VLAN Configuration
Table 12-6 shows the default Layer 2 Ethernet interface VLAN configuration. trunks negotiate encapsulation.Chapter 12
Configuring VLANs Configuring VLAN Trunks
•
Make sure the native VLAN for an 802.1Q trunk or disable spanning tree on every VLAN in the network. Make sure your network is loop-free before disabling spanning tree.

Enter the interface configuration mode and the port to be configured for trunking. If you change the configuration of one of these parameters.
Step 5
switchport access vlan vlan-id
(Optional) Specify the default VLAN. This is the default. all ports follow the parameters set for the first port to be added to the group. trunk—Set the interface in permanent trunking mode and negotiate to convert the link to a trunk link even if the neighboring interface is not a trunk interface. Configure the port to support ISL or 802.
Catalyst 3560 Switch Software Configuration Guide
12-20
78-16156-01
.
Configuring a Trunk Port
Beginning in privileged EXEC mode. an error message appears.
• • •
We recommend that you configure no more than 24 trunk ports in PVST mode and no more than 40 trunk ports in MST mode. which is used if the interface stops trunking.Chapter 12 Configuring VLAN Trunks
Configuring VLANs
Interaction with Other Features
Trunking interacts with other features in these ways:
• •
A trunk port cannot be a secure port.1X on a dynamic port. an error message appears.1X on a trunk port.1X is not enabled.1Q encapsulation or to negotiate (the default) with the neighboring interface for encapsulation type.1Q trunk port: Command
Step 1 Step 2 Step 3
Purpose Enter global configuration mode. desirable.1X-enabled port to dynamic. follow these steps to configure a port as an ISL or 802. Trunk ports can be grouped into EtherChannel port groups. and 802. If you try to enable 802. or auto mode. If you try to change the mode of an 802.
• • •
dynamic auto—Set the interface to a trunk link if the neighboring interface is set to trunk or desirable mode. When a group is first created. the port mode is not changed. dynamic desirable—Set the interface to a trunk link if the neighboring interface is set to trunk. A port in dynamic mode can negotiate with its neighbor to become a trunk port. You must configure each end of the link with the same encapsulation type. but all trunks in the group must have the same configuration. If you try to change the mode of an 802.1X is not enabled.1X-enabled port to trunk. the port mode is not changed. and 802. all ports cease to be trunks. If you try to enable 802.
configure terminal interface interface-id switchport trunk encapsulation {isl | dot1q | negotiate}
Step 4
switchport mode {dynamic {auto | desirable} | trunk}
Configure the interface as a Layer 2 trunk (required only if the interface is a Layer 2 access port or to specify the trunking mode). the switch propagates the setting you entered to all ports in the group:
– allowed-VLAN list – STP port priority for each VLAN – STP Port Fast setting – trunk status: if one port in a port group ceases to be a trunk.

When VTP detects a newly enabled VLAN and the VLAN is in the allowed list for a trunk port. if VTP knows of the VLAN.1Q trunk. and VLAN Trunking Protocol (VTP) in VLAN 1.1Q trunking. This example shows how to configure a port as an 802. However. A trunk port can become a member of a VLAN if the VLAN is enabled. Cisco Discovery Protocol (CDP). If a trunk port with VLAN 1 disabled is converted to a nontrunk port. a trunk port sends traffic to and receives traffic from all VLANs. To reset all trunking characteristics of a trunking interface to the defaults. use the switchport mode access interface configuration command to configure the port as a static-access port. use the switchport trunk allowed vlan remove vlan-list interface configuration command to remove specific VLANs from the allowed list. End with CNTL/Z. show interfaces interface-id trunk copy running-config startup-config Display the trunk configuration of the interface. You can use the VLAN 1 minimization feature to disable VLAN 1 on any individual VLAN trunk link so that no user traffic (including spanning tree advertisements) is sent or received on VLAN 1. When VTP detects a new VLAN and the VLAN is not in the allowed list for a trunk port. When you remove VLAN 1 from a trunk port.
Note
VLAN 1 is the default VLAN on all trunk ports in all Cisco switches. use the default interface interface-id interface configuration command. All VLAN IDs. To reduce the risk of spanning-tree loops or storms. Return to privileged EXEC mode. Switch(config)# interface gigabitethernet0/2 Switch(config-if)# switchport mode dynamic desirable Switch(config-if)# switchport trunk encapsulation dot1q Switch(config-if)# end
Defining the Allowed VLANs on a Trunk
By default. (Optional) Save your entries in the configuration file. one per line. regardless of the switchport trunk allowed setting.
switchport trunk native vlan vlan-id end
show interfaces interface-id switchport Display the switchport configuration of the interface in the Administrative Mode and the Administrative Trunking Encapsulation fields of the display. Link Aggregation Control Protocol (LACP). and if the VLAN is in the allowed list for the port. it is added to the access VLAN. Port Aggregation Protocol (PAgP). and it has previously been a requirement that VLAN 1 always be enabled on every trunk link. 1 to 4094.Chapter 12
Configuring VLANs Configuring VLAN Trunks
Command
Step 6 Step 7 Step 8
Purpose Specify the native VLAN for 802. the port will be added to VLAN 1. the trunk port does not become a member of the new VLAN.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
12-21
. you can disable VLAN 1 on any individual VLAN trunk port by removing VLAN 1 from the allowed list. the trunk port automatically becomes a member of the enabled VLAN. use the no switchport trunk interface configuration command. To restrict the traffic a trunk carries. To disable trunking. The example assumes that the neighbor interface is configured to support 802. the interface continues to sent and receive management traffic.
Switch# configure terminal Enter configuration commands. preventing traffic from those VLANs from passing over the trunk. The same is true for any VLAN that has been disabled on the port. Dynamic Trunking Protocol (DTP). you can remove VLANs from the allowed list.1Q trunks. for example. are allowed on each trunk.
Step 9 Step 10
To return an interface to its default configuration. If the access VLAN is set to 1.

(Optional) Configure the list of VLANs allowed on the trunk.
show interfaces interface-id switchport Verify your entries in the Trunking VLANs Enabled field of the display.
configure terminal interface interface-id switchport mode trunk switchport trunk allowed vlan {add | all | except | remove} vlan-list
Step 5 Step 6 Step 7
end copy running-config startup-config
Return to privileged EXEC mode. Each trunk port has its own eligibility list. For explanations about using the add. VTP pruning must be enabled for this procedure to take effect. the lower one first. and select the trunk port for which VLANs should be pruned.
configure terminal interface interface-id
Catalyst 3560 Switch Software Configuration Guide
12-22
78-16156-01
. except. All VLANs are allowed by default. and remove keywords.Chapter 12 Configuring VLAN Trunks
Configuring VLANs
Beginning in privileged EXEC mode. follow these steps to remove VLANs from the pruning-eligible list on a trunk port: Command
Step 1 Step 2
Purpose Enter global configuration mode. follow these steps to modify the allowed list of an ISL or 802. (Optional) Save your entries in the configuration file. use the no switchport trunk allowed vlan interface configuration command.
To return to the default allowed VLAN list of all VLANs. separated by a hyphen. The vlan-list parameter is either a single VLAN number from 1 to 4094 or a range of VLANs described by two VLAN numbers.1Q trunk: Command
Step 1 Step 2 Step 3 Step 4
Purpose Enter global configuration mode. refer to the command reference for this release. Do not enter any spaces between comma-separated VLAN parameters or in hyphen-specified ranges. all. Beginning in privileged EXEC mode. This example shows how to remove VLAN 2 from the allowed VLAN list on a port:
Switch(config)# interface gigabitethernet0/1 Switch(config-if)# switchport trunk allowed vlan remove 2 Switch(config-if)# end
Changing the Pruning-Eligible List
The pruning-eligible list applies only to trunk ports. The “Enabling VTP Pruning” section on page 13-13 describes how to enable VTP pruning. Enter interface configuration mode. Configure the interface as a VLAN trunk port. Enter interface configuration mode and the port to be configured.

Configuring Trunk Ports for Load Sharing
Load sharing divides the bandwidth supplied by parallel trunks connecting switches. STP normally blocks all but one parallel link between switches. For load sharing using STP path costs. the packet is sent untagged. VLANs 3 through 6 retain the default port priority of 128 on Trunk 1. For load sharing using STP port priorities. Trunk 1 carries traffic for VLANs 8 through 10. and Trunk 2 carries traffic for VLANs 3 through 6.
In this way. The trunk port with the lower priority (higher values) for the same VLAN remains in a blocking state for that VLAN. No duplication of traffic occurs over any trunk port. see Chapter 15.Chapter 12 Configuring VLAN Trunks
Configuring VLANs
To return to the default native VLAN. In this example. the trunk with the lower priority takes over and carries the traffic for all of the VLANs. you divide the traffic between the links according to which VLAN the traffic belongs. shows two trunks connecting supported switches. For more information about STP. each load-sharing link can be connected to the same switch or to two different switches. VLAN 1. If a packet has a VLAN ID that is the same as the outgoing port native VLAN ID. the switches are configured as follows:
• • • •
VLANs 8 through 10 are assigned a port priority of 16 on Trunk 1.
Figure 12-3 Load Sharing by Using STP Port Priorities
Switch A
Trunk 1 VLANs 8 – 10 (priority 16) VLANs 3 – 6 (priority 128)
Trunk 2 VLANs 3 – 6 (priority 16) VLANs 8 – 10 (priority 128)
93370
Switch B
Catalyst 3560 Switch Software Configuration Guide
12-24
78-16156-01
. Using load sharing. otherwise. You can set the priorities on a parallel trunk port so that the port carries all the traffic for a given VLAN. “Configuring STP.”
Load Sharing Using STP Port Priorities
When two ports on the same switch form a loop. the STP port priority setting determines which port is enabled and which port is in a blocking state. You configure load sharing on trunk ports by using STP port priorities or STP path costs. One trunk port sends or receives all traffic for the VLAN. VLANs 3 through 6 are assigned a port priority of 16 on Trunk 2. the switch sends the packet with a tag. VLANs 8 through 10 retain the default port priority of 128 on Trunk 2. The trunk port with the higher priority (lower values) for a VLAN is forwarding traffic for that VLAN. both load-sharing links must be connected to the same switch. If the active trunk fails. use the no switchport trunk native vlan interface configuration command. To avoid loops.

Each time an unknown MAC address is seen.
interface gigabitethernet0/1 spanning-tree vlan 2-4 cost 30 end
Step 15 Step 16 Step 17
exit show running-config copy running-config startup-config
Return to privileged EXEC mode. Verify your entries. it sends a VQP query to the VMPS. the server shuts down the port when an illegal host is detected. Set the spanning-tree path cost to 30 for VLANs 2 through 4. verify that the path costs are set correctly for both trunk interfaces. In the display. and set the spanning-tree path cost to 30 for VLANs 8. the query includes the newly seen MAC address and the port on which it was seen. Return to global configuration mode.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
12-27
. and define the interface on which to set the STP cost.
Configuring VMPS
The VLAN Query Protocol (VQP) is used to support dynamic-access ports.Chapter 12
Configuring VLANs Configuring VMPS
Command
Step 11 Step 12 Step 13 Step 14
Purpose Enter interface configuration mode. The switch cannot be a VMPS server but can act as a client to the VMPS and communicate with it through VQP. This section includes this information about configuring VMPS:
• • • • • • •
“Understanding VMPS” section on page 12-27 “Default VMPS Client Configuration” section on page 12-29 “VMPS Configuration Guidelines” section on page 12-29 “Configuring the VMPS Client” section on page 12-29 “Monitoring the VMPS” section on page 12-32 “Troubleshooting Dynamic-Access Port VLAN Membership” section on page 12-33 “VMPS Configuration Example” section on page 12-33
Understanding VMPS
Each time the client switch receives the MAC address of a new host. and 10. In open mode. The VMPS responds with a VLAN assignment for the port. (Optional) Save your entries in the configuration file. In secure mode. but given VLAN assignments based on the MAC source addresses seen on the port. it searches its database for a MAC-address-to-VLAN mapping. When the VMPS receives this query. The server response is based on this mapping and whether or not the server is in open or secure mode. which are not permanently assigned to a VLAN. Repeat Steps 9 through 11 on the other configured trunk interface on Switch A. the switch sends a VQP query to a remote VMPS. the server simply denies the host access to the port. 9.

Dynamic-Access Port VLAN Membership
A dynamic-access port can belong to only one VLAN with an ID from 1 to 4094. If the link goes down on a dynamic-access port. The VMPS receives the source MAC address from the first packet of a new host connected to the dynamic-access port and attempts to match the MAC address to a VLAN in the VMPS database. the VMPS sends an access-denied response. If the VLAN in the database does not match the current VLAN on the port and active hosts exist on the port. The VMPS verifies that the domain name in the packet matches its own domain name before accepting the request and responds to the client with the assigned VLAN number for the client. Multiple hosts (MAC addresses) can be active on a dynamic-access port if they are all in the same VLAN.
Catalyst 3560 Switch Software Configuration Guide
12-28
78-16156-01
. it continues to block traffic to and from the host MAC address. the switch does not forward traffic to or from this port until the VMPS provides the VLAN assignment. the VMPS sends an success response. the VMPS sends an access-denied or a port-shutdown response. the port returns to an isolated state and does not belong to a VLAN. If there is a match. the VMPS sends the client a vlan-assignment response containing the assigned VLAN name and allowing access to the host. the VMPS either denies the request or shuts down the port (depending on the VMPS secure mode setting). or they can connect to a network. If there is no match. the VMPS provides one of these responses:
• • •
If the host is allowed on the port. depending on the secure mode of the VMPS. it disables the port. If the switch receives a port-shutdown response from the VMPS.Chapter 12 Configuring VMPS
Configuring VLANs
If the port is currently unassigned (that is. If the client switch was previously configured. the VMPS sends a port-shutdown response.
If the switch receives an access-denied response from the VMPS. depending on the MAC addresses seen. CMS. A maximum of 20 MAC addresses are allowed per port on the switch. the VMPS shuts down a dynamic-access port if more than 20 hosts are active on the port. The switch continues to monitor the packets directed to the port and sends a query to the VMPS when it identifies a new host address. however. Dynamic-access ports can be used for direct host connections. it includes its domain name in the query packet to the VMPS to obtain its VLAN number. If the client switch was not previously configured. the VMPS sends the VLAN number for that port.
If the port already has a VLAN assignment. it uses the domain name from the first VTP packet it receives on its trunk port from the VMPS. The port must be manually re-enabled by using the CLI. When the link comes up. Any hosts that come online through the port are checked again through the VQP with the VMPS before the port is assigned to a VLAN. If the VLAN is not allowed on the port and the VMPS is in secure mode. or SNMP. A dynamic-access port can belong to only one VLAN at a time. allowing access to the host. the VMPS provides one of these responses:
• •
If the VLAN in the database matches the current VLAN on the port. but the VLAN can change over time. it does not yet have a VLAN assignment). If the host is not allowed on the port and the VMPS is in open mode.

Chapter 12
Configuring VLANs Configuring VMPS
Default VMPS Client Configuration
Table 12-7 shows the default VMPS and dynamic-access port configuration on client switches. the switch retains the setting and applies it if the port is later configured as an access port. A dynamic-access port can participate in fallback bridging. Secure ports cannot be dynamic-access ports. The VLAN configured on the VMPS server should not be a voice VLAN.1X is not enabled.
Table 12-7 Default VMPS Client and Dynamic-Access Port Configuration
Feature VMPS domain server VMPS reconfirm interval VMPS server retry count Dynamic-access ports
Default Setting None 60 minutes 3 None configured
VMPS Configuration Guidelines
These guidelines and restrictions apply to dynamic-access port VLAN membership:
• •
You should configure the VMPS before you configure ports as dynamic-access ports. and the VLAN configuration is not changed.
Configuring the VMPS Client
You configure dynamic VLANs by using the VMPS (server). Port channels cannot be configured as dynamic-access ports.1X on a dynamic-access (VQP) port.1X-enabled port to dynamic VLAN assignment. When you configure a port as a dynamic-access port. an error message appears. You must disable port security on a port before it becomes dynamic. The switch can be a VMPS client. If you try to change an 802. but you can enter the switchport access vlan dynamic interface configuration command for a trunk port.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
12-29
. If you try to enable 802. the spanning-tree Port Fast feature is automatically enabled for that port. Trunk ports cannot be dynamic-access ports. You must turn off trunking on the port before the dynamic-access setting takes effect. it cannot be a VMPS server.
•
•
• • • • • • •
Dynamic-access ports cannot be monitor ports. 802. and 802. The VTP management domain of the VMPS client and the VMPS server must be the same. Dynamic-access ports cannot be members of an EtherChannel group. an error message appears. In this case.1X ports cannot be configured as dynamic-access ports. The Port Fast mode accelerates the process of bringing the port into the forwarding state.

(Optional) Enter the IP address of the switch acting as a secondary VMPS server. Enter interface configuration mode for the switch port that is connected to the end station. Configure the port as eligible for dynamic VLAN membership. Return to privileged EXEC mode. (Optional) Save your entries in the configuration file. Beginning in privileged EXEC mode.
Note
If the VMPS is being defined for a cluster of switches.
configure terminal interface interface-id switchport mode access switchport access vlan dynamic end
Step 5
Catalyst 3560 Switch Software Configuration Guide
12-30
78-16156-01
. The dynamic-access port must be connected to an end station. follow these steps to configure a dynamic-access port on a VMPS client switch:
Command
Step 1 Step 2 Step 3 Step 4
Purpose Enter global configuration mode. Set the port to access mode.
Configuring Dynamic-Access Ports on VMPS Clients
If you are configuring a port on a cluster member switch as a dynamic-access port. follow these steps to enter the IP address of the VMPS:
Command
Step 1 Step 2 Step 3
Purpose Enter global configuration mode. enter the address on the command switch. first use the rcommand privileged EXEC command to log into the cluster member switch.
configure terminal vmps server ipaddress primary vmps server ipaddress
Step 4 Step 5 Step 6
end show vmps copy running-config startup-config
Note
You must have IP connectivity to the VMPS for dynamic-access ports to work. You can test for IP connectivity by pinging the IP address of the VMPS and verifying that you get a response. Enter the IP address of the switch acting as the primary VMPS server.
Caution
Dynamic-access port VLAN membership is for end stations or hubs connected to end stations.Chapter 12 Configuring VMPS
Configuring VLANs
Entering the IP Address of the VMPS
You must first enter the IP address of the server to configure the switch as a client. You can enter up to three secondary server addresses. Return to privileged EXEC mode. Connecting dynamic-access ports to other switches can cause a loss of connectivity. Verify your entries in the VMPS Domain Server field of the display. Beginning in privileged EXEC mode.

vmps reconfirm show vmps
Changing the Reconfirmation Interval
VMPS clients periodically reconfirm the VLAN membership information received from the VMPS. use the no switchport mode interface configuration command.
configure terminal vmps reconfirm minutes end show vmps copy running-config startup-config
To return the switch to its default setting. (Optional) Save your entries in the configuration file. If you are configuring a member switch in a cluster. Return to privileged EXEC mode. Verify the dynamic VLAN reconfirmation status.
Reconfirming VLAN Memberships
Beginning in privileged EXEC mode. use the no switchport access vlan interface configuration command. use the no vmps reconfirm global configuration command. To reset the access mode to the default VLAN for the switch. Enter the number of minutes between reconfirmations of the dynamic VLAN membership. this parameter must be equal to or greater than the reconfirmation setting on the command switch. Verify the dynamic VLAN reconfirmation status in the Reconfirm Interval field of the display. follow these steps to confirm the dynamic-access port VLAN membership assignments that the switch has received from the VMPS: Command
Step 1 Step 2
Purpose Reconfirm dynamic-access port VLAN membership.
show interfaces interface-id switchport copy running-config startup-config
To return an interface to its default configuration. use the default interface interface-id interface configuration command. The default is 60 minutes.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
12-31
. To return an interface to its default switchport mode (dynamic auto).Chapter 12
Configuring VLANs Configuring VMPS
Command
Step 6 Step 7
Purpose Verify your entries in the Operational Mode field of the display. You can set the number of minutes after which reconfirmation occurs. The range is from 1 to 120. (Optional) Save your entries in the configuration file. You must also first use the rcommand privileged EXEC command to log into the member switch. Beginning in privileged EXEC mode. follow these steps to change the reconfirmation interval: Command
Step 1 Step 2 Step 3 Step 4 Step 5
Purpose Enter global configuration mode.

current) 172.Chapter 12 Configuring VMPS
Configuring VLANs
Changing the Retry Count
Beginning in privileged EXEC mode. A reconfirmation attempt can occur automatically when the reconfirmation interval expired. The switch displays this information about the VMPS:
• • • • •
VMPS VQP Version—the version of VQP used to communicate with the VMPS. Change the retry count. follow these steps to change the number of times that the switch attempts to contact the VMPS before querying the next server: Command
Step 1 Step 2 Step 3 Step 4 Step 5
Purpose Enter global configuration mode. Return to privileged EXEC mode. Verify your entry in the Server Retry Count field of the display.128. VMPS Action—the result of the most recent reconfirmation attempt. The one marked primary is the primary server.128. the default is 3.87 Reconfirmation status --------------------VMPS Action: other
Catalyst 3560 Switch Software Configuration Guide
12-32
78-16156-01
. The retry range is from 1 to 10.20.
Monitoring the VMPS
You can display information about the VMPS by using the show vmps privileged EXEC command.86 (primary. The switch queries the VMPS that is using VQP version 1. Reconfirm Interval—the number of minutes the switch waits before reconfirming the VLAN-to-MAC-address assignments. The switch sends queries to the one marked current.
configure terminal vmps retry count end show vmps copy running-config startup-config
To return the switch to its default setting. (Optional) Save your entries in the configuration file. or you can force it by entering the vmps reconfirm privileged EXEC command or its CMS or SNMP equivalent
This is an example of output for the show vmps privileged EXEC command:
Switch# show vmps VQP Client Status: -------------------VMPS VQP Version: 1 Reconfirm Interval: 60 min Server Retry Count: 3 VMPS domain server: 172. VMPS domain server—the IP address of the configured VLAN membership policy servers. If no response is received after this many tries.20. the switch starts to query the secondary VMPS. use the no vmps retry global configuration command. Server Retry Count—the number of times VQP resends a query to the VMPS.

To re-enable a disabled dynamic-access port. End stations are connected to the clients.Chapter 12
Configuring VLANs Configuring VMPS
Troubleshooting Dynamic-Access Port VLAN Membership
The VMPS shuts down a dynamic-access port under these conditions:
• •
The VMPS is in secure mode. Switch B and Switch I.
VMPS Configuration Example
Figure 12-5 shows a network with a VMPS server switch and VMPS client switches with dynamic-access ports. these assumptions apply:
• • • • •
The VMPS server and the VMPS client are separate switches. The database configuration file is stored on the TFTP server with the IP address 172. enter the shutdown interface configuration command followed by the no shutdown interface configuration command. and it does not allow the host to connect to the port. In this example. The VMPS shuts down the port to prevent the host from connecting to the network. The Catalyst 6500 series Switch A is the primary VMPS server.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
12-33
.22.20. More than 20 active hosts reside on a dynamic-access port.7. The Catalyst 6500 series Switch C and Switch J are secondary VMPS servers.

Without 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. incorrect VLAN-type specifications. VTP only learns about normal-range VLANs (VLAN IDs 1 to 1005). page 13-6 Monitoring VTP.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
13-1
. and other configured features affects the usage of the switch hardware. you cannot send information about VLANs to other switches. and security violations. and renaming of VLANs on a network-wide basis. but the number of routed ports. SVIs. page 13-1 Configuring VTP. 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. refer to the command reference for this release. VTP minimizes misconfigurations and configuration inconsistencies that can cause several problems. which would result in an inconsistency in the VLAN database.
Note
For complete syntax and usage information for the commands used in this chapter. deletion. The chapter includes these sections:
• • •
Understanding VTP. The output of the show vlan user EXEC command shows the VLAN in a suspended state.C H A P T E R
13
Configuring VTP
This chapter describes how to use the VLAN Trunking Protocol (VTP) and the VLAN database for managing VLANs with the Catalyst 3560 switch. It does not work well in a situation where multiple updates to the VLAN database occur simultaneously on switches in the same domain. Before you create VLANs. page 13-15
Understanding VTP
VTP is a Layer 2 messaging protocol that maintains VLAN configuration consistency by managing the addition. such as duplicate VLAN names. Using VTP. it sends a message that there are not enough hardware resources available and shuts down the VLAN. The switch supports 1005 VLANs. you must decide whether to use VTP in your network. If the switch is notified by VTP of a new VLAN and the switch is already using the maximum available hardware resources. Extended-range VLANs (VLAN IDs greater than 1005) are not supported by VTP or stored in the VTP VLAN database.

and VLAN information is not propagated over the network.1Q. but the changes are not sent to other switches in the domain.Chapter 13 Understanding VTP
Configuring VTP
This section contains information about these VTP parameters and characteristics. page 13-3 VTP Advertisements. and they affect only the individual switch. By default. However. page 13-2 VTP Modes.
Caution
Before adding a VTP client switch to a VTP domain. If the switch receives a VTP advertisement over a trunk link. including Inter-Switch Link (ISL) and IEEE 802. If you configure a switch for VTP transparent mode. page 13-4
The VTP Domain
A VTP domain (also called a VLAN management domain) consists of one switch or several interconnected switches under the same administrative responsibility sharing the same VTP domain name. 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. VTP advertisements are sent over all IEEE trunk connections. Cluster Management Suite (CMS) software. A switch can be in only one VTP domain. The switch then ignores advertisements with a different domain name or an earlier configuration revision number. it inherits the management domain name and the VTP configuration revision number. you can create and modify VLANs. the switch is in 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. If you add a switch that has a revision number higher than the revision number in the VTP domain. page 13-3 VTP Version 2. or Simple Network Management Protocol (SNMP). it can erase all VLAN information from the VTP server and VTP domain. you cannot create or modify VLANs on a VTP server.
Catalyst 3560 Switch Software Configuration Guide
13-2
78-16156-01
.
• • • • •
The VTP Domain. the change is propagated to all switches in the 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. When you make a change to the VLAN configuration on a VTP server. Until the management domain name is specified or learned. Mapping eliminates excessive device administration required from network administrators. Switches in a VTP domain always use the VLAN configuration of the switch with the highest VTP configuration revision number. VTP dynamically maps VLANs with unique names and internal index associates across multiple LAN types. page 13-4 VTP Pruning. see the “VTP Configuration Guidelines” section on page 13-8. You make global VLAN configuration changes for the domain by using the command-line interface (CLI). For domain name and password configuration guidelines. See the “Adding a VTP Client Switch to a VTP Domain” section on page 13-14 for the procedure for verifying and resetting the VTP configuration revision number.

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 entering the copy running-config startup-config privileged EXEC command. For more information on trunk ports. Otherwise. see the “Configuring VLAN Trunks” section on page 12-16. Frame format
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
13-3
. modify. you must ensure that at least one trunk port is configured on the switch and that this trunk port is connected to the trunk port of another switch.
VTP Advertisements
Each switch in the VTP domain sends periodic global configuration advertisements from each trunk port to a reserved multicast address. including maximum transmission unit (MTU) size for each VLAN. In this mode. VLAN configurations are not saved in NVRAM. but you cannot create. in VTP version 2. In VTP client mode. VLANs are configured on another switch in the domain that is in server mode. In VTP server mode. the switch cannot receive any VTP advertisements. and delete VLANs on a switch in VTP transparent mode.
Table 13-1 VTP Modes
VTP Mode VTP server
Description In VTP server mode. modify. VTP server is the default mode.
VTP client
A VTP client behaves like a VTP server and transmits and receives VTP updates on its trunks.Chapter 13
Configuring VTP Understanding VTP
VTP Modes
You can configure a supported switch to be in one of the VTP modes listed in Table 13-1. or delete VLANs on a VTP client. and specify other configuration parameters (such as the VTP version) for the entire VTP domain. VTP advertisements distribute this global domain information:
• • • • •
VTP domain name VTP configuration revision number Update identity and update timestamp MD5 digest VLAN configuration. and delete VLANs. You can create. change. See the “Configuring Extended-Range VLANs” section on page 12-12. transparent switches do forward VTP advertisements that they receive from other switches from their trunk interfaces. but they are not advertised to other switches. Neighboring switches receive these advertisements and update their VTP and VLAN configurations as necessary. A VTP transparent switch does not advertise its VLAN configuration and does not synchronize its VLAN configuration based on received advertisements.
VTP transparent VTP transparent switches do not participate in VTP.
Note
Because trunk ports send and receive VTP advertisements. the VTP and VLAN configurations are saved in NVRAM. 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. The switch must be in VTP transparent mode when you create extended-range VLANs. However. you can create. VLAN configurations are saved in nonvolatile RAM (NVRAM). When the switch is in VTP transparent mode.

The unrecognized TLV is saved in NVRAM when the switch is operating in VTP server mode. By default.1Q) VLAN name VLAN type VLAN state Additional VLAN configuration information specific to the VLAN type
VTP Version 2
If you use VTP in your network. If the MD5 digest on a received VTP message is correct. and F have no ports in the Red VLAN. you must decide whether to use version 1 or version 2. VTP version 2 supports these features not supported in version 1:
•
Token Ring support—VTP version 2 supports Token Ring Bridge Relay Function (TrBRF) and Token Ring Concentrator Relay Function (TrCRF) VLANs. see the “Configuring Normal-Range VLANs” section on page 12-4. Unrecognized Type-Length-Value (TLV) support—A VTP server or client propagates configuration changes to its other trunks. If the VLANs are configured as pruning-ineligible. By default. VTP operates in version 1. Version-Dependent Transparent Mode—In VTP version 1. it forwards VTP messages in transparent mode without inspecting the version and domain name. a VTP transparent switch inspects VTP messages for the domain name and version and forwards a message only if the version and domain name match. VTP pruning is disabled by default. Consistency checks are not performed when new information is obtained from a VTP message or when information is read from NVRAM. Figure 13-1 shows a switched network without VTP pruning enabled.
Catalyst 3560 Switch Software Configuration Guide
13-4
78-16156-01
. E. Port 1 on Switch A and Port 2 on Switch D are assigned to the Red VLAN. a switch floods broadcast. its information is accepted. VTP pruning is supported with VTP version 1 and version 2. Because VTP version 2 supports only one domain. multicast. For more information about Token Ring VLANs. VLANs 2 through 1001 are pruning eligible switch trunk ports. Consistency Checks—In VTP version 2.Chapter 13 Understanding VTP
Configuring VTP
VTP advertisements distribute this VLAN information for each configured VLAN:
• • • • •
VLAN IDs (ISL and 802. Only VLANs included in the pruning-eligible list can be pruned. the Cluster Management Software (CMS). Switch A floods the broadcast and every switch in the network receives it. VTP pruning blocks unneeded flooded traffic to VLANs on trunk ports that are included in the pruning-eligible list. even for TLVs it is not able to parse.
•
•
•
VTP Pruning
VTP pruning increases network available bandwidth by restricting flooded traffic to those trunk links that the traffic must use to reach the destination devices. VLAN consistency checks (such as VLAN names and values) are performed only when you enter new information through the CLI. and unknown unicast traffic across all trunk links within a VTP domain even though receiving switches might discard them. even though Switches C. If a broadcast is sent from the host connected to Switch A. or SNMP. the flooding continues. Without VTP pruning.

If VTP mode is transparent. and the VTP and VLAN configurations in the startup configuration file are used. page 13-7 You access VLAN database configuration mode by entering the vlan database privileged EXEC command. the version. and to disable or enable pruning. the VTP domain name and mode are also saved in the switch running configuration file. You must use this command if you want to save VTP mode as transparent. the interface providing updated VTP information. refer to the vtp VLAN database configuration command description in the command reference for this release. the domain name and the mode (transparent) are saved in the switch running configuration. The VTP information is saved in the VTP VLAN database. For more information about available keywords. VTP messages are sent to other switches in the VTP domain. The VLAN database revision number remains unchanged in the VLAN database. it applies all the commands that you entered and updates the VLAN database. If the VTP mode or domain name in the startup configuration do not match the VLAN database. even if the switch resets.
• •
VTP Configuration in Global Configuration Mode. When VTP mode is transparent. refer to the command descriptions in the command reference for this release.
VTP Configuration in Global Configuration Mode
You can use the vtp global configuration command to set the VTP password. When you enter the exit command in VLAN database configuration mode. and the mode. the VTP file name. and you can save this information in the switch startup configuration file by entering the copy running-config startup-config privileged EXEC command. page 13-7 VTP Configuration in VLAN Database Configuration Mode. the switch configuration is determined as follows:
•
If the VTP mode is transparent in the startup configuration and the VLAN database and the VTP domain name from the VLAN database matches that in the startup configuration file. the domain name.
For detailed information about vtp commands.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
13-7
. When you save VTP information in the switch startup configuration file and reboot the switch. the VLAN database is ignored (cleared).
•
VTP Configuration in VLAN Database Configuration Mode
You can configure all VTP parameters in VLAN database configuration mode.Chapter 13
Configuring VTP Configuring VTP
VTP Configuration Options
You can configure VTP by using these configuration modes. and the privileged EXEC mode prompt appears. For more information about available keywords. and you can save it in the switch startup configuration file by entering the copy running-config startup-config privileged EXEC command. which you access by entering the vlan database privileged EXEC command. refer to the command reference for this release. the domain name and VTP mode and configuration for the first 1005 VLANs use the VLAN database information.

If you do configure a domain password.
Note
If NVRAM and DRAM storage is sufficient. the switch accepts the next VTP advertisement that uses the same password and domain name in the advertisement. You must configure all switches in the VTP domain with the same domain name.
Catalyst 3560 Switch Software Configuration Guide
13-8
78-16156-01
. a switch that is booted without a VTP configuration does not accept VTP advertisements until you configure it with the correct password. Switches in VTP transparent mode do not exchange VTP messages with other switches. After the configuration. If you configure a VTP password for a domain.
Caution
When you configure a VTP domain password.
Caution
Do not configure a VTP domain if all switches are operating in VTP client mode. Switches without a password or with the wrong password reject VTP advertisements. but it is not required. it is impossible to make changes to the VLAN configuration of that domain.
Domain Names
When configuring VTP for the first time. Make sure that you configure at least one switch in the VTP domain for VTP server mode. the new switch learns the domain name only after the applicable password has been configured on it. all switches in a VTP domain should be in VTP server mode. and you do not need to configure a VTP domain name for them. the management domain does not function properly if you do not assign a management domain password to each switch in the domain. If you are adding a new switch to an existing network with VTP capability. If you configure the domain.
Passwords
You can configure a password for the VTP domain. you must always assign a domain name.Chapter 13 Configuring VTP
Configuring VTP
VTP Configuration Guidelines
These sections describe guidelines you should follow when implementing VTP in your network. all domain switches must share the same password and you must configure the password on each switch in the management domain.

All switches operating in VTP server or client mode under the same administrative responsibility must be configured with the same domain name. disable VTP version 2. The name can be from 1 to 32 characters. you cannot change VTP mode to server. When you enable version 2 on a switch. Configure the switch for VTP server mode (the default). use the rcommand privileged EXEC command to log into the member switch.
•
Configuration Requirements
When you configure VTP. you can change the VLAN configuration and have it propagated throughout the network. you must configure a trunk port so that the switch can send and receive VTP advertisements to and from other switches in the domain. the switch must be in VTP transparent mode. A VTP version 2-capable switch can operate in the same VTP domain as a switch running VTP version 1 if version 2 is disabled on the version 2-capable switch (version 2 is disabled by default). Beginning in privileged EXEC mode. see the “Configuring VLAN Trunks” section on page 12-16.
Configuring a VTP Server
When a switch is in VTP server mode. you must enable VTP version 2 for Token Ring VLAN switching to function properly. You receive an error message. If you are configuring extended-range VLANs on the switch. it does not exchange VTP information with switches with version 2 enabled.
Note
If extended-range VLANs are configured on the switch. If you are configuring VTP on a cluster member switch to a VLAN. Do not enable VTP version 2 on a switch unless all of the switches in the same VTP domain are version-2-capable. To run Token Ring and Token Ring-Net.
configure terminal vtp mode server vtp domain domain-name
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
13-9
. follow these steps to configure the switch as a VTP server:
Command
Step 1 Step 2 Step 3
Purpose Enter global configuration mode. and the configuration is not allowed. For more information about the command. all of the version-2-capable switches in the domain enable version 2.Chapter 13
Configuring VTP Configuring VTP
VTP Version
Follow these guidelines when deciding which VTP version to implement:
• • •
All switches in a VTP domain must run the same VTP version. For more information. refer to the command reference for this release. If there is a version 1-only switch. Configure the VTP administrative-domain name. If there are TrBRF and TrCRF Token Ring networks in your environment.

you can only reassign a switch to a different domain. To return the switch to a no-password state.
vlan database vtp server vtp domain domain-name
Step 4
vtp password password
Step 5 Step 6
exit show vtp status
Update the VLAN database. you can only reassign a switch to a different domain. follow these steps to use VLAN database configuration mode to configure the switch as a VTP server: Command
Step 1 Step 2 Step 3
Purpose Enter VLAN database configuration mode. (Optional) Set a password for the VTP domain. Configure a VTP administrative-domain name.
vtp password password
Step 5 Step 6
end show vtp status
Return to privileged EXEC mode. the VTP domain does not function properly if you do not assign the same password to each switch in the domain.Chapter 13 Configuring VTP
Configuring VTP
Command
Step 4
Purpose (Optional) Set the password for the VTP domain. it cannot be removed. Verify your entries in the VTP Operating Mode and the VTP Domain Name fields of the display. The password can be from 8 to 64 characters. The name can be from 1 to 32 characters.
Catalyst 3560 Switch Software Configuration Guide
13-10
78-16156-01
. To return the switch to a no-password state. the VTP domain does not function properly if you do not assign the same password to each switch in the domain. it cannot be removed. and return to privileged EXEC mode.
When you configure a domain name. Configure the switch for VTP server mode (the default). This example shows how to use global configuration mode to configure the switch as a VTP server with the domain name eng_group and the password mypassword:
Switch# config terminal Switch(config)# vtp mode server Switch(config)# vtp domain eng_group Switch(config)# vtp password mypassword Switch(config)# end
You can also use VLAN database configuration mode to configure VTP parameters. Verify your entries in the VTP Operating Mode and the VTP Domain Name fields of the display. The password can be from 8 to 64 characters. If you configure a VTP password. If you configure a VTP password. Beginning in privileged EXEC mode. propagate it throughout the administrative domain. All switches operating in VTP server or client mode under the same administrative responsibility must be configured with the same domain name.
When you configure a domain name. use the no vtp password global configuration command. use the no vtp password VLAN database configuration command.

Beginning in privileged EXEC mode. and the configuration is not allowed. do not configure a VTP domain name. You receive an error message. All switches operating in VTP server or client mode under the same administrative responsibility must be configured with the same domain name. Configure the switch for VTP client mode. To return the switch to a no-password state. Verify your entries in the VTP Operating Mode and the VTP Domain Name fields of the display.
configure terminal vtp mode client vtp domain domain-name
Step 4 Step 5 Step 6
vtp password password end show vtp status
(Optional) Enter the password for the VTP domain.
Note
If extended-range VLANs are configured on the switch. you can only reassign a switch to a different domain. The default setting is VTP server. it cannot be removed. Exiting. follow these steps to configure the switch as a VTP client:
Command
Step 1 Step 2 Step 3
Purpose Enter global configuration mode.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
13-11
. The client switch receives VTP updates from a VTP server in the VTP domain and then modifies its configuration accordingly. Therefore. use the no vtp password privileged EXEC command. If you do.. make sure you configure at least one switch as a VTP server. Return to privileged EXEC mode.
Use the no vtp mode global configuration command to return the switch to VTP server mode. This should be the same domain name as the VTP server.
Caution
If all switches are operating in VTP client mode.. it is impossible to make changes to the VLAN configuration of that domain.Chapter 13
Configuring VTP Configuring VTP
This example shows how to use VLAN database configuration mode to configure the switch as a VTP server with the domain name eng_group and the password mypassword:
Switch# vlan database Switch(vlan)# vtp server Switch(vlan)# vtp domain eng_group Switch(vlan)# vtp password mypassword Switch(vlan)# exit APPLY completed. you cannot change VTP mode to client. Switch#
Configuring a VTP Client
When a switch is in VTP client mode.. When you configure a domain name. you cannot change its VLAN configuration. (Optional) Enter the VTP administrative-domain name. The name can be from 1 to 32 characters.

Save this configuration to the startup configuration so that the switch boots up in VTP transparent mode. use the no vtp mode global configuration command. follow these steps to configure VTP transparent mode and save the VTP configuration in the switch startup configuration file:
Command
Step 1 Step 2 Step 3 Step 4 Step 5
Purpose Enter global configuration mode. However. similar to the second procedure under “Configuring a VTP Server” section on page 13-9. Use the no vtp
Catalyst 3560 Switch Software Configuration Guide
13-12
78-16156-01
. you can only reassign a switch to a different domain. Use the no vtp client VLAN database configuration command to return the switch to VTP server mode or the no vtp password VLAN database configuration command to return the switch to a no-password state. it cannot be removed.
Note
If extended-range VLANs are configured on the switch. Return to privileged EXEC mode. Configure the switch for VTP transparent mode (disable VTP).
Note
configure terminal vtp mode transparent end show vtp status copy running-config startup-config
Only VTP mode and domain name are saved in the switch running configuration and can be copied to the startup configuration file. similar to the second procedure under the “Configuring a VTP Server” section on page 13-9. When you configure a domain name. (Optional) Save the configuration in the startup configuration file.
Disabling VTP (VTP Transparent Mode)
When you configure the switch for VTP transparent mode. Verify your entries in the VTP Operating Mode and the VTP Domain Name fields of the display. you lose the extended-range VLAN configuration if the switch resets and boots up in VTP server mode (the default). you disable VTP on the switch. and the configuration is not allowed.
Note
Before you create extended-range VLANs (VLAN IDs 1006 to 4094). The switch does not send VTP updates and does not act on VTP updates received from other switches.
To return the switch to VTP server mode. you cannot change the VTP mode to server. Otherwise. Beginning in privileged EXEC mode.
Note
You can also configure VTP transparent mode by using the vlan database privileged EXEC command to enter VLAN database configuration mode and by entering the vtp transparent command. you must set VTP mode to transparent by using the vtp mode transparent global configuration command.Chapter 13 Configuring VTP
Configuring VTP
Note
You can also configure a VTP client by using the vlan database privileged EXEC command to enter VLAN database configuration mode and entering the vtp client command. You receive an error message. a VTP transparent switch running VTP version 2 does forward received VTP advertisements on all of its trunk links.

Return to privileged EXEC mode. Verify that VTP version 2 is enabled in the VTP V2 Mode field of the display. You can only enable VTP pruning on a switch in VTP server mode. VTP version 2 must be disabled. you cannot change VTP mode to server. You receive an error message. and the configuration is not allowed.
Note
In TrCRF and TrBRF Token ring environments. follow these steps to enable VTP version 2:
Command
Step 1 Step 2
Purpose Enter global configuration mode. use the no vtp v2-mode VLAN database configuration command. Beginning in privileged EXEC mode. Every switch in the VTP domain must use the same VTP version. For Token Ring and Token Ring-Net media. For more information on VTP version configuration guidelines.
Enabling VTP Version 2
VTP version 2 is disabled by default on VTP version 2-capable switches.
configure terminal vtp version 2 end show vtp status
Step 3 Step 4
To disable VTP version 2. You can only configure the version on switches in VTP server or transparent mode.
Enabling VTP Pruning
Pruning increases available bandwidth by restricting flooded traffic to those trunk links that the traffic must use to access the destination devices. you must enable VTP version 2 for Token Ring VLAN switching to function properly. When you enable VTP version 2 on a switch.
Note
You can also enable VTP version 2 by using the vlan database privileged EXEC command to enter VLAN database configuration mode and entering the vtp v2-mode VLAN database configuration command.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
13-13
. To disable VTP version 2. see the “VTP Version” section on page 13-9. Do not enable VTP version 2 unless every switch in the VTP domain supports version 2.Chapter 13
Configuring VTP Configuring VTP
transparent VLAN database configuration command to return the switch to VTP server mode. VTP version 2 is disabled by default on VTP version 2-capable switches. Enable VTP version 2 on the switch. use the no vtp version global configuration command. If extended-range VLANs are configured on the switch. every VTP version 2-capable switch in the VTP domain enables version 2.
Caution
VTP version 1 and VTP version 2 are not interoperable on switches in the same VTP domain.

Verify your entries in the VTP Pruning Mode field of the display. b. c. If the number is 0. Only VLANs included in the pruning-eligible list can be pruned. You need to enable pruning on only one switch in VTP server mode. it can erase all VLAN information from the VTP server and VTP domain.
show vtp status
Write down the domain name. If the number is greater than 0.
Catalyst 3560 Switch Software Configuration Guide
13-14
78-16156-01
. Continue with the next steps to reset the switch configuration revision number. You can also enable VTP version 2 by using the vtp pruning privileged EXEC command. Enable pruning in the VTP administrative domain. If you enable pruning on the VTP server. By default. this command will not be available in future releases.
To disable VTP pruning. Write down the configuration revision number. Beginning in privileged EXEC mode.
configure terminal vtp pruning
Step 3 Step 4
end show vtp status
Return to privileged EXEC mode. VLANs 2 through 1001 are pruning eligible on trunk ports. use the no vtp pruning global configuration command. follow these steps:
a. pruning is disabled.
Step 2
configure terminal
Enter global configuration mode. add the switch to the VTP domain. see the “Changing the Pruning-Eligible List” section on page 12-22. use the no vtp pruning VLAN database configuration command.
Adding a VTP Client Switch to a VTP Domain
Before adding a VTP client to a VTP domain. follow these steps to enable VTP pruning in the VTP domain: Command
Step 1 Step 2
Purpose Enter global configuration mode. If you add a switch that has a revision number higher than the revision number in the VTP domain. To disable VTP pruning. always verify that its VTP configuration revision number is lower than the configuration revision number of the other switches in the VTP domain. follow these steps to verify and reset the VTP configuration revision number on a switch before adding it to a VTP domain: Command
Step 1
Purpose Check the VTP configuration revision number.Chapter 13 Configuring VTP
Configuring VTP
Beginning in privileged EXEC mode. By default. Pruning is supported with VTP version 1 and version 2. Reserved VLANs and extended-range VLANs cannot be pruned.
Note
You can also enable VTP pruning by using the vlan database privileged EXEC command to enter VLAN database configuration mode and entering the vtp pruning VLAN database configuration command. it is enabled for the entire VTP domain. However. To change the pruning-eligible VLANs. Switches in a VTP domain always use the VLAN configuration of the switch with the highest VTP configuration revision number.

Enter global configuration mode.
Table 13-3 VTP Monitoring Commands
Command show vtp status show vtp counters
Purpose Display the VTP switch configuration information.Chapter 13
Configuring VTP Monitoring VTP
Command
Step 3 Step 4 Step 5 Step 6 Step 7 Step 8 Step 9
Purpose Change the domain name from the original one displayed in Step 1 to a new name. The VLAN information on the switch is updated and the configuration revision number is reset to 0. Display counters about VTP messages that have been sent and received. The VLAN information on the switch is updated. and the number of VLANs. add the switch to the VTP domain. you must enter the exit command to update VLAN information and return to privileged EXEC mode. You can also display statistics about the advertisements sent and received by the switch. After resetting the configuration revision number.
Note
You can use the vtp mode transparent global configuration command or the vtp transparent VLAN database configuration command to disable VTP on the switch. Table 13-3 shows the privileged EXEC commands for monitoring VTP activity. You return to privileged EXEC mode. and then change its VLAN information without affecting the other switches in the VTP domain.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
13-15
. (Optional) Verify that the domain name is the same as in Step 1 and that the configuration revision number is 0. Enter the original domain name on the switch.
vtp domain domain-name end show vtp status configure terminal vtp domain domain-name end show vtp status
You can also change the VTP domain name by entering the vlan database privileged EXEC command to enter VLAN database configuration mode and by entering the vtp domain domain-name command. Verify that the configuration revision number has been reset to 0. In this mode. the current VTP revision.
Monitoring VTP
You monitor VTP by displaying VTP configuration information: the domain name. and you return to privileged EXEC mode.

Because the sound quality of an IP phone call can deteriorate if the data is unevenly sent. which are both set to 5 by default.1P CoS.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
14-1
. the switch supports quality of service (QoS) based on IEEE 802. “Configuring QoS. refer to the command reference for this release. the IP Phone sends voice traffic with Layer 3 IP precedence and Layer 2 class of service (CoS) values.
Figure 14-1 shows one way to connect a Cisco 7960 IP Phone. page 14-6
Understanding Voice VLAN
The voice VLAN feature enables access ports to carry IP voice traffic from an IP phone. Port 2 is an internal 10/100 interface that carries the IP phone traffic.1P priority. When the switch is connected to a Cisco 7960 IP Phone.C H A P T E R
14
Configuring Voice VLAN
This chapter describes how to configure the voice VLAN feature on the Catalyst 3560 switch. You can configure the switch to trust or override the traffic priority assigned by an IP Phone. The Cisco IP Phone contains an integrated three-port 10/100 switch as shown in Figure 14-1. Port 3 (access port) connects to a PC or other device.
Note
For complete syntax and usage information for the commands used in this chapter. page 14-1 Configuring Voice VLAN. see Chapter 28. Voice VLAN is referred to as an auxiliary VLAN in some Catalyst 6500 family switch documentation.” The Cisco 7960 IP Phone is a configurable device. and you can configure it to forward traffic with an 802. QoS uses classification and scheduling to send network traffic from the switch in a predictable manner. This chapter consists of these sections:
• • •
Understanding Voice VLAN. The ports provide dedicated connections to these devices:
• • •
Port 1 connects to the switch or other voice-over-IP (VoIP) device. page 14-3 Displaying Voice VLAN. For more information on QoS.

1P frames received through the access port on the IP phone receive a configured Layer 2 CoS value.Chapter 14 Understanding Voice VLAN
Configuring Voice VLAN
Figure 14-1 Cisco 7960 IP Phone Connected to a Switch
Cisco IP Phone 7960
Phone ASIC
P2 P1 3-port switch P3 Access port
PC
Cisco IP Phone Voice Traffic
You can configure an access port with an attached Cisco IP Phone to use one VLAN for voice traffic and another VLAN for data traffic from a device attached to the phone. You can configure access ports on the switch to send Cisco Discovery Protocol (CDP) packets that instruct an attached Cisco IP Phone to send voice traffic to the switch in any of these ways:
• • •
In the voice VLAN tagged with a Layer 2 CoS priority value In the access VLAN tagged with a Layer 2 CoS priority value In the access VLAN. untagged (no Layer 2 CoS priority value)
Note
In all configurations.1Q or 802. Untrusted mode is the default. In untrusted mode. The default Layer 2 CoS value is 0.
Cisco IP Phone Data Traffic
The switch can also process tagged data traffic (traffic in 802. regardless of the trust state of the access port on the IP phone.1P frame types) from the device attached to the access port on the Cisco IP Phone (see Figure 14-1). all traffic received through the access port on the Cisco IP Phone passes through the IP phone unchanged.
Note
Untagged traffic from the device attached to the Cisco IP Phone passes through the IP phone unchanged.1Q or 802. all traffic in 802.
Catalyst 3560 Switch Software Configuration Guide
14-2
101351
78-16156-01
. the voice traffic carries a Layer 3 IP precedence value (the default is 5 for voice traffic and 3 for voice control traffic). You can configure Layer 2 access ports on the switch to send CDP packets that instruct the attached Cisco IP Phone to configure the IP phone access port in one of these modes:
• •
In trusted mode.

1p or untagged frames. we recommend that you enable QoS on the switch by entering the mls qos global configuration command and configure the port trust state to trust by entering the mls qos trust cos interface configuration command. see Chapter 28. (CDP is enabled by default globally and on all switch interfaces.) The Port Fast feature is automatically enabled when voice VLAN is configured.
•
The Power over Ethernet (PoE) switches are capable of automatically providing power to Cisco pre-standard and IEEE 802. The CoS value is not trusted for 802.1Q tagged traffic.
Voice VLAN Configuration Guidelines
These are the voice VLAN configuration guidelines:
•
You should configure voice VLAN on switch access ports.3af-compliant powered devices if they are not being powered by an AC power source.1p frames and the device uses untagged frames. If you use the auto-QoS feature. even though the configuration is allowed. This section contains this configuration information:
• • •
Default Voice VLAN Configuration. page 14-3 Voice VLAN Configuration Guidelines.1Q frames and the voice VLAN is the same as the access VLAN. For information about PoE interfaces.
•
• • •
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
14-3
. Before you enable voice VLAN.1P or 802. When you disable voice VLAN. “Configuring QoS. When the voice VLAN feature is enabled. You can only configure a voice VLAN on Layer 2 ports. page 14-3 Configuring a Port Connected to a Cisco 7960 IP Phone.
Note
Voice VLAN is only supported on access ports and not on trunk ports. page 14-4
Default Voice VLAN Configuration
The voice VLAN feature is disabled by default. For more information. these settings are automatically configured. These conditions indicate that they are in the same VLAN:
– They both use 802.1p frames. – The Cisco IP Phone uses 802. voice VLAN is not supported on trunk ports. – The Cisco IP Phone uses untagged frames and the device uses 802. the Port Fast feature is not automatically disabled.” You must enable CDP on the switch port connected to the Cisco IP Phone to send configuration to the Cisco IP Phone. – The Cisco IP Phone uses 802. If the Cisco IP Phone and a device attached to the Cisco IP Phone are in the same VLAN. all untagged traffic is sent according to the default CoS priority of the port. they must be in the same IP subnet.Chapter 14
Configuring Voice VLAN Configuring Voice VLAN
Configuring Voice VLAN
This section describes how to configure voice VLAN on access ports. see the “Configuring Power over Ethernet on an Interface” section on page 10-16.

1Q frames for a specified voice VLAN with a Layer 2 CoS value. The phone can carry voice traffic in 802. See the “Configuring Port Security” section on page 20-7 for more information. You can configure a port to determine how the IP phone carries voice traffic and data traffic. – Secure port. the voice traffic carries a Layer 3 IP precedence value (the default is 5). and specify the interface connected to the IP phone. See the “Configuring Protected Ports” section on page 20-5 for more
information. The IP phone address is learned on the voice VLAN and might also be learned on the access VLAN.
configure terminal interface interface-id
Catalyst 3560 Switch Software Configuration Guide
14-4
78-16156-01
.
– Protected port. Beginning in privileged EXEC mode. page 14-5
Configuring IP Phone Voice Traffic
You can configure a port connected to the Cisco IP Phone to send CDP packets to the phone to configure the way in which the phone sends voice traffic.1X Authentication” section on page 9-11
for more information.
Note
When you enable port security on an interface that is also configured with a voice VLAN. The IP phone can also send untagged voice traffic or use its own configuration to send voice traffic in the access VLAN. a port connecting the switch to a Cisco IP Phone can carry mixed traffic. You cannot configure static secure MAC addresses in the voice VLAN. Voice VLAN ports can also be these port types:
– Dynamic access port. the IP phone requires up to two MAC addresses. In all configurations. This section includes these topics:
• •
Configuring IP Phone Voice Traffic. See the “Configuring 802. See the “Configuring Dynamic-Access Ports on VMPS Clients” section
• •
on page 12-30 for more information.
Configuring a Port Connected to a Cisco 7960 IP Phone
Because a Cisco 7960 IP Phone also supports a connection to a PC or other device. Enter interface configuration mode.1X authenticated port. It can use 802.
– A source or destination port for a SPAN or RSPAN session. page 14-4 Configuring the Priority of Incoming Data Frames.Chapter 14 Configuring Voice VLAN
Configuring Voice VLAN
•
The Cisco IP Phone and a device attached to the phone cannot communicate if they are in the same VLAN and subnet but use different frame types because traffic in the same subnet is not routed (routing would eliminate the frame type difference). you must set the maximum allowed secure addresses on the port to two plus the maximum number of secure addresses allowed on the access VLAN.
– 802. Connecting a PC to the IP phone requires additional MAC addresses.1P priority tagging to give voice traffic a higher priority and forward all voice traffic through the native (access) VLAN. follow these steps to configure voice traffic on a port: Command
Step 1 Step 2
Purpose Enter global configuration mode. When the port is connected to a Cisco IP phone.

the Cisco IP Phone forwards the voice traffic with an 802. You can configure the Cisco IP Phone to not change (trust) or to override (not trust) the priority of frames arriving on the IP phone port from connected devices. vlan-id—Configure the Cisco IP Phone to forward all voice traffic through the specified VLAN. untagged—Configure the phone to send untagged voice traffic.1P priority tagging for voice traffic. dot1p—Configure the Cisco IP Phone to use 802. one per line. use the no switchport voice vlan interface configuration command.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
14-5
.1P priority of 5. By default. By default. To process tagged data traffic (in 802. Verify your voice VLAN entries. the Cisco IP Phone forwards the voice traffic with an 802.
Step 4
switchport voice vlan {vlan-id | dot1p | none | untagged}
Configure how the Cisco IP Phone carries voice traffic:
•
•
• • Step 5 Step 6
end show interfaces interface-id switchport or show running-config interface interface-id
Return to privileged EXEC mode. End with CNTL/Z. the port default CoS value is used.1P priority tagging for voice traffic and to use the default native VLAN (VLAN 0) to carry all traffic. Verify your QoS and voice VLAN entries.
Step 7
copy running-config startup-config
This example shows how to configure a port connected to an IP phone to use the CoS value to classify ingress traffic. you can configure the switch to send CDP packets to instruct the IP phone how to send data packets from the device attached to the access port on the Cisco IP Phone. Valid VLAN IDs are from 1 to 4094.
Configuring the Priority of Incoming Data Frames
You can connect a PC or other data device to a Cisco IP Phone port.1Q priority of 5.1Q or 802.
Note
mls qos trust cos
Before configuring the port trust state. (Optional) Save your entries in the configuration file. to use 802. none—Allow the IP phone to use its own configuration to send untagged voice traffic. and to use and the default native VLAN (VLAN 0) to carry all traffic:
Switch# configure terminal Enter configuration commands. For untagged packets. The PC can generate packets with an assigned CoS value. you must first globally enable QoS by using the mls qos global configuration command.Chapter 14
Configuring Voice VLAN Configuring Voice VLAN
Command
Step 3
Purpose Configure the interface to classify ingress traffic packets by using the packet CoS value.1P frames). Switch(config)# interface gigabitethernet0/1 Switch(config-if)# mls qos trust cos Switch(config-if)# switchport voice vlan dot1p Switch(config-if)# end
To return the port to its default setting.

The value is a number from 0 to 7. Enter interface configuration mode.
Displaying Voice VLAN
To display voice VLAN configuration for an interface. End with CNTL/Z. use the show interfaces interface-id switchport privileged EXEC command. and specify the interface connected to the IP phone. (Optional) Save your entries in the configuration file.
This example shows how to configure a port connected to an IP phone to not change the priority of frames received from the PC or the attached device:
Switch# configure terminal Enter configuration commands. Set the priority of data traffic received from the IP phone access port:
•
configure terminal interface interface-id switchport priority extend {cos value | trust}
cos value—Configure the IP phone to override the priority received from the PC or the attached device with the specified CoS value. trust—Configure the IP phone access port to trust the priority received from the PC or the attached device. Switch(config)# interface gigabitethernet0/1 Switch(config-if)# switchport priority extend trust Switch(config-if)# end
To return the port to its default setting. use the no switchport priority extend interface configuration command.Chapter 14 Displaying Voice VLAN
Configuring Voice VLAN
Beginning in privileged EXEC mode. one per line. The default priority is cos 0.
Catalyst 3560 Switch Software Configuration Guide
14-6
78-16156-01
. follow these steps to set the priority of data traffic received from the nonvoice port on the Cisco IP Phone: Command
Step 1 Step 2 Step 3
Purpose Enter global configuration mode. with 7 as the highest priority. Verify your entries.
• Step 4 Step 5 Step 6
end show interfaces interface-id switchport copy running-config startup-config
Return to privileged EXEC mode.

If a loop exists in the network. page 15-10 VLAN-Bridge Spanning Tree. including switch and MAC addresses.1Q Trunks. which cannot detect whether they are connected to a single LAN segment or a switched LAN of multiple segments. at regular intervals.
Catalyst 3560 Switch Software Configuration Guide
15-2
78-16156-01
. When two ports on a switch are part of a loop. The STP uses a spanning-tree algorithm to select one switch of a redundantly connected network as the root of the spanning tree. the spanning-tree algorithm recalculates the spanning-tree topology and activates the standby path. see Chapter 17. and path cost. The algorithm calculates the best loop-free path through a switched Layer 2 network by assigning a role to each port based on the role of the port in the active topology:
• • • •
Root—A forwarding port elected for the spanning-tree topology Designated—A forwarding port elected for every switched LAN segment Alternate—A blocked port providing an alternate path to the root port in the spanning tree Backup—A blocked port in a loopback configuration
Switches that have ports with these assigned roles are called root or designated switches. switch priority. page 15-10 STP and IEEE 802. The path cost value represents the media speed. If a network segment in the spanning tree fails and a redundant path exists. the spanning-tree port priority and path cost settings control which port is put in the forwarding state and which is put in the blocking state. port priority. For a Layer 2 Ethernet network to function properly. The spanning-tree port priority value represents the location of a port in the network topology and how well it is located to pass traffic.Chapter 15 Understanding Spanning-Tree Features
Configuring STP
• • •
Spanning-Tree Interoperability and Backward Compatibility.”
STP Overview
STP is a Layer 2 link management protocol that provides path redundancy while preventing loops in the network. Switches might also learn end-station MAC addresses on multiple Layer 2 interfaces. The switches do not forward these frames but use them to construct a loop-free path. Switches send and receive spanning-tree frames. “Configuring Optional Spanning-Tree Features. only one active path can exist between any two stations. Spanning-tree operation is transparent to end stations. see the “Configuring Spanning-Tree Features” section on page 15-11. Multiple active paths among end stations cause loops in the network. called bridge protocol data units (BPDUs). Spanning tree uses this information to elect the root switch and root port for the switched network and the root port and designated port for each switched segment. For information about optional spanning-tree features. Spanning tree forces redundant data paths into a standby (blocked) state. end stations might receive duplicate messages. These conditions result in an unstable network. page 15-11
For configuration information. BPDUs contain information about the sending switch and its ports.

If all switches are configured with the default priority (32768).
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
15-3
. The designated switch incurs the lowest path cost when forwarding packets from that LAN to the root switch. Each configuration BPDU contains this information:
• • • • • •
The unique bridge ID of the switch that the sending switch identifies as the root switch The spanning-tree path cost to the root The bridge ID of the sending switch Message age The identifier of the sending interface Values for the hello. If a switch receives a configuration BPDU that contains inferior information to that currently stored for that port. If this BPDU is received on the root port of the switch. and max-age protocol timers
When a switch receives a configuration BPDU that contains superior information (lower bridge ID. the switch also forwards it with an updated message to all attached LANs for which it is the designated switch. and superior information is propagated on the network. This port provides the best path (lowest cost) when the switch forwards packets to the root switch. If the switch is a designated switch for the LAN from which the inferior BPDU was received. The port identifier (port priority and MAC address) associated with each Layer 2 interface. and so forth). the switch with the lowest MAC address in the VLAN becomes the root switch. active spanning-tree topology of a switched network is controlled by these elements:
• • •
The unique bridge ID (switch priority and MAC address) associated with each VLAN on each switch. Each switch sends a configuration BPDU through all of its ports. The port through which the designated switch is attached to the LAN is called the designated port. it discards the BPDU.
• • •
A root port is selected for each switch (except the root switch). as shown in Table 15-1 on page 15-4.
All paths that are not needed to reach the root switch from anywhere in the switched network are placed in the spanning-tree blocking mode. it stores the information for that port. forward delay. it sends that LAN a BPDU containing the up-to-date information stored for that port. The BPDUs communicate and compute the spanning-tree topology. In this way. lower path cost. inferior information is discarded. A designated switch for each LAN segment is selected. The switch priority value occupies the most significant bits of the bridge ID. the switch with the highest switch priority (the lowest numerical priority value) is elected as the root switch. each functions as the root switch. The spanning-tree path cost to the root switch. A BPDU exchange results in these actions: One switch in the network is elected as the root switch (the logical center of the spanning-tree topology in a switched network).
When the switches in a network are powered up.Chapter 15
Configuring STP Understanding Spanning-Tree Features
Spanning-Tree Topology and BPDUs
The stable. The shortest distance to the root switch is calculated for each switch based on the path cost. For each VLAN.

Chapter 15 Understanding Spanning-Tree Features
Configuring STP
Bridge ID. the same switch must have as many different bridge IDs as VLANs configured on it. The Catalyst 3560 switch supports the 802.1T spanning-tree extensions. and Extended System ID
The IEEE 802.
Catalyst 3560 Switch Software Configuration Guide
15-4
78-16156-01
. As shown in Table 15-1. The result is that fewer MAC addresses are reserved for the switch. the switch priority. see the “Configuring the Root Switch” section on page 15-14. Listening—The first transitional state after the blocking state when the spanning tree determines that the interface should participate in frame forwarding. Learning—The interface prepares to participate in frame forwarding. Interfaces must wait for new topology information to propagate through the switched LAN before starting to forward frames. no link on the port. Configuring a higher value decreases the probability.
Table 15-1 Switch Priority Value and Extended System ID
Switch Priority Value Bit 16 32768 Bit 15 16384 Bit 14 8192 Bit 13 4096
Extended System ID (Set Equal to the VLAN ID) Bit 12 2048 Bit 11 1024 Bit 10 512 Bit 9 256 Bit 8 128 Bit 7 64 Bit 6 32 Bit 5 16 Bit 4 8 Bit 3 4 Bit 2 2 Bit 1 1
Spanning tree uses the extended system ID. and a larger range of VLAN IDs can be supported. They must allow the frame lifetime to expire for forwarded frames that have used the old topology. Disabled—The interface is not participating in spanning tree because of a shutdown port. Switch Priority. the “Configuring a Secondary Root Switch” section on page 15-16. For example. topology changes can take place at different times and at different places in a switched network. and the remaining six bytes are derived from the switch MAC address. Forwarding—The interface forwards frames. The two most-significant bytes are used for the switch priority. Each Layer 2 interface on a switch using spanning tree exists in one of these states:
• • • • •
Blocking—The interface does not participate in frame forwarding. all while maintaining the uniqueness of the bridge ID. and the “Configuring the Switch Priority of a VLAN” section on page 15-19.
Spanning-Tree Interface States
Propagation delays can occur when protocol information passes through a switched LAN. When an interface transitions directly from nonparticipation in the spanning-tree topology to the forwarding state. As a result. and some of the bits previously used for the switch priority are now used as the VLAN identifier. when you change the switch priority value. the secondary root switch. a lower value increases the probability. Each VLAN on the switch has a unique 8-byte bridge ID. Support for the extended system ID affects how you manually configure the root switch. For more information. which controls the selection of the root switch.1D standard requires that each switch has an unique bridge identifier (bridge ID). or no spanning-tree instance running on the port. Because each VLAN is considered as a different logical bridge with PVST+ and rapid PVST+. you change the probability that the switch will be elected as the root switch. and the allocated spanning-tree MAC address to make the bridge ID unique for each VLAN. and the switch priority of a VLAN. the two bytes previously used for the switch priority are reallocated into a 4-bit priority value and a 12-bit extended system ID value equal to the VLAN ID. it can create temporary data loops.

2. In the learning state. it moves the interface to the learning state and resets the forward-delay timer. While spanning tree waits the forward-delay timer to expire. spanning tree is enabled by default.
The interface is in the listening state while spanning tree waits for protocol information to transition the interface to the blocking state. where both learning and frame forwarding are enabled. spanning tree moves the interface to the forwarding state. 3. When the forward-delay timer expires. Spanning tree stabilizes each interface at the forwarding or blocking state. or network goes through the blocking state and the transitory states of listening and learning.
43569
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
15-5
. this process occurs:
1. and every interface in the switch. When the spanning-tree algorithm places a Layer 2 interface in the forwarding state.
Figure 15-1 Spanning-Tree Interface States
Power-on initialization Blocking state Listening state Learning state Forwarding state
Disabled state
When you power up the switch. 4.Chapter 15
Configuring STP Understanding Spanning-Tree Features
An interface moves through these states:
• • • • •
From initialization to blocking From blocking to listening or to disabled From listening to learning or to disabled From learning to forwarding or to disabled From forwarding to disabled
Figure 15-1 illustrates how an interface moves through the states. the interface continues to block frame forwarding as the switch learns end-station location information for the forwarding database. VLAN.

Chapter 15 Understanding Spanning-Tree Features
Configuring STP
Blocking State
A Layer 2 interface in the blocking state does not participate in frame forwarding. The interface enters the forwarding state from the learning state. A switch initially functions as the root until it exchanges BPDUs with other switches. The interface enters this state when the spanning tree determines that the interface should participate in frame forwarding. and the interface moves to the listening state. the forward-delay timer expires. An interface in the learning state performs these functions:
• • • •
Discards frames received on the interface Discards frames switched from another interface for forwarding Learns addresses Receives BPDUs
Forwarding State
A Layer 2 interface in the forwarding state forwards frames. An interface always enters the blocking state after switch initialization. An interface in the blocking state performs these functions:
• • • •
Discards frames received on the interface Discards frames switched from another interface for forwarding Does not learn addresses Receives BPDUs
Listening State
The listening state is the first state a Layer 2 interface enters after the blocking state. The interface enters the learning state from the listening state. An interface in the listening state performs these functions:
• • • •
Discards frames received on the interface Discards frames switched from another interface for forwarding Does not learn addresses Receives BPDUs
Learning State
A Layer 2 interface in the learning state prepares to participate in frame forwarding. a BPDU is sent to each switch interface. This exchange establishes which switch in the network is the root or root switch. If there is only one switch in the network. An interface in the forwarding state performs these functions:
• • • •
Receives and forwards frames received on the interface Forwards frames switched from another interface Learns addresses Receives BPDUs
Catalyst 3560 Switch Software Configuration Guide
15-6
78-16156-01
. After initialization. no exchange occurs.

Chapter 15
Configuring STP Understanding Spanning-Tree Features
Disabled State
A Layer 2 interface in the disabled state does not participate in frame forwarding or in the spanning tree. Switch A is elected as the root switch because the switch priority of all the switches is set to the default (32768) and Switch A has the lowest MAC address. By increasing the priority (lowering the numerical value) of the ideal switch so that it becomes the root switch. number of forwarding interfaces. An interface in the disabled state is nonoperational. The goal is to make the fastest link the root port. Network traffic might be more efficient over the Gigabit Ethernet link. the switch with the lowest MAC address becomes the root switch. However. For instance. connecting higher-speed links to an interface that has a higher number than the root port can cause a root-port change. Switch A might not be the ideal root switch. assume that one port on Switch B is a Gigabit Ethernet link and that another port on Switch B (a 10/100 link) is the root port. the path between source and destination end stations in a switched network might not be ideal. or link types. you force a spanning-tree recalculation to form a new topology with the ideal switch as the root. In Figure 15-2. For example. the Gigabit Ethernet port becomes the new root port.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
15-7
. because of traffic patterns. A disabled interface performs these functions:
• • • •
Discards frames received on the interface Discards frames switched from another interface for forwarding Does not learn addresses Does not receive BPDUs
How a Switch or Port Becomes the Root Switch or Root Port
If all switches in a network are enabled with default spanning-tree settings.
Figure 15-2 Spanning-Tree Topology
DP DP DP RP B RP = Root Port DP = Designated Port RP C A DP RP DP
86475
D
When the spanning-tree topology is calculated based on default parameters. By changing the spanning-tree port priority on the Gigabit Ethernet port to a higher priority (lower numerical value) than the root port.

1D specifies 17 multicast addresses.
Accelerated Aging to Retain Connectivity
The default for aging dynamic addresses is 5 minutes. the port priority and port ID are added together. the switch forwards those packets as unknown multicast addresses. ranging from 0x00180C2000000 to 0x0180C2000010.
Figure 15-3 Spanning Tree and Redundant Connectivity
Workstations
You can also create redundant links between switches by using EtherChannel groups. as shown in Figure 15-3. the address-aging time is accelerated so that station addresses can be dropped from the address table and then relearned. Spanning tree automatically disables one interface but enables it if the other one fails. However. each switch receives but does not forward packets destined for addresses between 0x0180C2000000 and 0x0180C200000F. and spanning tree disables the link with the lowest value. see the Chapter 29.”
Spanning-Tree Address Management
IEEE 802. If spanning tree is disabled. If spanning tree is enabled. the low-speed link is always disabled. Regardless of the spanning-tree state. the CPU on the switch receives packets destined for 0x0180C2000000 and 0x0180C2000010. If one link is high-speed and the other is low-speed. The accelerated aging is the same as the forward-delay parameter value (spanning-tree vlan vlan-id forward-time seconds global configuration command) when the spanning tree reconfigures.
Catalyst 3560 Switch Software Configuration Guide
15-8
101226
Active link Blocked link
78-16156-01
. These addresses are static addresses that cannot be removed. a spanning-tree reconfiguration can cause many station locations to change.Chapter 15 Understanding Spanning-Tree Features
Configuring STP
Spanning Tree and Redundant Connectivity
You can create a redundant backbone with spanning tree by connecting two switch interfaces to another device or to two different devices. “Configuring EtherChannels. For more information. Because these stations could be unreachable for 5 minutes or more during a reconfiguration. the default setting of the mac address-table aging-time global configuration command. to be used by different bridge protocols. If the speeds are the same.

You cannot run MSTP without RSTP. PVST+ uses a short aging time for dynamically learned MAC address entries. see Chapter 16. see the next section. For more information.1D standard and Cisco proprietary extensions. You can create different logical topologies by using the VLANs on your network to ensure that all of your links are used but that no one link is oversubscribed. Because each switch has the same information about the network. each VLAN runs its own spanning-tree instance up to the maximum supported.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
15-9
. and the switch needs only minimal extra configuration. which reduces the number of spanning-tree instances required to support a large number of VLANs. “Configuring MSTP. which provides for rapid convergence of the spanning tree by eliminating the forward delay and by quickly transitioning root ports and designated ports to the forwarding state. see the “Spanning-Tree Configuration Guidelines” section on page 15-12. this process ensures that the network topology is maintained. and Gigabit Ethernet port-based VLANs.
•
MSTP—This spanning-tree mode is based on the IEEE 802. the switch supports up to 128 spanning-tree instances. In rapid-PVST+ mode.
Spanning-Tree Modes and Protocols
The switch supports these spanning-tree modes and protocols:
•
PVST+—This spanning-tree mode is based on the IEEE 802. For information about how spanning tree interoperates with the VLAN Trunking Protocol (VTP). the rapid PVST+ immediately deletes dynamically learned MAC address entries on a per-port basis upon receiving a topology change. You can map multiple VLANs to the same spanning-tree instance. the switch accelerates aging on a per-VLAN basis. The number of VLANs that can be mapped to a particular MST instance is unlimited. A spanning-tree reconfiguration on one VLAN can cause the dynamic addresses learned on that VLAN to be subject to accelerated aging.1W standard. The PVST+ provides Layer 2 load balancing for the VLAN on which it runs.
Supported Spanning-Tree Instances
In PVST+ or rapid-PVST+ mode. ensuring that each has a loop-free path through the network. To provide rapid convergence. Each instance of PVST+ on a VLAN has a single root switch. The PVST+ runs on each VLAN on the switch up to the maximum supported.1W). This root switch propagates the spanning-tree information associated with that VLAN to all other switches in the network.Chapter 15
Configuring STP Understanding Spanning-Tree Features
Because each VLAN is a separate spanning-tree instance. Fast Ethernet.1S standard.”
For information about the number of supported spanning-tree instances.
•
Rapid PVST+—This spanning-tree mode is the same as PVST+ except that is uses a rapid convergence based on the IEEE 802. The benefit of rapid PVST+ is that you can migrate a large PVST+ install base to rapid PVST+ without having to learn the complexities of the MSTP configuration and without having to reprovision your network. The most common initial deployment of MSTP is in the backbone and distribution layers of a Layer 2 switched network. The MSTP runs on top of the RSTP (based on IEEE 802. The rapid PVST+ uses the same configuration as PVST+ (except where noted). By contrast. It is the default spanning-tree mode used on all Ethernet. Dynamic addresses on other VLANs can be unaffected and remain subject to the aging interval entered for the switch. In MSTP mode. the switch supports up to 16 MST instances.

The PVST+ switches should be at the edge of the network. However. see Chapter 12.1Q standard for VLAN trunks imposes some limitations on the spanning-tree strategy for a network. If rapid PVST+ is enabled. in a network of Cisco switches connected through 802.1Q trunks.1Q Trunks
The IEEE 802.”
Catalyst 3560 Switch Software Configuration Guide
15-10
78-16156-01
. the switch uses it instead of PVST+.1Q switch. the switches maintain one spanning-tree instance for each VLAN allowed on the trunks.1Q trunk.1Q switches. MSTP and Rapid-PVST+ Interoperability .1Q cloud separating the Cisco switches is treated as a single trunk link between the switches. all PVST+ or rapid-PVST+ information is maintained by Cisco switches separated by a cloud of non-Cisco 802.
Table 15-2 PVST+. In the rapid-PVST+ spanning-tree instances.Chapter 15 Understanding Spanning-Tree Features
Configuring STP
Spanning-Tree Interoperability and Backward Compatibility
Table 15-2 lists the interoperability and compatibility among the supported spanning-tree modes in a network.1Q trunks. The external spanning-tree behavior on access ports and Inter-Switch Link (ISL) trunk ports is not affected by PVST+. “Configuring VLANs. the common spanning-tree (CST) root must be inside the MST backbone. However. When a network contains switches running rapid PVST+ and switches running PVST+.
STP and IEEE 802.
PVST+ PVST+ MSTP Rapid PVST+ Yes Yes (with restrictions) Yes (reverts to PVST+)
MSTP Yes (with restrictions) Yes Yes (reverts to PVST+)
Rapid PVST+ Yes (reverts to PVST+) Yes (reverts to PVST+) Yes
In a mixed MSTP and PVST+ network. The standard requires only one spanning-tree instance for all VLANs allowed on the trunks. and no user configuration is required. the root switch must be a rapid-PVST+ switch. PVST+ is automatically enabled on 802. In the PVST+ instances. The switch combines the spanning-tree instance of the 802. The non-Cisco 802.1Q VLAN of the trunk with the spanning-tree instance of the non-Cisco 802. For more information on 802. the root switch must be a PVST+ switch. and a PVST+ switch cannot connect to multiple MST regions. we recommend that the rapid-PVST+ switches and PVST+ switches be configured for different spanning-tree instances. the Cisco switch uses PVST+ to provide spanning-tree interoperability.1Q trunks. When you connect a Cisco switch to a non-Cisco device through an 802.

Forward-delay time: 15 seconds. It is not absolutely necessary to run spanning tree on all switches in the VLAN. spanning tree must be running on enough switches to break all the loops in the network. 100 Mbps: 19. However.Chapter 15 Configuring Spanning-Tree Features
Configuring STP
Table 15-3 Default Spanning-Tree Configuration (continued)
Feature Spanning-tree port cost (configurable on a per-interface basis)
Default Setting 1000 Mbps: 4. the new VLAN is carried on all trunk ports. 10 Mbps: 100. you can map multiple VLANs to the same spanning-tree instances by using MSTP. particularly if there are several adjacent switches that have all run out of spanning-tree instances.
Catalyst 3560 Switch Software Configuration Guide
15-12
78-16156-01
.
Caution
Switches that are not running spanning tree still forward BPDUs that they receive so that the other switches on the VLAN that have a running spanning-tree instance can break loops. “Configuring MSTP. see Chapter 16. for example.
Spanning-Tree Configuration Guidelines
If more VLANs are defined in the VTP than there are spanning-tree instances. Use the no spanning-tree vlan vlan-id global configuration command to disable spanning tree on a specific VLAN. this could create a loop in the new VLAN that will not be broken.
Note
If you have already used all available spanning-tree instances on your switch. you can disable spanning tree on one of the VLANs and then enable it on the VLAN where you want it to run. 10 Mbps: 100.” If 128 instances of spanning tree are already in use. if you are running spanning tree only on a minimal set of switches. 1000 Mbps: 4.
Spanning-tree timers
Hello time: 2 seconds. at least one switch on each loop in the VLAN must be running spanning tree. However. and use the spanning-tree vlan vlan-id global configuration command to enable spanning tree on the desired VLAN. adding another VLAN anywhere in the VTP domain creates a VLAN that is not running spanning tree on that switch. Therefore. an incautious change to the network that introduces another loop into the VLAN can result in a broadcast storm. You can prevent this possibility by setting up allowed lists on the trunk ports of switches that have used up their allocation of spanning-tree instances. 100 Mbps: 19. Setting up allowed lists is not necessary in many cases and can make it more labor-intensive to add another VLAN to the network.
Spanning-tree VLAN port priority (configurable on a per-VLAN basis) Spanning-tree VLAN port cost (configurable on a per-VLAN basis)
128. you can enable PVST+ or rapid PVST+ on only 128 VLANs on the switch. If you have the default allowed list on the trunk ports of that switch. Depending on the topology of the network. Maximum-aging time: 20 seconds. For more information. The remaining VLANs operate with spanning tree disabled.

all VLANs run rapid PVST+. By default. VLANs. (For example. follow these steps to change the spanning-tree mode. Beginning in privileged EXEC mode. the switch runs the PVST+ protocol. If you want to enable a mode that is different from the default mode. this procedure is required. You create a spanning-tree instance when you assign an interface to a VLAN.) For information about the different spanning-tree modes and how they interoperate. restart the protocol migration process on the entire switch.
Step 3
interface interface-id
(Recommended for rapid-PVST+ mode only) Specify an interface to configure.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
15-13
. For more configuration steps. these parameters are applied when the spanning-tree instance is created. the switch negotiates with the remote port and rapidly transitions the local port to the forwarding state. The switch supports PVST+. You can configure switch and port parameters before a spanning-tree instance is created. see the “Spanning-Tree Interoperability and Backward Compatibility” section on page 15-10. and MSTP. (Recommended for rapid-PVST+ mode only) Specify that the link type for this port is point-to-point. but only one version can be active at any time. The port-channel range is 1 to 12. see Chapter 16. and enter interface configuration mode. Select mst to enable MSTP (and RSTP). The spanning-tree instance is removed when the last interface is moved to another VLAN.
Changing the Spanning-Tree Mode
The switch supports three spanning-tree modes: PVST+.Chapter 15
Configuring STP Configuring Spanning-Tree Features
Spanning-tree commands control the configuration of VLAN spanning-tree instances. or MSTP. rapid PVST+. or all VLANs run MSTP. Configure a spanning-tree mode. Valid interfaces include physical ports.” Select rapid-pvst to enable rapid PVST+. The VLAN ID range is 1 to 4094.1D switch. “Configuring MSTP. This step is optional if the designated switch detects that this switch is running rapid PVST+. Command
Step 1 Step 2
Purpose Enter global configuration mode.
• • •
configure terminal spanning-tree mode {pvst | mst | rapid-pvst}
Select pvst to enable PVST+ (the default setting). rapid PVST+.
Step 4
spanning-tree link-type point-to-point
Step 5 Step 6
end clear spanning-tree detected-protocols
Return to privileged EXEC mode. (Recommended for rapid-PVST+ mode only) If any port on the switch is connected to a port on a legacy 802. If you connect this port (local port) to a remote port through a point-to-point link and the local port becomes a designated port. and port channels. The UplinkFast and BackboneFast features are not supported with the rapid PVST+. all VLANs run PVST+.

Catalyst 3560 Switch Software Configuration Guide
15-14
78-16156-01
. follow these steps to disable spanning-tree on a per-VLAN basis. use the spanning-tree vlan vlan-id root global configuration command to modify the switch priority from the default value (32768) to a significantly lower value.
Command
Step 1 Step 2 Step 3 Step 4 Step 5
Purpose Enter global configuration mode. use the no spanning-tree link-type interface configuration command.
configure terminal no spanning-tree vlan vlan-id end show spanning-tree vlan vlan-id copy running-config startup-config
To re-enable spanning-tree.
Configuring the Root Switch
The switch maintains a separate spanning-tree instance for each active VLAN configured on it. A bridge ID. Return to privileged EXEC mode. To return the port to its default setting. Disable spanning tree only if you are sure there are no loops in the network topology. excessive traffic and indefinite packet duplication can drastically reduce network performance. the switch sets its own priority for the specified VLAN to 24576 if this value will cause this switch to become the root for the specified VLAN.Chapter 15 Configuring Spanning-Tree Features
Configuring STP
Command
Step 7
Purpose Verify your entries.
Caution
When spanning tree is disabled and loops are present in the topology. the range is 1 to 4094. the switch with the lowest bridge ID becomes the root switch for that VLAN. use the no spanning-tree mode global configuration command. consisting of the switch priority and the switch MAC address.
To return to the default setting. Beginning in privileged EXEC mode. (Optional) Save your entries in the configuration file. This procedure is optional.
show spanning-tree summary and show spanning-tree interface interface-id
Step 8
copy running-config startup-config
(Optional) Save your entries in the configuration file. Verify your entries. For vlan-id. Because of the extended system ID support. is associated with each instance.
Disabling Spanning Tree
Spanning tree is enabled by default on VLAN 1 and on all newly created VLANs up to the spanning-tree limit specified in the “Supported Spanning-Tree Instances” section on page 15-9. For each VLAN. To configure a switch to become the root for the specified VLAN. use the spanning-tree vlan vlan-id global configuration command. When you enter this command. the software checks the switch priority of the root switches for each VLAN.

The range is 1 to 10.
•
configure terminal spanning-tree vlan vlan-id root primary [diameter net-diameter [hello-time seconds]]
For vlan-id. specify the maximum number of switches between any two end stations. You can use the hello keyword to override the automatically calculated hello time. The extended system ID increases the switch priority value every time the VLAN number is greater than the priority of the connected switches running older software.)
Note
The spanning-tree vlan vlan-id root global configuration command fails if the value necessary to be the root switch is less than 1. Configure a switch to become the root for the specified VLAN.
Note
The root switch for each spanning-tree instance should be a backbone or distribution switch. or a series of VLANs separated by a comma. (Optional) For diameter net-diameter. Do not configure an access switch as the spanning-tree primary root.Chapter 15
Configuring STP Configuring Spanning-Tree Features
If any root switch for the specified VLAN has a switch priority lower than 24576. This procedure is optional. a range of VLANs separated by a hyphen.
Note
After configuring the switch as the root switch. which can significantly reduce the convergence time. forward-delay time.
Command
Step 1 Step 2
Purpose Enter global configuration mode. spanning-tree vlan vlan-id forward-time.
Note
If your network consists of switches that both do and do not support the extended system ID. and maximum-age time through the spanning-tree vlan vlan-id hello-time. the switch sets its own priority for the specified VLAN to 4096 less than the lowest switch priority.
•
•
Step 3
end
Return to privileged EXEC mode. and the spanning-tree vlan vlan-id max-age global configuration commands. follow these steps to configure a switch to become the root for the specified VLAN. you can specify a single VLAN identified by VLAN ID number. The range is 1 to 4094. The range is 2 to 7. forward-delay time. specify the interval in seconds between the generation of configuration messages by the root switch. it is unlikely that the switch with the extended system ID support will become the root switch. and maximum-age time for a network of that diameter. the switch automatically sets an optimal hello time.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
15-15
. Beginning in privileged EXEC mode. the default is 2. (4096 is the value of the least-significant bit of a 4-bit switch priority value as shown in Table 15-1 on page 15-4. we recommend that you avoid manually configuring the hello time. the maximum number of switch hops between any two end stations in the Layer 2 network). When you specify the network diameter. (Optional) For hello-time seconds. Use the diameter keyword to specify the Layer 2 network diameter (that is.

You can execute this command on more than one switch to configure multiple backup root switches. or a series of VLANs separated by a comma. follow these steps to configure a switch to become the secondary root for the specified VLAN.Chapter 15 Configuring Spanning-Tree Features
Configuring STP
Command
Step 4 Step 5
Purpose Verify your entries. The range is 1 to 4094. The range is 1 to 10.
Step 3 Step 4 Step 5
end show spanning-tree detail copy running-config startup-config
Return to privileged EXEC mode.
show spanning-tree detail copy running-config startup-config
To return to the default setting. This procedure is optional. See the “Configuring the Root Switch” section on page 15-14. Configure a switch to become the secondary root for the specified VLAN. (Optional) For diameter net-diameter. (Optional) For hello-time seconds. the switch priority is modified from the default value (32768) to 28672.
Configuring a Secondary Root Switch
When you configure a Catalyst 3560 switch as the secondary root.
•
•
Use the same network diameter and hello-time values that you used when configuring the primary root switch. The range is 2 to 7. you can specify a single VLAN identified by VLAN ID number. (Optional) Save your entries in the configuration file. specify the maximum number of switches between any two end stations. Beginning in privileged EXEC mode.
•
configure terminal spanning-tree vlan vlan-id root secondary [diameter net-diameter [hello-time seconds]]
For vlan-id. use the no spanning-tree vlan vlan-id root global configuration command. This is assuming that the other network switches use the default switch priority of 32768 and therefore are unlikely to become the root switch. use the no spanning-tree vlan vlan-id root global configuration command. specify the interval in seconds between the generation of configuration messages by the root switch.
To return to the default setting. The switch is then likely to become the root switch for the specified VLAN if the primary root switch fails. Command
Step 1 Step 2
Purpose Enter global configuration mode. Use the same network diameter and hello-time values that you used when you configured the primary root switch with the spanning-tree vlan vlan-id root primary global configuration command. the default is 2.
Catalyst 3560 Switch Software Configuration Guide
15-16
78-16156-01
. Verify your entries. (Optional) Save your entries in the configuration file. a range of VLANs separated by a hyphen.

The lower the number. 224. 16. 64. spanning tree puts the interface with the lowest interface number in the forwarding state and blocks the other interfaces. 176. 64.
Step 4
spanning-tree vlan vlan-id port-priority priority
Configure the port priority for a VLAN. 48. 96. Beginning in privileged EXEC mode. Valid values are 0. a range of VLANs separated by a hyphen. The range is 1 to 4094. The lower the number. All other values are rejected. the higher the priority. spanning tree uses the port priority when selecting an interface to put into the forwarding state.
Note
The show spanning-tree interface interface-id privileged EXEC command displays information only if the port is in a link-up operative state. in increments of 16. 80. You can assign higher priority values (lower numerical values) to interfaces that you want selected first and lower priority values (higher numerical values) that you want selected last. 192. 48. Command
Step 1 Step 2
Purpose Enter global configuration mode. 208. Specify an interface to configure. 144.
•
For vlan-id. you can specify a single VLAN identified by VLAN ID number. If all interfaces have the same priority value. 128. For priority. Otherwise. Verify your entries. 224. This procedure is optional. the range is 0 to 240. and 240. 32. 80. 160. Valid values are 0. 192. All other values are rejected.
configure terminal interface interface-id
Step 3
spanning-tree port-priority priority
Configure the port priority for an interface. 208. the higher the priority. 144. follow these steps to configure the port priority of an interface. 128. 176. 32. the default is 128. 16.
•
Step 5 Step 6
end show spanning-tree interface interface-id or show spanning-tree vlan vlan-id
Return to privileged EXEC mode. For priority. and enter interface configuration mode. you can use the show running-config interface privileged EXEC command to confirm the configuration. in increments of 16.
Step 7
copy running-config startup-config
(Optional) Save your entries in the configuration file.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
15-17
. 96. the default is 128. and 240.Chapter 15
Configuring STP Configuring Spanning-Tree Features
Configuring Port Priority
If a loop occurs. 112. 112. Valid interfaces include physical ports and port-channel logical interfaces (port-channel port-channel-number). 160. the range is 0 to 240. or a series of VLANs separated by a comma.

Configuring Path Cost
The spanning-tree path cost default value is derived from the media speed of an interface.
Catalyst 3560 Switch Software Configuration Guide
15-18
78-16156-01
. You can assign lower cost values to interfaces that you want selected first and higher cost values that you want selected last.
• Step 5 Step 6
end show spanning-tree interface interface-id or show spanning-tree vlan vlan-id
Return to privileged EXEC mode.
Step 7
copy running-config startup-config
(Optional) Save your entries in the configuration file. For information on how to configure load sharing on trunk ports by using spanning-tree port priorities. Verify your entries. If a loop occurs. Beginning in privileged EXEC mode. A lower path cost represents higher-speed transmission. spanning tree uses the path cost when selecting an interface to place into the forwarding state. the range is 1 to 200000000. For cost.
•
For vlan-id. follow these steps to configure the cost of an interface. If a loop occurs. spanning tree uses the path cost when selecting an interface to place into the forwarding state. If a loop occurs. and enter interface configuration mode. or a series of VLANs separated by a comma. the range is 1 to 200000000. This procedure is optional. you can specify a single VLAN identified by VLAN ID number. a range of VLANs separated by a hyphen.Chapter 15 Configuring Spanning-Tree Features
Configuring STP
To return to the default setting. spanning tree puts the interface with the lowest interface number in the forwarding state and blocks the other interfaces. If all interfaces have the same cost value. the default value is derived from the media speed of the interface. Configure the cost for an interface. Specify an interface to configure. the default value is derived from the media speed of the interface. see the “Configuring Trunk Ports for Load Sharing” section on page 12-24. use the no spanning-tree [vlan vlan-id] port-priority interface configuration command. The range is 1 to 4094. Command
Step 1 Step 2
Purpose Enter global configuration mode. A lower path cost represents higher-speed transmission. Valid interfaces include physical ports and port-channel logical interfaces (port-channel port-channel-number).
configure terminal interface interface-id
Step 3
spanning-tree cost cost
Step 4
spanning-tree vlan vlan-id cost cost
Configure the cost for a VLAN. For cost. spanning tree uses cost when selecting an interface to put in the forwarding state.

you can use the show running-config privileged EXEC command to confirm the configuration. and 61440. or a series of VLANs separated by a comma. For priority. This procedure is optional. the default is 32768. the more likely the switch will be chosen as the root switch. All other values are rejected. For most situations. 57344. Otherwise. 16384. Valid priority values are 4096.
•
Step 3 Step 4 Step 5
end show spanning-tree vlan vlan-id copy running-config startup-config
Return to privileged EXEC mode. you can specify a single VLAN identified by VLAN ID number. Beginning in privileged EXEC mode.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
15-19
. 36864. 20480.
To return to the default setting. 53248. The lower the number. see the “Configuring Trunk Ports for Load Sharing” section on page 12-24. we recommend that you use the spanning-tree vlan vlan-id root primary and the spanning-tree vlan vlan-id root secondary global configuration commands to modify the switch priority. 32768. For information on how to configure load sharing on trunk ports by using spanning-tree path costs.
•
configure terminal spanning-tree vlan vlan-id priority priority
For vlan-id.Chapter 15
Configuring STP Configuring Spanning-Tree Features
Note
The show spanning-tree interface interface-id privileged EXEC command displays information only for ports that are in a link-up operative state.
Configuring the Switch Priority of a VLAN
You can configure the switch priority and make it more likely that the switch will be chosen as the root switch. use the no spanning-tree [vlan vlan-id] cost interface configuration command.
Note
Exercise care when using this command. 8192. follow these steps to configure the switch priority of a VLAN. 12288. Verify your entries. 49152. 28672. a range of VLANs separated by a hyphen. 45056. use the no spanning-tree vlan vlan-id priority global configuration command. The range is 1 to 4094. Configure the switch priority of a VLAN. To return to the default setting. the range is 0 to 61440 in increments of 4096. 40960.
Command
Step 1 Step 2
Purpose Enter global configuration mode. (Optional) Save your entries in the configuration file. 24576.

The hello time is the interval between the generation of configuration messages by the root switch. we recommend that you use the spanning-tree vlan vlan-id root primary and the spanning-tree vlan vlan-id root secondary global configuration commands to modify the hello time.
Note
Exercise care when using this command.
Catalyst 3560 Switch Software Configuration Guide
15-20
78-16156-01
. For most situations. the default is 2. The sections that follow provide the configuration steps. a range of VLANs separated by a hyphen. These messages mean that the switch is alive. (Optional) Save your entries in the configuration file.Chapter 15 Configuring Spanning-Tree Features
Configuring STP
Configuring Spanning-Tree Timers
Table 15-4 describes the timers that affect the entire spanning-tree performance.
• Step 3 Step 4 Step 5
end show spanning-tree vlan vlan-id copy running-config startup-config
Return to privileged EXEC mode. Controls how long each of the listening and learning states last before the interface begins forwarding. The range is 1 to 4094. or a series of VLANs separated by a comma. the range is 1 to 10.
Command
Step 1 Step 2
Purpose Enter global configuration mode. Configure the hello time of a VLAN. Beginning in privileged EXEC mode. follow these steps to configure the hello time of a VLAN.
To return to the default setting. use the no spanning-tree vlan vlan-id hello-time global configuration command. Verify your entries. you can specify a single VLAN identified by VLAN ID number. For seconds.
Configuring the Hello Time
You can configure the interval between the generation of configuration messages by the root switch by changing the hello time.
•
configure terminal spanning-tree vlan vlan-id hello-time seconds
For vlan-id. Controls the amount of time the switch stores protocol information received on an interface.
Table 15-4 Spanning-Tree Timers
Variable Hello timer Forward-delay timer Maximum-age timer
Description Controls how often the switch broadcasts hello messages to other switches. This procedure is optional.

This procedure is optional.
To return to the default setting. For seconds. you can specify a single VLAN identified by VLAN ID number. Command
Step 1 Step 2
Purpose Enter global configuration mode. a range of VLANs separated by a hyphen.
•
configure terminal spanning-tree vlan vlan-id forward-time seconds
For vlan-id. use the no spanning-tree vlan vlan-id forward-time global configuration command. Configure the forward time of a VLAN. the range is 4 to 30.Chapter 15
Configuring STP Configuring Spanning-Tree Features
Configuring the Forwarding-Delay Time for a VLAN
Beginning in privileged EXEC mode. the default is 20. use the no spanning-tree vlan vlan-id max-age global configuration command. This procedure is optional.
To return to the default setting. or a series of VLANs separated by a comma.
Configuring the Maximum-Aging Time for a VLAN
Beginning in privileged EXEC mode. Verify your entries.
• Step 3 Step 4 Step 5
end show spanning-tree vlan vlan-id copy running-config startup-config
Return to privileged EXEC mode. Verify your entries. follow these steps to configure the maximum-aging time for a VLAN. For seconds. The range is 1 to 4094. you can specify a single VLAN identified by VLAN ID number.
• Step 3 Step 4 Step 5
end show spanning-tree vlan vlan-id copy running-config startup-config
Return to privileged EXEC mode. follow these steps to configure the forwarding-delay time for a VLAN. Configure the maximum-aging time of a VLAN. the default is 15. or a series of VLANs separated by a comma.
•
configure terminal spanning-tree vlan vlan-id max-age seconds
For vlan-id. Command
Step 1 Step 2
Purpose Enter global configuration mode. The maximum-aging time is the number of seconds a switch waits without receiving spanning-tree configuration messages before attempting a reconfiguration. (Optional) Save your entries in the configuration file. (Optional) Save your entries in the configuration file. The forward delay is the number of seconds an interface waits before changing from its spanning-tree learning and listening states to the forwarding state. a range of VLANs separated by a hyphen. The range is 1 to 4094. the range is 6 to 40.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
15-21
.

You can clear spanning-tree counters by using the clear spanning-tree [interface interface-id] privileged EXEC command. Displays a detailed summary of interface information. For information about other keywords for the show spanning-tree privileged EXEC command. use one or more of the privileged EXEC commands in Table 15-5:
Table 15-5 Commands for Displaying Spanning-Tree Status
Command show spanning-tree active show spanning-tree detail show spanning-tree interface interface-id show spanning-tree summary [totals]
Purpose Displays spanning-tree information on active interfaces only. refer to the command reference for this release.Chapter 15 Displaying the Spanning-Tree Status
Configuring STP
Displaying the Spanning-Tree Status
To display the spanning-tree status.
Catalyst 3560 Switch Software Configuration Guide
15-22
78-16156-01
. Displays a summary of interface states or displays the total lines of the STP state section. Displays spanning-tree information for the specified interface.

When the switch is in the multiple spanning-tree (MST) mode. This deployment provides the highly available network required in a service-provider environment. refer to the command reference for this release. Both MSTP and RSTP improve the spanning-tree operation and maintain backward compatibility with equipment that is based on the (original) 802. the Rapid Spanning Tree Protocol (RSTP). page 16-2 Understanding RSTP.” For information about other spanning-tree features such as Port Fast. which is based on IEEE 802.”
Note
For complete syntax and usage information for the commands used in this chapter. The MSTP enables multiple VLANs to be mapped to the same spanning-tree instance. page 16-6 Configuring MSTP Features. The MSTP provides for multiple forwarding paths for data traffic and enables load balancing. see Chapter 15.1S Multiple STP (MSTP) on the Catalyst 3560 switch. and with existing Cisco per-VLAN spanning-tree plus (PVST+) and rapid per-VLAN spanning-tree plus (rapid PVST+). is automatically enabled. “Configuring STP. and so forth. page 16-11 Displaying the MST Configuration and Status. This chapter consists of these sections:
• • • •
Understanding MSTP. page 16-23
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
16-1
. UplinkFast. The RSTP provides rapid convergence of the spanning tree through explicit handshaking that eliminates the IEEE 802. see Chapter 17.1D forwarding delay and quickly transitions root ports and designated ports to the forwarding state. The most common initial deployment of MSTP is in the backbone and distribution layers of a Layer 2 switched network. For information about PVST+ and rapid PVST+. root guard.1W.1D spanning tree. It improves the fault tolerance of the network because a failure in one instance (forwarding path) does not affect other instances (forwarding paths). “Configuring Optional Spanning-Tree Features. with existing Cisco-proprietary Multiple Instance STP (MISTP). thereby reducing the number of spanning-tree instances needed to support a large number of VLANs.C H A P T E R
16
Configuring MSTP
This chapter describes how to configure the Cisco implementation of the IEEE 802.

You configure the switch for a region by using the spanning-tree mst configuration global configuration command. see the “Configuring MSTP Features” section on page 16-11.
Multiple Spanning-Tree Regions
For switches to participate in multiple spanning-tree (MST) instances. From this mode. the revision number. A collection of interconnected switches that have the same MST configuration comprises an MST region as shown in Figure 16-1 on page 16-4. and set the revision number by using the revision MST configuration command. which uses RSTP for rapid convergence. You can assign a VLAN to only one spanning-tree instance at a time. CIST. with each instance having a spanning-tree topology independent of other spanning-tree instances. after which the switch enters the MST configuration mode. page 16-5 “Interoperability with 802.Chapter 16 Understanding MSTP
Configuring MSTP
Understanding MSTP
MSTP. page 16-2 IST.
Catalyst 3560 Switch Software Configuration Guide
16-2
78-16156-01
. but each region can support up to 16 spanning-tree instances. and the MST VLAN-to-instance assignment map. This architecture provides multiple forwarding paths for data traffic. A region can have one member or multiple members with the same MST configuration. you can map VLANs to an MST instance by using the instance MST configuration command. The MST configuration controls to which MST region each switch belongs. enables VLANs to be grouped into a spanning-tree instance. enables load balancing.1D STP” section on page 16-5
For configuration information. specify the region name by using the name MST configuration command. and reduces the number of spanning-tree instances required to support a large number of VLANs. These sections describe how the MSTP works:
• • • • •
Multiple Spanning-Tree Regions. each member must be capable of processing RSTP bridge protocol data units (BPDUs). page 16-3 Hop Count. and CST. you must consistently configure the switches with the same MST configuration information. page 16-5 Boundary Ports. The configuration includes the name of the region. There is no limit to the number of MST regions in a network.

it sends BPDUs claiming itself as the root of the CST and the IST master. even if regions A and B are interconnected. which is the switch within the region with the lowest bridge ID and path cost to the CST root. Because the MSTP BPDU carries information for all instances. it relinquishes its claim as the IST master. with both of the path costs to the CST root and to the IST master set to zero. such as root switch ID. By default. the MSTP establishes and maintains two types of spanning trees:
•
An internal spanning tree (IST). 802. The CIST inside an MST region is the same as the CST outside a region. Therefore. and 802. root path cost. MST instance 1 in region A is independent of MST instance 1 in region B. The CIST is formed as a result of the spanning-tree algorithm running between switches that support the 802. for example. All MST instances within the same region share the same protocol timers.1D protocols. and so forth) than currently stored for the port. When the IST converges. see the “Operations Within an MST Region” section on page 16-3 and the “Operations Between MST Regions” section on page 16-4. each with its own IST master. The IST master also is the CST root if there is only one region within the network. all VLANs are assigned to the IST. If the CST root is outside the region. As switches receive superior IST information. except for the one that contains the true IST master. Instance 0 is a special instance for a region. During initialization.
For more information. Thus all subregions shrink. If the switch receives superior MST root information (lower bridge ID. they leave their old subregions and join the new subregion that might contain the true IST master. the root of the IST becomes the IST master (shown in Figure 16-1 on page 16-4). known as the internal spanning tree (IST). one of the MSTP switches at the boundary of the region is selected as the IST master. a region might have many subregions. the MSTP maintains multiple spanning-tree instances. The spanning tree computed in a region appears as a subtree in the CST that encompasses the entire switched domain.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
16-3
. The switch also initializes all of its MST instances and claims to be the root for all of them.1W.Chapter 16
Configuring MSTP Understanding MSTP
IST. Within each MST region. lower path cost. all of the other spanning-tree instance information is contained in M-records. which are encapsulated within MSTP BPDUs. and so forth. and the common spanning tree (CST) that interconnects the MST regions and single spanning trees. An MST instance is local to the region. CIST. and CST
Unlike PVST+ and rapid PVST+ in which all the spanning-tree instances are independent.
Operations Within an MST Region
The IST connects all the MSTP switches in a region. any two switches in the region synchronize their port roles for an MST instance only if they converge to a common IST master.1S. which is the spanning tree that runs in an MST region. the number of BPDUs that need to be processed by a switch to support multiple spanning-tree instances is significantly reduced. but each MST instance has its own topology parameters.
•
A common and internal spanning tree (CIST). The IST is the only spanning-tree instance that sends and receives BPDUs. For correct operation. all switches in the MST region must agree on the same IST master. which is a collection of the ISTs in each MST region. All other MST instances are numbered from 1 to 15. When an MSTP switch initializes.

The RSTP runs in all regions. Parameters related to the spanning-tree topology (for example. port VLAN priority) can be configured on both the CST instance and the MST instance.1D switches. IST Masters. MSTP switches use version 3 RSTP BPDUs or 802. with the root of the subtree being the IST master. forward time.1D MST Region 1
B
IST master
C
IST master
Figure 16-1 does not show additional MST instances for each region. switch priority. the spanning-tree parameters related to BPDU transmission (for example.1D switch (D).Chapter 16 Understanding MSTP
Configuring MSTP
Operations Between MST Regions
If there are multiple regions or legacy 802. The IST master for region 1 (A) is also the CST root. Because of this. Figure 16-1 shows a network with three MST regions and a legacy 802.1D STP BPDUs to communicate with legacy 802. port VLAN cost. and MST instances add their spanning-tree information into the BPDUs to interact with neighboring switches and compute the final spanning-tree topology.
Catalyst 3560 Switch Software Configuration Guide
16-4
78-16156-01
88762
MST Region 2
MST Region 3
. hello time. Only the CST instance sends and receives BPDUs. MSTP switches use MSTP BPDUs to communicate with MSTP switches. Note that the topology of MST instances can be different from that of the IST for the same region. and the CST Root
A IST master and CST root
D Legacy 802. which includes all MST regions and all legacy STP switches in the network. max-age.
Figure 16-1 MST Regions. The MST instances combine with the IST at the boundary of the region to become the CST.1D switches within the network. The IST connects all the MSTP switches in the region and appears as a subtree in the CST that encompasses the entire switched domain. and max-hops) are configured only on the CST instance but affect all MST instances. MSTP establishes and maintains the CST. The IST master for region 2 (B) and the IST master for region 3 (C) are the roots for their respective subtrees within the CST. The MST region appears as a virtual switch to adjacent STP switches and MST regions.

and their state is forced to be the same as the IST port state (MST ports at the boundary are in the forwarding state only when the IST port is forwarding). If a boundary port with the IST root or designated port role receives a topology change notice external to the MST cloud. When the count reaches zero.1D switches. The hop count achieves the same result as the message-age information (trigger a reconfiguration). the MSTP switch triggers a topology change in the IST instance and in all the MST instances active on that port. or to another MST region with a different MST configuration. Instead. it is forwarding in all MST instances. an MSTP BPDU (version 3) associated with a different region. The MST ports wait another forward-delay time before transitioning to the forwarding state. or an RSTP BPDU (version 2).1D BPDUs on that port.
Boundary Ports
A boundary port is a port that connects an MST region to a single spanning-tree region running RSTP. If the boundary port is on a point-to-point link and it is the IST root port. An IST port at the boundary can have any port role except a backup port role. and a topology change is triggered. and the same values are propagated by the region’s designated ports at the boundary. By using the spanning-tree mst max-hops global configuration command. the switch discards the BPDU and ages the information held for the port. An MSTP switch also can detect that a port is at the boundary of a region when it receives a legacy BPDU. A boundary port also connects to a LAN. If a boundary port transitions to the forwarding state in an IST instance.
Interoperability with 802. the MST ports wait in the blocking state for the forward-delay time to expire before transitioning to the learning state. it sends only 802. On a shared boundary link.Chapter 16
Configuring MSTP Understanding MSTP
Hop Count
The IST and MST instances do not use the message-age and maximum-age information in the configuration BPDU to compute the spanning-tree topology. The root switch of the instance always sends a BPDU (or M-record) with a cost of 0 and the hop count set to the maximum value. At the boundary. If the IST port is a designated port on a point-to-point link and if the IST port transitions to the forwarding state because of an agreement received from its peer port.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
16-5
.1D configuration BPDU (a BPDU with the protocol version set to 0). the roles of the MST ports do not matter. The message-age and maximum-age information in the RSTP portion of the BPDU remain the same throughout the region. you can configure the maximum hops inside the region and apply it to the IST and all MST instances in that region. the designated switch of which is either a single spanning-tree switch or a switch with a different MST configuration.1D STP
A switch running MSTP supports a built-in protocol migration mechanism that enables it to interoperate with legacy 802. When a switch receives this BPDU. the MST ports also immediately transition to the forwarding state. to a single spanning-tree region running PVST+ or rapid PVST+. it decrements the received remaining hop count by one and propagates this value as the remaining hop count in the BPDUs it generates. they use the path cost to the root and a hop-count mechanism similar to the IP time-to-live (TTL) mechanism. the MST ports transition to the forwarding state as soon as the IST port transitions to the forwarding state. If this switch receives a legacy 802.

A backup port can exist only when two ports are connected together in a loopback by a point-to-point link or when a switch has two or more connections to a shared LAN segment. These section describes how the RSTP works:
• • • •
Port Roles and the Active Topology. a switch might continue to assign a boundary role to a port when the switch to which this switch is connected has joined the region. the switch does not automatically revert to the MSTP mode if it no longer receives 802. A port with the alternate or backup port role is excluded from the active topology. they can process MSTP BPDUs as if they are RSTP BPDUs. Designated port—Connects to the designated switch. The port through which the designated switch is attached to the LAN is called the designated port.
Port Roles and the Active Topology
The RSTP provides rapid convergence of the spanning tree by assigning port roles and by learning the active topology.Chapter 16 Understanding RSTP
Configuring MSTP
However. page 16-7 Synchronization of Port Roles. Also. page 16-8 Bridge Protocol Data Unit Format and Processing.
• •
•
A port with the root or a designated port role is included in the active topology. page 16-6 Rapid Convergence.
Understanding RSTP
The RSTP takes advantage of point-to-point wiring and provides rapid convergence of the spanning tree. A boundary port connects to a LAN. the designated switch of which is either a single spanning-tree switch or a switch with a different MST configuration. MSTP switches send either a version 0 configuration and TCN BPDUs or version 3 MSTP BPDUs on a boundary port. which is critical for networks carrying delay-sensitive traffic such as voice and video. see the “Configuring MSTP Features” section on page 16-11.1D spanning tree).1D BPDUs because it cannot detect whether the legacy switch has been removed from the link unless the legacy switch is the designated switch. which incurs the lowest path cost when forwarding packets from that LAN to the root switch. Reconfiguration of the spanning tree can occur in less than 1 second (in contrast to 50 seconds with the default settings in the 802. Backup port—Acts as a backup for the path provided by a designated port toward the leaves of the spanning tree. use the clear spanning-tree detected-protocols privileged EXEC command. Disabled port—Has no role within the operation of the spanning tree. Therefore. Then the RSTP assigns one of these port roles to individual ports:
• •
Root port—Provides the best path (lowest cost) when the switch forwards packets to the root switch. The RSTP builds upon the IEEE 802.1D STP to select the switch with the highest switch priority (lowest numerical priority value) as the root switch as described in the “Spanning-Tree Topology and BPDUs” section on page 15-3. Alternate port—Offers an alternate path toward the root switch to that provided by the current root port.
Catalyst 3560 Switch Software Configuration Guide
16-6
78-16156-01
. To restart the protocol migration process (force the renegotiation with neighboring switches). If all the legacy switches on the link are RSTP switches. page 16-9
For configuration information.

Rapid Convergence
The RSTP provides for rapid recovery of connectivity following the failure of a switch. Switch A also immediately transitions its designated port to the forwarding state. the edge port immediately transitions to the forwarding state. Switch B selects as its new root port the port from which the proposal message was received. Switch A is connected to Switch B through a point-to-point link. and you should enable it only on ports that connect to a single end station. It provides rapid convergence for edge ports. and ports connected through point-to-point links as follows:
•
Edge ports—If you configure a port as an edge port on an RSTP switch by using the spanning-tree portfast interface configuration command.1D and RSTP port states. Point-to-point links—If you connect a port to another port through a point-to-point link and the local port becomes a designated port.
Table 16-1 Port State Comparison
Operational Status Enabled Enabled Enabled Enabled Disabled
STP Port State (802. it negotiates a rapid transition with the other port by using the proposal-agreement handshake to ensure a loop-free topology. Root ports—If the RSTP selects a new root port.
• •
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
16-7
. The port state controls the operation of the forwarding and learning processes. or a LAN.Chapter 16
Configuring MSTP Understanding RSTP
In a stable topology with consistent port roles throughout the network. it blocks the old root port and immediately transitions the new root port to the forwarding state. After receiving Switch B’s agreement message. a switch port.1D) Blocking Listening Learning Forwarding Disabled
RSTP Port State Discarding Discarding Learning Forwarding Discarding
Is Port Included in the Active Topology? No No Yes Yes No
To be consistent with Cisco STP implementations. and all of the ports are in the blocking state. An edge port is the same as a Port Fast-enabled port. No loops in the network are formed because Switch B blocked all of its nonedge ports and because there is a point-to-point link between Switches A and B. the RSTP ensures that every root port and designated port immediately transition to the forwarding state while all alternate and backup ports are always in the discarding state (equivalent to blocking in 802. Assume that the priority of Switch A is a smaller numerical value than the priority of Switch B. new root ports. and sends an agreement message (a BPDU with the agreement flag set) through its new root port. Table 16-1 provides a comparison of 802. As shown in Figure 16-2. forces all nonedge ports to the blocking state.1D). Designated ports start in the listening state. this guide documents the port state as blocking instead of discarding. proposing itself as the designated switch. Switch A sends a proposal message (a configuration BPDU with the proposal flag set) to Switch B. After receiving the proposal message.

a half-duplex port is considered to have a shared connection. An individual port on the switch is synchronized if
• •
That port is in the blocking state. it transitions to the blocking state when the RSTP forces it to synchronize with new root information. It is an edge port (a port configured to be at the edge of the network).
Catalyst 3560 Switch Software Configuration Guide
16-8
88760
78-16156-01
. You can override the default setting that is controlled by the duplex setting by using the spanning-tree link-type interface configuration command. the RSTP immediately transitions the port states to forwarding. this proposal-agreement handshaking progresses from the root toward the leaves of the spanning tree. a similar set of handshaking messages are exchanged. As the network converges.
Figure 16-2 Proposal and Agreement Handshaking for Rapid Convergence
Switch A
Proposal
Switch B
Root F DP Root F DP Root F DP
Agreement
Designated switch F RP Designated switch F RP Designated switch F RP F DP Switch C
Proposal
Agreement
F RP
DP = designated port RP = root port F = forwarding
Synchronization of Port Roles
When the switch receives a proposal message on one of its ports and that port is selected as the new root port.
If a designated port is in the forwarding state and is not configured as an edge port. The sequence of events is shown in Figure 16-3. the switch sends an agreement message to the designated switch corresponding to its root port. one more switch joins the active topology. The switch is synchronized with superior root information received on the root port if all other ports are synchronized. its port state is set to blocking. the RSTP forces all other ports to synchronize with the new root information. when the RSTP forces a port to synchronize with root information and the port does not satisfy any of the above conditions. Switch C selects the port connected to Switch B as its root port. and both ends immediately transition to the forwarding state. The switch learns the link type from the port duplex mode: a full-duplex port is considered to have a point-to-point connection. After ensuring all of the ports are synchronized. When the switches connected by a point-to-point link are in agreement about their port roles.Chapter 16 Understanding RSTP
Configuring MSTP
When Switch C is connected to Switch B. With each iteration of this handshaking process. In general.

higher path cost. The RSTP BPDUs never have the TCA bit set. at which time the port transitions to the forwarding state. which uses TCN BPDUs. the RSTP does not use them. The learning and forwarding flags are set according to the state of the sending port.1D. and so forth than currently stored for the port) with a designated port role.1D switch and a configuration BPDU with the TCA bit set is received. RSTP sets the port to the blocking state but does not send the agreement message. lower path cost. the RSTP triggers a reconfiguration.1D in which any transition between the blocking and the forwarding state causes a topology change.Chapter 16 Understanding RSTP
Configuring MSTP
The RSTP does not have a separate topology change notification (TCN) BPDU. If the BPDU is an 802.1D) is active on a root port connected to an 802. Notification—Unlike 802. However. for interoperability with 802. The new root port requires twice the forward-delay time to transition to the forwarding state.1D BPDU. it immediately replies with its own information.
• •
Catalyst 3560 Switch Software Configuration Guide
16-10
78-16156-01
.
•
Detection—Unlike 802. RSTP forces all the other ports to synchronize. This behavior is only required to support 802.1D configuration BPDU with the TCA bit set. If the BPDU received is an RSTP BPDU with the proposal flag set. If the port is proposed and is selected as the new root port. it flushes the learned information on all of its nonedge ports except on those from which it received the TC notification. When an RSTP switch detects a topology change. the switch does not set the proposal flag and starts the forward-delay timer for the port. However. for 802. an RSTP switch processes and generates TCN BPDUs. the TC-while timer is reset.
Processing Inferior BPDU Information
If a designated port receives an inferior BPDU (higher bridge ID.1D switches.1D switches. Acknowledgement—When an RSTP switch receives a TCN message on a designated port from an 802.
Topology Changes
This section describes the differences between the RSTP and the 802. It uses the topology change (TC) flag to show the topology changes. only transitions from the blocking to the forwarding state cause a topology change with RSTP (only an increase in connectivity is considered a topology change). However.
Processing Superior BPDU Information
If a port receives superior root information (lower bridge ID. it replies with an 802.1D interoperability. and so forth) than currently stored for the port. the switch sends an agreement message after all of the other ports are synchronized.1D in handling spanning-tree topology changes. State changes on an edge port do not cause a topology change. if the TC-while timer (the same as the topology-change timer in 802.1D switch. the RSTP switch processes and generates TCN BPDUs. The designated port continues sending BPDUs with the proposal flag set until the forward-delay timer expires. If the superior information received on the port causes the port to become a backup or alternate port.

page 16-19 (optional) Configuring the Hello Time. However. page 16-22 (optional)
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
16-11
.Chapter 16
Configuring MSTP Configuring MSTP Features
•
Propagation—When an RSTP switch receives a TC message from another switch through a designated or root port. page 16-12 Specifying the MST Region Configuration and Enabling MSTP. page 16-16 (optional) Configuring Port Priority. page 16-13 (required) Configuring the Root Switch.1D BPDUs on a port and receives an RSTP BPDU after the timer has expired. it propagates the change to all of its nonedge. designated ports and to the root port (excluding the port on which it is received). page 16-17 (optional) Configuring Path Cost.
•
Configuring MSTP Features
These sections describe how to configure basic MSTP features:
• • • • • • • • • • • • • •
Default MSTP Configuration. the switch processes all BPDUs received on that port and ignores the protocol type.1D BPDU after the port’s migration-delay timer has expired. The switch starts the TC-while timer for all such ports and flushes the information learned on them. RSTP selectively sends 802. If the switch receives an 802.1D switches. page 16-20 (optional) Configuring the Maximum-Aging Time.1D configuration BPDUs and TCN BPDUs on a per-port basis. it assumes that it is connected to an 802. page 16-21 (optional) Configuring the Maximum-Hop Count. While this timer is active. if the RSTP switch is using 802. When a port is initialized. and RSTP BPDUs are sent. page 16-14 (optional) Configuring a Secondary Root Switch. page 16-18 (optional) Configuring the Switch Priority. it restarts the timer and starts using RSTP BPDUs on that port.1D BPDUs.1D switch and starts using only 802. page 16-22 (optional) Restarting the Protocol Migration Process. page 16-19 (optional) Configuring the Forwarding-Delay Time. page 16-12 MSTP Configuration Guidelines. page 16-21 (optional) Specifying the Link Type to Ensure Rapid Transitions. Protocol migration—For backward compatibility with 802. the migrate-delay timer is started (specifies the minimum time during which RSTP BPDUs are sent).

all VLANs run rapid PVST+. 100 Mbps: 19. 15 seconds. For information on the recommended trunk port configuration. 128. 10 Mbps: 100. otherwise. The UplinkFast and BackboneFast features are not supported with the MSTP. rapid PVST+. For two or more switches to be in the same MST region.) For more information. and MSTP are supported. PVST+. (For example.
Table 16-3 Default MSTP Configuration
Feature Spanning-tree mode Switch priority (configurable on a per-CIST port basis) Spanning-tree port priority (configurable on a per-CIST port basis) Spanning-tree port cost (configurable on a per-CIST port basis)
Default Setting PVST+ (Rapid PVST+ and MSTP are disabled). 1000 Mbps: 4. RSTP is automatically enabled. the same configuration revision number.
MSTP Configuration Guidelines
These are the configuration guidelines for MSTP:
• • • • •
When you enable MST by using the spanning-tree mode mst global configuration command. see the “Supported Spanning-Tree Instances” section on page 15-9. 32768. but only one version can be active at any time. see the “Spanning-Tree Interoperability and Backward Compatibility” section on page 15-10. all VLANs run PVST+. revision number. and the same name. 20 hops. all traffic flows on a single link. For information about the supported number of spanning-tree instances. or all VLANs run MSTP. 20 seconds. all VLAN-to-instance mapping assignments must match. see the “Interaction with Other Features” section on page 12-20. VTP propagation of the MST configuration is not supported. For load balancing across redundant paths in the network to work. However.
Hello time Forward-delay time Maximum-aging time Maximum hop count
2 seconds. and VLAN-to-instance mapping) on each switch within the MST region by using the command-line interface (CLI) or through the SNMP support. The switch supports up to 16 MST instances. The number of VLANs that can be mapped to a particular MST instance is unlimited.
•
•
Catalyst 3560 Switch Software Configuration Guide
16-12
78-16156-01
. they must have the same VLAN-to-instance map. you can manually configure the MST configuration (region name.Chapter 16 Configuring MSTP Features
Configuring MSTP
Default MSTP Configuration
Table 16-3 shows the default MSTP configuration.

If the MST cloud consists of multiple MST regions. Enter MST configuration mode. the mapping is incremental.
• •
configure terminal spanning-tree mst configuration instance instance-id vlan vlan-range
For instance-id. if this situation is unavoidable. Verify your configuration by displaying the pending configuration.
To specify a VLAN range. For this to occur. To specify a VLAN series. When you map VLANs to an MST instance. and the VLANs specified in the command are added to or removed from the VLANs that were previously mapped. each member must be capable of processing RSTP BPDUs. 30 maps VLANs 10. follow these steps to specify the MST region configuration and enable MSTP. the same configuration revision number. one of the MST regions must contain the CST root. Map VLANs to an MST instance. and all of the other MST regions must have a better path to the root contained within the MST cloud than a path through the PVST+ or rapid-PVST+ cloud. for example. A region can have one member or multiple members with the same MST configuration. use a comma. 20. but each region can support up to 16 spanning-tree instances. There is no limit to the number of MST regions in a network. and return to global configuration mode.
•
Specifying the MST Region Configuration and Enabling MSTP
For two or more switches to be in the same MST region. we recommend that you partition the switched LAN into smaller LANs interconnected by routers or non-Layer 2 devices. Command
Step 1 Step 2 Step 3
Purpose Enter global configuration mode. 20. Specify the configuration revision number.Chapter 16
Configuring MSTP Configuring MSTP Features
•
All MST boundary ports must be forwarding for load balancing between a PVST+ and an MST cloud or between a rapid-PVST+ and an MST cloud. You can assign a VLAN to only one spanning-tree instance at a time. for example. This procedure is required.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
16-13
. However. instance 1 vlan 1-63 maps VLANs 1 through 63 to MST instance 1. the range is 1 to 15. The range is 0 to 65535. Apply all changes. and the same name.
Step 4 Step 5 Step 6 Step 7
name name revision version show pending exit
Specify the configuration name. use a hyphen. You might have to manually configure the switches in the clouds. and 30 to MST instance 1. the range is 1 to 4094. Beginning in privileged EXEC mode. they must have the same VLAN-to-instance mapping. For vlan vlan-range. The name string has a maximum length of 32 characters and is case sensitive. Partitioning the network into a large number of regions is not recommended. instance 1 vlan 10. the IST master of the MST cloud should also be the root of the CST.

use the no name MST configuration command. map VLANs 10 to 20 to MST instance 1.
spanning-tree mode mst
Caution
Changing spanning-tree modes can disrupt traffic because all spanning-tree instances are stopped for the previous mode and restarted in the new mode. the switch checks the switch priorities of the root switches. When you enter this command. use the no spanning-tree mode or the spanning-tree mode pvst global configuration command. A bridge ID. name the region region1. and return to global configuration mode:
Switch(config)# spanning-tree mst configuration Switch(config-mst)# instance 1 vlan 10-20 Switch(config-mst)# name region1 Switch(config-mst)# revision 1 Switch(config-mst)# show pending Pending MST configuration Name [region1] Revision 1 Instance Vlans Mapped -------.
Catalyst 3560 Switch Software Configuration Guide
16-14
78-16156-01
. To configure a switch to become the root. apply the changes. consisting of the switch priority and the switch MAC address. the switch sets its own priority for the specified instance to 24576 if this value will cause this switch to become the root for the specified spanning-tree instance. This example shows how to enter MST configuration mode. Verify your entries. use the no spanning-tree mst configuration global configuration command. RSTP is also enabled. Because of the extended system ID support. To return to the default VLAN-to-instance map. use the no instance instance-id [vlan vlan-range] MST configuration command. set the configuration revision to 1.--------------------0 1-9. To return to the default name. use the no revision MST configuration command. is associated with each instance. use the spanning-tree mst instance-id root global configuration command to modify the switch priority from the default value (32768) to a significantly lower value so that the switch becomes the root switch for the specified spanning-tree instance. For a group of VLANs.21-4094 1 10-20 ------------------------------Switch(config-mst)# exit Switch(config)#
Configuring the Root Switch
The switch maintains a spanning-tree instance for the group of VLANs mapped to it. the switch with the lowest bridge ID becomes the root switch.
Step 9 Step 10 Step 11
end show running-config copy running-config startup-config
Return to privileged EXEC mode.Chapter 16 Configuring MSTP Features
Configuring MSTP
Command
Step 8
Purpose Enable MSTP. To re-enable PVST+. display the pending configuration.
You cannot run both MSTP and PVST+ or both MSTP and rapid PVST+ at the same time. (Optional) Save your entries in the configuration file. To return to the default revision number.
To return to the default MST region configuration.

it is unlikely that the switch with the extended system ID support will become the root switch. you can specify a single instance. and the spanning-tree mst max-age global configuration commands. Do not configure an access switch as the spanning-tree primary root. Beginning in privileged EXEC mode. or a series of instances separated by a comma.
To return the switch to its default setting. and maximum-age time for a network of that diameter. Use the diameter keyword. The range is 1 to 10 seconds. This procedure is optional.
•
•
Step 3 Step 4 Step 5
end show spanning-tree mst instance-id copy running-config startup-config
Return to privileged EXEC mode. and maximum-age time through the spanning-tree mst hello-time. (4096 is the value of the least-significant bit of a 4-bit switch priority value as shown in Table 15-1 on page 15-4. use the no spanning-tree mst instance-id root global configuration command. which is available only for MST instance 0. (Optional) For diameter net-diameter.
•
configure terminal spanning-tree mst instance-id root primary [diameter net-diameter [hello-time seconds]]
For instance-id. (Optional) For hello-time seconds. (Optional) Save your entries in the configuration file. When you specify the network diameter. The extended system ID increases the switch priority value every time the VLAN number is greater than the priority of the connected switches running older software. The range is 0 to 15. the default is 2 seconds. follow these steps to configure a switch as the root switch.
Note
After configuring the switch as the root switch. a range of instances separated by a hyphen.Chapter 16
Configuring MSTP Configuring MSTP Features
If any root switch for the specified instance has a switch priority lower than 24576. This keyword is available only for MST instance 0. the switch automatically sets an optimal hello time. forward-delay time. You can use the hello keyword to override the automatically calculated hello time.
Command
Step 1 Step 2
Purpose Enter global configuration mode. the switch sets its own priority to 4096 less than the lowest switch priority. Configure a switch as the root switch. Verify your entries.)
Note
If your network consists of switches that both do and do not support the extended system ID. the maximum number of switch hops between any two end stations in the Layer 2 network). to specify the Layer 2 network diameter (that is. The range is 2 to 7.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
16-15
. we recommend that you avoid manually configuring the hello time. forward-delay time. specify the maximum number of switches between any two end stations. which can significantly reduce the convergence time. specify the interval in seconds between the generation of configuration messages by the root switch. spanning-tree mst forward-time.
Note
The root switch for each spanning-tree instance should be a backbone or distribution switch.

Catalyst 3560 Switch Software Configuration Guide
16-16
78-16156-01
. specify the maximum number of switches between any two end stations. Command
Step 1 Step 2
Purpose Enter global configuration mode. specify the interval in seconds between the generation of configuration messages by the root switch. the switch priority is modified from the default value (32768) to 28672. (Optional) For diameter net-diameter. This keyword is available only for MST instance 0.
•
•
Use the same network diameter and hello-time values that you used when configuring the primary root switch.
To return the switch to its default setting. Verify your entries. This procedure is optional. (Optional) Save your entries in the configuration file. a range of instances separated by a hyphen. Use the same network diameter and hello-time values that you used when you configured the primary root switch with the spanning-tree mst instance-id root primary global configuration command. follow these steps to configure a switch as the secondary root switch. You can execute this command on more than one switch to configure multiple backup root switches. The switch is then likely to become the root switch for the specified instance if the primary root switch fails. The range is 0 to 15. The range is 1 to 10 seconds. you can specify a single instance. See the “Configuring the Root Switch” section on page 16-14. use the no spanning-tree mst instance-id root global configuration command.Chapter 16 Configuring MSTP Features
Configuring MSTP
Configuring a Secondary Root Switch
When you configure a Catalyst 3560 switch with the extended system ID support as the secondary root. This is assuming that the other network switches use the default switch priority of 32768 and therefore are unlikely to become the root switch. (Optional) For hello-time seconds. or a series of instances separated by a comma. the default is 2 seconds.
Step 3 Step 4 Step 5
end show spanning-tree mst instance-id copy running-config startup-config
Return to privileged EXEC mode.
•
configure terminal spanning-tree mst instance-id root secondary [diameter net-diameter [hello-time seconds]]
For instance-id. The range is 2 to 7. Configure a switch as the secondary root switch. Beginning in privileged EXEC mode.

This procedure is optional.
Step 6
copy running-config startup-config
(Optional) Save your entries in the configuration file. 176.
configure terminal interface interface-id
Step 3
spanning-tree mst instance-id port-priority priority
Configure the port priority.
•
For instance-id. you can use the show running-config interface privileged EXEC command to confirm the configuration. The port-channel range is 1 to 12. The priority values are 0. use the no spanning-tree mst instance-id port-priority interface configuration command. You can assign higher priority values (lower numerical values) to interfaces that you want selected first and lower priority values (higher numerical values) that you want selected last. Valid interfaces include physical ports and port-channel logical interfaces. Beginning in privileged EXEC mode. 224. The default is 128. 128.
Note
The show spanning-tree mst interface interface-id privileged EXEC command displays information only if the port is in a link-up operative state. 48. and enter interface configuration mode. 192. or a series of instances separated by a comma. 96. 160. Command
Step 1 Step 2
Purpose Enter global configuration mode. Specify an interface to configure. The lower the number. To return the interface to its default setting. 64.
•
Step 4 Step 5
end show spanning-tree mst interface interface-id or show spanning-tree mst instance-id
Return to privileged EXEC mode. 144. 112. 16. Verify your entries. the range is 0 to 240 in increments of 16. All other values are rejected. The range is 0 to 15. the higher the priority. If all interfaces have the same priority value. the MSTP uses the port priority when selecting an interface to put into the forwarding state. 32. follow these steps to configure the MSTP port priority of an interface. Otherwise. a range of instances separated by a hyphen. 208.Chapter 16
Configuring MSTP Configuring MSTP Features
Configuring Port Priority
If a loop occurs. For priority. you can specify a single instance.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
16-17
. the MSTP puts the interface with the lowest interface number in the forwarding state and blocks the other interfaces. 80. and 240.

The range is 0 to 15. a range of instances separated by a hyphen. Otherwise. the MSTP puts the interface with the lowest interface number in the forwarding state and blocks the other interfaces. This procedure is optional. or a series of instances separated by a comma.
Step 6
copy running-config startup-config
(Optional) Save your entries in the configuration file. you can specify a single instance. use the no spanning-tree mst instance-id cost interface configuration command. Specify an interface to configure. Valid interfaces include physical ports and port-channel logical interfaces. For cost. If a loop occurs. If a loop occurs. Beginning in privileged EXEC mode. A lower path cost represents higher-speed transmission.
• Step 4 Step 5
end show spanning-tree mst interface interface-id or show spanning-tree mst instance-id
Return to privileged EXEC mode.
•
configure terminal interface interface-id
Step 3
spanning-tree mst instance-id cost cost
For instance-id. the MSTP uses cost when selecting an interface to put in the forwarding state. and enter interface configuration mode. If all interfaces have the same cost value. the default value is derived from the media speed of the interface.Chapter 16 Configuring MSTP Features
Configuring MSTP
Configuring Path Cost
The MSTP path cost default value is derived from the media speed of an interface.
Catalyst 3560 Switch Software Configuration Guide
16-18
78-16156-01
. Verify your entries. the range is 1 to 200000000. The port-channel range is 1 to 12. You can assign lower cost values to interfaces that you want selected first and higher cost values that you want selected last. you can use the show running-config privileged EXEC command to confirm the configuration. follow these steps to configure the MSTP cost of an interface. To return the interface to its default setting. the MSTP uses the path cost when selecting an interface to place into the forwarding state. Configure the cost. Command
Step 1 Step 2
Purpose Enter global configuration mode.
Note
The show spanning-tree mst interface interface-id privileged EXEC command displays information only for ports that are in a link-up operative state.

36864. 32768. the more likely the switch will be chosen as the root switch. Configure the switch priority.
Command
Step 1 Step 2
Purpose Enter global configuration mode. 12288.
To return the switch to its default setting. 45056. 16384. Priority values are 0. the default is 32768. and 61440. The range is 0 to 15. (Optional) Save your entries in the configuration file.
•
configure terminal spanning-tree mst instance-id priority priority
For instance-id. you can specify a single instance. 40960. or a series of instances separated by a comma. Verify your entries.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
16-19
. the range is 0 to 61440 in increments of 4096. 24576. For priority. This procedure is optional. 4096. follow these steps to configure the switch priority.
Configuring the Hello Time
You can configure the interval between the generation of configuration messages by the root switch by changing the hello time. we recommend that you use the spanning-tree mst instance-id root primary and the spanning-tree mst instance-id root secondary global configuration commands to modify the switch priority.Chapter 16
Configuring MSTP Configuring MSTP Features
Configuring the Switch Priority
You can configure the switch priority and make it more likely that the switch will be chosen as the root switch. a range of instances separated by a hyphen.
•
Step 3 Step 4 Step 5
end show spanning-tree mst instance-id copy running-config startup-config
Return to privileged EXEC mode. All other values are rejected. 28672. 8192. 49152. Beginning in privileged EXEC mode. use the no spanning-tree mst instance-id priority global configuration command. 20480. we recommend that you use the spanning-tree mst instance-id root primary and the spanning-tree mst instance-id root secondary global configuration commands to modify the hello time. For most situations. 53248.
Note
Exercise care when using this command. For most situations. The lower the number. 57344.
Note
Exercise care when using this command.

This procedure is optional. Verify your entries.
Configuring the Forwarding-Delay Time
Beginning in privileged EXEC mode. follow these steps to configure the forwarding-delay time for all MST instances.Chapter 16 Configuring MSTP Features
Configuring MSTP
Beginning in privileged EXEC mode. (Optional) Save your entries in the configuration file. Command
Step 1 Step 2
Purpose Enter global configuration mode. These messages mean that the switch is alive. For seconds. Return to privileged EXEC mode. Command
Step 1 Step 2
Purpose Enter global configuration mode. For seconds.
configure terminal spanning-tree mst hello-time seconds
Step 3 Step 4 Step 5
end show spanning-tree mst copy running-config startup-config
To return the switch to its default setting. This procedure is optional. The forward delay is the number of seconds a port waits before changing from its spanning-tree learning and listening states to the forwarding state.
Catalyst 3560 Switch Software Configuration Guide
16-20
78-16156-01
. the default is 15. (Optional) Save your entries in the configuration file. use the no spanning-tree mst hello-time global configuration command. the range is 4 to 30. the default is 2. Return to privileged EXEC mode. Configure the hello time for all MST instances. Verify your entries. Configure the forward time for all MST instances. the range is 1 to 10.
configure terminal spanning-tree mst forward-time seconds
Step 3 Step 4 Step 5
end show spanning-tree mst copy running-config startup-config
To return the switch to its default setting. use the no spanning-tree mst forward-time global configuration command. The hello time is the interval between the generation of configuration messages by the root switch. follow these steps to configure the hello time for all MST instances.

Verify your entries.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
16-21
. follow these steps to configure the maximum-aging time for all MST instances. For hop-count. Return to privileged EXEC mode.
configure terminal spanning-tree mst max-age seconds
Step 3 Step 4 Step 5
end show spanning-tree mst copy running-config startup-config
To return the switch to its default setting. (Optional) Save your entries in the configuration file. Configure the maximum-aging time for all MST instances. Return to privileged EXEC mode. Command
Step 1 Step 2
Purpose Enter global configuration mode.Chapter 16
Configuring MSTP Configuring MSTP Features
Configuring the Maximum-Aging Time
Beginning in privileged EXEC mode. Verify your entries. use the no spanning-tree mst max-hops global configuration command. The maximum-aging time is the number of seconds a switch waits without receiving spanning-tree configuration messages before attempting a reconfiguration. the default is 20. For seconds. the default is 20. This procedure is optional. Specify the number of hops in a region before the BPDU is discarded. Command
Step 1 Step 2
Purpose Enter global configuration mode. This procedure is optional.
configure terminal spanning-tree mst max-hops hop-count
Step 3 Step 4 Step 5
end show spanning-tree mst copy running-config startup-config
To return the switch to its default setting. the range is 1 to 40. use the no spanning-tree mst max-age global configuration command. follow these steps to configure the maximum-hop count for all MST instances. the range is 6 to 40. and the information held for a port is aged.
Configuring the Maximum-Hop Count
Beginning in privileged EXEC mode. (Optional) Save your entries in the configuration file.

VLANs. A switch also might continue to assign a boundary role to a port when the switch to which it is connected has joined the region. or an RST BPDU (version 2). an MST BPDU (version 3) associated with a different region. you can override the default setting of the link type and enable rapid transitions to the forwarding state. If you have a half-duplex link physically connected point-to-point to a single port on a remote switch running MSTP. use the clear spanning-tree detected-protocols privileged EXEC command. it sends only 802. To restart the protocol migration process (force the renegotiation with neighboring switches) on the switch.
configure terminal interface interface-id
Step 2 Step 3 Step 4 Step 5
spanning-tree link-type point-to-point end show spanning-tree mst interface interface-id copy running-config startup-config
To return the port to its default setting. Command
Step 1 Step 1
Purpose Enter global configuration mode. Specify that the link type of a port is point-to-point. By default. use the clear spanning-tree detected-protocols interface interface-id privileged EXEC command. (Optional) Save your entries in the configuration file. Return to privileged EXEC mode. and enter interface configuration mode.1D switches. Verify your entries. Beginning in privileged EXEC mode. If this switch receives a legacy 802.1D configuration BPDU (a BPDU with the protocol version set to 0).Chapter 16 Configuring MSTP Features
Configuring MSTP
Specifying the Link Type to Ensure Rapid Transitions
If you connect a port to another port through a point-to-point link and the local port becomes a designated port. The port-channel range is 1 to 12. and port-channel logical interfaces. Valid interfaces include physical ports. An MSTP switch also can detect that a port is at the boundary of a region when it receives a legacy BPDU.1D BPDUs because it cannot detect whether the legacy switch has been removed from the link unless the legacy switch is the designated switch. To restart the protocol migration process on a specific interface.
Catalyst 3560 Switch Software Configuration Guide
16-22
78-16156-01
. This procedure is optional. The VLAN ID range is 1 to 4094. the link type is controlled from the duplex mode of the interface: a full-duplex port is considered to have a point-to-point connection. use the no spanning-tree link-type interface configuration command. the RSTP negotiates a rapid transition with the other port by using the proposal-agreement handshake to ensure a loop-free topology as described in the “Rapid Convergence” section on page 16-7. a half-duplex port is considered to have a shared connection. the switch does not automatically revert to the MSTP mode if it no longer receives 802. However.
Restarting the Protocol Migration Process
A switch running MSTP supports a built-in protocol migration mechanism that enables it to interoperate with legacy 802.1D BPDUs on that port. follow these steps to override the default link-type setting. Specify an interface to configure.

show spanning-tree mst interface interface-id Displays MST information for the specified interface. For information about other keywords for the show spanning-tree privileged EXEC command. Displays MST information for the specified instance. use one or more of the privileged EXEC commands in Table 16-4:
Table 16-4 Commands for Displaying MST Status
Command show spanning-tree mst configuration show spanning-tree mst instance-id
Purpose Displays the MST region configuration. refer to the command reference for this release.Chapter 16
Configuring MSTP Displaying the MST Configuration and Status
Displaying the MST Configuration and Status
To display the spanning-tree status.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
16-23
.

If you enable Port Fast on an interface connecting to another switch. Interfaces connected to a single workstation or server should not receive bridge protocol data units (BPDUs). An interface with Port Fast enabled goes through the normal cycle of spanning-tree status changes when the switch is restarted. rapid PVST+. You can use Port Fast on interfaces connected to a single workstation or server. you can enable this feature by using the spanning-tree portfast interface configuration or the spanning-tree portfast default global configuration command. you risk creating a spanning-tree loop. or MSTP. bypassing the listening and learning states.
Note
Because the purpose of Port Fast is to minimize the time interfaces must wait for spanning-tree to converge. to allow those devices to immediately connect to the network.
Figure 17-1 Port Fast-Enabled Interfaces
Server
Port Fast-enabled ports Workstations Workstations
Port Fast-enabled port
Catalyst 3560 Switch Software Configuration Guide
17-2
101225
78-16156-01
.Chapter 17 Understanding Optional Spanning-Tree Features
Configuring Optional Spanning-Tree Features
Understanding Port Fast
Port Fast immediately brings an interface configured as an access or trunk port to the forwarding state from a blocking state. rather than waiting for the spanning tree to converge. as shown in Figure 17-1. it is effective only when used on interfaces connected to end stations. If your switch is running PVST+.

Use the BPDU guard feature in a service-provider network to prevent an access port from participating in the spanning tree. When the interface receives a BPDU. but the feature operates with some differences. you can enable the BPDU filtering feature for the entire switch or for an interface. This command prevents the interface from sending or receiving BPDUs. If your switch is running PVST+. you enable BPDU guard on any interface by using the spanning-tree bpduguard enable interface configuration command without also enabling the Port Fast feature.
Understanding BPDU Filtering
The BPDU filtering feature can be globally enabled on the switch or can be enabled per interface.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
17-3
. At the global level. rapid PVST+. If your switch is running PVST+. you can enable BPDU filtering on any interface by using the spanning-tree bpdufilter enable interface configuration command without also enabling the Port Fast feature. The BPDU guard feature provides a secure response to invalid configurations because you must manually put the interface back in service.Chapter 17
Configuring Optional Spanning-Tree Features Understanding Optional Spanning-Tree Features
Understanding BPDU Guard
The BPDU guard feature can be globally enabled on the switch or can be enabled per interface. You should globally enable BPDU filtering on a switch so that hosts connected to these interfaces do not receive BPDUs. and BPDU filtering is disabled. it is put in the error-disabled state. This command prevents interfaces that are in a Port Fast-operational state from sending or receiving BPDUs. you enable BPDU guard on Port Fast-enabled interfaces by using the spanning-tree portfast bpduguard default global configuration command. and the BPDU guard feature puts the interface in the error-disabled state. you can enable BPDU filtering on Port Fast-enabled interfaces by using the spanning-tree portfast bpdufilter default global configuration command. In a valid configuration.
Caution
Enabling BPDU filtering on an interface is the same as disabling spanning tree on it and can result in spanning-tree loops. rapid PVST+. or MSTP. At the interface level. Spanning tree shuts down interfaces that are in a Port Fast-operational state. Port Fast-enabled interfaces do not receive BPDUs. or MSTP. The interfaces still send a few BPDUs at link-up before the switch begins to filter outbound BPDUs. Receiving a BPDU on a Port Fast-enabled interface signals an invalid configuration. such as the connection of an unauthorized device. but the feature operates with some differences. At the global level. the interface loses its Port Fast-operational status. If a BPDU is received on a Port Fast-enabled interface. you can enable the BPDU guard feature for the entire switch or for an interface. At the interface level.

one for each address that was learned on the interface. It is not appropriate for backbone devices. and access switches. other interfaces flood the network with multicast packets. UplinkFast provides fast convergence after a direct link failure and achieves load balancing between redundant Layer 2 links using uplink groups.
Note
UplinkFast is most useful in wiring-closet switches at the access or edge of the network. It is not supported when the switch is running rapid PVST+ or MSTP because these protocols use fast convergence and take precedence over UplinkFast. This feature might not be useful for other types of applications. You can limit these bursts of multicast traffic by reducing the max-update-rate parameter (the default for this parameter is 150 packets per second). distribution switches. However. Specifically. station-learning frames are not generated. except for self-looping ports. it begins using the alternate paths as soon as the spanning tree selects a new root port.Chapter 17 Understanding Optional Spanning-Tree Features
Configuring Optional Spanning-Tree Features
Understanding UplinkFast
Switches in hierarchical networks can be grouped into backbone switches. When the spanning tree reconfigures the new root port. an uplink group consists of the root port (which is forwarding) and a set of blocked ports. you can accelerate the choice of a new root port when a link or switch fails or when the spanning tree reconfigures itself. The UplinkFast feature is supported only when the switch is running PVST+. By enabling UplinkFast with the spanning-tree uplinkfast global configuration command. An uplink group is a set of Layer 2 interfaces (per VLAN). so the spanning-tree topology converges more slowly after a loss of connectivity. Figure 17-2 shows a complex network where distribution switches and access switches each have at least one redundant link that spanning tree blocks to prevent loops. as it would with the normal spanning-tree procedures.
Catalyst 3560 Switch Software Configuration Guide
17-4
101231
78-16156-01
. The root port transitions to the forwarding state immediately without going through the listening and learning states.
Figure 17-2 Switches in a Hierarchical Network
Backbone switches Root bridge
Distribution switches
Active link Blocked link
Access switches
If a switch looses connectivity. only one of which is forwarding at any given time. The uplink group provides an alternate path in case the currently forwarding link fails. if you enter zero.

which is enabled by using the spanning-tree backbonefast global configuration command. is connected directly to Switch B over link L1 and to Switch C over link L2. This change takes approximately 1 to 5 seconds. Switch C
43576
Understanding BackboneFast
BackboneFast detects indirect failures in the core of the backbone. BackboneFast optimizes the maximum-age timer. BackboneFast.
Figure 17-3 UplinkFast Example Before Direct Link Failure
Switch A (Root) L1
Switch B
L2
L3 Blocked port Switch C
43575
If Switch C detects a link failure on the currently active link L2 on the root port (a direct link failure). When a switch receives an inferior BPDU from the designated port of another switch. as shown in Figure 17-4. The Layer 2 interface on Switch C that is connected directly to Switch B is in a blocking state. and BackboneFast tries to find an alternate path to the root. the BPDU is a signal that the other switch might have lost its path to the root.
Figure 17-4 UplinkFast Example After Direct Link Failure
Switch A (Root) L1
Switch B
L2 Link failure
L3 UplinkFast transitions port directly to forwarding state. The BackboneFast feature is supported only when the switch is running PVST+. BackboneFast is a complementary technology to the UplinkFast feature. It is not supported when the switch is running rapid PVST+ or MSTP. which controls the amount of time the switch stores protocol information received on an interface. the root switch. UplinkFast unblocks the blocked interface on Switch C and transitions it to the forwarding state without going through the listening and learning states. Switch A.Chapter 17
Configuring Optional Spanning-Tree Features Understanding Optional Spanning-Tree Features
Figure 17-3 shows an example topology with no link failures. which responds to failures on links directly connected to access switches. starts when a root port or blocked interface on a switch receives inferior BPDUs from its designated switch. An inferior BPDU identifies a switch that declares itself as both the root bridge and
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
17-5
.

it means that a link to which the switch is not directly connected (an indirect link) has failed (that is. it expires the maximum aging time on the interface that received the inferior BPDU. If the inferior BPDU arrives on a blocked interface. and into the forwarding state. the root switch. providing a path from Switch B to Switch A. When a switch receives an inferior BPDU. This switchover takes approximately 30 seconds. and becomes the root switch according to normal spanning-tree rules. If all the alternate paths to the root switch indicate that the switch has lost connectivity to the root switch. Switch C assumes that an indirect failure has occurred. the designated switch has lost its connection to the root switch). the switch expires the maximum aging time on the interface that received the RLQ reply. elects itself the root. At that point. Under spanning-tree rules. When Switch C receives the inferior BPDUs from Switch B. connects directly to Switch B over link L1 and to Switch C over link L2.
Figure 17-5 BackboneFast Example Before Indirect Link Failure
Switch A (Root) L1
Switch B
L2
L3 Blocked port Switch C
44963
If link L1 fails as shown in Figure 17-6. If the inferior BPDU arrives on the root port and there are no blocked interfaces. all blocked interfaces become alternate paths to the root switch. BackboneFast allows the blocked interface on Switch C to move immediately to the listening state without waiting for the maximum aging time for the interface to expire. the root port and other blocked interfaces on the switch become alternate paths to the root switch. causes the maximum aging time on the root port to expire.Chapter 17 Understanding Optional Spanning-Tree Features
Configuring Optional Spanning-Tree Features
the designated switch. it detects the failure. the switch ignores inferior BPDUs for the configured maximum aging time specified by the spanning-tree vlan vlan-id max-age global configuration command. If one or more alternate paths can still connect to the root switch. If the switch has alternate paths to the root switch. The switch tries to determine if it has an alternate path to the root switch. and begins sending BPDUs to Switch C. Figure 17-5 shows an example topology with no link failures. (Self-looped ports are not considered alternate paths to the root switch. If the switch discovers that it still has an alternate path to the root. through the listening and learning states. identifying itself as the root. it uses these alternate paths to send a root link query (RLQ) request. However. twice the Forward Delay time if the default Forward Delay time of 15 seconds is set. Switch C cannot detect this failure because it is not connected directly to link L1. the switch assumes that it has lost connectivity to the root switch. because Switch B is directly connected to the root switch over L1. The Layer 2 interface on Switch C that connects directly to Switch B is in the blocking state.
Catalyst 3560 Switch Software Configuration Guide
17-6
78-16156-01
. Switch A. The switch sends the RLQ request on all alternate paths and waits for an RLQ reply from other switches in the network. the switch makes all interfaces on which it received an inferior BPDU its designated ports and moves them from the blocking state (if they were in the blocking state).) If the inferior BPDU arrives on the root port. BackboneFast then transitions the Layer 2 interface on Switch C to the forwarding state. Figure 17-6 shows how BackboneFast reconfigures the topology to account for the failure of link L1.

You can avoid this situation by enabling root guard on SP switch interfaces that connect to switches in your customer’s network. the other switches ignore these inferior BPDUs. In such a topology.
Figure 17-7 Adding a Switch in a Shared-Medium Topology
Switch A (Root)
Switch C
Switch B (Designated bridge)
Blocked port
Added switch
44965
Understanding Root Guard
The Layer 2 network of a service provider (SP) can include many connections to switches that are not owned by the SP. However. If spanning-tree calculations cause an interface in the customer network to be selected as the root port.Chapter 17
Configuring Optional Spanning-Tree Features Understanding Optional Spanning-Tree Features
Figure 17-6 BackboneFast Example After Indirect Link Failure
Switch A (Root) L1 Link failure L2 L3
Switch B
Switch C
If a new switch is introduced into a shared-medium topology as shown in Figure 17-7. and the new switch learns that Switch B is the designated switch to Switch A. the spanning tree can reconfigure itself and select a customer switch as the root switch. BackboneFast is not activated because the inferior BPDUs did not come from the recognized designated switch (Switch B). as shown in Figure 17-8. the root switch.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
44964
BackboneFast changes port through listening and learning states to forwarding state. root guard then places the interface in the root-inconsistent (blocked) state to prevent the customer’s switch from becoming the root switch or being in the path to the root.
17-7
. The new switch begins sending inferior BPDUs that indicate it is the root switch.

you can enable this feature by using the spanning-tree guard root interface configuration command.Chapter 17 Understanding Optional Spanning-Tree Features
Configuring Optional Spanning-Tree Features
If a switch outside the SP network becomes the root switch. the interface is blocked (root-inconsistent state). or MSTP. or MSTP.
Figure 17-8 Root Guard in a Service-Provider Network
Customer network Potential spanning-tree root without root guard enabled
Service-provider network
Desired root switch
Enable the root-guard feature on these interfaces to prevent switches in the customer network from becoming the root switch or being in the path to the root. loop guard prevents alternate and root ports from becoming designated ports.
Caution
Misuse of the root-guard feature can cause a loss of connectivity. If a boundary port is blocked in an internal spanning-tree (IST) instance because of root guard. If the switch is operating in multiple spanning-tree (MST) mode. The customer’s switch does not become the root switch and is not in the path to the root. A boundary port is an interface that connects to a LAN. the designated switch of which is either an 802. root guard forces the interface to be a designated port. Loop guard prevents alternate and root ports from becoming designated ports. and spanning tree does not send BPDUs on root or alternate ports. rapid PVST+. VLANs can be grouped and mapped to an MST instance. the interface also is blocked in all MST instances. When the switch is operating in PVST+ or rapid-PVST+ mode.1D switch or a switch with a different MST region configuration.
Catalyst 3560 Switch Software Configuration Guide
17-8
78-16156-01
101232
. This feature is most effective when it is enabled on the entire switched network. If your switch is running PVST+. and spanning tree selects a new root switch. rapid PVST+. Root guard enabled on an interface applies to all the VLANs to which the interface belongs. you can enable this feature by using the spanning-tree loopguard default global configuration command. and spanning tree does not send BPDUs on root or alternate ports. If your switch is running PVST+.
Understanding Loop Guard
You can use loop guard to prevent alternate or root ports from becoming designated ports because of a failure that leads to a unidirectional link.

Caution
Use Port Fast only when connecting a single end station to an access or trunk port.Chapter 17 Configuring Optional Spanning-Tree Features
Configuring Optional Spanning-Tree Features
Enabling Port Fast
An interface with the Port Fast feature enabled is moved directly to the spanning-tree forwarding state without waiting for the standard forward-time delay. Specify an interface to configure. which could cause broadcast storms and address-learning problems.
Catalyst 3560 Switch Software Configuration Guide
17-10
78-16156-01
. Enabling this feature on an interface connected to a switch or hub could prevent spanning tree from detecting and disabling loops in your network. the Port Fast feature is automatically enabled.
Command
Step 1 Step 2 Step 3
Purpose Enter global configuration mode. Beginning in privileged EXEC mode. Enable Port Fast on an access port connected to a single workstation or server. see Chapter 14. Verify your entries. When you disable voice VLAN. For more information. or MSTP. rapid PVST+.
Note
You can use the spanning-tree portfast default global configuration command to globally enable the Port Fast feature on all nontrunking ports. the Port Fast feature is not automatically disabled. To disable the Port Fast feature.
By default. “Configuring Voice VLAN. Port Fast is disabled on all interfaces. you can enable Port Fast on a trunk port. By specifying the trunk keyword. If you enable the voice VLAN feature. (Optional) Save your entries in the configuration file. This procedure is optional. and enter interface configuration mode. use the spanning-tree portfast disable interface configuration command.
Step 4 Step 5 Step 6
end show spanning-tree interface interface-id portfast copy running-config startup-config
Return to privileged EXEC mode. follow these steps to enable Port Fast.
configure terminal interface interface-id spanning-tree portfast [trunk]
Caution
Make sure that there are no loops in the network between the trunk port and the workstation or server before you enable Port Fast on a trunk port.” You can enable this feature if your switch is running PVST+.

such as the connection of an unauthorized device. it is put in the error-disabled state. Verify your entries. Enable the Port Fast feature. Return to privileged EXEC mode. You also can use the spanning-tree bpduguard enable interface configuration command to enable BPDU guard on any interface without also enabling the Port Fast feature. otherwise. BPDU guard is disabled. follow these steps to globally enable the BPDU guard feature. Beginning in privileged EXEC mode. (Optional) Save your entries in the configuration file. and the BPDU guard feature puts the interface in the error-disabled state.
configure terminal spanning-tree portfast bpduguard default interface interface-id spanning-tree portfast end show running-config copy running-config startup-config
Step 3 Step 4 Step 5 Step 6 Step 7
To disable BPDU guard. spanning tree shuts down Port Fast-enabled interfaces that receive BPDUs. an accidental topology loop could cause a data packet loop and disrupt switch and network operation. Globally enable BPDU guard.Chapter 17
Configuring Optional Spanning-Tree Features Configuring Optional Spanning-Tree Features
Enabling BPDU Guard
When you globally enable BPDU guard on interfaces that are Port Fast-enabled (the interfaces are in a Port Fast-operational state). In a valid configuration. Port Fast-enabled interfaces do not receive BPDUs.
Caution
Configure Port Fast only on interfaces that connect to end stations.
Command
Step 1 Step 2
Purpose Enter global configuration mode. The BPDU guard feature provides a secure response to invalid configurations because you must manually put the interface back in service.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
17-11
. You can override the setting of the no spanning-tree portfast bpduguard default global configuration command by using the spanning-tree bpduguard enable interface configuration command. rapid PVST+. Use the BPDU guard feature in a service-provider network to prevent an access port from participating in the spanning tree. Specify the interface connected to an end station. You can enable the BPDU guard feature if your switch is running PVST+. and enter interface configuration mode. When the interface receives a BPDU. or MSTP. By default. Receiving a BPDU on a Port Fast-enabled interface signals an invalid configuration. use the no spanning-tree portfast bpduguard default global configuration command. This procedure is optional.

use the no spanning-tree portfast bpdufilter default global configuration command. follow these steps to globally enable the BPDU filtering feature.
Catalyst 3560 Switch Software Configuration Guide
17-12
78-16156-01
. BPDU filtering is disabled. The interfaces still send a few BPDUs at link-up before the switch begins to filter outbound BPDUs. Enable the Port Fast feature. Specify the interface connected to an end station. You can enable the BPDU filtering feature if your switch is running PVST+. Return to privileged EXEC mode. an accidental topology loop could cause a data packet loop and disrupt switch and network operation. and BPDU filtering is disabled.
Caution
Enabling BPDU filtering on an interface is the same as disabling spanning tree on it and can result in spanning-tree loops. Beginning in privileged EXEC mode. (Optional) Save your entries in the configuration file. and enter interface configuration mode. rapid PVST+.Chapter 17 Configuring Optional Spanning-Tree Features
Configuring Optional Spanning-Tree Features
Enabling BPDU Filtering
When you globally enable BPDU filtering on Port Fast-enabled interfaces. Globally enable BPDU filtering. This procedure is optional.
configure terminal spanning-tree portfast bpdufilter default interface interface-id spanning-tree portfast end show running-config copy running-config startup-config
Step 3 Step 4 Step 5 Step 6 Step 7
To disable BPDU filtering.
Caution
Configure Port Fast only on interfaces that connect to end stations. If a BPDU is received on a Port Fast-enabled interface. You can also use the spanning-tree bpdufilter enable interface configuration command to enable BPDU filtering on any interface without also enabling the Port Fast feature. This command prevents the interface from sending or receiving BPDUs. it prevents interfaces that are in a Port Fast-operational state from sending or receiving BPDUs. By default.
Command
Step 1 Step 2
Purpose Enter global configuration mode. otherwise. You should globally enable BPDU filtering on a switch so that hosts connected to these interfaces do not receive BPDUs. or MSTP. You can override the setting of the no spanning-tree portfast bpdufilter default global configuration command by using the spanning-tree bpdufilter enable interface configuration command. Verify your entries. the interface loses its Port Fast-operational status.

the switch priorities of all VLANs and path costs of all interfaces are set to default values if you did not modify them from their defaults. first restore the switch priority on the VLAN to the default value by using the no spanning-tree vlan vlan-id priority global configuration command. the path cost of all interfaces and VLAN trunks is increased by 3000 (if you change the path cost to 3000 or above. BackboneFast is not supported on Token Ring VLANs. station-learning frames are not generated. This feature is supported for use with third-party switches.
Command
Step 1 Step 2
Purpose Enter global configuration mode. It is not supported when the switch is running rapid PVST+ or MSTP.
When UplinkFast is enabled.
Note
If you use BackboneFast. If you change the path cost to a value less than 3000 and you enable UplinkFast or UplinkFast is already enabled. The UplinkFast feature is supported only when the switch is running PVST+. the range is 0 to 32000 packets per second. the default is 150.
Step 3 Step 4 Step 5
end show spanning-tree summary copy running-config startup-config
Return to privileged EXEC mode. When UplinkFast is disabled. To enable UplinkFast on a VLAN with switch priority configured. You cannot configure UplinkFast on an individual VLAN.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
17-13
.
Enabling BackboneFast
You can enable BackboneFast to detect indirect link failures and to start the spanning-tree reconfiguration sooner. use the no spanning-tree uplinkfast max-update-rate global configuration command. pkts-per-second] (Optional) For pkts-per-second.Chapter 17
Configuring Optional Spanning-Tree Features Configuring Optional Spanning-Tree Features
Enabling UplinkFast for Use with Redundant Links
UplinkFast cannot be enabled on VLANs that have been configured with a switch priority. the path cost is not altered). follow these steps to enable UplinkFast. and the spanning-tree topology converges more slowly after a loss of connectivity. To disable UplinkFast. you must enable it on all switches in the network. Beginning in privileged EXEC mode. it affects all VLANs on the switch. This procedure is optional. Verify your entries. (Optional) Save your entries in the configuration file. To return the update packet rate to the default setting.
configure terminal
spanning-tree uplinkfast [max-update-rate Enable UplinkFast. use the no spanning-tree uplinkfast command.
Note
When you enable UplinkFast. The changes to the switch priority and the path cost reduce the chance that a switch will become the root switch. If you set the rate to 0. the switch priority of all VLANs is set to 49152.

Verify your entries.
Catalyst 3560 Switch Software Configuration Guide
17-14
78-16156-01
.
configure terminal spanning-tree backbonefast end show spanning-tree summary copy running-config startup-config
To disable the BackboneFast feature. Enable root guard on the interface.
Note
You cannot enable both root guard and loop guard at the same time.
configure terminal interface interface-id spanning-tree guard root end show running-config
Step 4 Step 5 Step 6
copy running-config startup-config (Optional) Save your entries in the configuration file. It is not supported when the switch is running rapid PVST+ or MSTP. and enter interface configuration mode. Command
Step 1 Step 2 Step 3 Step 4 Step 5
Purpose Enter global configuration mode. Enable BackboneFast.
Command
Step 1 Step 2 Step 3
Purpose Enter global configuration mode. With UplinkFast. This procedure is optional.Chapter 17 Configuring Optional Spanning-Tree Features
Configuring Optional Spanning-Tree Features
The BackboneFast feature is supported only when the switch is running PVST+. all the backup interfaces used by the UplinkFast feature are placed in the root-inconsistent state (blocked) and are prevented from reaching the forwarding state. By default. This procedure is optional. To disable root guard. if root guard is also enabled. use the no spanning-tree guard interface configuration command. root guard is disabled on all interfaces. Beginning in privileged EXEC mode. Return to privileged EXEC mode. Specify an interface to configure. the backup interfaces (in the blocked state) replace the root port in the case of a failure. You can enable this feature if your switch is running PVST+. or MSTP. (Optional) Save your entries in the configuration file. Verify your entries. Beginning in privileged EXEC mode.
Enabling Root Guard
Root guard enabled on an interface applies to all the VLANs to which the interface belongs. use the no spanning-tree backbonefast global configuration command. rapid PVST+. follow these steps to enable root guard on an interface. However. Return to privileged EXEC mode. Do not enable the root guard on interfaces to be used by the UplinkFast feature. follow these steps to enable BackboneFast.

Displays a detailed summary of interface information. This feature is most effective when it is configured on the entire switched network. Displays MST information for the specified interface. Enable loop guard. This procedure is optional.
Command
Step 1
Purpose Verify which interfaces are alternate or root ports.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
17-15
. Displays a summary of interface states or displays the total lines of the spanning-tree state section. rapid PVST+. or MSTP. By default. Return to privileged EXEC mode. use one or more of the privileged EXEC commands in Table 17-2:
Table 17-2 Commands for Displaying the Spanning-Tree Status
Command show spanning-tree active show spanning-tree detail show spanning-tree interface interface-id show spanning-tree mst interface interface-id show spanning-tree summary [totals]
Purpose Displays spanning-tree information on active interfaces only.
Note
You cannot enable both loop guard and root guard at the same time. follow these steps to enable loop guard. You can enable this feature if your switch is running PVST+. use the no spanning-tree loopguard default global configuration command. Displays spanning-tree information for the specified interface. Beginning in privileged EXEC mode.
Step 4 Step 5 Step 6
To globally disable loop guard. (Optional) Save your entries in the configuration file. Verify your entries.
show spanning-tree active or show spanning-tree mst
Step 2 Step 3
configure terminal spanning-tree loopguard default end show running-config copy running-config startup-config
Enter global configuration mode.Chapter 17
Configuring Optional Spanning-Tree Features Displaying the Spanning-Tree Status
Enabling Loop Guard
You can use loop guard to prevent alternate or root ports from becoming designated ports because of a failure that leads to a unidirectional link. Loop guard operates only on interfaces that are considered point-to-point by the spanning tree.
Displaying the Spanning-Tree Status
To display the spanning-tree status. You can override the setting of the no spanning-tree loopguard default global configuration command by using the spanning-tree guard loop interface configuration command. loop guard is disabled.

Chapter 17 Displaying the Spanning-Tree Status
Configuring Optional Spanning-Tree Features
You can clear spanning-tree counters by using the clear spanning-tree [interface interface-id] privileged EXEC command.
Catalyst 3560 Switch Software Configuration Guide
17-16
78-16156-01
. For information about other keywords for the show spanning-tree privileged EXEC command. refer to the command reference for this release.

Note
For complete syntax and usage information for the commands used in this chapter. lease time.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
18-1
. and interface information that corresponds to the local untrusted interfaces of a switch. and refer to the “IP Addressing and Services” section in the Cisco IOS IP and IP Routing Command Reference for Release 12. page 18-3 Displaying DHCP Information. This chapter consists of these sections:
• • •
Understanding DHCP Features. VLAN number. DHCP snooping acts like a firewall between untrusted hosts and DHCP servers. An untrusted message is a message that is received from outside the network or firewall that can cause traffic attacks within your network. binding type.
DHCP Snooping
DHCP snooping is a DHCP security feature that provides network security by filtering untrusted DHCP messages and by building and maintaining a DHCP snooping binding table. it does not contain information regarding hosts interconnected with a trusted interface. see the command reference for this release. which significantly reduces the overhead of administration of IP addresses. It also gives you a way to differentiate between untrusted interfaces connected to the end user and trusted interfaces connected to the DHCP server or another switch. page 18-5
Understanding DHCP Features
DHCP is widely used in LAN environments to dynamically assign host IP addresses from a centralized server. IP address. only those hosts that are connected to the network consume IP addresses.C H A P T E R
18
Configuring DHCP Features
This chapter describes how to configure Dynamic Host Configuration Protocol (DHCP) snooping and the option-82 data insertion features on the Catalyst 3560 switch. DHCP also helps conserve the limited IP address space because IP addresses no longer need to be permanently assigned to hosts. page 18-1 Configuring DHCP Features. A trusted interface is an interface that is configured to receive only messages from within the network.1. The DHCP snooping binding table contains the MAC address. An untrusted interface is an interface that is configured to receive messages from outside the network or firewall.

Multiple hosts on the subscriber LAN can be connected to the same port on the access switch and are uniquely identified.
Figure 18-1 DHCP Relay Agent in a Metropolitan Ethernet Network
DHCP server
Catalyst switch (DHCP relay agent)
Access layer
VLAN 10 Host A (DHCP client) Subscribers Host B (DHCP client)
98813
When you enable the DHCP snooping information option 82 on the switch. from which the packet is received (the circuit ID suboption). it can use the remote ID. When the switch receives the DHCP request. The switch forwards the DHCP request that includes the option-82 field to the DHCP server. vlan-mod-port. If the server is option-82-capable. a subscriber is identified by the switch port through which it connects to the network (in addition to its MAC address). it adds the option-82 information in the packet. Then the DHCP server echoes the option-82 field in the DHCP reply.Chapter 18 Understanding DHCP Features
Configuring DHCP Features
Option-82 Data Insertion
In residential. such as restricting the number of IP addresses that can be assigned to a single remote ID or a circuit ID. The DHCP server receives the packet. The switch verifies that it originally inserted the option-82 data by inspecting the remote ID and possibly the circuit ID fields. DHCP can centrally manage the IP address assignments for a large number of subscribers. Figure 18-1 is an example of a metropolitan Ethernet network in which a centralized DHCP server assigns IP addresses to subscribers connected to the switch at the access layer. or both to assign IP addresses and implement policies. metropolitan Ethernet-access environments. Because the DHCP clients and their associated DHCP server do not reside on the same IP network or subnet. this sequence of events occurs:
• •
The host (DHCP client) generates a DHCP request and broadcasts it on the network. a DHCP relay agent (the Catalyst switch) is configured with a helper address to enable broadcast forwarding and to transfer DHCP messages between the clients and the server. The switch removes the option-82 field and forwards the packet to the switch port that connects to the DHCP client that sent the DHCP request. the circuit ID. The option-82 information contains the switch MAC address (the remote ID suboption) and the port identifier. The DHCP server unicasts the reply to the switch if the request was relayed to the server by the switch. When the DHCP option-82 feature is enabled on the switch.
• •
•
Catalyst 3560 Switch Software Configuration Guide
18-2
78-16156-01
.

If you specify group membership for a multicast group address statically. page 19-5 Immediate-Leave Processing. If a port spanning-tree.xxx). As the name implies. it removes the host port from the table entry. page 19-6 IGMP Report Suppression. However. When the switch receives an IGMP report from a host for a particular multicast group. a port group. the command fails. the switch adds the host port number to the forwarding table entry. page 19-3 Joining a Multicast Group. All hosts interested in this multicast traffic send join requests and are added to the forwarding table entry. page 19-3 Leaving a Multicast Group. The IP multicast groups learned through IGMP snooping are dynamic. or a VLAN ID change occurs.Chapter 19 Understanding IGMP Snooping
Configuring IGMP Snooping and MVR
Understanding IGMP Snooping
Layer 2 switches can use IGMP snooping to constrain the flooding of multicast traffic by dynamically configuring Layer 2 interfaces so that multicast traffic is forwarded to only those interfaces associated with IP multicast devices. page 19-6
Catalyst 3560 Switch Software Configuration Guide
19-2
78-16156-01
. With multicast MAC address-based groups. there are no address aliasing issues. IGMP snooping requires the LAN switch to snoop on the IGMP transmissions between the host and the router and to keep track of multicast groups and member ports. The Catalyst 3560 switch supports IP multicast group-based bridging.
Note
For more information on IP multicast and IGMP.0. The multicast router sends out periodic general queries to all VLANs. if an IP address being configured translates (aliases) to a previously configured MAC address or to any reserved multicast MAC addresses (in the range 224. These sections describe characteristics of IGMP snooping on the switch:
• • • • •
IGMP Versions. The switch creates one entry per VLAN in the IGMP snooping IP multicast forwarding table for each group from which it receives an IGMP join request. the IGMP snooping-learned multicast groups from this port on the VLAN are deleted. Multicast group membership lists can consist of both user-defined and IGMP snooping-learned settings. when it receives an IGMP Leave Group message from a host. you can statically configure multicast groups by using the ip igmp snooping vlan vlan-id static ip_address interface interface-id global configuration command. It also periodically deletes entries if it does not receive IGMP membership reports from the multicast clients. refer to RFC 1112 and RFC 2236. your setting supersedes any automatic manipulation by IGMP snooping.0. rather than MAC-addressed based groups. Because the Catalyst 3560 switch uses IP multicast groups.

They do not support snooping based on the source MAC address or on proxy reports. For example. refer to the “Configuring IP Multicast Layer 3 Switching” chapter in the Catalyst 4500 Series Switch Cisco IOS Software Configuration Guide. IGMP version 1 or version 2 hosts wanting to join the multicast group respond by sending a join message to the switch.htm
Joining a Multicast Group
When a host connected to the switch wants to join an IP multicast group. if it is an IGMP version 2 client. It constrains traffic to approximately the same set of ports as the IGMP snooping feature on IGMPv2 or IGMPv1 hosts. when the switch receives a general query from the router.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
19-3
. For more information.
Note
IGMPv3 join and leave messages are not supported on switches running IGMP filtering or MVR.1(12c)EW at this URL: http://www. An IGMPv3 switch can receive messages from and forward messages to a device running the Source Specific Multicast (SSM) feature. An IGMPv3 switch supports Basic IGMPv3 Snooping Support (BISS). it sends an unsolicited IGMP join message.Chapter 19
Configuring IGMP Snooping and MVR Understanding IGMP Snooping
IGMP Versions
The switch supports IGMP version 1. See Figure 19-1. the switch can forward the IGMPv3 report to the multicast router. if IGMP snooping is enabled on an IGMPv2 switch and the switch receives an IGMPv3 report from a host.cisco. These versions are interoperable on the switch.
Note
The switches support IGMPv3 snooping based only on the destination multicast MAC address. Cisco IOS Release 12. BISS constrains the flooding of multicast traffic when your network includes IGMPv3 hosts. The host associated with that interface receives multicast traffic for that multicast group. The CPU also adds the interface where the join message was received to the forwarding-table entry. IGMP version 2. which includes support for the snooping features on IGMPv1 and IGMPv2 switches and for IGMPv3 membership report messages. specifying the IP multicast group to join. it forwards the query to all ports in the VLAN. The switch CPU creates a multicast forwarding-table entry for the group if it is not already present.com/univercd/cc/td/doc/product/lan/cat4000/12_1_12/config/mcastmls. and IGMP version 3. Alternatively.

2
The switch hardware can distinguish IGMP information packets from other packets for the multicast group. the message is not flooded to other ports on the switch.
Table 19-1 IGMP Snooping Forwarding Table
Destination Address 224. that includes the port numbers connected to Host 1 and the router. Any known multicast traffic is forwarded to the group and not to the CPU.1. the CPU receives that message and adds the port number of Host 4 to the forwarding table as shown in Table 19-2. If another host (for example.3 and multicasts an IGMP membership report (IGMP join message) to the group.2. The information in the table tells the switching engine to send frames addressed to the 224.1. which forwards the query to ports 2 through 5. Host 4) sends an unsolicited IGMP join message for the same group (Figure 19-2). Host 1 wants to join multicast group 224.2.Chapter 19 Understanding IGMP Snooping
Configuring IGMP Snooping and MVR
Figure 19-1 Initial IGMP Join Message
Router A
1 IGMP report 224. Note that because the forwarding table directs IGMP messages to only the CPU.3 multicast IP address that are not IGMP packets to the router and to the host that has joined the group. the CPU uses the information in the IGMP report to set up a forwarding-table entry.1.
Catalyst 3560 Switch Software Configuration Guide
19-4
45750
Forwarding table
78-16156-01
.3
Type of Packet IGMP
Ports 1. as shown in Table 19-1. When the CPU receives the IGMP report multicast by Host 1.2.1.2.3 Switching engine CPU 0 VLAN
2
3
4
5
Host 1
Host 2
Host 3
Host 4
Router A sends a general query to the switch. all members of the same VLAN.

it removes the group for the VLAN from its IGMP cache. When the switch receives a leave message from a host. When hosts want to leave a multicast group.1. If the router receives no reports from a VLAN. Interested hosts respond to the queries. the router continues forwarding the multicast traffic to the VLAN.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
45751
Forwarding table
Ports 1. they can silently leave or they can send a leave message.3
Type of Packet IGMP
Leaving a Multicast Group
The router sends periodic multicast general queries. it sends out a MAC-based general query to determine if any other devices connected to that interface are interested in traffic for the specific multicast group. 5
19-5
. The switch then updates the forwarding table for that MAC group so that only those hosts interested in receiving multicast traffic for the group are listed in the forwarding table. 2.2.Chapter 19
Configuring IGMP Snooping and MVR Understanding IGMP Snooping
Figure 19-2 Second Host Joining a Multicast Group
Router A
1 VLAN
Switching engine CPU 0
2
3
4
5
Host 1
Host 2
Host 3
Host 4
Table 19-2 Updated IGMP Snooping Forwarding Table
Destination Address 224. The switch forwards multicast group traffic only to those hosts listed in the forwarding table for that IP multicast group maintained by IGMP snooping. If at least one host in the VLAN wishes to receive multicast traffic. and the switch forwards these queries through all ports in the VLAN.

page 19-7 Setting the Snooping Method. These sections describe how to configure IGMP snooping:
• • • • • • •
Default IGMP Snooping Configuration.
Configuring IGMP Snooping
IGMP snooping allows switches to examine IGMP packets and make forwarding decisions based on their content.
IGMP Report Suppression
Note
IGMP report suppression is supported only when the multicast query has IGMPv1 and IGMPv2 reports. If the multicast router query includes requests only for IGMPv1 and IGMPv2 reports. If the multicast router query also includes requests for IGMPv3 reports. The switch uses IGMP report suppression to forward only one IGMP report per multicast router query to multicast devices. even when multiple multicast groups are simultaneously in use. This feature is not supported when the query includes IGMPv3 reports. page 19-8 Configuring a Multicast Router Port. The switch uses IGMP snooping Immediate-Leave processing to remove from the forwarding table an interface that sends a leave message without the switch sending MAC-based general queries to the interface. When IGMP router suppression is enabled (the default). page 19-9 Configuring a Host Statically to Join a Group. some hosts might inadvertently be dropped. page 19-11
Catalyst 3560 Switch Software Configuration Guide
19-6
78-16156-01
. If Immediate Leave is enabled in VLANs where more than one host is connected to a port. page 19-10 Disabling IGMP Report Suppression. The VLAN interface is pruned from the multicast tree for the multicast group specified in the original leave message. page 19-7 Enabling or Disabling IGMP Snooping. IGMPv2. the switch forwards only the first IGMPv1 or IGMPv2 report from all hosts for a group to all the multicast routers. page 19-10 Enabling IGMP Immediate-Leave Processing. and IGMPv3 reports for a group to the multicast devices. This feature prevents duplicate reports from being sent to the multicast devices. The switch does not send the remaining IGMP reports for the group to the multicast routers. Immediate-Leave processing ensures optimal bandwidth management for all hosts on a switched network.
Note
You should only use the Immediate-Leave processing feature on VLANs where a single host is connected to each port. If you disable IGMP report suppression. all IGMP reports are forwarded to the multicast routers.Chapter 19 Configuring IGMP Snooping
Configuring IGMP Snooping and MVR
Immediate-Leave Processing
Immediate Leave is only supported with IGMP version 2 hosts. the switch forwards all IGMPv1. the switch sends the first IGMP report from all hosts for a group to all the multicast routers.

use one or more of the privileged EXEC commands in Table 19-4. user—Display only the user-configured multicast entries. dynamic—Display entries learned through IGMP snooping. refer to the command reference for this release. user—Display only the user-configured multicast entries. You can also display MAC address multicast entries for a VLAN configured for IGMP snooping. These are dynamically learned interfaces.
Catalyst 3560 Switch Software Configuration Guide
19-12
78-16156-01
. show ip igmp snooping querier [vlan vlan-id] Display information about the IGMP version that an interface supports.
show ip igmp snooping multicast vlan vlan-id [count | dynamic [count | group ip_address] | group ip_address | user [count | group ip_address]]
Display multicast table information for a multicast VLAN or about a specific parameter for the VLAN:
• • • •
count—Display the total number of entries for the specified command options instead of the actual entries. Display multicast table information for the switch or about a specific parameter:
• • • •
show ip igmp snooping multicast [count | dynamic [count | group ip_address] | group ip_address | user [count | group ip_address]]
count—Display the total number of entries for the specified command options instead of the actual entries. group ip_address—Display characteristics of the multicast group with the specified group IP address. dynamic—Display entries learned through IGMP snooping. To display IGMP snooping information.
(Optional) Enter vlan vlan-id to display information for a single VLAN. the switch automatically learns the interface to which a multicast router is connected. (Optional) Enter vlan vlan-id to display information for a single VLAN.
Note
When you enable IGMP snooping. For more information about the keywords and options in these commands.
Table 19-4 Commands for Displaying IGMP Snooping Information
Command show ip igmp snooping [vlan vlan-id]
Purpose Display the snooping configuration information for all VLANs on the switch or for a specified VLAN. (Optional) Enter vlan vlan-id to display information for a single VLAN. group ip_address—Display characteristics of the multicast group with the specified group IP address.
show ip igmp snooping mrouter [vlan vlan-id]
Display information on dynamically learned and manually configured multicast router interfaces.Chapter 19 Displaying IGMP Snooping Information
Configuring IGMP Snooping and MVR
Displaying IGMP Snooping Information
You can display IGMP snooping information for dynamically learned and statically configured router ports and VLAN interfaces.

You can set the switch for compatible or dynamic mode of MVR operation. multicast data received by MVR hosts is forwarded to all MVR data ports.Chapter 19
Configuring IGMP Snooping and MVR Understanding Multicast VLAN Registration
Understanding Multicast VLAN Registration
Multicast VLAN Registration (MVR) is designed for applications using wide-scale deployment of multicast traffic across an Ethernet ring-based service provider network (for example. This eliminates using unnecessary bandwidth on MVR data port links. either by IGMP reports or by MVR static configuration. Join and leave messages from all other multicast groups are managed by IGMP snooping. MVR reacts only to join and leave messages from multicast groups configured under MVR. The switch CPU identifies the MVR IP multicast streams and their associated IP multicast group in the switch forwarding table.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
19-13
. regardless of MVR host membership on those ports. if IGMP snooping and MVR are both enabled. One can be enabled or disabled without affecting the behavior of the other feature.
•
In compatible mode. even though the receivers might be in a different VLAN from the source. Only one MVR multicast VLAN per switch is supported. but to isolate the streams from the subscriber VLANs for bandwidth and security reasons. either by IGMP reports or by MVR static configuration. Any IGMP reports received from MVR hosts are also forwarded from all the MVR data ports in the switch. Although MVR operates on the underlying mechanism of IGMP snooping. intercepts the IGMP messages. MVR assumes that subscriber ports subscribe and unsubscribe (join and leave) these multicast streams by sending out IGMP join and leave messages. and modifies the forwarding table to include or remove the subscriber as a receiver of the multicast stream. However. the two features operate independently of each other.
•
Only Layer 2 ports take part in MVR. You must configure ports as MVR receiver ports. which occurs when the switch runs in compatible mode. IGMP reports received from MVR hosts are never forwarded out of MVR data ports that were configured in the switch. multicast data received by MVR hosts on the switch is forwarded from only those MVR data and client ports that the MVR hosts have explicitly joined. This forwarding behavior selectively allows traffic to cross between different VLANs. The multicast data is forwarded only to those receiver ports which MVR hosts have explicitly joined. the broadcast of multiple television channels over a service-provider network). Also. In dynamic mode. MVR allows a subscriber on a port to subscribe and unsubscribe to a multicast stream on the network-wide multicast VLAN. It allows the single multicast VLAN to be shared in the network while subscribers remain in separate VLANs. These messages can originate from an IGMP version-2-compatible host with an Ethernet connection. MVR provides the ability to continuously send multicast streams in the multicast VLAN.

DHCP assigns an IP address to the set-top box or the PC. which is a switch port configured as an MVR receiver port. Uplink ports that send and receive multicast data to and from the multicast VLAN are called MVR source ports.
Figure 19-3 Multicast VLAN Registration Example
Multicast VLAN
Cisco router
Switch B SP
SP SP
Multicast server
SP SP SP1 Multicast data Switch A RP1 RP2 RP3 RP4 RP5 RP6 RP7 Customer premises IGMP join Set-top box TV data PC Set-top box Hub SP2
SP
Multicast data
TV RP = Receiver Port SP = Source Port
TV Note: All source ports belong to the multicast VLAN. the set-top box or PC sends an IGMP report to Switch A to join the appropriate multicast. the switch CPU modifies the hardware address table to include this receiver port and VLAN as a forwarding destination of the specified multicast stream when it is received from the multicast VLAN. Multiple set-top boxes or PCs can be connected to one subscriber port. Figure 19-3 is an example configuration. If the IGMP report matches one of the configured IP multicast group addresses. When a subscriber selects a channel.Chapter 19 Understanding Multicast VLAN Registration
Configuring IGMP Snooping and MVR
Using MVR in a Multicast Television Application
In a multicast television application. a PC or a television with a set-top box can receive the multicast stream.
Catalyst 3560 Switch Software Configuration Guide
19-14
101364
78-16156-01
.

The Switch A CPU must capture all IGMP join and leave messages from receiver ports and forward them to the multicast VLAN of the source (uplink) port. the receiver port is removed from multicast group membership. page 19-16 Configuring MVR Global Parameters. page 19-16 MVR Configuration Guidelines and Limitations. Enable the Immediate Leave feature only on receiver ports to which a single receiver device is connected. which speeds up leave latency. As soon as the leave message is received. Switch A. when the switch receives an IGMP leave message from a subscriber on a receiver port. an IGMP query is not sent from the receiver port on which the IGMP leave was received. the port leaves a multicast group more quickly. MVR eliminates the need to duplicate television-channel multicast traffic for subscribers in each VLAN. If the CPU does not receive a response. based on the MVR mode. Switch B. the set-top box sends an IGMP leave message for the multicast stream. If the Immediate-Leave feature is enabled on a receiver port. Multicast traffic for all channels is only sent around the VLAN trunk once—only on the multicast VLAN. it eliminates the receiver port as a forwarding destination for this group. These messages dynamically register for streams of multicast traffic in the multicast VLAN on the Layer 3 device. that set-top box must respond within the maximum response time specified in the query. the receiver port is removed from multicast group membership.
Configuring MVR
These sections include basic MVR configuration information:
• • • •
Default MVR Configuration. selectively allowing traffic to cross between two VLANs. With Immediate Leave. it sends out an IGMP query on that port and waits for IGMP group membership reports. Without Immediate Leave. The access layer switch. page 19-18
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
19-15
. IGMP reports are sent to the same IP multicast group address as the multicast data. If there is another set-top box in the VLAN still subscribing to this group. The IGMP leave and join messages are in the VLAN to which the subscriber port is assigned. page 19-17 Configuring MVR Interfaces. If no reports are received in a configured time period.Chapter 19
Configuring IGMP Snooping and MVR Configuring MVR
When a subscriber changes channels or turns off the television. modifies the forwarding behavior to allow the traffic to be forwarded from the multicast VLAN to the subscriber port in a different VLAN. The switch CPU sends a MAC-based general query through the receiver port VLAN.

they cannot be trunk ports. MVR is disabled. MVR can coexist with IGMP snooping on a switch. However. If you try to enable MVR while multicast routing and a multicast routing protocol are enabled.
Table 19-5 Default MVR Configuration
Feature MVR Multicast addresses Query response time Multicast VLAN Mode Interface (per port) default Immediate Leave
Default Setting Disabled globally and per interface None configured 0. MVR does not support IGMPv3 messages.5 second VLAN 1 Compatible Neither a receiver nor a source port Disabled on all ports
MVR Configuration Guidelines and Limitations
Follow these guidelines when configuring MVR:
• • • •
Receiver ports can only be access ports.
•
• • •
Catalyst 3560 Switch Software Configuration Guide
19-16
78-16156-01
. MVR data received on an MVR receiver port is not forwarded to MVR source ports. the operation to enable MVR is cancelled.xxx). and you receive a warning message. Because MVR on the Catalyst 3560 switch uses IP multicast addresses instead of MAC multicast addresses. If you enable multicast routing and a multicast routing protocol while MVR is enabled. MVR multicast data received in the source VLAN and leaving from receiver ports has its time-to-live (TTL) decremented by 1 in the Catalyst 3560 switch.Chapter 19 Configuring MVR
Configuring IGMP Snooping and MVR
Default MVR Configuration
Table 19-5 shows the default MVR configuration.0. but should not belong to the multicast VLAN. if the switch is interoperating with Catalyst 3550 or Catalyst 3500 XL switches. you should not configure IP addresses that alias between themselves or with the reserved IP multicast addresses (in the range 224. The maximum number of multicast entries (MVR group addresses) that can be configured on a switch (that is. the maximum number of television channels that can be received) is 256. Receiver ports on a switch can be in different VLANs. aliased IP multicast addresses are allowed on the switch. and you receive an error message.0. MVR is not supported when multicast routing is enabled on a switch.

The value is in units of tenths of a second. The range is from 1 to 100 and the default is 5 tenths or one-half second.Chapter 19
Configuring IGMP Snooping and MVR Configuring MVR
Configuring MVR Global Parameters
You do not need to set the optional MVR parameters if you choose to use the default settings. Beginning in privileged EXEC mode. Enable MVR on the switch. The default is VLAN 1. The VLAN range is 1 to 4094.
• •
configure terminal mvr mvr group ip-address [count]
Step 4
mvr querytime value
Step 5
mvr vlan vlan-id
Step 6
mvr mode {dynamic | compatible} (Optional) Specify the MVR mode of operation: dynamic—Allows dynamic MVR membership on source ports. (Optional) Specify the VLAN in which multicast data is received. Verify the configuration. Configure an IP multicast address on the switch or use the count parameter to configure a contiguous series of MVR group addresses (the range for count is 1 to 256.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
19-17
. all source ports must belong to this VLAN. follow these steps to configure MVR parameters:
Command
Step 1 Step 2 Step 3
Purpose Enter global configuration mode.
Step 7 Step 8 Step 9
end show mvr or show mvr members copy running-config startup-config
Return to privileged EXEC mode. refer to the command reference for this release. If you do want to change the default parameters (except for the MVR VLAN). you must first enable MVR. the default is 1). (Optional) Define the maximum time to wait for IGMP report memberships on a receiver port before removing the port from multicast group membership.
The default is compatible mode.
Note
For complete syntax and usage information for the commands used in this section. compatible—Is compatible with Catalyst 3500 XL and Catalyst 2900 XL switches and does not support IGMP dynamic joins on source ports. Any multicast data sent to this address is sent to all source ports on the switch and all receiver ports that have elected to receive data on that multicast address. Each multicast address would correspond to one television channel. (Optional) Save your entries in the configuration file.

It does not receive data unless it becomes a member of the multicast group. it applies to receiver ports and source ports. specify the MVR multicast VLAN as VLAN 22. follow these steps to configure Layer 2 MVR interfaces: Command
Step 1 Step 2 Step 3 Step 4
Purpose Enter global configuration mode. set the query time to 1 second (10 tenths). and enter the type and number of the Layer 2 port to configure.
Step 5
mvr vlan vlan-id group [ip-address] (Optional) Statically configure a port to receive multicast traffic sent to the multicast VLAN and the IP multicast address. Configure an MVR port as one of these:
•
configure terminal mvr interface interface-id mvr type {source | receiver}
source—Configure uplink ports that receive and send multicast data as source ports.
Catalyst 3560 Switch Software Configuration Guide
19-18
78-16156-01
. In dynamic mode.4 querytime 10 vlan 22 mode dynamic
You can use the show mvr members privileged EXEC command to verify the MVR multicast group addresses on the switch. receiver—Configure a port as a receiver port if it is a subscriber port and should only receive multicast data.23.Chapter 19 Configuring MVR
Configuring IGMP Snooping and MVR
To return the switch to its default settings. Receiver ports cannot belong to the multicast VLAN. A port statically configured as a member of a group remains a member of the group until statically removed. the operation fails.
•
The default configuration is as a non-MVR port.
Configuring MVR Interfaces
Beginning in privileged EXEC mode. Subscribers cannot be directly connected to source ports. This example shows how to enable MVR. and set the MVR mode as dynamic:
Switch(config)# Switch(config)# Switch(config)# Switch(config)# Switch(config)# Switch(config)# mvr mvr mvr mvr mvr end group 228. All source ports on a switch belong to the single multicast VLAN. either statically or by using IGMP leave and join messages.
Receiver ports can also dynamically join multicast groups by using IGMP join and leave messages. Enter interface configuration mode. use the no mvr [mode | group ip-address | querytime | vlan] global configuration commands. this command applies to only receiver ports.
Note
In compatible mode. configure the group address. If you attempt to configure a non-MVR port with MVR characteristics.1. Enable MVR on the switch.

metropolitan or multiple-dwelling unit (MDU) installations. An IGMP profile can contain one or more multicast groups and specifies whether access to the group is permitted or denied. [members [vlan vlan-id]] When a specific interface is entered. displays all multicast group members on this port or. If the filtering action permits access to the multicast group.
show mvr interface [interface-id] Displays all MVR interfaces and their MVR configurations. not static configuration. With the IGMP filtering feature. use the commands in Table 19-6 to display MVR configuration:
Table 19-6 Commands for Displaying MVR Information
Command show mvr
Purpose Displays MVR status and values for the switch—whether MVR is enabled or disabled. show mvr members [ip-address] Displays all receiver and source ports that are members of any IP multicast group or the specified IP multicast group IP address. you might want to control the set of multicast groups to which a user on a switch port can belong.
•
Immediate Leave—Enabled or Disabled
If the members keyword is entered. all multicast group members on the VLAN. It does not control general IGMP queries. – Inactive means that the port is not part of any VLAN. IGMP filtering has no relationship with the function that directs the forwarding of IP multicast traffic. the IGMP join report requesting the stream of IP multicast traffic is dropped. displays this information:
• •
Type—Receiver or Source Status—One of these:
– Active means the port is part of a VLAN.Chapter 19 Displaying MVR Information
Configuring IGMP Snooping and MVR
Displaying MVR Information
You can display MVR information for the switch or for a specified interface. the multicast VLAN. The VLAN ID range is 1 to 4094. based on some type of subscription or service plan. if a VLAN identification is entered. IGMP filtering is only applicable to dynamic learning of IP multicast group addresses. the query response time. IGMP filtering controls only group specific query and membership reports. the maximum (256) and current (0 through 256) number of multicast groups. Beginning in privileged EXEC mode. You might also want to limit the number of multicast groups to which a user on a switch port can belong. If an IGMP profile denying access to a multicast group is applied to a switch port. – Up/Down means that the port is forwarding or nonforwarding. and the MVR mode. including join and leave reports. do not enter leading zeros.
Catalyst 3560 Switch Software Configuration Guide
19-20
78-16156-01
. You can control the distribution of multicast services. and the port is not allowed to receive IP multicast traffic from that group. you can filter multicast joins on a per-port basis by configuring IP multicast profiles and associating them with individual switch ports. the IGMP report from the port is forwarded for normal processing. for example.
Configuring IGMP Filtering and Throttling
In some environments. such as IP/TV. The filtering feature operates in the same manner whether CGMP or MVR is used to forward the multicast traffic.

the IGMP snooping forwarding table contains the maximum number of entries. page 19-24 (optional) Configuring the IGMP Throttling Action. page 19-22 (optional) Applying IGMP Profiles.
Note
IGMPv3 join and leave messages are not supported on switches running IGMP filtering. page 19-24 (optional)
Default IGMP Filtering and Throttling Configuration
Table 19-7 shows the default IGMP filtering configuration. and the interface receives an IGMP join report. For configuration guidelines.Chapter 19
Configuring IGMP Snooping and MVR Configuring IGMP Filtering and Throttling
You can also set the maximum number of IGMP groups that a Layer 2 interface can join. you can configure an interface to drop the IGMP report or to remove a randomly selected multicast entry in the forwarding table and then to add the IGMP group in the report to the table. page 19-23 (optional) Setting the Maximum Number of IGMP Groups. see the “Configuring the IGMP Throttling Action” section on page 19-24.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
19-21
. page 19-21 Configuring IGMP Profiles. If the maximum number of IGMP groups is set. you can also set the maximum number of IGMP groups that a Layer 2 interface can join. the default IGMP throttling action is to deny the IGMP report. With the IGMP throttling feature.
Table 19-7 Default IGMP Filtering Configuration
Feature IGMP filters IGMP maximum number of IGMP groups IGMP profiles IGMP profile action
Default Setting None applied No maximum set None defined Deny the range addresses
When the maximum number of groups is in forwarding table. These sections describe how to configure IGMP filtering and throttling:
• • • • •
Default IGMP Filtering and Throttling Configuration.

use the no range ip multicast address IGMP profile configuration command. a space. if neither the permit nor deny keyword is included. exit: Exits from igmp-profile configuration mode. Enter IGMP profile configuration mode. range: Specifies a range of IP addresses for the profile. the default is to deny access to the range of IP addresses.
The default is for the switch to have no IGMP profiles configured. If entering a range. If no action is configured. Verify the profile configuration. The range is from 1 to 4294967295.
Catalyst 3560 Switch Software Configuration Guide
19-22
78-16156-01
. From this mode.
configure terminal ip igmp profile profile number permit | deny
Step 4
range ip multicast address
Step 5 Step 6 Step 7
end show ip igmp profile profile number copy running-config startup-config
Return to privileged EXEC mode. enter the low IP multicast address. You can enter a single IP address or a range with a start and an end address. you can specify the parameters of the IGMP profile to be used for filtering IGMP join requests from a port. this is the default condition. To delete an IP multicast address or range of IP multicast addresses. Beginning in privileged EXEC mode.Chapter 19 Configuring IGMP Filtering and Throttling
Configuring IGMP Snooping and MVR
Configuring IGMP Profiles
To configure an IGMP profile. Enter the IP multicast address or range of IP multicast addresses to which access is being controlled. use the no ip igmp profile profile number global configuration command. you can create the profile by using these commands:
• • • • •
deny: Specifies that matching addresses are denied. (Optional) Set the action to permit or deny access to the IP multicast address. permit: Specifies that matching addresses are permitted. and assign a number to the profile you are configuring. use the ip igmp profile global configuration command with a profile number to create an IGMP profile and to enter IGMP profile configuration mode. the default for the profile is to deny access. When you are in IGMP profile configuration mode. no: Negates a command or sets its defaults. When a profile is configured. You can use the range command multiple times to enter multiple addresses or ranges of addresses.
To delete a profile. (Optional) Save your entries in the configuration file. follow these steps to create an IGMP profile: Command
Step 1 Step 2 Step 3
Purpose Enter global configuration mode. and the high IP multicast address.

9. Apply the specified IGMP profile to the interface. If the action was to deny (the default).0
Applying IGMP Profiles
To control access as defined in an IGMP profile. and enter the physical interface to configure. Return to privileged EXEC mode.0 229. Beginning in privileged EXEC mode. You can apply a profile to multiple interfaces. use the ip igmp filter interface configuration command to apply the profile to the appropriate interfaces.Chapter 19
Configuring IGMP Snooping and MVR Configuring IGMP Filtering and Throttling
This example shows how to create IGMP profile 4 allowing access to the single IP multicast address and how to verify the configuration.9. but each interface can only have one profile applied to it.0 Switch(config-igmp-profile)# end Switch# show ip igmp profile 4 IGMP Profile 4 permit range 229.9. follow these steps to apply an IGMP profile to a switch port: Command
Step 1 Step 2
Purpose Enter global configuration mode. use the no ip igmp filter profile number interface configuration command. it would not appear in the show ip igmp profile output display. (Optional) Save your entries in the configuration file.
configure terminal interface interface-id
Step 3 Step 4 Step 5 Step 6
ip igmp filter profile number end show running-config interface interface-id copy running-config startup-config
To remove a profile from an interface. Enter interface configuration mode.9.
Switch(config)# ip igmp profile 4 Switch(config-igmp-profile)# permit Switch(config-igmp-profile)# range 229. Verify the configuration.9. You cannot apply profiles to ports that belong to an EtherChannel port group. The interface must be a Layer 2 port that does not belong to an EtherChannel port group. The profile number can be from 1 to 4294967295. you cannot apply IGMP profiles to routed ports or SVIs. You can apply IGMP profiles to layer 2 access ports only. This example shows how to apply IGMP profile 4 to a port:
Switch(config)# interface gigabitethernet0/2 Switch(config-if)# ip igmp filter 4 Switch(config-if)# end
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
19-23
.9.

The range is from 0 to 4294967294. This restriction can be applied to Layer 2 ports only. you cannot set a maximum number of IGMP groups on routed ports or SVIs. Set the maximum number of IGMP groups that the interface can join. Follow these guidelines when configuring the IGMP throttling action:
• •
This restriction can be applied to Layer 2 ports only. Verify the configuration. When the maximum group limitation is set to the default (no maximum). you can configure an interface to remove a randomly selected multicast entry in the forwarding table and to add the next IGMP group to it by using the ip igmp max-groups action replace interface configuration command. Beginning in privileged EXEC mode.Chapter 19 Configuring IGMP Filtering and Throttling
Configuring IGMP Snooping and MVR
Setting the Maximum Number of IGMP Groups
You can set the maximum number of IGMP groups that a Layer 2 interface can join by using the ip igmp max-groups interface configuration command. use the no ip igmp max-groups interface configuration command. Use the no form of this command to set the maximum back to the default. follow these steps to set the maximum number of IGMP groups in the forwarding table: Command
Step 1 Step 2
Purpose Enter global configuration mode. and enter the interface to configure. Enter interface configuration mode. Return to privileged EXEC mode.
Switch(config)# interface gigabitethernet0/2 Switch(config-if)# ip igmp max-groups 25 Switch(config-if)# end
Configuring the IGMP Throttling Action
After you set the maximum number of IGMP groups that a Layer 2 interface can join. The interface can be a Layer 2 port that does not belong to an EtherChannel group or a EtherChannel interface. entering the ip igmp max-groups action {deny | replace} command has no effect. which is to drop the IGMP join report. You also can use this command on a logical EtherChannel interface but cannot use it on ports that belong to an EtherChannel port group. which is no limit. you can use this command on a logical EtherChannel interface but cannot use it on ports that belong to an EtherChannel port group. The default is to have no maximum set. Use the no form of this command to return to the default. (Optional) Save your entries in the configuration file. This example shows how to limit to 25 the number of IGMP groups that a port can join.
Catalyst 3560 Switch Software Configuration Guide
19-24
78-16156-01
.
configure terminal interface interface-id
Step 3
ip igmp max-groups number
Step 4 Step 5 Step 6
end show running-config interface interface-id copy running-config startup-config
To remove the maximum group limitation and return to the default of no maximum.

The interface cannot be a trunk port. the entries that were previously in the forwarding
table are not removed but are aged out. replace—Remove a randomly selected multicast entry in the forwarding table. follow these steps to configure the throttling action when the maximum number of entries is in the forwarding table: Command
Step 1 Step 2
Purpose Enter global configuration mode.
To return to the default action of dropping the report.Chapter 19
Configuring IGMP Snooping and MVR Configuring IGMP Filtering and Throttling
•
If you configure the throttling action and set the maximum group limitation after an interface has added multicast entries to the forwarding table. This example shows how to configure a port to remove a randomly selected multicast entry in the forwarding table and to add an IGMP group to the forwarding table when the maximum number of entries is in the table. use the no ip igmp max-groups action interface configuration command. After these entries are aged out and the maximum number of entries is in the forwarding table.
– If you configure the throttling action as deny. the switch drops the next IGMP report received on the interface. To prevent the switch from removing the forwarding-table entries. Enter interface configuration mode. The interface can be a Layer 2 port that does not belong to an EtherChannel group or an EtherChannel interface. When the maximum number of entries is in the forwarding table.
Switch(config)# interface gigabitethernet0/1 Switch(config-if)# ip igmp max-groups action replace Switch(config-if)# end
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
19-25
. Beginning in privileged EXEC mode. the entries that were previously in the
forwarding table are removed. When an interface receives an IGMP report and the maximum number of entries is in the forwarding table. you can configure the IGMP throttling action before an interface adds entries to the forwarding table. the forwarding-table entries are either aged out or removed. specify the action that the interface takes:
• •
configure terminal interface interface-id
Step 3
ip igmp max-groups action {deny | replace}
deny—Drop the report. and enter the physical interface to configure. Verify the configuration.
– If you configure the throttling action as replace.
Step 4 Step 5 Step 6
end show running-config interface interface-id copy running-config startup-config
Return to privileged EXEC mode. and add the IGMP group in the report. the switch deletes a randomly selected entry and adds an entry for the next IGMP report received on the interface. (Optional) Save your entries in the configuration file. depending on the throttling action.

Catalyst 3560 Switch Software Configuration Guide
19-26
78-16156-01
.Chapter 19 Displaying IGMP Filtering and Throttling Configuration
Configuring IGMP Snooping and MVR
Displaying IGMP Filtering and Throttling Configuration
You can display IGMP profile characteristics. including (if configured) the maximum number of IGMP groups to which an interface can belong and the IGMP profile applied to the interface. You can also display the IGMP throttling configuration for all interfaces on the switch or for a specified interface. Use the privileged EXEC commands in Table 19-8 to display IGMP filtering and throttling configuration:
Table 19-8 Commands for Displaying IGMP Filtering and Throttling Configuration
Command show ip igmp profile [profile number] show running-config [interface interface-id]
Purpose Displays the specified IGMP profile or all the IGMP profiles defined on the switch. Displays the configuration of the specified interface or the configuration of all interfaces on the switch. and you can display the IGMP profile and maximum group configuration for all interfaces on the switch or for a specified interface.

that type of traffic is dropped. multicast. However.
Figure 20-1 Broadcast Storm Control Example
Forwarded traffic Blocked traffic Total number of broadcast packets or bytes Threshold
0
T1
T2
T3
T4
T5
Time
The combination of the storm-control suppression level and the 200-millisecond time interval control the way the storm control algorithm works. Errors in the protocol-stack implementation or in the network configuration can cause a storm. A LAN storm occurs when packets flood the LAN. the broadcast traffic being forwarded exceeded the configured threshold between time intervals T1 and T2 and between T4 and T5. Storm control (or traffic suppression) monitors incoming traffic statistics over a time period and compares the measurement with a predefined suppression level threshold. or unicast storm on one of the physical interfaces. or unicast traffic on that port is blocked. further traffic of that type is suppressed until the incoming traffic falls below the threshold level. all traffic of that kind is dropped for the next time period. the switch monitors packets passing from an interface to the switching bus and determines if the packet is unicast. In this example. The switch monitors the number of broadcast. multicast.
Note
When the storm control threshold for multicast traffic is reached. The graph in Figure 20-1 shows broadcast traffic patterns on an interface over a given period of time. or broadcast.0 means that all broadcast. such as bridge protocol data unit (BDPU) and Cisco Discovery Protocol (CDP) frames. T3). or unicast packets received within a 200-millisecond time interval. This threshold is specified as a percentage of total available bandwidth that can be used by broadcast (multicast or unicast) traffic. The switch supports separate storm control thresholds for broadcast. If the threshold of a traffic type is reached. it is again forwarded. if broadcast traffic does not exceed the threshold. and when a threshold for one type of traffic is reached. Therefore. multicast. and unicast traffic.Chapter 20 Configuring Storm Control
Configuring Port-Based Traffic Control
Understanding Storm Control
Storm control prevents switchports on a LAN from being disrupted by a broadcast. the switch does not differentiate between routing updates. and regular multicast data traffic. are blocked. such as OSPF. A threshold value of 100 percent means that no limit is placed on the traffic. multicast. When storm control is enabled. When the amount of specified traffic exceeds the threshold. At the next time interval (for example. so both types of traffic are blocked. broadcast traffic is blocked during the intervals following T2 and T5.
Catalyst 3560 Switch Software Configuration Guide
20-2
46651
78-16156-01
. A value of 0. multicast. all multicast traffic except control traffic. creating excessive traffic and degrading network performance. The example can also be applied to multicast and unicast traffic. A higher threshold allows more packets to pass through. The threshold represents the percentage of the total available bandwidth of the port.

it is not supported on EtherChannel port channels even though the command is available in the CLI.
Note
Although visible in the command-line interface (CLI) online help. and enter the type and number of the physical interface to configure.
Default Storm Control Configuration
By default. and switchport unicast interface configuration commands for setting suppression levels are not available. the suppression level is 100 percent.level]
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
20-3
.Chapter 20
Configuring Port-Based Traffic Control Configuring Storm Control
Note
Because packets do not arrive at uniform intervals. the switchport broadcast. Specify the broadcast traffic suppression level for an interface as a percentage of total bandwidth. Enter interface configuration mode.0 means that all broadcast traffic on that port is blocked. Beginning in privileged EXEC mode. Depending on the sizes of the packets making up the incoming traffic. You use the storm-control interface configuration commands to set the threshold value for each traffic type. A value of 0. However.
Enabling Storm Control
You enable storm control on an interface and enter the percentage of total available bandwidth that you want to be used by a particular type of traffic. entering 100 percent allows all traffic. threshold percentages are approximations. A threshold value of 100 percent means that no limit is placed on broadcast traffic. unicast. the optional fraction of a level can be from 0 to 99. The switch continues to monitor traffic on the port. the actual enforced threshold might differ from the configured level by several percentage points. follow these steps to enable a particular type of storm control:
Command
Step 1 Step 2 Step 3
Purpose Enter global configuration mode. broadcast. the 200-millisecond time interval during which traffic activity is measured can affect the behavior of storm control. because of hardware limitations and the way in which packets of different sizes are counted. that is. and multicast storm control is disabled on the switch interfaces.
configure terminal interface interface-id storm-control broadcast level level [. and when the utilization level is below the threshold level. replaced by the storm-control interface configuration commands. These commands are obsolete. the type of traffic that was dropped is forwarded again. The level can be from 1 to 100. switchport multicast.
Note
Storm control is supported only on physical interfaces.

or no storm-control unicast level interface configuration commands. the optional fraction of a level can be from 0 to 99.5 Switch(config-if)# end Switch# show storm-control gigabitethernet0/1 multicast Interface Filter State Level Current --------. Return to privileged EXEC mode. A value of 0. no storm-control multicast level.0 means that all unicast traffic on that port is blocked.------. The level can be from 1 to 100.------------. use the no storm-control broadcast level.
storm-control multicast level level [.
Step 8
To disable storm control. broadcast storm control settings are displayed. copy running-config startup-config (Optional) Save your entries in the configuration file.5 percent on a port and to verify the configuration:
Switch# configure terminal Switch(config)# interface gigabitethernet0/1 Switch(config-if)# storm-control multicast level 70.level]
Step 5
storm-control unicast level level [.00%
This example shows how to disable the multicast storm control on a port:
Switch# configure terminal Switch(config)# interface gigabitethernet0/1 Switch(config-if)# no storm-control multicast level Switch(config-if)# end
Catalyst 3560 Switch Software Configuration Guide
20-4
78-16156-01
. This example shows how to set the multicast storm control level at 70. If you do not enter a traffic type.50% 0. A value of 0. A threshold value of 100 percent means that no limit is placed on broadcast traffic.level]
Step 6 Step 7
end
show storm-control [interface-id] [broadcast | Verify the storm control suppression levels set on the interface for multicast | unicast] the specified traffic type.Chapter 20 Configuring Storm Control
Configuring Port-Based Traffic Control
Command
Step 4
Purpose Specify the multicast traffic suppression level for an interface as a percentage of total bandwidth. the optional fraction of a level can be from 0 to 99.0 means that all multicast traffic on that port is blocked. The level can be from 1 to 100. Specify the unicast traffic suppression level for an interface as a percentage of total bandwidth.------Gi0/1 Forwarding 70. A threshold value of 100 percent means that no limit is placed on broadcast traffic.

When you enable protected ports for a port channel. the use of protected ports ensures that there is no exchange of unicast. (Optional) Save your entries in the configuration file.
configure terminal interface interface-id
Step 3 Step 4 Step 5 Step 6
switchport protected end show interfaces interface-id switchport copy running-config startup-config
To disable protected port. for example gigabitethernet0/1. or multicast traffic between these ports on the switch.
•
Default Protected Port Configuration
The default is to have no protected ports defined. all traffic passing between protected ports must be forwarded through a Layer 3 device. Verify your entries. follow these steps to define a port as a protected port: Command
Step 1 Step 2
Purpose Enter global configuration mode. In such an environment. Traffic cannot be forwarded between protected ports at Layer 2. or broadcast) to any other port that is also a protected port.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
20-5
. use the no switchport protected interface configuration command. Enter interface configuration mode. Gigabit Ethernet port 1) or an EtherChannel group (for example. Return to privileged EXEC mode.
Protected Port Configuration Guidelines
You can configure protected ports on a physical interface (for example.Chapter 20
Configuring Port-Based Traffic Control Configuring Protected Ports
Configuring Protected Ports
Some applications require that no traffic be forwarded at Layer 2 between ports on the same switch so that one neighbor does not see the traffic generated by another neighbor. Protected ports have these features:
•
A protected port does not forward any traffic (unicast. and enter the type and number of the interface to configure. Configure the interface to be a protected port.
Configuring a Protected Port
Beginning in privileged EXEC mode. multicast. it is enabled for all ports in the port-channel group. broadcast. port-channel 5). Forwarding behavior between a protected port and a nonprotected port proceeds as usual.

Block unknown unicast forwarding out of the port. To prevent unknown unicast or multicast traffic from being forwarded from one port to another. If unknown unicast and multicast traffic is forwarded to a protected port. you can block a port (protected or nonprotected) from flooding unknown unicast or multicast packets to other ports. but to flood these packets to all ports. Return to privileged EXEC mode. follow these steps to disable the flooding of multicast and unicast packets out of an interface:
Command
Step 1 Step 2 Step 3 Step 4 Step 5 Step 6 Step 7
Purpose Enter global configuration mode. Beginning in privileged EXEC mode. Block unknown multicast forwarding out of the port.Chapter 20 Configuring Port Blocking
Configuring Port-Based Traffic Control
This example shows how to configure a port as a protected port:
Switch# configure terminal Switch(config)# interface gigabitethernet0/1 Switch(config-if)# switchport protected Switch(config-if)# end
Configuring Port Blocking
By default.
Catalyst 3560 Switch Software Configuration Guide
20-6
78-16156-01
. it is blocked on all ports in the port channel group. the switch floods packets with unknown destination MAC addresses out of all ports. Enter interface configuration mode.
Blocking Flooded Traffic on an Interface
Note
The interface can be a physical interface or an EtherChannel group. Verify your entries.
Default Port Blocking Configuration
The default is to not block flooding of unknown multicast and unicast traffic out of a port. When you block multicast or unicast traffic for a port channel. (Optional) Save your entries in the configuration file. and enter the type and number of the interface to configure.
configure terminal interface interface-id switchport block multicast switchport block unicast end show interfaces interface-id switchport copy running-config startup-config
To return the interface to the default condition where no traffic is blocked and normal forwarding occurs on the port. there could be security issues. use the no switchport block {multicast | unicast} interface configuration commands.

if a station with a secure MAC address configured or learned on one secure port attempts to access another secure port. the port does not forward packets with source addresses outside the group of defined addresses. page 20-14
Understanding Port Security
This section contains information about these topics:
• •
Secure MAC Addresses. a violation is flagged. Also. These sections include port security configuration information and procedures:
• • • • •
Understanding Port Security. a security violation occurs. page 20-11 Enabling and Configuring Port Security Aging. page 20-9
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
20-7
. When you assign secure MAC addresses to a secure port. the workstation attached to that port is assured the full bandwidth of the port. page 20-8 Security Violations. If you limit the number of secure MAC addresses to one and assign a single secure MAC address. If a port is configured as a secure port and the maximum number of secure MAC addresses is reached. page 20-10 Configuration Guidelines. page 20-7 Default Port Security Configuration. page 20-10 Enabling and Configuring Port Security. when the MAC address of a station attempting to access the port is different from any of the identified secure MAC addresses.Chapter 20
Configuring Port-Based Traffic Control Configuring Port Security
This example shows how to block unicast and multicast flooding on a port:
Switch# configure terminal Switch(config)# interface gigabitethernet0/1 Switch(config-if)# switchport block multicast Switch(config-if)# switchport block unicast Switch(config-if)# end
Configuring Port Security
You can use the port security feature to restrict input to an interface by limiting and identifying MAC addresses of the stations allowed to access the port.

If these addresses are saved in the configuration file. All sticky secure MAC addresses are added to the running configuration. the interface converts all the dynamic secure MAC addresses. including those that were dynamically learned before sticky learning was enabled. the interface does not need to dynamically reconfigure them.” This number represents the total of available MAC addresses. If you save the sticky secure MAC addresses in the configuration file. The switch supports these types of secure MAC addresses:
•
Static secure MAC addresses—These are manually configured by using the switchport port-security mac-address mac-address interface configuration command.
Note
If you try to set the maximum value to a number less than the number of secure addresses already configured on an interface.
• •
You can configure an interface to convert the dynamic MAC addresses to sticky secure MAC addresses and to add them to the running configuration by enabling sticky learning. “Configuring SDM Templates. which is the startup configuration used each time the switch restarts. and removed when the switch restarts. See Chapter 7. when the switch restarts. and added to the running configuration. If you do not save the sticky secure addresses. the sticky secure MAC addresses are converted to dynamic secure addresses and are removed from the running configuration. If sticky learning is disabled. To enable sticky learning.
Catalyst 3560 Switch Software Configuration Guide
20-8
78-16156-01
. enter the switchport port-security mac-address sticky interface configuration command. the interface does not need to relearn these addresses. The maximum number of secure MAC addresses that you can configure on a switch is determined by the maximum number of available MAC addresses allowed in the system. the command is rejected. they are lost. Sticky secure MAC addresses—These can be dynamically learned or manually configured. to sticky secure MAC addresses. when the switch restarts. and added to the switch running configuration. stored only in the address table. Dynamic secure MAC addresses—These are dynamically configured. stored in the address table. stored in the address table. including those used for other Layer 2 functions and any other secure MAC addresses configured on interfaces. The sticky secure MAC addresses do not automatically become part of the configuration file.Chapter 20 Configuring Port Security
Configuring Port-Based Traffic Control
Secure MAC Addresses
You configure the maximum number of secure addresses allowed on a port by using the switchport port-security maximum value interface configuration command. This number is determined by the active Switch Database Management (SDM) template. When you enter this command.

and a station whose MAC address is not in the address table attempts to access the interface. The switch returns an error message if you manually configure an address that would cause a security violation. you can bring it out of this state by entering the errdisable recovery cause psecure-violation global configuration command. An SNMP trap is sent.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
20-9
. a syslog message is logged. shutdown—a port security violation causes the interface to become error-disabled and to shut down immediately. packets with unknown source addresses are dropped until you remove a sufficient number of secure MAC addresses to drop below the maximum value or increase the number of maximum allowable addresses.
Table 20-1 Security Violation Mode Actions
Violation Mode protect restrict shutdown
Traffic is forwarded1 No No No
Sends SNMP trap No Yes Yes
Sends syslog message No Yes Yes
Displays error message2 No No No
Violation counter increments No Yes Yes
Shuts down port No No Yes
1.
You can configure the interface for one of three violation modes. or you can manually re-enable it by entering the shutdown and no shut down interface configuration commands. and the port LED turns off. a syslog message is logged. An SNMP trap is sent.Chapter 20
Configuring Port-Based Traffic Control Configuring Port Security
Security Violations
It is a security violation when one of these situations occurs:
• •
The maximum number of secure MAC addresses have been added to the address table. In this mode. packets with unknown source addresses are dropped until you remove a sufficient number of secure MAC addresses to drop below the maximum value or increase the number of maximum allowable addresses. This is the default mode. The protect mode disables learning when any VLAN reaches its maximum limit.
•
Table 20-1 shows the violation mode and the actions taken when you configure an interface for port security. based on the action to be taken if a violation occurs:
•
protect—when the number of secure MAC addresses reaches the maximum limit allowed on the port. When a secure port is in the error-disabled state. and the violation counter increments. You are not notified that a security violation has occurred.
Note
We do not recommend configuring the protect violation mode on a trunk port. you are notified that a security violation has occurred.
•
restrict—when the number of secure MAC addresses reaches the maximum limit allowed on the port. even if the port has not reached its maximum limit. An address learned or configured on one secure interface is seen on another secure interface in the same VLAN. Packets with unknown source addresses are dropped until you remove a sufficient number of secure MAC addresses. 2. and the violation counter increments.

Chapter 20 Configuring Port Security
Configuring Port-Based Traffic Control
Default Port Security Configuration
Table 20-2 shows the default port security configuration for an interface.
Table 20-2 Default Port Security Configuration
Feature Port security Sticky address learning Maximum number of secure MAC addresses per port Violation mode Port security aging
Default Setting Disabled on a port.
Note
Voice VLAN is only supported on access ports and not on trunk ports. Connecting a PC to the IP phone requires additional MAC addresses. Disabled. the IP phone requires up to two MAC addresses. the new value overwrites the previously configured value. and the new value is greater than the previous value. Type is absolute.
Configuration Guidelines
Follow these guidelines when configuring port security:
• • • •
Port security can only be configured on static access ports or trunk ports.
• •
•
•
Catalyst 3560 Switch Software Configuration Guide
20-10
78-16156-01
. 1. The IP phone address is learned on the voice VLAN and might also be learned on the access VLAN. dynamic port security is automatically enabled on the voice VLAN. the command is rejected. Disabled. Shutdown. even though the configuration is allowed. When you enter a maximum secure address value for an interface. Aging time is 0. A secure port cannot be a destination port for Switched Port Analyzer (SPAN). A secure port cannot be a dynamic access port. and all addresses seen on the access VLAN to which the port belongs are learned as sticky secure addresses. The port shuts down when the maximum number of secure MAC addresses is exceeded. you must set the maximum allowed secure addresses on the port to two plus the maximum number of secure addresses allowed on the access VLAN. all addresses on the voice VLAN are learned as dynamic secure addresses.
•
When you enable port security on an interface that is also configured with a voice VLAN. When a voice VLAN is configured on a secure port that is also configured as a sticky secure port. You cannot configure static secure or sticky secure MAC addresses in the voice VLAN. Static aging is disabled. You cannot configure port security on a per-VLAN basis. When the port is connected to a Cisco IP phone. A secure port cannot belong to a Fast EtherChannel a Gigabit EtherChannel port group. If the new value is less than the previous value and the number of configured secure addresses on the interface exceeds the new value. If any type of port security is enabled on the access VLAN. The switch does not support port security aging of sticky secure MAC addresses.

the per-VLAN maximum value is used. you can set the maximum number of secure MAC addresses on a VLAN. including those used for other Layer 2 functions and any other secure MAC addresses configured on interfaces. Set the interface switchport mode as access or trunk. the default value is used. an interface in the default mode (dynamic auto) cannot be configured as a secure port. vlan vlan-list—set a per-VLAN maximum value on a range of VLANs separated by a hyphen. “Configuring SDM Templates. See Chapter 7. (Optional) For trunk ports. or a series of VLANs separated by commas. For non-specified VLANs.”This number represents the total of available MAC addresses. If the vlan keyword is not entered. (Optional) Set the maximum number of secure MAC addresses for the interface. Enable port security on the interface. follow these steps to restrict input to an interface by limiting and identifying MAC addresses of the stations allowed to access the port: Command
Step 1 Step 2 Step 3 Step 4 Step 5
Purpose Enter global configuration mode.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
20-11
. The maximum number of secure MAC addresses that you can configure on a switch is determined by the maximum number of available MAC addresses allowed in the system. This number is determined by the active Switch Database Management (SDM) template.
• •
configure terminal interface interface-id switchport mode {access | trunk} switchport port-security switchport port-security maximum value [vlan [vlan-list]]
vlan—set a per-VLAN maximum value. and enter the physical interface to configure.Chapter 20
Configuring Port-Based Traffic Control Configuring Port Security
Enabling and Configuring Port Security
Beginning in privileged EXEC mode. Enter interface configuration mode.

and the violation counter increments. The protect mode disables learning when any VLAN reaches its maximum limit. the action to be taken when a security violation is detected.
Catalyst 3560 Switch Software Configuration Guide
20-12
78-16156-01
. If no VLAN ID is specified. a syslog message is logged. shutdown—The interface is error-disabled when a violation occurs. the remaining MAC addresses are dynamically learned. If you configure fewer secure MAC addresses than the maximum. packets with unknown source addresses are dropped until you remove a sufficient number of secure MAC addresses or increase the number of maximum allowable addresses. a syslog message is logged. You are not notified that a security violation has occurred.
Note
If you do not enable sticky learning before this command is entered. When a secure port is in the error-disabled state. (Optional) Enter a sticky secure MAC address. the remaining MAC addresses are dynamically learned. An SNMP trap is sent. and the violation counter increments.
Note
If you enable sticky learning after you enter this command. restrict—When the number of secure MAC addresses reaches the limit allowed on the port. and are added to the running configuration.Chapter 20 Configuring Port Security
Configuring Port-Based Traffic Control
Command
Step 6
Purpose (Optional) Set the violation mode. you can specify the VLAN ID and the MAC address.
Step 8 Step 9
switchport port-security mac-address sticky switchport port-security mac-address sticky mac-address
(Optional) Enable stick learning on the interface. you can bring it out of this state by entering the errdisable recovery cause psecure-violation global configuration command. repeating the command as many times as necessary. an error message appears. We do not recommend configuring the protect mode on a trunk port. the native VLAN is used. or you can manually re-enable it by entering the shutdown and no shutdown interface configuration commands. packets with unknown source addresses are dropped until you remove a sufficient number of secure MAC addresses to drop below the maximum value or increase the number of maximum allowable addresses.
Note
•
•
Note
Step 7
switchport port-security mac-address mac-address [vlan vlan-id]
(Optional) Enter a secure MAC address for the interface. the secure addresses that were dynamically learned are converted to sticky secure MAC addresses and are added to the running configuration. and you cannot enter a sticky secure MAC address. You can use this command to enter the maximum number of secure MAC addresses. even if the port has not reached its maximum limit.
Step 10
end
Return to privileged EXEC mode. are converted to sticky secure MAC addresses. and the port LED turns off. If you configure fewer secure MAC addresses than the maximum. as one of these:
•
switchport port-security violation {protect | restrict | shutdown}
protect—When the number of port secure MAC addresses reaches the maximum limit allowed on the port. (Optional) On a trunk port. An SNMP trap is sent.

The violation mode is the default. the sticky secure addresses remain part of the running configuration but are removed from the address table. To delete all dynamic secure addresses on an interface from the address table. use the no switchport port-security violation {protocol | restrict} interface configuration command.
show port-security copy running-config startup-config
To return the interface to the default condition as not a secure port. use the no switchport port-security interface configuration command. To disable sticky learning on an interface. To delete a specific secure MAC address from the address table. This example shows how to enable port security on a port and to set the maximum number of secure addresses to 50. To return the interface to the default number of secure MAC addresses. If you use the no switchport port-security mac-address sticky interface configuration command to convert sticky secure MAC addresses to dynamic secure MAC addresses before entering the no switchport port-security command. you should save the configuration again after entering the no switchport port-security mac-address sticky command. All addresses are now dynamically learned. You must specifically delete configured secure MAC addresses from the address table by using the no switchport port-security mac-address mac-address interface configuration command. The interface converts the sticky secure MAC addresses to dynamic secure addresses. use the no switchport port-security maximum value interface configuration command. enter the no switchport port-security interface configuration command followed by the switchport port-security command (to re-enable port security on the interface). (Optional) Save your entries in the configuration file. and sticky learning is enabled. use the no switchport port-security mac-address mac-address interface configuration command. If you enter this command when sticky learning is enabled.02000. if you have previously saved the configuration with the sticky MAC addresses.0004 vlan 3
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
20-13
. use the no switchport port-security mac-address sticky interface configuration command. or the sticky addresses will be restored if the switch reboots. However.
Switch(config)# interface gigabitethernet0/1 Switch(config-if)# switchport mode access Switch(config-if)# switchport port-security Switch(config-if)# switchport port-security maximum 50 Switch(config-if)# switchport port-security mac-address sticky
This example shows how to configure a static secure MAC address on VLAN 3 on a port:
Switch(config)# interface gigabitethernet0/2 Switch(config-if)# switchport mode trunk Switch(config-if)# switchport port-security Switch(config-if)# switchport port-security mac-address 0000.Chapter 20
Configuring Port-Based Traffic Control Configuring Port Security
Command
Step 11 Step 12
Purpose Verify your entries. To return the violation mode to the default condition (shutdown mode). no static secure MAC addresses are configured. all secure addresses on the interface except those that were manually configured are deleted.

or set the aging time or type. Enable or disable static aging for the secure port. use the no switchport port-security aging static interface configuration command. (Optional) Save your entries in the configuration file. If the time is equal to 0. use the no switchport port-security aging time interface configuration command.
To disable port security aging for all secure addresses on a port. You can enable or disable the aging of secure addresses on a per-port basis. The valid range is from 0 to 1440 minutes. To disable aging for only statically configured secure addresses. Two types of aging are supported per port:
• •
Absolute—The secure addresses on the port are deleted after the specified aging time. aging is disabled for this port. The secure addresses on this port age out only if there is no data traffic from the secure source addresses for the specified time period. specify the aging time for this port. Beginning in privileged EXEC mode.Chapter 20 Configuring Port Security
Configuring Port-Based Traffic Control
Enabling and Configuring Port Security Aging
You can use port security aging to set the aging time for all secure addresses on a port. All the secure addresses on this port age out exactly after the time (minutes) specified lapses and are removed from the secure address list. select one of these keywords:
•
absolute—Sets the aging type as absolute aging. For time.
•
Step 4 Step 5 Step 6
end show port-security [interface interface-id] [address] copy running-config startup-config
Return to privileged EXEC mode.
Note
configure terminal interface interface-id switchport port-security aging {static | time time | type {absolute | inactivity}}
The switch does not support port security aging of sticky secure addresses. inactivity—Sets the aging type as inactivity aging. Inactivity—The secure addresses on the port are deleted only if the secure addresses are inactive for the specified aging time.
Catalyst 3560 Switch Software Configuration Guide
20-14
78-16156-01
.
Use this feature to remove and add devices on a secure port without manually deleting the existing secure MAC addresses and to still limit the number of secure addresses on a port. Enter interface configuration mode for the port on which you want to enable port security aging.
Enter static to enable aging for statically configured secure addresses on this port. For type. Verify your entries. follow these steps to configure port security aging: Command
Step 1 Step 2 Step 3
Purpose Enter global configuration mode.

Chapter 20
Configuring Port-Based Traffic Control Displaying Port-Based Traffic Control Settings
This example shows how to set the aging time as 2 hours for the secure addresses on a port:
Switch(config)# interface gigabitethernet0/1 Switch(config-if)# switchport port-security aging time 120
This example shows how to set the aging time as 2 minutes for the inactivity aging type with aging enabled for the configured secure addresses on the interface:
Switch(config-if)# switchport port-security aging time 2 Switch(config-if)# switchport port-security aging type inactivity Switch(config-if)# switchport port-security aging static
You can verify the previous commands by entering the show port-security interface interface-id privileged EXEC command. Displays the storm-control multicast suppression discard counter with the number of packets discarded for all interfaces or the specified interface. To display traffic control information. Displays port security settings for the switch or for the specified interface. Displays the storm-control unicast suppression discard counter with the number of packets discarded for all interfaces or the specified interface. show port-security interface interface-id vlan Displays the number of secure MAC addresses configured per VLAN on the specified interface. the number of secure MAC addresses on the interface. Displays storm control suppression levels set on all interfaces or the specified interface for the specified traffic type or for broadcast traffic if no traffic type is entered. the number of security violations that have occurred. use one or more of the privileged EXEC commands in Table 20-3.
Displaying Port-Based Traffic Control Settings
The show interfaces interface-id switchport privileged EXEC command displays (among other characteristics) the interface traffic suppression and control configuration.
Table 20-3 Commands for Displaying Traffic Control Status and Configuration
Command show interfaces [interface-id] switchport
Purpose Displays the administrative and operational status of all switching (nonrouting) ports or the specified port. including the maximum allowed number of secure MAC addresses for each interface.
show storm-control [interface-id] [broadcast | multicast | unicast] show interfaces [interface-id] counters broadcast
show interfaces [interface-id] counters multicast
show interfaces [interface-id] counters unicast
show port-security [interface interface-id]
show port-security [interface interface-id] address Displays all secure MAC addresses configured on all switch interfaces or on a specified interface with aging information for each address. and the violation mode. including port blocking and port protection settings.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
20-15
. Displays the storm-control broadcast suppression discard counter with the number of packets discarded for all interfaces or the specified interface. The show interfaces counters privileged EXEC commands display the count of discarded packets. The show storm-control and show port-security privileged EXEC commands display those features.

bridges. page 21-1 Configuring CDP. CDP runs on all media that support Subnetwork Access Protocol (SNAP). This chapter consists of these sections:
• • •
Understanding CDP. transparent protocols. network management applications can learn the device type and the Simple Network Management Protocol (SNMP) agent address of neighboring devices running lower-layer. page 21-5
Understanding CDP
CDP is a device discovery protocol that runs over Layer 2 (the data link layer) on all Cisco-manufactured devices (routers. The switch uses CDP to find cluster candidates and maintain information about cluster members and other devices up to three cluster-enabled devices away from the command switch by default. CDP enables the Cluster Management Suite to display a graphical view of the network. The advertisements also contain time-to-live.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
21-1
. which is the length of time a receiving device holds CDP information before discarding it. With CDP. This feature enables applications to send SNMP queries to neighboring devices. advertising at least one address at which it can receive SNMP messages. two systems that support different network-layer protocols can learn about each other.C H A P T E R
21
Configuring CDP
This chapter describes how to configure Cisco Discovery Protocol (CDP) on the Catalyst 3560 switch. Because CDP runs over the data-link layer only. and switches) and allows network management applications to discover Cisco devices that are neighbors of already known devices. refer to the command reference for this release and the Cisco IOS Configuration Fundamentals Command Reference for Release 12.1. Each device also listens to the messages sent by other devices to learn about neighboring devices. Each CDP-configured device sends periodic messages to a multicast address. The switch supports CDP version 2. or holdtime information. access servers.
Note
For complete syntax and usage information for the commands used in this chapter. page 21-2 Monitoring and Maintaining CDP. On the switch.

You can also limit the display to information about the protocols enabled on the specified neighbor or information about the version of software running on the device. You can limit the display to neighbors of a specific interface or expand the display to provide more detailed information. capabilities. You can limit the display to the interface about which you want information. beginning in privileged EXEC mode. perform one or more of these tasks. such as frequency of transmissions and the holdtime for packets being sent. You can enter an asterisk (*) to display all CDP neighbors. show cdp traffic Display CDP counters. Display information about neighbors. Delete the CDP table of information about neighbors. Display information about a specific neighbor. Display global information. show cdp interface [interface-id] show cdp neighbors [interface-id] [detail] Display information about interfaces where CDP is enabled. platform. and port ID. Command clear cdp counters clear cdp table show cdp show cdp entry entry-name [protocol | version] Description Reset the traffic counters to zero. This is an example of the output from the show cdp privileged EXEC commands:
Switch# show cdp Global CDP information: Sending CDP packets every 50 seconds Sending a holdtime value of 120 seconds Sending CDPv2 advertisements is enabled
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
21-5
. holdtime settings. interface type and number. including device type. including the number of packets sent and received and checksum errors. or you can enter the name of the neighbor about which you want information.Chapter 21
Configuring CDP Monitoring and Maintaining CDP
Monitoring and Maintaining CDP
To monitor and maintain CDP on your device.

When you enable both autonegotiation and UDLD. In normal mode. UDLD can also detect unidirectional links due to one-way traffic on fiber-optic and twisted-pair links and to misconnected ports on fiber-optic links. the Layer 1 and Layer 2 detections work together to prevent physical and logical unidirectional connections and the malfunctioning of other protocols. page 22-4 Displaying UDLD Status. All connected devices must support UDLD for the protocol to successfully identify and disable unidirectional links. When UDLD detects a unidirectional link. This chapter consists of these sections:
• • •
Understanding UDLD. page 22-7
Understanding UDLD
UDLD is a Layer 2 protocol that enables devices connected through fiber-optic or twisted-pair Ethernet cables to monitor the physical configuration of the cables and detect when a unidirectional link exists. it administratively shuts down the affected port and alerts you.
Modes of Operation
UDLD supports two modes of operation: normal (the default) and aggressive. autonegotiation takes care of physical signaling and fault detection. including spanning-tree topology loops. Unidirectional links can cause a variety of problems. page 22-1 Configuring UDLD. UDLD can detect unidirectional links due to misconnected ports on fiber-optic connections. In normal and aggressive modes. In aggressive mode.
Note
For complete syntax and usage information for the commands used in this chapter. At Layer 1.C H A P T E R
22
Configuring UDLD
This chapter describes how to configure the UniDirectional Link Detection (UDLD) protocol on the Catalyst 3560 switch. UDLD works with the Layer 1 mechanisms to learn the physical status of a link. UDLD performs tasks that autonegotiation cannot perform.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
22-1
. refer to the command reference for this release. such as detecting the identities of neighbors and shutting down misconnected ports.

UDLD does not detect the unidirectional link because the Layer 1 mechanism. UDLD detects a unidirectional link when fiber strands in a fiber-optic port are misconnected and the Layer 1 mechanisms do not detect this misconnection. UDLD shuts down the affected port. or whenever the switch is reset. Whenever a port is disabled and UDLD is running. one of the ports cannot send or receive traffic. In case. When UDLD is in normal mode. If the switch receives a new hello message before an older cache entry ages. If both fiber strands in a cable are working normally from a Layer 1 perspective. In aggressive mode. the loss of the heart beat means that the link must be shut down if it is not possible to re-establish a bidirectional link. and the logical link is considered undetermined. does not do so. the link does not stay up because the Layer 1 mechanisms did not detect a physical problem with the link. the logical link is considered undetermined. The message is intended to keep the caches synchronized. UDLD hello packets can be considered as a heart beat whose presence guarantees the health of the link. UDLD in aggressive mode detects whether those fiber strands are connected correctly and whether traffic is flowing bidirectionally between the correct neighbors. On fiber-optic or twisted-pair links. It can also detect a unidirectional link when one of these problems exists:
• • •
On fiber-optic or twisted-pair links.
In these cases. UDLD clears all existing cache entries for the ports affected by the configuration change. In this case. UDLD sends at least one message to inform the neighbors to flush the part of their caches affected by the status change. the switch replaces the older entry with the new one.Chapter 22 Understanding UDLD
Configuring UDLD
A unidirectional link occurs whenever traffic sent by a local device is received by its neighbor but traffic from the neighbor is not received by the local device. whenever UDLD is disabled on a port. one of the ports is down while the other is up. When the switch receives a hello message. UDLD detects a unidirectional link by using the previous detection methods. This check cannot be performed by autonegotiation because autonegotiation operates at Layer 1.
Catalyst 3560 Switch Software Configuration Guide
22-2
78-16156-01
. In normal mode.
Methods to Detect Unidirectional Links
UDLD operates by using two mechanisms:
•
Neighbor database maintenance UDLD learns about other UDLD-capable neighbors by periodically sending a hello packet (also called an advertisement or probe) on every active port to keep each device informed about its neighbors. In a point-to-point link. if one of the fiber strands in a pair is disconnected and autonegotiation is active. it caches the information until the age time (hold time or time-to-live) expires. One of the fiber strands in the cable is disconnected. If the ports are connected correctly but the traffic is one way. Conversely. UDLD in aggressive mode can also detect a unidirectional link on a point-to-point link on which no failure between the two devices is allowed. UDLD does not take any action. which is supposed to detect this condition. and UDLD does not disable the port.

the link might shut down.Chapter 22
Configuring UDLD Understanding UDLD
•
Event-driven detection and echoing UDLD relies on echoing as its detection mechanism. it detects the problem and disables the port. the link is considered unidirectional. after the fast train of messages. Figure 22-1 shows an example of a unidirectional link condition. and the port is shut down. the link state is still undetermined. Because this behavior is the same on all UDLD neighbors. and UDLD does not disable the interface.
If UDLD in normal mode is in the advertisement or in the detection phase and all the neighbor cache entries are aged out. UDLD restarts the link-up sequence to resynchronize with any potentially out-of-sync neighbors. depending on the UDLD mode. If the detection window ends and no valid reply message is received. the sender of the echoes expects to receive an echo in reply. If you enable aggressive mode when all the neighbors of a port have aged out either in the advertisement or in the detection phase. UDLD shuts down the port if.
98648
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
22-3
. When UDLD is in aggressive mode. If UDLD is in normal mode. the link might be considered undetermined and might not be shut down. If UDLD is in aggressive mode. Whenever a UDLD device learns about a new neighbor or receives a resynchronization request from an out-of-sync neighbor. When UDLD is in normal mode. the logical link is considered undetermined.
TX
RX Switch B
However. Switch A does not receive traffic from Switch B on the same port. UDLD restarts the link-up sequence to resynchronize with any potentially out-of-sync neighbor. it restarts the detection window on its side of the connection and sends echo messages in reply.
Figure 22-1 UDLD Detection of a Unidirectional Link
Switch A TX RX
Switch B successfully receives traffic from Switch A on this port.

The range is from 7 to 90 seconds. use the no udld enable global configuration command to disable normal mode UDLD on all fiber-optic ports. UDLD is disabled by default.Chapter 22
Configuring UDLD Configuring UDLD
Enabling UDLD Globally
Beginning in privileged EXEC mode. For more information about aggressive and normal modes. Use the no udld aggressive global configuration command to disable aggressive mode UDLD on all fiber-optic ports.
Note
Step 3 Step 4 Step 5
end show udld copy running-config startup-config
Return to privileged EXEC mode. follow these steps to enable UDLD in the aggressive or normal mode and to set the configurable message timer on all fiber-optic ports on the switch: Command
Step 1 Step 2
Purpose Enter global configuration mode. (Optional) Save your entries in the configuration file.
•
message time message-timer-interval—Configures the period of time between UDLD probe messages on ports that are in the advertisement phase and are detected to be bidirectional. see the “Modes of Operation” section on page 22-1. see the “Enabling UDLD on an Interface” section on page 22-6. Use the udld interface configuration command to enable UDLD on other port types.
configure terminal
udld {aggressive | enable | message time Specify the UDLD mode of operation: message-timer-interval} • aggressive—Enables UDLD in aggressive mode on all fiber-optic ports. Verify your entries. For more information.
•
enable—Enables UDLD in normal mode on all fiber-optic ports on the switch.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
22-5
.
To disable UDLD globally. An individual interface configuration overrides the setting of the udld enable global configuration command. This command affects fiber-optic ports only.

Chapter 22
Configuring UDLD Displaying UDLD Status
Displaying UDLD Status
To display the UDLD status for the specified port or for all ports. use the show udld [interface-id] privileged EXEC command.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
22-7
. refer to the command reference for this release. For detailed information about the fields in the command output.

the IDS device can send TCP reset packets to close down the TCP session of a suspected attacker. however. if incoming traffic is being monitored. page 23-9 Displaying SPAN and RSPAN Status. traffic that is received on the source VLAN and routed to another VLAN can be monitored. traffic routed to a source VLAN cannot be monitored. if you connect a Cisco Intrusion Detection System (IDS) sensor appliance to a destination port. Except for traffic that is required for the SPAN or RSPAN session. traffic that gets routed from another VLAN to the source VLAN cannot be monitored. You can use the SPAN or RSPAN destination port to inject traffic from a network security device. SPAN copies (or mirrors) traffic received or sent (or both) on source ports or source VLANs to a destination port for analysis.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
23-1
.
Note
For complete syntax and usage information for the commands used in this chapter. destination ports do not receive or forward traffic. For example. Only traffic that enters or leaves source ports or traffic that enters or leaves source VLANs can be monitored by using SPAN. page 23-23
Understanding SPAN and RSPAN
You can analyze network traffic passing through ports or VLANs by using SPAN or RSPAN to send a copy of the traffic to another port on the switch or on another switch that has been connected to a network analyzer or other monitoring or security device.C H A P T E R
23
Configuring SPAN and RSPAN
This chapter describes how to configure Switched Port Analyzer (SPAN) and Remote SPAN (RSPAN) on the Catalyst 3560 switch. SPAN does not affect the switching of network traffic on the source ports or VLANs. refer to the command reference for this release. page 23-1 Configuring SPAN and RSPAN. This chapter consists of these sections:
• • •
Understanding SPAN and RSPAN. For example. You must dedicate the destination port for SPAN use.

page 23-2 Remote SPAN. page 23-8
Local SPAN
Local SPAN supports a SPAN session entirely within one switch. The RSPAN traffic from the source ports or VLANs is copied into the RSPAN VLAN and forwarded over trunk ports carrying the RSPAN VLAN to a destination session monitoring the RSPAN VLAN. and destination ports on different switches. all source ports or source VLANs and destination ports reside in the same switch. page 23-3 SPAN and RSPAN Interaction with Other Features. The destination is always a physical port. Local SPAN copies traffic from one or more source ports in any VLAN or from one or more VLANs to a destination port for analysis. page 23-2 SPAN and RSPAN Concepts and Terminology.
Figure 23-1 Example of Local SPAN Configuration on a Single Switch
1 2 3 4 5 6 7 8 9 10 11 12
Port 5 traffic mirrored on Port 10
5 4 3 2 1
6
7
8 9 10
11 12
Network analyzer
Remote SPAN
RSPAN supports source ports. Each RSPAN source switch must have either ports or VLANs as RSPAN sources. For example.Chapter 23 Understanding SPAN and RSPAN
Configuring SPAN and RSPAN
This section includes these topics:
• • • •
Local SPAN. in Figure 23-1. as shown on Switch C in the figure. Figure 23-2 shows source ports on Switch A and Switch B. A network analyzer on port 10 receives all network traffic from port 5 without being physically attached to port 5.
Catalyst 3560 Switch Software Configuration Guide
23-2
43580
78-16156-01
. all traffic on port 5 (the source port) is mirrored to port 10 (the destination port). source VLANs. enabling remote monitoring of multiple switches across your network. The traffic for each RSPAN session is carried over a user-specified RSPAN VLAN that is dedicated for that RSPAN session in all participating switches.

You separately configure RSPAN source sessions and RSPAN destination sessions on different network devices. To configure an RSPAN destination session on another device.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
23-3
. and send the monitored traffic to one or more destination ports.Chapter 23
Configuring SPAN and RSPAN Understanding SPAN and RSPAN
Figure 23-2 Example of RSPAN Configuration
RSPAN destination ports RSPAN destination session
Switch C
Intermediate switches must support RSPAN VLAN
RSPAN VLAN
Switch A
RSPAN source session A RSPAN source ports
Switch B
RSPAN source session B RSPAN source ports
101366
SPAN and RSPAN Concepts and Terminology
This section describes concepts and terminology associated with SPAN and RSPAN configuration. The output of this session is the stream of SPAN packets that are sent to the RSPAN VLAN. you associate the destination port with the RSPAN VLAN. you associate a set of source ports or source VLANs with an RSPAN VLAN. RSPAN consists of at least one RSPAN source session. The destination session collects all RSPAN VLAN traffic and sends it out the RSPAN destination port. or one or more VLANs. which is directed to the destination port. Local SPAN does not have separate source and destination sessions. To configure an RSPAN source session on a device. an RSPAN VLAN. and at least one RSPAN destination session. A local SPAN session is an association of a destination port with source ports or source VLANs.
SPAN Sessions
SPAN sessions (local or remote) allow you to monitor traffic on one or more ports. Local SPAN sessions gather a set of ingress and egress packets specified by the user and form them into a stream of SPAN data. all on a single network device.

for example. Both switched and routed ports can be configured as SPAN sources and destinations.
Catalyst 3560 Switch Software Configuration Guide
23-4
78-16156-01
. strips off the VLAN tagging. but they must respond to the requirements of the RSPAN VLAN (see the “RSPAN VLAN” section on page 23-8). VLAN ACLs and egress QoS policing. however. but you cannot mix source ports and source VLANs in the same session. You can configure two separate SPAN or RSPAN source sessions with separate or overlapping sets of SPAN source ports and VLANs. except for where the packet stream is directed. These switches need not be capable of running RSPAN. When RSPAN is enabled. a SPAN session does not become active unless you enable the destination port and at least one source port or VLAN for that session. Traffic monitoring in a SPAN session has these restrictions:
• •
Sources can be ports or VLANs. That is. can result in dropped or lost packets. However. There can also be intermediate switches separating the RSPAN source and destination sessions. Its purpose is to present a copy of all RSPAN VLAN packets (except Layer 2 control packets) to the user for analysis. and presents them on the destination port.Chapter 23 Understanding SPAN and RSPAN
Configuring SPAN and RSPAN
An RSPAN source session is very similar to a local SPAN session. once as normal traffic and once as a monitored packet. You can have multiple destination ports in a SPAN session. The switch supports up to two source sessions. ingress QoS policing. the destination port receives a copy of the packet even if the actual incoming packet is dropped. SPAN sessions do not interfere with the normal operation of the switch. modified Differentiated Services Code Point (DSCP)—are copied before modification. an RSPAN source session cannot have a local destination port. In an RSPAN source session. an oversubscribed SPAN destination. an RSPAN destination session cannot have a local source port. a 10-Mbps port monitoring a 100-Mbps port. There can be more than one source session and more than one destination session active in the same RSPAN VLAN. A copy of each packet received by the source is sent to the destination port for that SPAN session. you can run both a local SPAN and an RSPAN source session in the same switch. Features that can cause a packet to be dropped during receive processing have no effect on ingress SPAN. You can configure SPAN sessions on disabled ports. These features include IP standard and extended input access control lists (ACLs). SPAN packets are relabeled with the RSPAN VLAN ID and directed over normal trunk ports to the destination switch. The switch does not support a combination of local SPAN and RSPAN in a single session. The switch supports a total of 66 source and RSPAN destination sessions. Therefore monitoring a large number of ports or VLANs could potentially generate large amounts of network traffic. and an RSPAN destination session and an RSPAN source session that are using the same RSPAN VLAN cannot run on the same switch. each packet being monitored is transmitted twice. Packets that are modified because of routing or quality of service (QoS)—for example. but no more than 64 destination ports. An RSPAN destination session takes all packets received on the RSPAN VLAN.
• •
•
•
• •
Monitored Traffic
SPAN sessions can monitor these traffic types:
•
Receive (Rx) SPAN—The goal of receive (or ingress) SPAN is to monitor as much as possible all the packets received by the source interface or VLAN before any modification or processing is performed by the switch.

Spanning Tree Protocol (STP). The switch supports any number of source ports (up to the maximum number of available ports on the switch) and any number of source VLANs (up to the maximum number of VLANs supported). However. Packets that are modified because of routing—for example. Each source port can be configured with a direction (ingress. An egress packet dropped because of switch congestion is also dropped from egress SPAN. Dynamic Trunking Protocol (DTP). However. or SPAN destination ports. egress. these characteristics are independent of one another. a bidirectional (both Rx and Tx) SPAN session is configured for the Rx monitor on port A and Tx monitor on port B. and Port Aggregation Protocol (PAgP).Chapter 23
Configuring SPAN and RSPAN Understanding SPAN and RSPAN
•
Transmit (Tx) SPAN—The goal of transmit (or egress) SPAN is to monitor as much as possible all the packets sent by the source interface after all modification and processing is performed by the switch. in which case the packets are different because of the packet modification). with modified time-to-live (TTL).
The default configuration for local SPAN session ports is to send all packets untagged. 802.1Q. Packets of all types. when you enter the encapsulation replicate keywords when configuring a destination port. A source port has these characteristics:
• •
It can be monitored in multiple SPAN sessions. a local SPAN session with encapsulation replicate enabled can have a mixture of untagged.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
23-5
. such as Cisco Discovery Protocol (CDP). These features include IP standard and extended output ACLs and egress QoS policing. IEEE 802. SPAN also does not normally monitor bridge protocol data unit (BPDU) packets and Layer 2 protocols. and ISL tagged packets appear on the destination port. egress source ports. MAC-address. Both packets are the same (unless a Layer-3 rewrite occurs.
Therefore. or Inter-Switch Link (ISL)—that they had on the source port. For example:
• • •
A packet might be forwarded normally but dropped from monitoring due to an oversubscribed SPAN destination port. but still appear on the SPAN destination port.
In some SPAN configurations. VLAN Trunk Protocol (VTP). Features that can cause a packet to be dropped during transmit processing also affect the duplicated copy for SPAN. you can also monitor a port or VLAN for both received and sent packets. or both) to monitor. A copy of each packet sent by the source is sent to the destination port for that SPAN session. In general. Switch congestion can cause packets to be dropped at ingress source ports. An ingress packet might be dropped from normal forwarding. This is the default.
•
Both—In a SPAN session. In a local SPAN session or RSPAN source session.1Q. the switch supports a maximum of two sessions (local or RSPAN) with source ports or VLANs and you cannot mix ports and VLANs in a single session.
Source Ports
A source port (also called a monitored port) is a switched or routed port that you monitor for network traffic analysis. The copy is provided after the packet is modified. you can monitor source ports or VLANs for traffic in one or both directions. including BPDU and Layer 2 protocol packets are monitored. these changes occur:
• •
Packets are sent on the destination port with the same encapsulation—untagged. or QoS values—are duplicated (with the modifications) at the destination port. If a packet enters the switch through port A and is switched to port B. For example. multiple copies of the same source packet are sent to the SPAN destination port. both incoming and outgoing packets are sent to the destination port.

VSPAN has these characteristics:
• • • • • •
All active ports in the source VLAN are included as source ports and can be monitored in either or both directions. by default. If ports are added to or removed from the source VLANs. For EtherChannel sources. You cannot use filter VLANs in the same session with VLAN sources. that is. Fast Ethernet. On a given port.
• • • • •
VLAN filtering applies only to trunk ports or to voice VLAN ports. only traffic on the monitored VLAN is sent to the destination port. routed port. Source ports can be in the same or different VLANs. When a VLAN filter list is specified. all VLANs active on the trunk are monitored.
VLAN Filtering
When you monitor a trunk port as a source port. SPAN traffic coming from other port types is not affected by VLAN filtering. trunk port. you can monitor traffic for the entire EtherChannel or individually on a physical port as it participates in the port channel. or voice VLAN port. all VLANs are allowed on other ports. The SPAN or RSPAN source interface in VSPAN is a VLAN ID and traffic is monitored on all the ports for that VLAN. You can monitor only Ethernet VLANs. You can limit SPAN traffic monitoring on trunk source ports to specific VLANs by using VLAN filtering. VLAN filtering applies only to port-based sessions and is not allowed in sessions with VLAN sources.Chapter 23 Understanding SPAN and RSPAN
Configuring SPAN and RSPAN
• • • • • •
It can be any port type (for example. it is excluded from the source list and is not monitored.
Catalyst 3560 Switch Software Configuration Guide
23-6
78-16156-01
. EtherChannel. only those VLANs in the list are monitored on trunk ports or on voice VLAN access ports. VLAN filtering affects only traffic forwarded to the destination SPAN port and does not affect the switching of normal traffic. If a destination port belongs to a source VLAN. It cannot be a destination port. You can monitor multiple source ports in a single session. and so forth). It can be an access port. the traffic on the source VLAN received by those ports is added to or removed from the sources being monitored.
Source VLANs
VLAN-based SPAN (VSPAN) is the monitoring of the network traffic in one or more VLANs.

It cannot be an EtherChannel group or a VLAN. It does not participate in any of the Layer 2 protocols (STP. the configuration overwrites the original port configuration. It cannot be a secure port. the destination port forwards traffic at Layer 2. usually a network analyzer. the change does not take effect until the SPAN destination configuration had been removed. these packets appear with the original encapsulation (untagged. If ingress traffic forwarding is enabled for a network security device. CDP. If these keywords are not specified. If it was a routed port. A destination port that belongs to a source VLAN of any SPAN session is excluded from the source list and is not monitored. The port does not transmit any traffic except that required for the SPAN session.1Q. It cannot be a source port. When the SPAN destination configuration is removed. ISL. packets appear in the untagged format. The maximum number of destination ports in a switch is 64. It can participate in only one SPAN session at a time (a destination port in one SPAN session cannot be a destination port for a second SPAN session). For an RSPAN session. it is removed from the group while it is a destination port. it is located on the switch containing the RSPAN destination session. Therefore. When a port is configured as a SPAN destination port. the original VLAN ID is lost because it is overwritten by the RSPAN VLAN identification. it is no longer a routed port.Chapter 23
Configuring SPAN and RSPAN Understanding SPAN and RSPAN
Destination Port
Each local SPAN session or RSPAN destination session must have a destination port (also called a monitoring port) that receives a copy of traffic from the source ports or VLANs and sends the SPAN packets to the user. It can be any Ethernet physical port. If the port was in an EtherChannel group. the port reverts to its previous configuration. VTP. For RSPAN. There is no destination port on a switch running only an RSPAN source session. A destination port has these characteristics:
•
For a local SPAN session. or 802.1Q). When it is active. PagP).
•
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
23-7
. or ISL tagged packets. if the encapsulation replicate keywords are specified for the destination port. DTP. incoming traffic is disabled. 802. all packets appear on the destination port as untagged. Therefore.
•
• • • • • • • • • • •
Local SPAN and RSPAN destination ports behave differently regarding VLAN tagging and encapsulation:
•
For local SPAN. Incoming traffic is never learned or forwarded on a destination port. the output of a local SPAN session with encapsulation replicate enabled can contain a mixture of untagged. the destination port must reside on the same switch as the source port. If a configuration change is made to the port while it is acting as a SPAN destination port.

•
• • •
•
Catalyst 3560 Switch Software Configuration Guide
23-8
78-16156-01
. It is also possible to have multiple RSPAN destination sessions throughout the network. there is no data to monitor.Chapter 23 Understanding SPAN and RSPAN
Configuring SPAN and RSPAN
RSPAN VLAN
The RSPAN VLAN carries SPAN traffic between RSPAN source and destination sessions. you must manually configure all intermediate switches. Spanning Tree Protocol (STP)—A destination port does not participate in STP while its SPAN or RSPAN session is active. it is automatically removed from the source port list. monitoring the same RSPAN VLAN and presenting traffic to the user. If the port is the only port in the EtherChannel group. It is normal to have multiple RSPAN VLANs in a network at the same time with each RSPAN VLAN defining a network-wide RSPAN session. STP can run on RSPAN VLAN trunks but not on SPAN destination ports. After the SPAN session is disabled. Changes in VLAN membership or trunk settings for a source port immediately take effect. RSPAN VLANs must be configured in VLAN configuration mode by using the remote-span VLAN configuration mode command. the entire group is monitored. When a group is configured as a SPAN source. if a VLAN is being Rx-monitored and the switch routes traffic from another VLAN to the monitored VLAN. EtherChannel—You can configure an EtherChannel group as a source port but not as a SPAN destination port. That is. multiple RSPAN source sessions anywhere in the network can contribute packets to the RSPAN session. If a physical port is added to a monitored EtherChannel group. No MAC address learning occurs on the RSPAN VLAN. changes in VLAN membership or trunk settings for a destination port do not take effect until you remove the SPAN destination configuration. On a source port. not traffic that is routed between VLANs. VLAN Trunking Protocol (VTP)—You can use VTP to prune an RSPAN VLAN between switches. the new port is added to the SPAN source port list. the port again participates in CDP. that traffic is not monitored and not received on the SPAN destination port. and the respective SPAN sessions automatically adjust accordingly. The destination port can participate in STP after the SPAN or RSPAN session is disabled. The RSPAN VLAN ID separates the sessions. Cisco Discovery Protocol (CDP)—A SPAN destination port does not participate in CDP while the SPAN session is active. VSPAN only monitors traffic that enters or exits the switch. VLAN and trunking—You can modify VLAN membership or trunk settings for source or destination ports at any time. If a port is removed from a monitored EtherChannel group. For example. RSPAN VLAN traffic only flows on trunk ports. If you assign an RSPAN VLAN ID in the extended VLAN range (1006 to 4094). the VLAN ID and its associated RSPAN characteristic are propagated by VTP. because there are no longer any ports in the group.
For VLANs 1 to 1005 that are visible to VLAN Trunking Protocol (VTP). STP can be active on trunk ports carrying an RSPAN VLAN.
SPAN and RSPAN Interaction with Other Features
SPAN interacts with these features:
•
Routing—SPAN does not monitor routed traffic. However. SPAN does not affect the STP status. It has these special characteristics:
• • • • •
All traffic in the RSPAN VLAN is always flooded.

if a physical port that belongs to an EtherChannel group is configured as a SPAN destination.1X port can be a SPAN source port. do not enable 802. page 23-9 Configuring Local SPAN. A secure port cannot be a SPAN destination port. For egress and ingress port monitoring.
•
Multicast traffic can be monitored. it is removed from the group. but they are in the inactive or standalone state. data from the physical port is monitored as it participates in the EtherChannel. However. page 23-10 Configuring RSPAN.Chapter 23
Configuring SPAN and RSPAN Configuring SPAN and RSPAN
A physical port that belongs to an EtherChannel group can be configured as a SPAN source port and still be a part of the EtherChannel. 802. None configured. Ports removed from an EtherChannel group remain members of the group. the port is removed from the EtherChannel group and from the list of monitored ports. all VLANs are monitored.1X on ports with monitored egress when ingress forwarding is enabled on the destination port.1X is disabled until the port is removed as a SPAN destination.1X on a port that is a SPAN destination port.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
23-9
. For SPAN sessions. do not enable 802.
Table 23-1 Default SPAN and RSPAN Configuration
Feature SPAN state (SPAN and RSPAN) Source port traffic to monitor Encapsulation type (destination port) Ingress forwarding (destination port) VLAN filtering RSPAN VLANs
Default Setting Disabled. it rejoins the EtherChannel group. For RSPAN source sessions. If a physical port that belongs to an EtherChannel group is a destination port and the EtherChannel group is a source. however. It contains this configuration information:
• • •
Default SPAN and RSPAN Configuration. Native form (untagged packets). For SPAN sessions.1X on any ports that are egress monitored. do not enable port security on ports with monitored egress when ingress forwarding is enabled on the destination port. For RSPAN source sessions. In this case. page 23-16
Default SPAN and RSPAN Configuration
Table 23-1 shows the default SPAN and RSPAN configuration.
Configuring SPAN and RSPAN
This section describes how to configure SPAN on your switch. Both received and sent traffic (both). only a single unedited packet is sent to the SPAN destination port. Disabled On a trunk interface used as a source port. It does not reflect the number of times the multicast packet is sent.
•
•
An 802. After the port is removed from the SPAN session. do not enable port security on any ports with monitored egress. You can enable 802.

The destination port cannot be a source port. and RSPAN destination) on a switch. You cannot have two SPAN sessions using the same destination port. You can limit SPAN traffic to specific VLANs by using the filter vlan keyword. If a trunk port is being monitored. You can configure a disabled port to be a source or destination port. only traffic on the VLANs specified with this keyword is monitored. all VLANs are monitored on a trunk port. page 23-13 Specifying VLANs to Filter. outgoing packets through the SPAN destination port carry the original encapsulation headers—untagged. It contains this configuration information:
• • • •
SPAN Configuration Guidelines. page 23-15
SPAN Configuration Guidelines
Follow these guidelines when configuring SPAN:
• •
You can configure a total of two local SPAN sessions or RSPAN source sessions on each switch. or IEEE 802. but the SPAN function does not start until the destination port and at least one source port or source VLAN are enabled. page 23-11 Creating a Local SPAN Session and Configuring Ingress Traffic. You cannot mix source ports and source VLANs within a single SPAN session. you can monitor traffic for a single port or VLAN or a series or range of ports or VLANs for each session. You cannot mix source VLANs and filter VLANs within a single SPAN session. By default. Entering SPAN configuration commands does not remove previously configured SPAN parameters. the packets are sent in native form. For SPAN sources. You can have a total of 66 SPAN sessions (local. a source port cannot be a destination port.1Q— if the encapsulation replicate keywords are specified. only monitored traffic passes through the SPAN destination port. If the keywords are not specified. page 23-10 Creating a Local SPAN Session. You must enter the no monitor session {session_number | all | local | remote} global configuration command to delete configured SPAN parameters. it is no longer a normal switch port. outgoing packets are not tagged.Chapter 23 Configuring SPAN and RSPAN
Configuring SPAN and RSPAN
Configuring Local SPAN
This section describes how to configure Local SPAN on your switch. ISL. For local SPAN. When you configure a switch port as a SPAN destination port.
• • • •
•
• •
•
Catalyst 3560 Switch Software Configuration Guide
23-10
78-16156-01
. For RSPAN destination ports. RSPAN source.

Valid port channel numbers are 1 to 12. A single session can include multiple sources (ports or VLANs). but you cannot combine source ports and source VLANs in one session.
configure terminal no monitor session {session_number | all | local | remote}
Step 3
monitor session session_number source {interface interface-id | vlan vlan-id} [. Remove any existing SPAN configuration for the session.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
23-11
. You can use the monitor session session_number source command multiple times to configure multiple source ports. | -] Specify a series or range of interfaces. enter a space before and after the hyphen. tx—Monitor sent traffic. (Optional) Specify the direction of traffic to monitor.
•
For source interface-id. specify the source VLAN to monitor. specify the source port to monitor. Specify all to remove all SPAN sessions. follow these steps to create a SPAN session and specify the source (monitored) ports or VLANs and the destination (monitoring) ports: Command
Step 1 Step 2
Purpose Enter global configuration mode. For session_number. or remote to remove all remote SPAN sessions. Enter a space before and after the comma.
• • • Note
both—Monitor both received and sent traffic. Valid interfaces include physical interfaces and port-channel logical interfaces (port-channel port-channel-number). the range is from 1 to 66. defined in a series of commands.Chapter 23
Configuring SPAN and RSPAN Configuring SPAN and RSPAN
Creating a Local SPAN Session
Beginning in privileged EXEC mode. | -] [both | rx | tx]
Specify the SPAN session and the source port (monitored port). rx—Monitor received traffic. This is the default. If you do not specify a traffic direction. For session_number. For interface-id.
• Note
(Optional) [. the range is from 1 to 66. local to remove all local sessions. specify the source port or source VLAN to monitor. the SPAN monitors both sent and received traffic. The range is 1 to 4094 (excluding the RSPAN VLAN). For vlan-id.

the default is to send packets in native form (untagged). First. use the no monitor session session_number source {interface interface-id | vlan vlan-id} global configuration command or the no monitor session session_number destination interface interface-id global configuration command. The destination interface must be a physical port.
Note
monitor session session_number destination {interface interface-id [. the encapsulation replicate keywords are ignored with the no form of the command.
Step 5 Step 6
end show monitor [session session_number] show running-config copy running-config startup-config
Return to privileged EXEC mode. | -] [encapsulation replicate]}
For local SPAN. | -] Specify a series or range of interfaces. and it cannot be a VLAN. This example shows how to set up SPAN session 1 for monitoring source port traffic to a destination port. specify the session number entered in step 3. and then bidirectional traffic is mirrored from source Gigabit Ethernet port 1 to destination Gigabit Ethernet port 2. Verify the configuration. (Optional) Save the configuration in the configuration file. For session_number. retaining the encapsulation method.
Note
You can use monitor session session_number destination command multiple times to configure multiple destination ports. use the no monitor session session_number global configuration command. (Optional) [. enter a space before and after the hyphen. Enter a space before and after the comma. (Optional) Enter encapsulation replicate to specify that the destination interface replicates the source interface encapsulation method.
Switch(config)# no monitor session 1 Switch(config)# monitor session 1 source interface gigabitethernet0/1 Switch(config)# monitor session 1 destination interface gigabitethernet0/2 encapsulation replicate Switch(config)# end
This example shows how to remove port 1 as a SPAN source for SPAN session 1:
Switch(config)# no monitor session 1 source interface gigabitethernet0/1 Switch(config)# end
This example shows how to disable received traffic monitoring on port 1.Chapter 23 Configuring SPAN and RSPAN
Configuring SPAN and RSPAN
Command
Step 4
Purpose Specify the SPAN session and the destination port (monitoring port). any existing SPAN configuration for session 1 is deleted. To remove a source or destination port or VLAN from the SPAN session. which was configured for bidirectional monitoring:
Switch(config)# no monitor session 1 source interface gigabitethernet0/1 rx
Catalyst 3560 Switch Software Configuration Guide
23-12
78-16156-01
. you must use the same session number for the source and destination interfaces. For destination interfaces.
Step 7
To delete a SPAN session. it cannot be an EtherChannel. If not selected. specify the destination port.
For interface-id.

and the ingress VLAN and encapsulation. the encapsulation and ingress options are ignored with the no form of the command. the packet encapsulation. If not selected. (Optional) Enter encapsulation replicate to specify that the destination interface replicates the source interface encapsulation method. For session_number. Verify the configuration. it cannot be an EtherChannel. This example shows how to remove any existing configuration on SPAN session 2. | -] [encapsulation replicate] [ingress {dot1q vlan vlan-id | isl | untagged vlan vlan-id | vlan vlan-id}]}
dot1q vlan vlan-id—Forward ingress packets with 802. The destination interface must be a physical port.
Step 7
To delete a SPAN session.1Q encapsulation with the specified VLAN as the default VLAN. untagged vlan vlan-id or vlan vlan-id—Forward ingress packets with untagged encapsulation type with the specified VLAN as the default VLAN. the destination port. Enter ingress with keywords to enable ingress traffic forwarding on the destination port and specify the encapsulation type:
• • •
monitor session session_number destination {interface interface-id [. For interface-id. specify the destination port. Enter a space before and after the comma or hyphen. (Optional) [.1Q encapsulation and VLAN 6 as the default ingress VLAN.
Switch(config)# no monitor session 2 Switch(config)# monitor session 2 source gigabitethernet0/1 rx Switch(config)# monitor session 2 destination interface gigabitethernet0/2 encapsulation replicate ingress dot1q vlan 6 Switch(config)# end
Catalyst 3560 Switch Software Configuration Guide
23-14
78-16156-01
. (Optional) Save the configuration in the configuration file. To remove a source or destination port or VLAN from the SPAN session. configure SPAN session 2 to monitor received traffic on Gigabit Ethernet source port 1. use the no monitor session session_number source {interface interface-id | vlan vlan-id} global configuration command or the no monitor session session_number destination interface interface-id global configuration command. | -] Specify a series or range of interfaces. use the no monitor session session_number global configuration command. and to enable ingress forwarding with 802. specify the session number entered in step 3.
Step 5 Step 6
end show monitor [session session_number] show running-config copy running-config startup-config
Return to privileged EXEC mode. isl—Forward ingress packets with ISL encapsulation. and it cannot be a VLAN.Chapter 23 Configuring SPAN and RSPAN
Configuring SPAN and RSPAN
Command
Step 4
Purpose Specify the SPAN session. For destination interfaces. the default is to send packets in native form (untagged). and send it to destination Gigabit Ethernet port 2 with the same egress encapsulation type as the source port.

Step 6 Step 7
end show monitor [session session_number] show running-config copy running-config startup-config
Return to privileged EXEC mode. the default is to send packets in native form (untagged). For session_number.) to specify a series of VLANs.Chapter 23
Configuring SPAN and RSPAN Configuring SPAN and RSPAN
Specifying VLANs to Filter
Beginning in privileged EXEC mode. local to remove all local sessions.
Step 5
monitor session session_number destination {interface interface-id [. the range is from 1 to 66. The destination interface must be a physical port. Specify all to remove all SPAN sessions. enter the session number specified in Step 3. specify the source port to monitor. (Optional) Enter encapsulation replicate to specify that the destination interface replicates the source interface encapsulation method. it cannot be an EtherChannel.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
23-15
.
configure terminal no monitor session {session_number | all | local | remote}
Step 3
monitor session session_number source interface interface-id
Specify the characteristics of the source port (monitored port) and SPAN session. enter a space before and after the hyphen. For session_number. (Optional) Use a comma (. follow these steps to limit SPAN source traffic to specific VLANs: Command
Step 1 Step 2
Purpose Enter global configuration mode. If not selected. For interface-id. For session_number. For vlan-id. the range is from 1 to 66. Verify the configuration.
Step 4
monitor session session_number filter vlan Limit the SPAN source traffic to specific VLANs. specify the session number entered in step 3. or remote to remove all remote SPAN sessions. Remove any existing SPAN configuration for the session. Enter a space before and after the comma. and it cannot be a VLAN. the range is 1 to 4094. The interface specified must already be configured as a trunk port. Enter a space before and after the comma. or use a hyphen (-) to specify a range of VLANs.
Step 8
To monitor all VLANs on the trunk port. For interface-id. vlan-id [. | -] Specify a series or range of interfaces. | -] [encapsulation replicate]}
Specify the SPAN session and the destination port (monitoring port). enter a space before and after the hyphen. | -] For session_number. (Optional) [. specify the destination port. use the no monitor session session_number filter global configuration command. (Optional) Save the configuration in the configuration file.

Access ports (including voice VLAN ports) on the RSPAN VLAN are put in the inactive state.
• •
•
Catalyst 3560 Switch Software Configuration Guide
23-16
78-16156-01
. page 23-19 Creating an RSPAN Destination Session. RSPAN VLANs are included as sources for port-based RSPAN sessions when source trunk ports have active RSPAN VLANs. you should reserve a few VLANs across your network for use as RSPAN VLANs. page 23-19 Specifying VLANs to Filter. page 23-22
RSPAN Configuration Guidelines
Follow these guidelines when configuring RSPAN:
• • • • • •
All the items in the “SPAN Configuration Guidelines” section on page 23-10 apply to RSPAN. It contains this configuration information:
• • • • • •
RSPAN Configuration Guidelines. it does not support egress spanning of packets on any RSPAN VLAN identified as the destination of an RSPAN source session on the switch. configure SPAN session 2 to monitor traffic received on Gigabit Ethernet trunk port 2. page 23-18 Creating an RSPAN Destination Session. do not assign access ports to these VLANs. The RSPAN VLAN is configured only on trunk ports and not on access ports. since the switch does not monitor spanned traffic. You can configure any VLAN as an RSPAN VLAN as long as these conditions are met:
– The same RSPAN VLAN is used for an RSPAN session in all the switches. page 23-16 Configuring a VLAN as an RSPAN VLAN. However.5 . and send traffic for only VLANs 1 through 5 and VLAN 9 to destination Gigabit Ethernet port 1. you can distribute the source ports and the destination ports across multiple switches in your network. – All participating switches support RSPAN. As RSPAN VLANs have special properties. To avoid unwanted traffic in RSPAN VLANs. You can apply an output access control list (ACL) to RSPAN traffic to selectively filter or monitor specific packets. RSPAN VLANs can also be sources in SPAN sessions. page 23-17 Creating an RSPAN Source Session. RSPAN does not support BPDU packet monitoring or other Layer 2 switch protocols. For RSPAN configuration.Chapter 23 Configuring SPAN and RSPAN
Configuring SPAN and RSPAN
This example shows how to remove any existing configuration on SPAN session 2.
Switch(config)# Switch(config)# Switch(config)# Switch(config)# Switch(config)# no monitor session 2 monitor session 2 source interface gigabitethernet0/2 rx monitor session 2 filter vlan 1 . make sure that the VLAN remote-span feature is supported in all the participating switches. Specify these ACLs on the RSPAN VLAN in the RSPAN source switches. 9 monitor session 2 destination interface gigabitethernet0/1 end
Configuring RSPAN
This section describes how to configure RSPAN on your switch.

you must configure RSPAN VLAN on both source and destination switches and any intermediate switches. and VTP propagates it to the other switches in the VTP domain. You must create the RSPAN VLAN in all switches that will participate in RSPAN. Use VTP pruning to get an efficient flow of RSPAN traffic. use the no remote-span VLAN configuration command. This example shows how to create RSPAN VLAN 901. and enter VLAN configuration mode. Return to privileged EXEC mode.
Note
configure terminal vlan vlan-id
The RSPAN VLAN cannot be VLAN 1 (the default VLAN) or VLAN IDs 1002 through 1005 (reserved for Token Ring and FDDI VLANs).
Configuring a VLAN as an RSPAN VLAN
First create a new VLAN to be the RSPAN VLAN for the RSPAN session.
To remove the remote SPAN characteristic from a VLAN and convert it back to a normal VLAN. Enter a VLAN ID to create a VLAN. Beginning in privileged EXEC mode.
Switch(config)# vlan 901 Switch(config-vlan)# remote span Switch(config-vlan)# end
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
23-17
. or manually delete the RSPAN VLAN from all trunks that do not need to carry the RSPAN traffic. RSPAN traffic is pruned in the trunks to prevent the unwanted flooding of RSPAN traffic across the network for VLAN IDs that are lower than 1005. or enter the VLAN ID of an existing VLAN.Chapter 23
Configuring SPAN and RSPAN Configuring SPAN and RSPAN
• •
We recommend that you configure an RSPAN VLAN before you configure an RSPAN source or a destination session. The range is from 2 to 1001 and from 1006 to 4094.
Step 3 Step 4 Step 5
remote-span end copy running-config startup-config
Configure the VLAN as an RSPAN VLAN. For extended-range VLANs (greater than 1005). you can create the RSPAN VLAN in one switch. If you enable VTP and VTP pruning. If the RSPAN VLAN-ID is in the normal range (lower than 1005) and VTP is enabled in the network. follow these steps to create an RSPAN VLAN: Command
Step 1 Step 2
Purpose Enter global configuration mode. (Optional) Save the configuration in the configuration file.

the range is from 1 to 66. (Optional) Specify the direction of traffic to monitor. the source interface sends both sent and received traffic. specify the source port to monitor. Valid interfaces include physical interfaces and port-channel logical interfaces (port-channel port-channel-number). For vlan-id. but you cannot combine source ports and source VLANs in one session.
Step 5 Step 6
end show monitor [session session_number] show running-config copy running-config startup-config
Step 7
To delete a SPAN session. Enter a space before and after the comma. A single session can include multiple sources (ports or VLANs). enter the number defined in Step 3.Chapter 23 Configuring SPAN and RSPAN
Configuring SPAN and RSPAN
Creating an RSPAN Source Session
Beginning in privileged EXEC mode. The range is 1 to 4094 (excluding the RSPAN VLAN). Enter a source port or source VLAN for the RSPAN session:
•
For interface-id. follow these steps to start an RSPAN source session and to specify the monitored source and the destination RSPAN VLAN: Command
Step 1 Step 2
Purpose Enter global configuration mode. For session_number. defined in a series of commands. Verify the configuration. Return to privileged EXEC mode. or remote to remove all remote SPAN sessions. tx—Monitor sent traffic. | -] [both | rx | tx]
Specify the RSPAN session and the source port (monitored port).
configure terminal no monitor session {session_number | all | local | remote}
Step 3
monitor session session_number source {interface interface-id | vlan vlan-id} [. (Optional) Save the configuration in the configuration file. For vlan-id. the range is from 1 to 66. specify the source VLAN to monitor. local to remove all local sessions.
Catalyst 3560 Switch Software Configuration Guide
23-18
78-16156-01
.
• • • Step 4
both—Monitor both received and sent traffic. enter a space before and after the hyphen. Remove any existing RSPAN configuration for the session. | -] Specify a series or range of interfaces. Specify all to remove all RSPAN sessions.
• Note
(Optional) [. specify the source RSPAN VLAN to monitor. If you do not specify a traffic direction. Valid port channel numbers are 1 to 12.
monitor session session_number destination remote vlan vlan-id
Specify the RSPAN session and the destination RSPAN VLAN. use the no monitor session session_number global configuration command. For session_number. rx—Monitor received traffic. For session_number.

local to remove all local sessions.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
23-19
. or remote to remove all remote SPAN sessions. and to specify the source RSPAN VLAN and the destination port: Command
Step 1 Step 2
Purpose Enter global configuration mode. and configure the destination as RSPAN VLAN 901. Return to global configuration mode. the range is from 1 to 66. Beginning in privileged EXEC mode. to create an RSPAN destination session.
Step 3 Step 4 Step 5
remote-span exit no monitor session {session_number | all | local | remote}
Identify the VLAN as the RSPAN VLAN. use the no monitor session session_number source {interface interface-id | vlan vlan-id} global configuration command. For vlan-id.
Step 6
monitor session session_number source remote vlan vlan-id
Specify the RSPAN session and the source RSPAN VLAN. that is. Steps 2 through 4 are not required because the RSPAN VLAN ID is propagated through the VTP network. To remove the RSPAN VLAN from the session. Enter the VLAN ID of the RSPAN VLAN created from the source switch. This example shows how to remove any existing RSPAN configuration for session 1.
Switch(config)# Switch(config)# Switch(config)# Switch(config)# Switch(config)# Switch(config)# no monitor session 1 monitor session 1 source interface gigabitethernet0/1 tx monitor session 1 source interface gigabitethernet0/2 rx monitor session 1 source interface port-channel 12 monitor session 1 destination remote vlan 901 end
Creating an RSPAN Destination Session
You configure the RSPAN destination session on a different switch. and enter VLAN configuration mode.Chapter 23
Configuring SPAN and RSPAN Configuring SPAN and RSPAN
To remove a source port or VLAN from the SPAN session. follow these steps to define the RSPAN VLAN on that switch. not the switch on which the source session was configured. Specify all to remove all RSPAN sessions. configure RSPAN session 1 to monitor multiple source interfaces. For session_number.
Note
configure terminal vlan vlan-id
If both switches are participating in VTP and the RSPAN VLAN ID is from 2 to 1005. use the no monitor session session_number destination remote vlan vlan-id. Remove any existing RSPAN configuration for the session. specify the source RSPAN VLAN to monitor. the range is from 1 to 66. For session_number.

use the no monitor session session_number destination interface interface-id global configuration command. Remove any existing SPAN configuration for the session. This example shows how to configure VLAN 901 as the source remote VLAN and port 1 as the destination interface:
Switch(config)# monitor session 1 source remote vlan 901 Switch(config)# monitor session 1 destination interface gigabitethernet0/1 Switch(config)# end
Creating an RSPAN Destination Session and Configuring Ingress Traffic
Beginning in privileged EXEC mode.
For interface-id.
configure terminal no monitor session {session_number | all | local | remote}
Catalyst 3560 Switch Software Configuration Guide
23-20
78-16156-01
. follow these steps to create an RSPAN destination session.
Step 8 Step 9
end show monitor [session session_number] show running-config copy running-config startup-config
Return to privileged EXEC mode.
Step 10
To delete a SPAN session. use the no monitor session session_number source remote vlan vlan-id. to specify the source RSPAN VLAN and the destination port. This procedure assumes the RSPAN VLAN has already been configured. you must use the same session number for the source RSPAN VLAN and the destination port. The destination interface must be a physical interface. The original VLAN ID is overwritten by the RSPAN VLAN ID. and all packets appear on the destination port as untagged. To remove the RSPAN VLAN from the session. enter the number defined in Step 6. specify the destination interface. Verify the configuration.Chapter 23 Configuring SPAN and RSPAN
Configuring SPAN and RSPAN
Command
Step 7
Purpose Specify the RSPAN session and the destination interface. encapsulation replicate is not supported for RSPAN.
Note
Though visible in the command-line help string. For session_number. To remove a destination port from the SPAN session.
Note
monitor session session_number destination interface interface-id
In an RSPAN destination session. and to enable ingress traffic on the destination port for a network security device (such as a Cisco IDS Sensor Appliance). (Optional) Save the configuration in the configuration file.
Command
Step 1 Step 2
Purpose Enter global configuration mode. use the no monitor session session_number global configuration command.
Note
Refer to the “Creating an RSPAN Destination Session” section on page 23-19 for details about the keywords not related to ingress traffic.

the range is from 1 to 66.
Note
Though visible in the command-line help string. untagged vlan vlan-id or vlan vlan-id—Forward ingress packets with untagged encapsulation type with the specified VLAN as the default VLAN. The ingress options are ignored with the no form of the command.1Q encapsulation with the specified VLAN as the default VLAN. the packet monitor session session_number encapsulation.
Step 7
To delete an RSPAN session.
Switch(config)# monitor session 2 source remote vlan 901 Switch(config)# monitor session 2 destination interface gigabitethernet0/2 ingress vlan 6 Switch(config)# end
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
23-21
. encapsulation replicate is not supported for RSPAN. Enter ingress with additional keywords to enable ingress traffic forwarding on the destination port and to specify the encapsulation type:
• • •
dot1q vlan vlan-id—Forward ingress packets with 802. destination {interface interface-id [. to configure Gigabit Ethernet source port 2 as the destination interface. and all packets appear on the destination port as untagged.
Step 5 Step 6
end show monitor [session session_number] show running-config copy running-config startup-config
Return to privileged EXEC mode. vlan vlan-id | vlan vlan-id}]} Note In an RSPAN destination session. you must use the same session number for the source RSPAN VLAN and the destination port. The destination interface must be a physical interface. and the ingress VLAN and encapsulation.Chapter 23
Configuring SPAN and RSPAN Configuring SPAN and RSPAN
Command
Step 3
Purpose Specify the RSPAN session and the source RSPAN VLAN. For session_number.
(Optional) [. For interface-id. use the no monitor session session_number destination interface interface-id global configuration command. the destination port. isl—Forward ingress packets with ISL encapsulation. To remove a destination port from the RSPAN session. specify the source RSPAN VLAN to monitor. Enter a space before and after the comma. This example shows how to configure VLAN 901 as the source remote VLAN in RSPAN session 2. specify the destination interface. Verify the configuration. and to enable ingress forwarding on the interface with VLAN 6 as the default ingress VLAN. The original VLAN ID is overwritten by the RSPAN VLAN ID. | -] Specify a series or range of interfaces. enter the number defined in Step 4.
monitor session session_number source remote vlan vlan-id
Step 4
Specify the SPAN session. use the no monitor session session_number global configuration command. enter a space before and after the hyphen. (Optional) Save the configuration in the configuration file. | -] [ingress {dot1q vlan vlan-id | isl | untagged For session_number. For vlan-id.

Step 6 Step 7
end show monitor [session session_number] show running-config copy running-config startup-config
Return to privileged EXEC mode. For vlan-id.
Step 5
monitor session session_number destination remote vlan vlan-id
Specify the RSPAN session and the destination remote VLAN (RSPAN VLAN). This example shows how to remove any existing configuration on RSPAN session 2. local to remove all local sessions.
Step 8
To monitor all VLANs on the trunk port. For session_number. enter a space before and after the hyphen.Chapter 23 Configuring SPAN and RSPAN
Configuring SPAN and RSPAN
Specifying VLANs to Filter
Beginning in privileged EXEC mode. the range is 1 to 4094. specify the RSPAN VLAN to carry the monitored traffic to the destination port. and send traffic for only VLANs 1 through 5 and 9 to destination RSPAN VLAN 902. (Optional) Use a comma (. follow these steps to configure the RSPAN source session to limit RSPAN source traffic to specific VLANs: Command
Step 1 Step 2
Purpose Enter global configuration mode. the range is from 1 to 66. Enter a space before and after the comma. Remove any existing SPAN configuration for the session. For interface-id. Verify the configuration. | -] For session_number. vlan-id [. specify the source port to monitor. For session_number. enter the session number specified in step 3. configure RSPAN session 2 to monitor traffic received on trunk port 2. enter the session number specified in step 3. use the no monitor session session_number filter vlan global configuration command. the range is from 1 to 66. The interface specified must already be configured as a trunk port.5 . For session_number.) to specify a series of VLANs or use a hyphen (-) to specify a range of VLANs. (Optional) Save the configuration in the configuration file. 9 monitor session 2 destination remote vlan 902 end
Catalyst 3560 Switch Software Configuration Guide
23-22
78-16156-01
.
Step 4
monitor session session_number filter vlan Limit the SPAN source traffic to specific VLANs. or remote to remove all remote SPAN sessions.
Switch(config)# Switch(config)# Switch(config)# Switch(config)# Switch(config)# no monitor session 2 monitor session 2 source interface gigabitethernet0/2 rx monitor session 2 filter vlan 1 .
configure terminal no monitor session {session_number | all | local | remote}
Step 3
monitor session session_number source interface interface-id
Specify the characteristics of the source port (monitored port) and SPAN session. Specify all to remove all SPAN sessions. For vlan-id.

You can also use the show running-config privileged EXEC command to display configured SPAN or RSPAN sessions.Chapter 23
Configuring SPAN and RSPAN Displaying SPAN and RSPAN Status
Displaying SPAN and RSPAN Status
To display the current SPAN or RSPAN configuration. use the show monitor user EXEC command.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
23-23
.

RMON provides you with comprehensive network-fault diagnosis.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
24-1
. and performance-tuning information. RMON is a standard monitoring specification that defines a set of statistics and functions that can be exchanged between RMON-compliant console systems and network probes. planning.
Note
For complete syntax and usage information for the commands used in this chapter. refer to the Cisco IOS Configuration Fundamentals Command Reference for Release 12. This chapter consists of these sections:
• • •
Understanding RMON.1. page 24-2 Displaying RMON Status. page 24-1 Configuring RMON. page 24-6
Understanding RMON
RMON is an Internet Engineering Task Force (IETF) standard monitoring specification that allows various network agents and console systems to exchange network monitoring data.C H A P T E R
24
Configuring RMON
This chapter describes how to configure Remote Network Monitoring (RMON) on the Catalyst 3560 switch. You can use the RMON feature with the Simple Network Management Protocol (SNMP) agent in the switch to monitor all the traffic flowing among switches on all connected LAN segments as shown in Figure 24-1.

page 24-5 (optional) Collecting Group Ethernet Statistics on an Interface. Event (RMON group 9)—Specifies the action to take when an event is triggered by an alarm. triggers an alarm at a specified value (rising threshold). RMON history and statistic collection enabled.Chapter 24 Configuring RMON
Configuring RMON
Figure 24-1 Remote Monitoring Example
Network management station with generic RMON console application
RMON alarms and events configured.
•
•
Because switches supported by this software release use hardware counters for RMON data processing. History (RMON group 2)—Collects a history group of statistics on Ethernet ports (including Fast Ethernet and Gigabit Ethernet statistics. Alarm (RMON group 3)—Monitors a specific management information base (MIB) object for a specified interval. depending on the switch type and supported interfaces) for a specified polling interval. the alarm triggers an event. the monitoring is more efficient. and little processing power is required. Alarms can be used with events. page 24-6 (optional)
Catalyst 3560 Switch Software Configuration Guide
24-2
101233
78-16156-01
.
Workstations
Workstations
The switch supports these RMON groups (defined in RFC 1757):
• •
Statistics (RMON group 1)—Collects Ethernet statistics (including Fast Ethernet and Gigabit Ethernet statistics. page 24-3 (required) Collecting Group History Statistics on an Interface. page 24-3 Configuring RMON Alarms and Events. and resets the alarm at another value (falling threshold). depending on the switch type and supported interfaces) on an interface. which can generate a log entry or an SNMP trap.
Configuring RMON
These sections describe how to configure RMON on your switch:
• • • •
Default RMON Configuration. SNMP configured. The action can be to generate a log entry or an SNMP trap.

(Optional) For owner string. You must also configure SNMP on the switch to access RMON MIB objects.
• • •
configure terminal rmon alarm number variable interval {absolute | delta} rising-threshold value [event-number] falling-threshold value [event-number] [owner string]
For number. follow these steps to enable RMON alarms and events. specify a number at which the alarm is triggered and one for when the alarm is reset. For value. specify the event number to trigger when the rising or falling threshold exceeds its limit. Set an alarm on a MIB object. The range for the rising threshold and falling threshold values is -2147483648 to 2147483647. For more information. The range is 1 to 65535. Specify the absolute keyword to test each MIB variable directly.
•
•
•
•
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
24-3
. see Chapter 26. specify the time in seconds the alarm monitors the MIB variable. specify the owner of the alarm. For interval. no alarms or events are configured. “Configuring SNMP. The range is 1 to 4294967295 seconds. Command
Step 1 Step 2
Purpose Enter global configuration mode.” Beginning in privileged EXEC mode.Chapter 24
Configuring RMON Configuring RMON
Default RMON Configuration
RMON is disabled by default. Only RMON 1 is supported on the switch. Specify the delta keyword to test the change between samples of a MIB variable. We recommend that you use a generic RMON console application on the network management station (NMS) to take advantage of RMON’s network management capabilities. specify the alarm number. This procedure is required. specify the MIB object to monitor. (Optional) For event-number.
Configuring RMON Alarms and Events
You can configure your switch for RMON by using the command-line interface (CLI) or an SNMP-compatible network management station. For variable.

Step 4 Step 5 Step 6
end show running-config copy running-config startup-config
Return to privileged EXEC mode.1 once every 20 seconds until the alarm is disabled and checks the change in the variable’s rise or fall. You can set an alarm on any MIB object. (Optional) Use the log keyword to generate an RMON log entry when the event is triggered. The following example configures RMON alarm number 10 by using the rmon alarm command.20. The alarm monitors the MIB variable ifEntry. assign an event number. If the ifEntry. (Optional) For owner string.
To disable an alarm. This example also generates an SNMP trap when the event is triggered. (Optional) For description string.20. enter the SNMP community string used for this trap.1 value changes by 0. To disable an event. The range is 1 to 65535.
• • • • •
For number. (Optional) For trap community.
Switch(config)# rmon event 1 log trap eventtrap description "High ifOutErrors" owner jjones
Catalyst 3560 Switch Software Configuration Guide
24-4
78-16156-01
. such as from 100000 to 100015.Chapter 24 Configuring RMON
Configuring RMON
Command
Step 3
Purpose
rmon event number [description string] [log] [owner string] Add an event in the RMON event table that is [trap community] associated with an RMON event number. The event is defined as High ifOutErrors and generates a log entry when the event is triggered by the alarm. which is configured with the rmon event command. the alarm is triggered. specify a description of the event. specify the owner of this event.
Switch(config)# rmon alarm 10 ifEntry. You cannot disable at once all the alarms that you configured.20.20. The user jjones owns the row that is created in the event table by this command. Verify your entries. the alarm is reset and can be triggered again. refer to RFC 1757. use the no rmon event number global configuration command.1 value shows a MIB counter increase of 15 or more. (Optional) Save your entries in the configuration file. To learn more about alarms and events and how they interact with each other. If the ifEntry.1 20 delta rising-threshold 15 1 falling-threshold 0 owner jjohnson
The following example creates RMON event number 1 by using the rmon event command. Possible events can include a log entry or an SNMP trap. The alarm in turn triggers event number 1. use the no rmon alarm number global configuration command on each alarm you configured.

enter the name of the owner of the RMON group of statistics. Beginning in privileged EXEC mode. The range is 1 to 3600. This procedure is optional. specify the maximum number of buckets desired for the RMON collection history group of statistics. The default is 1800 seconds. (Optional) For interval seconds. follow these steps to collect group history statistics on an interface. Verify your entries.Chapter 24
Configuring RMON Configuring RMON
Collecting Group History Statistics on an Interface
You must first configure RMON alarms and events to display collection information. use the no rmon collection history index interface configuration command. The range is 1 to 65535. specify the number of seconds in each polling cycle. (Optional) Save your entries in the configuration file. Enable history collection for the specified number of buckets and time period. and enter interface configuration mode.
• •
configure terminal interface interface-id rmon collection history index [buckets bucket-number] [interval seconds] [owner ownername]
For index.
•
• Step 4 Step 5 Step 6 Step 7
end show running-config show rmon history copy running-config startup-config
Return to privileged EXEC mode. (Optional) For buckets bucket-number. identify the RMON group of statistics The range is 1 to 65535. The default is 50 buckets.
To disable history collection. Specify the interface on which to collect history.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
24-5
. Command
Step 1 Step 2 Step 3
Purpose Enter global configuration mode. Display the contents of the switch history table. (Optional) For owner ownername.

This example shows how to collect RMON statistics for the owner root:
Switch(config)# interface gigabitethernet0/1 Switch(config-if)# rmon collection stats 2 owner root
Displaying RMON Status
To display the RMON status.
Step 4 Step 5 Step 6 Step 7
end show running-config show rmon statistics copy running-config startup-config
Return to privileged EXEC mode. follow these steps to collect group Ethernet statistics on an interface. Displays the RMON alarm table.
• •
configure terminal interface interface-id
rmon collection stats index [owner ownername] Enable RMON statistic collection on the interface.1. (Optional) Save your entries in the configuration file. Display the contents of the switch statistics table. use the no rmon collection stats index interface configuration command. and enter interface configuration mode. use one or more of the privileged EXEC commands in Table 24-1:
Table 24-1 Commands for Displaying RMON Status
Command show rmon show rmon alarms show rmon events show rmon history show rmon statistics
Purpose Displays general RMON statistics. enter the name of the owner of the RMON group of statistics. For index.
Catalyst 3560 Switch Software Configuration Guide
24-6
78-16156-01
.
To disable the collection of group Ethernet statistics. Command
Step 1 Step 2 Step 3
Purpose Enter global configuration mode. Displays the RMON event table. Displays the RMON history table. This procedure is optional. refer to the Cisco IOS Configuration Fundamentals Command Reference for Release 12. The range is from 1 to 65535.Chapter 24 Displaying RMON Status
Configuring RMON
Collecting Group Ethernet Statistics on an Interface
Beginning in privileged EXEC mode. (Optional) For owner ownername. specify the RMON group of statistics. Specify the interface on which to collect statistics. Displays the RMON statistics table.
For information about the fields in these displays. Verify your entries.

You can access logged system messages by using the switch command-line interface (CLI) or by saving them to a properly configured syslog server. For information on possible messages. a switch sends the output from system messages and debug privileged EXEC commands to a logging process. refer to the system message guide for this release. The process also sends messages to the console.
Note
The syslog format is compatible with 4. This chapter consists of these sections:
• • •
Understanding System Message Logging. messages are sent only to the console. page 25-12
Understanding System Message Logging
By default.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
25-1
. The logging process controls the distribution of logging messages to various destinations. depending on your configuration. terminal lines. page 25-2 Displaying the Logging Configuration. The switch software saves syslog messages in an internal buffer. You can set the severity level of the messages to control the type of messages displayed on the consoles and each of the destinations. or a UNIX syslog server.3 BSD UNIX. The messages are sent as they are generated. so message and debug output are interspersed with prompts or output from other commands. Messages appear on the console after the process that generated them has finished.1.
Note
For complete syntax and usage information for the commands used in this chapter. refer to the Cisco IOS Configuration Fundamentals Command Reference for Release 12. When the logging process is disabled. You can remotely monitor system messages by viewing the logs on a syslog server or by accessing the switch through Telnet or through the console port. such as the logging buffer.C H A P T E R
25
Configuring System Message Logging
This chapter describes how to configure system message logging on the Catalyst 3560 switch. You can time-stamp log messages or set the syslog source address to enhance real-time debugging and management. page 25-1 Configuring System Message Logging.

and so forth). see the “Enabling and Disabling Time Stamps on Log Messages” section on page 25-7.
Catalyst 3560 Switch Software Configuration Guide
25-2
78-16156-01
. SNMP. service timestamps log datetime [localtime] [msec] [show-timezone]. see the “Enabling and Disabling Sequence Numbers in Log Messages” section on page 25-7. For more information. service timestamps log datetime. Messages appear in this format: seq no:timestamp: %facility-severity-MNEMONIC:description The part of the message preceding the percent sign depends on the setting of the service sequence-numbers. For more information. if configured. page 25-7 (optional) Enabling and Disabling Sequence Numbers in Log Messages. page 25-3 Disabling Message Logging. see Table 25-4 on page 25-12. page 25-4 (optional) Synchronizing Log Messages. page 25-4 (optional) Setting the Message Display Destination Device. page 25-8 (optional) Limiting Syslog Messages Sent to the History Table and to SNMP. page 25-5 (optional) Enabling and Disabling Time Stamps on Log Messages. This information appears only if the service timestamps log [datetime | log] global configuration command is configured. For a list of supported facilities. page 25-10 (optional)
System Log Message Format
System log messages can contain up to 80 characters and a percent sign (%). or service timestamps log uptime global configuration command. Single-digit code from 0 to 7 that is the severity of the message. For a description of the severity levels. page 25-7 (optional) Defining the Message Severity Level. page 25-2 Default System Message Logging Configuration. SYS. which follows the optional sequence number or time-stamp information. Table 25-1 describes the elements of syslog messages. see Table 25-3 on page 25-9.Chapter 25 Configuring System Message Logging
Configuring System Message Logging
Configuring System Message Logging
These sections describe how to configure system message logging:
• • • • • • • • • •
System Log Message Format.
The facility to which the message refers (for example. page 25-9 (optional) Configuring UNIX Syslog Servers.
timestamp formats: mm/dd hh:mm:ss or hh:mm:ss (short uptime) or d h (long uptime) facility severity
Date and time of the message or event.
Table 25-1 System Log Message Elements
Element seq no:
Description Stamps log messages with a sequence number only if the service sequence-numbers global configuration command is configured.

messages appear on the console as soon as they are produced. Return to privileged EXEC mode.
Disabling the logging process can slow down the switch because a process must wait until the messages are written to the console before continuing. this value is the maximum available. Verify your entries. you can send messages to specific locations in addition to the console. If the switch fails. When this command is enabled. Beginning in privileged EXEC mode.
Setting the Message Display Destination Device
If message logging is enabled.
Catalyst 3560 Switch Software Configuration Guide
25-4
78-16156-01
. see the “Synchronizing Log Messages” section on page 25-5. log messages are sent to a logging process. often appearing in the middle of command output. Command
Step 1 Step 2
Purpose Enter global configuration mode. When enabled. It must be enabled to send messages to any destination other than the console. follow these steps to disable message logging. This procedure is optional. Disable message logging. which logs messages to designated locations asynchronously to the processes that generated the messages. The default buffer size is 4096. The range is 4096 to 2147483647 bytes. use the logging on global configuration command.
Note
configure terminal logging buffered [size]
Do not make the buffer size too large because the switch could run out of memory for other tasks. The logging synchronous global configuration command also affects the display of messages to the console. Command
Step 1 Step 2 Step 3 Step 4
Purpose Enter global configuration mode. Use the show memory privileged EXEC command to view the free processor memory on the switch. When the logging process is disabled.Chapter 25 Configuring System Message Logging
Configuring System Message Logging
Disabling Message Logging
Message logging is enabled by default. See Step 4. To re-enable message logging after it has been disabled.
configure terminal no logging on end show running-config or show logging
Step 5
copy running-config startup-config
(Optional) Save your entries in the configuration file. Log messages to an internal buffer on the switch. Beginning in privileged EXEC mode. the log file is lost unless you previously saved it to Flash memory. This procedure is optional. messages appear only after you press Return. and the buffer size should not be set to this amount. use one or more of the following commands to specify the locations that receive messages. For more information. However.

Use the logging event power-inline-status interface configuration command to enable and to disable logging of Power over Ethernet (PoE) events on specific PoE-capable ports. By default. You can also configure the maximum number of buffers for storing asynchronous messages for the terminal after which messages are dropped. specify the minimum logging file size.
Step 5 Step 6
end terminal monitor
Return to privileged EXEC mode. (Optional) For max-file-size. For a list of logging type keywords. specify the maximum logging file size. The default is 2048 bytes.
• • • •
For filename. use the clear logging privileged EXEC command. For host. Logging on these ports is enabled by default. To clear the contents of the buffer. (Optional) For severity-level-number | type. see Table 25-3 on page 25-9. so newer messages overwrite older messages after the buffer is full. You must perform this step for each session to see the debugging messages. (Optional) For min-file-size. The default is 4096 bytes. For complete syslog server configuration steps. You can identify the types of messages to be output asynchronously based on the level of severity. use the show logging privileged EXEC command. use the no logging file [severity-level-number | type] global configuration command. specify either the logging severity level or the logging type.
logging host
Step 4
logging file flash:filename [max-file-size [min-file-size]] [severity-level-number | type]
Store log messages in a file in Flash memory. Log messages to a nonconsole terminal during the current session. The severity range is 0 to 7. enter the log message filename. The range is 4096 to 2147483647. The range is 1024 to 2147483647. specify the name or IP address of the host to be used as the syslog server.
Step 7 Step 8
show running-config copy running-config startup-config
Verify your entries. enter this command more than once.Chapter 25
Configuring System Message Logging Configuring System Message Logging
Command
Step 3
Purpose Log messages to a UNIX syslog server host.
Synchronizing Log Messages
You can synchronize unsolicited messages and debug privileged EXEC command output with solicited device output and prompts for a specific console port line or virtual terminal line. the log file receives debugging messages and numerically lower levels. To display the messages that are logged in the buffer. To disable logging to a file.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
25-5
. The buffer is circular. To disable logging to the console. (Optional) Save your entries in the configuration file. see the “Configuring UNIX Syslog Servers” section on page 25-10. To build a list of syslog servers that receive logging messages. The first message displayed is the oldest message in the buffer.
The logging buffered global configuration command copies logging messages to an internal buffer. Terminal parameter-setting commands are set locally and do not remain in effect after the session has ended. use the no logging console global configuration command.

follow these steps to configure synchronous logging. The range of line numbers is from 0 to 15. Specify the line to be configured for synchronous logging of messages. Beginning in privileged EXEC mode. The default is 20. unsolicited messages and debug command output are not interspersed with solicited device output and prompts. (Optional) For limit number-of-buffers. Therefore. the console again displays the user prompt.
Step 3
logging synchronous [level [severity-level | all] | limit number-of-buffers]
Enable synchronous logging of messages. The default is 2.
•
(Optional) For level severity-level. the mode changes to line configuration. (Optional) Specifying level all means that all messages are printed asynchronously regardless of the severity level. Command
Step 1 Step 2
Purpose Enter global configuration mode. You use a vty connection for configurations that occur through a Telnet session. specify the message severity level.
You can change the setting of all 16 vty lines at once by entering: line vty 0 15 Or you can change the setting of the single vty line being used for your current connection. After the unsolicited messages appear.
To disable synchronization of unsolicited messages and debug output. unsolicited device output appears on the console or printed after solicited device output appears or is printed. enter: line vty 2 When you enter this command.
• •
configure terminal line [console | vty] line-number [ending-line-number]
Use the console keyword for configurations that occur through the switch console port. specify the number of buffers to be queued for the terminal after which new messages are dropped. The range is 0 to 2147483647. Unsolicited messages and debug command output appears on the console after the prompt for user input is returned. use the no logging synchronous [level severity-level | all] [limit number-of-buffers] line configuration command. Messages with a severity level equal to or higher than this value are printed asynchronously. For example. to change the setting for vty line 2. This procedure is optional. Verify your entries. Low numbers mean greater severity and high numbers mean lesser severity. Use the line vty line-number command to specify which vty lines are to have synchronous logging enabled.Chapter 25 Configuring System Message Logging
Configuring System Message Logging
When synchronous logging of unsolicited messages and debug command output is enabled.
Catalyst 3560 Switch Software Configuration Guide
25-6
78-16156-01
.
• •
Step 4 Step 5 Step 6
end show running-config copy running-config startup-config
Return to privileged EXEC mode. (Optional) Save your entries in the configuration file.

This example shows part of a logging display with the service timestamps log datetime global configuration command enabled:
*Mar 1 18:46:11: %SYS-5-CONFIG_I: Configured from console by vty2 (10. follow these steps to enable time-stamping of log messages. Command
Step 1 Step 2 Step 3 Step 4 Step 5
Purpose Enter global configuration mode.
To disable time stamps for both debug and log messages.
configure terminal service timestamps log uptime or
service timestamps log datetime [msec] [localtime] The second command enables time stamps on log messages. (Optional) Save your entries in the configuration file. use the no service timestamps global configuration command. Command
Step 1 Step 2
Purpose Enter global configuration mode. [show-timezone] Depending on the options selected. and the time zone name. sequence numbers in log messages are not displayed. Beginning in privileged EXEC mode. changed state to up
Enabling and Disabling Sequence Numbers in Log Messages
Because there is a chance that more than one log message can have the same time stamp. (Optional) Save your entries in the configuration file. Return to privileged EXEC mode.
Step 3 Step 4 Step 5
end show running-config copy running-config startup-config
Return to privileged EXEC mode. The first command enables time stamps on log messages.
configure terminal service sequence-numbers end show running-config copy running-config startup-config
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
25-7
. Enable log time stamps. By default. log messages are not time-stamped. Verify your entries. This procedure is optional. Beginning in privileged EXEC mode. the time stamp can include the date. Verify your entries. follow these steps to enable sequence numbers in log messages. Enable sequence numbers.34.36)
This example shows part of a logging display with the service timestamps log uptime global configuration command enabled:
00:00:46: %LINK-3-UPDOWN: Interface Port-channel1. This procedure is optional. showing the time since the system was rebooted.Chapter 25
Configuring System Message Logging Configuring System Message Logging
Enabling and Disabling Time Stamps on Log Messages
By default.195. you can display messages with sequence numbers so that you can unambiguously refer to a single message. time in milliseconds relative to the local time-zone.

displayed at the debugging level. switch functionality is not affected. one message of the level warning and numerically lower levels (see Table 25-3 on page 25-9) are stored in the history table even if syslog traps are not enabled. Output from the debug commands. For information on how to recover from these malfunctions. This message is only for information. refer to the system message guide for this release. you can change the level of messages sent and stored in the switch history table. Debug commands are typically used only by the Technical Assistance Center. By default. displayed at the notifications level.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
25-9
. displayed at levels warnings through emergencies.
• •
Limiting Syslog Messages Sent to the History Table and to SNMP
If you enabled syslog message traps to be sent to an SNMP network management station by using the snmp-server enable trap global configuration command.Chapter 25
Configuring System Message Logging Configuring System Message Logging
Table 25-3 Message Logging Level Keywords
Level Keyword emergencies alerts critical errors warnings notifications informational debugging
Level 0 1 2 3 4 5 6 7
Description System unstable Immediate action needed Critical conditions Error conditions Warning conditions Normal but significant condition Informational messages only Debugging messages
Syslog Definition LOG_EMERG LOG_ALERT LOG_CRIT LOG_ERR LOG_WARNING LOG_NOTICE LOG_INFO LOG_DEBUG
The software generates four other categories of messages:
•
Error messages about software or hardware malfunctions. These types of messages mean that the functionality of the switch is affected. You also can change the number of messages that are stored in the history table. Messages are stored in the history table because SNMP traps are not guaranteed to reach their destination. Interface up or down transitions and system restart messages.

follow these steps to change the level and history table size defaults. By default. For SNMP usage.
Logging Messages to a UNIX Syslog Daemon
Before you can send system log messages to a UNIX syslog server. warnings. Command
Step 1 Step 2
Purpose Enter global configuration mode.
Catalyst 3560 Switch Software Configuration Guide
25-10
78-16156-01
. the oldest message entry is deleted from the table to allow the new message entry to be stored.
Step 3
logging history size number
Specify the number of syslog messages that can be stored in the history table.
Configuring UNIX Syslog Servers
The next sections describe how to configure the UNIX server syslog daemon and how to define the UNIX system logging facility.
Table 25-3 lists the level keywords and severity level. alerts. you must configure the syslog daemon on a UNIX server. and critical equals 3. Verify your entries.Chapter 25 Configuring System Message Logging
Configuring System Message Logging
Beginning in privileged EXEC mode. critical. To return the number of messages in the history table to the default value. This procedure is optional. and perform these steps:
Note
Some recent versions of UNIX syslog daemons no longer accept by default syslog packets from the network.
1
configure terminal logging history level
Change the default level of syslog messages stored in the history file and sent to the SNMP server. use the UNIX man syslogd command to decide what options must be added to or removed from the syslog command line to enable logging of remote syslog messages. To return the logging of syslog messages to the default level. This procedure is optional.
When the history table is full (it contains the maximum number of message entries specified with the logging history size global configuration command). errors. not 2. For example. use the no logging history size global configuration command. Log in as root. If this is the case with your system. the severity level values increase by 1. The default is to store one message. not 0. The range is 0 to 500 messages.
Step 4 Step 5 Step 6
end show running-config copy running-config startup-config
1. Return to privileged EXEC mode. use the no logging history global configuration command. and emergencies messages are sent. emergencies equal 1. See Table 25-3 on page 25-9 for a list of level keywords. (Optional) Save your entries in the configuration file.

The file must already exist. See Table 25-3 on page 25-9 for level keywords. use the no logging host global configuration command. you can cause the switch to identify its messages as originating from any of the UNIX syslog facilities. Command
Step 1 Step 2
Purpose Enter global configuration mode.Chapter 25
Configuring System Message Logging Configuring System Message Logging
Step 1
Add a line such as the following to the file /etc/syslog. Verify your entries.
configure terminal logging host
Step 3
logging trap level
Limit messages logged to the syslog servers. and specify the syslog server IP address.conf:
local7. see Table 25-3 on page 25-9 for information on the severity levels.
Configuring the UNIX System Logging Facility
When sending system log messages to an external device. enter the no logging trap global configuration command. The default is local7. Beginning in privileged EXEC mode.
Step 5 Step 6 Step 7
end show running-config copy running-config startup-config
To remove a syslog server.pid`
For more information.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
25-11
.conf and man syslogd commands on your UNIX system. This procedure is optional.
Step 4
logging facility facility-type
Configure the syslog facility. and the syslog daemon must have permission to write to it.
Step 2
Create the log file by entering these commands at the UNIX shell prompt:
$ touch /var/log/cisco. syslog servers receive informational messages and lower.log
Step 3
Make sure the syslog daemon reads the new changes:
$ kill -HUP `cat /etc/syslog. Log messages to a UNIX syslog server host by entering its IP address. follow these steps to configure UNIX system facility message logging. The syslog daemon sends messages at this level or at a more severe level to the file specified in the next field. To build a list of syslog servers that receive logging messages. (Optional) Save your entries in the configuration file. See Table 25-4 on page 25-12 for facility-type keywords.log
The local7 keyword specifies the logging facility to be used. To disable logging to syslog servers. enter this command more than once. see the man syslog. Be default. see Table 25-4 on page 25-12 for information on the facilities. The debug keyword specifies the syslog level.debug /usr/adm/logs/cisco. Return to privileged EXEC mode.log $ chmod 666 /var/log/cisco.

The SNMP manager can be part of a network management system (NMS) such as CiscoWorks. refer to the switch command reference for this release and to the Cisco IOS Configuration Fundamentals Command Reference for Release 12. and a management information base (MIB). link status (up or down). an SNMP agent. you define the relationship between the manager and the agent.C H A P T E R
26
Configuring SNMP
This chapter describes how to configure the Simple Network Management Protocol (SNMP) on the Catalyst 3560 switch. Traps are messages alerting the SNMP manager to a condition on the network. The SNMP system consists of an SNMP manager. the repository for information about device parameters and network data. A manager can get a value from an agent or store a value into the agent. loss of connection to a neighbor.
Catalyst 3560 Switch Software Configuration Guide 78-16156-01
26-1
. An agent can send unsolicited traps to the manager. The SNMP agent contains MIB variables whose values the SNMP manager can request or change. closing of a Transmission Control Protocol (TCP) connection. To configure SNMP on the switch. page 26-1 Configuring SNMP. The agent can also respond to a manager’s requests to get or set data.
Note
For complete syntax and usage information for the commands used in this chapter. The agent and MIB reside on the switch. or other significant events. MAC address tracking.1. restarts. page 26-6 Displaying SNMP Status. The agent gathers data from the MIB. Traps can mean improper user authentication. This chapter consists of these sections:
• • •
Understanding SNMP. page 26-16
Understanding SNMP
SNMP is an application-layer protocol that provides a message format for communication between managers and agents.

page 26-5 SNMP ifIndex MIB Object Values.Chapter 26 Understanding SNMP
Configuring SNMP
This section includes information about these topics:
• • • • • • •
SNMP Versions. a Draft Internet Standard. SNMPv2C replaces the Party-based Administrative and Security Framework of SNMPv2Classic with the community-string-based Administrative Framework of SNMPv2C while retaining the bulk retrieval and improved error handling of SNMPv2Classic.
•
SNMPv3—Version 3 of the SNMP is an interoperable standards-based protocol defined in RFCs 2273 to 2275.
Both SNMPv1 and SNMPv2C use a community-based form of security.
– SNMPv2C—The community-string-based Administrative Framework for SNMPv2.
Catalyst 3560 Switch Software Configuration Guide
26-2
78-16156-01
. page 26-3 SNMP Agent Functions. It has these features:
– SNMPv2—Version 2 of the Simple Network Management Protocol. page 26-5 SNMP Notifications. A security level is the permitted level of security within a security model.
defined in RFCs 1902 through 1907. SNMPv3 provides secure access to devices by authenticating and encrypting packets over the network and includes these security features:
– Message integrity—ensuring that a packet was not tampered with in transit – Authentication—determining that the message is from a valid source – Encryption—mixing the contents of a package to prevent it from being read by an unauthorized
source. a Full Internet Standard. minimizing the number of round-trips required. A security model is an authentication strategy set up for a user and the group within which the user resides. The community of managers able to access the agent’s MIB is defined by an IP address access control list and password. A combination of the security level and the security model determine which security mechanism is used when handling an SNMP packet. enter the priv keyword. SNMPv3 provides for both security models