You are on page 1of 68

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running

CatOS Configuration and Management

Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management
Document ID: 13414

Contents
Introduction Before You Begin Conventions Prerequisites Components Used Background Information Basic Configuration Catalyst Control Plane Protocols VLAN Trunking Protocol Auto-Negotiation Gigabit Ethernet Dynamic Trunking Protocol Spanning Tree Protocol EtherChannel/Port Aggregation Protocol Unidirectional Link Detection Management Configuration Network Diagrams In-Band Management Out-of-Band Management System Tests System Logging Simple Network Management Protocol Remote Monitoring Network Time Protocol Cisco Discovery Protocol Security Configuration Basic Security Features Terminal Access Controller Access Control System Configuration Checklist Related Information

http://www.cisco.com/warp/customer/473/103.html (1 of 68) [4/18/2004 7:56:18 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

Introduction
This document discusses the implementation of Cisco Catalyst series switches in your network, specifically the Catalyst 4500/4000, 5500/5000, and 6500/6000 platforms. Configurations and commands will be discussed that assume you are running Catalyst OS (CatOS) General Deployment software 5.5(7) or later. Although some design considerations are presented, this document does not cover overall campus design.

Before You Begin
Conventions
For more information on document conventions, see the Cisco Technical Tips Conventions.

Prerequisites
This paper assumes familiarity with the Catalyst 6500 Series Command Reference, 6.3 and 6.4. Although references to public online material for further reading will be provided throughout the document, other good foundational and educational references are listed below.
q

Cisco IOS Essentials L3 router security and routing configuration templates to complement this L2 document. Building Cisco Multilayer Switched Networks Performance and Fault Management , Cisco Press

q

q q q q q

, Cisco Press

Cisco Network Monitoring and Event Correlation Guidelines Gigabit Campus Network DesignPrinciples and Architecture Gigabit Campus Design Configuration and Recovery Analysis Cisco SAFE: A Security Blueprint for Enterprise Networks

Components Used
This document is not restricted to specific software and hardware versions.

Background Information
The solutions offered here represent years of field experience from Cisco engineers working with many of our largest customers and complex networks. Consequently, this document emphasizes real world configurations that make networks successful. This paper offers the following solutions:
q q q q

Solutions that have statistically the broadest field exposure, and thus the lowest risk. Solutions that are simple, trading some flexibility for deterministic results. Solutions that are easy to manage and configure by network operations teams. Solutions that promote high availability and high stability.

This document is divided into the following four sections:
q

Basic Configuration features used by a majority of networks such as STP and trunking.

http://www.cisco.com/warp/customer/473/103.html (2 of 68) [4/18/2004 7:56:18 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management
q

Management Configuration design considerations along with system and event monitoring using SNMP, RMON, Syslog, CDP, and NTP. Security Configuration passwords, port security, physical security, and authentication using TACACS+. Configuration Checklist summary of suggested configuration templates.

q q

Basic Configuration
Features deployed when using the majority of Catalyst networks are discussed in this section.

Catalyst Control Plane Protocols
This section introduces the protocols that run between switches under normal operation. A basic understanding of them will be helpful in tackling each section. Supervisor Traffic Most features enabled in a Catalyst network require two or more switches to cooperate, so there must be a controlled exchange of keepalive messages, configuration parameters, and management changes. Whether these protocols are Cisco proprietary, like Cisco Discovery Protocol (CDP), or standards-based, like IEEE 802.1d (STP), all have certain elements in common when implemented on the Catalyst series. In basic frame forwarding, user data frames originate from end systems, and their source address and destination address are not changed throughout Layer 2 (L2) switched domains. Content Addressable Memory (CAM) lookup-tables on each switch Supervisor Engine are populated by a source address learning process and indicate which egress port should forward each frame received. If the address learning process is incomplete (the destination is unknown or the frame is destined to a broadcast or multicast address), it is forwarded (flooded) out all ports in that VLAN. The switch must also recognize which frames are to be switched through the system and which should be directed to the switch CPU itself (also known as the Network Management Processor or NMP). The Catalyst control plane is created using special entries in the CAM table called system entries to receive and direct traffic to the NMP on an internal switch port. Thus, by using protocols with well-known destination MAC addresses, control plane traffic can be separated from the data traffic. Issuing the command show CAM system on a switch will confirm this, as shown below. >show cam system * = Static Entry. + = Permanent Entry. # = System Entry. R = Router Entry. X = Port Security Entry VLAN Dest MAC/Route Des [CoS] Destination Ports or VCs / [Protocol Type] ---- ---------------------- ------------------------------------------1 00-d0-ff-88-cb-ff # 1/3 !--- NMP internal port. 1 01-00-0c-cc-cc-cc # 1/3

!--- CDP and so on. 1 01-00-0c-cc-cc-cd # 1/3

!--- Cisco STP. 1 01-80-c2-00-00-00 # 1/3

http://www.cisco.com/warp/customer/473/103.html (3 of 68) [4/18/2004 7:56:18 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

!--- IEEE STP. 1 01-80-c2-00-00-01 # 1/3

!--- IEEE flow control. 1 00-03-6b-51-e1-82 R# 15/1

!--- MSFC router. ... Cisco has a reserved range of Ethernet MAC and protocol addresses as shown below. Each one will be covered later in this document, however, a summary is presented in the table below for convenience. SNAP HDLC Protocol Type Destination Multicast MAC 01-00-0c-cc-cc-cc 01-00-0c-cc-cc-cd 01-00-0c-cd-cd-ce 01-00-0c-cc-cc-cc 01-00-0c-cc-cc-cc 01-00-0c-cc-cc-cc 01-00-0c-cd-cd-cd 01-80-c2-00-00-00 01-00-0c-00-00-00 01-00-0c-cc-cc-cc 01-80-C2-00-00-00>0F

Feature

Port Aggregation 0x0104 Protocol (PAgP) Spanning Tree PVSTP+ VLAN Bridge Unidirectional Link Detection (UDLD) Cisco Discovery Protocol Dynamic Trunking (DTP) STP Uplink Fast IEEE Spanning Tree 802.1d 0x010b 0x010c 0x0111 0x2000 0x2004 0x200a N/A DSAP 42 SSAP 42

Inter Switch Link N/A (ISL) VLAN Trunking (VTP) IEEE Pause, 802.3x 0x2003 N/A DSAP 81 SSAP 80

The majority of Cisco control protocols use an IEEE 802.3 SNAP encapsulation, including LLC 0xAAAA03, OUI 0x00000C, which can be seen on a LAN analyzer trace. Other common properties of these protocols include the following:
q

These protocols assume point-to-point connectivity. Note that the deliberate use of multicast destination addresses enables two Catalysts to transparently communicate over non-Cisco switches, as devices that do not understand and intercept the frames will simply flood them. Point-to-multipoint connections through multi-vendor environments,

http://www.cisco.com/warp/customer/473/103.html (4 of 68) [4/18/2004 7:56:18 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

however, can result in inconsistent behavior and should generally be avoided.
q q

These protocols terminate at L3 routers; they function only within a switch domain. These protocols receive prioritization over user data by ingress ASIC processing and scheduling.

After introducing the control protocol destination addresses, the source address should also be described for completeness. Switch protocols use a MAC address taken from a bank of available addresses provided by an EPROM on the chassis. Issuing the show module command will display the address ranges available to each module when it is sourcing traffic such as STP BPDUs or ISL frames. >show module ... Mod MAC-Address(es) Hw Fw Sw --- -------------------------------------- ------ ---------- ----------------1 00-01-c9-da-0c-1e to 00-01-c9-da-0c-1f 2.2 6.1(3) 6.1(1d) 00-01-c9-da-0c-1c to 00-01-c9-da-0c-1 00-d0-ff-88-c8-00 to 00-d0-ff-88-cb-ff !--- MACs for sourcing traffic. ... VLAN 1 VLAN 1 VLAN 1 has a special significance in Catalyst networks. The Catalyst Supervisor Engine always uses the default VLAN, VLAN 1, to tag a number of control and management protocols when trunking, such as CDP, VTP and PAgP. All ports, including the internal sc0 interface, are configured by default to be members of VLAN 1. All trunks carry VLAN 1 by default, and in CatOS software versions earlier than 5.4, it was not possible to block user data in VLAN 1. The following definitions are needed to help clarify some well-used terms in Catalyst networking:
q q

The management VLAN is where sc0 resides; this VLAN can be changed. The native VLAN is defined as the VLAN to which a port will return when not trunking, and is the untagged VLAN on an 802.1Q trunk.

The following are several good reasons to tune a network and alter the behavior of ports in VLAN 1:
q

When the diameter of VLAN 1, like any other VLAN, gets large enough to be a risk to stability, particularly from an STP perspective, it needs to be pruned back. This is discussed in more detail in the In-Band Management section of this document. Control plane data on VLAN 1 should be kept separate from the user data to simplify troubleshooting and maximize available CPU cycles. L2 loops in VLAN 1 must be avoided when designing multilayer-campus networks without STP, yet trunking is still required to the access layer if there are multiple VLANs and IP subnets. To do this, manually clear VLAN 1 from trunk ports.

q

q

In summary, it is worth noting the following about trunks:
q

CDP, VTP, and PAgP updates are always forwarded on trunks with a VLAN 1 tag. This is the case even if VLAN 1 has been cleared from the trunks and is not the native VLAN. Clearing VLAN 1 for user data has no impact on control plane traffic that is still sent using VLAN 1.

http://www.cisco.com/warp/customer/473/103.html (5 of 68) [4/18/2004 7:56:18 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management
q

802.1Q IEEE BPDUs are forwarded untagged on the common Spanning Tree VLAN 1 for interoperability with other vendors, unless VLAN 1 has been cleared from the trunk. Cisco PVST+ BPDUs are sent and tagged for all other VLANs. Refer to the Spanning Tree Protocol section in this document for more details.

VLAN Trunking Protocol
Before creating VLANs, determine the VTP mode to be used in the network. VTP enables VLAN configuration changes to be made centrally on one or more switches. Those changes automatically propagate to all other switches in the domain. Operational Overview VTP is a L2 messaging protocol that maintains VLAN configuration consistency by managing the addition, deletion, and renaming of VLANs on a network-wide basis. VTP minimizes misconfigurations and configuration inconsistencies that can cause a number of problems, such as duplicate VLAN names, incorrect VLAN-type specifications, and security violations. The VLAN database is a binary file and is stored in NVRAM on VTP servers separately from the configuration file. The VTP protocol communicates between switches using an Ethernet destination multicast MAC address (01-00-0c-cc-cc-cc) and SNAP HDLC protocol type Ox2003. It does not work over non-trunk ports (VTP is a payload of ISL or 802.1Q), so messages cannot be sent until DTP has brought the trunk online. Message types include summary advertisements every five minutes, subset advertisements and request advertisements when there are changes, and joins when VTP pruning is enabled. The VTP configuration revision number is incremented by one with every change on a server, which then propagates the new table across the domain. If a VLAN is deleted, ports that were once a member of that VLAN are placed in an inactive state. Similarly, if a switch in client mode is unable to receive the VTP VLAN table at boot-up (either from a VTP server or another VTP client), all ports in VLANs other than the default VLAN 1 will be deactivated. Feature Source VTP Messages Listen to VTP messages Create VLANs Remember VLANs Server Client Yes Yes Yes Yes Yes Yes No No No No Yes (locally significant only) Yes (locally significant only) Transparent

In VTP transparent mode, VTP updates are ignored (the VTP multicast MAC address is removed from the system CAM that is normally used to pick up control frames and direct them to the Supervisor Engine). As the protocol uses a multicast address, a switch in transparent mode (or another vendor's switch) will simply flood the frame to other Cisco switches in the domain. The table below provides a summary of the initial configuration. Feature VTP Domain Name VTP mode VTP version 2 VTP password VTP Pruning Null Server Disabled None Disabled Default Value

http://www.cisco.com/warp/customer/473/103.html (6 of 68) [4/18/2004 7:56:18 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

VTP version 2 includes the following functional flexibility, however, it is not interoperable with VTP version 1:
q q q

Token Ring support Unrecognized VTP information support; switches will now propagate values they cannot parse. Version-dependent transparent mode; transparent mode no longer checks domain name. This enables support of more than one domain across a transparent domain. Version number propagation; if VTPv2 is possible on all switches, all can be enabled by configuring a single switch.

q

For more information, refer to Understanding and Configuring VLAN Trunk Protocol (VTP). Recommendation There is no specific recommendation on whether to use VTP client/server modes or VTP transparent mode. Some customers prefer the ease of management of VTP client/server mode despite some considerations noted below. The recommendation is to have two server mode switches in each domain for redundancy, typically the two distribution-layer switches. The rest of the switches in the domain should be set to client mode. There are pros and cons to VTP's ability to make changes easily on a network. Many enterprises prefer a cautious approach of using VTP transparent mode for the following reasons:
q

It encourages good change control practice, as the requirement to modify a VLAN on a switch or trunk port has to be considered one switch at a time. It limits the risk of an administrator error, such as deleting a VLAN accidentally and thus impacting the entire domain. There is no risk from a new switch being introduced into the network with a higher VTP revision number and overwriting the entire domain's VLAN configuration. It encourages VLANs to be pruned from trunks running to switches that do not have ports in that VLAN, thus making frame flooding more bandwidth-efficient. Manual pruning also has the benefit of reducing the spanning tree diameter (see DTP section). The extended VLAN range in CatOS 6.x, numbers 1025-4094, can only be configured in this way. VTP transparent mode is supported in Campus Manager 3.1, part of Cisco Works 2000. The old restriction of needing at least one server in a VTP domain has been removed. Comments CDP checks names to help check for miscabling between domains. A simple password is a helpful precaution against unintentional changes. Beware of case-sensitive names or spaces if pasting.

q

q

q

q q

Sample VTP Commands

set vtp domain name password x

set vtp mode transparent set vlan vlan number name Per switch that has ports in the name VLAN. set trunk mod/port vlan range Enables trunks to carry VLANs where needed default is all VLANs.

http://www.cisco.com/warp/customer/473/103.html (7 of 68) [4/18/2004 7:56:18 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

clear trunk mod/port vlan range

Limit STP diameter by manual pruning, such as on trunks from distribution layer to access layer, where the VLAN does not exist.

Note that specifying VLANs using the set command will only add VLANs, not clear them. For example, set trunk x/y 1-10 does not set the allowed list to just VLANs 1-10. Enter clear trunk x/y 11-1005 to achieve the desired result. Although Token Ring switching is outside the scope of this document, it is worth noting that VTP transparent mode is not recommended for TR-ISL networks. The basis for token ring switching is that the whole domain forms a single distributed multi-port bridge; therefore, every switch must have the same VLAN information. Other Options VTPv2 is a requirement in token ring environments, where client/server mode is highly recommended. The benefits of pruning VLANs to reduce unnecessary frame flooding have been advocated in the previous section. Theset vtp pruning enable command will prune VLANs automatically, stopping the inefficient flooding of frames where they are not needed. Note that unlike manual VLAN pruning, automatic pruning does not limit the Spanning Tree diameter. Starting from CatOS 5.1, the Catalyst switches can map 802.1Q VLAN numbers greater than 1000 to ISL VLAN numbers. In CatOS 6.x, Catalyst 6500/6000 switches support 4096 VLANs in accordance with the IEEE 802.1Q standard. These VLANs are organized into the following three ranges, only some of which are propagated to other switches in the network with VTP:
q q q

normal-range VLANs: 1-1001 extended-range VLANs: 1025-4094 NOT propagated by VTP reserved-range VLANs: 0, 1002-1024, 4095

The IEEE has produced a standards-based architecture to accomplish similar results as VTP. As a member of the 802.1Q Generic Attribute Registration Protocol (GARP), the Generic VLAN Registration Protocol (GVRP) will allow VLAN management interoperability between vendors, but is outside the scope of this document. It is also worth noting that CatOS 7.x introduces the possibility to set VTP to off mode, a mode very similar to transparent. The switch does not forward VTP frames however. This may be useful in some designs when trunking to switches outside of your administrative control.

Auto-Negotiation
Ethernet / Fast Ethernet Auto-negotiation is an optional function of the IEEE Fast Ethernet (FE) standard (802.3u) that enables devices to automatically exchange information over a link about speed and duplex abilities. Auto-negotiation operates at Layer 1 (L1), and targets access layer ports where transient users such as PCs connect to the network. Operational Overview The most common cause of performance issues on 10/100 Mbps Ethernet links are when one port on the link is operating at half-duplex while the other is at full-duplex. This occasionally happens when one or both ports on a link are reset and the auto-negotiation process does not result in both link partners having the same configuration. It also happens when administrators reconfigure one side of a link and forget to reconfigure the other side. The typical symptoms of this are increasing FCS, CRC, alignment, or runt counters on the switch. Auto-negotiation is discussed in detail in the documents below. These documents include explanations of how

http://www.cisco.com/warp/customer/473/103.html (8 of 68) [4/18/2004 7:56:18 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

auto-negotiation works and configuration options.
q q

Configuring and Troubleshooting Ethernet 10/100Mb Half/Full Duplex Auto-Negotiation Troubleshooting Cisco Catalyst Switches to Network Interface Card (NIC) Compatibility Issues

A common misconception about auto-negotiation is that it is possible to manually configure one link partner for 100 Mbps full-duplex and auto-negotiate to full-duplex with the other link partner. In fact, attempting to do this will result in a duplex mismatch. This is a consequence of one link partner auto-negotiating, not seeing any auto-negotiation parameters from the other link partner, and defaulting to half-duplex. Most Catalyst Ethernet modules support 10/100 Mbps and half/full-duplex, but the show port capabilities mod/port command will confirm this. FEFI Far-End-Fault-Indication (FEFI) protects 100BaseFX (fiber) and Gigabit interfaces, while auto-negotiation protects 100BaseTX (copper) against physical-layer/signaling related faults. A far end fault is an error in the link that one station can detect while the other cannot, such as a disconnected TX-wire. In this example, the sending station would still be receiving valid data and detect that the link is good via the link-integrity-monitor. It will not, however, be able to detect that its transmission is not being received by the other station. A 100BaseFX station that detects such a remote fault may modify its transmitted IDLE stream to send a special bit-pattern (referred to as the FEFI IDLE pattern) to inform the neighbor of the remote fault; the FEFI-IDLE pattern subsequently triggers a shutdown of the remote port (ErrDisable). Refer to the UDLD section of this document for more information on fault protection. FEFI is supported by the following hardware/modules:
q q

Catalyst 5500/5000: WS-X5201R, WS-X5305, WS-X5236, WS-X5237, WS-U5538, and WS-U5539 Catalyst 6500/6000 and 4500/4000: All 100BaseFX modules and GE modules

Recommendation Whether to configure auto-negotiation on 10/100 links or to hard code speed and duplex ultimately depends on the type of link partner or end device you have connected to a Catalyst switch port. Auto-negotiation between end devices and Catalyst switches generally works well, and Catalyst switches are compliant with the IEEE 802.3u specification. Problems may result, however, when NIC or vendor switches do not conform exactly. Hardware incompatibility and other issues may also exist as a result of vendor-specific advanced features, such as auto-polarity or cabling integrity, that are not described in the IEEE 802.3u specification for 10/100 Mbps auto-negotiation. An example is given in the following field notice: Field Notice: Performance Issue with Intel Pro/1000T NICs connecting to CAT4K/6K It is worth anticipating that there will be some situations that require host, port speed, and duplex to be set. In general, follow these basic troubleshooting steps:
q

Make sure that either auto-negotiation is configured on both sides of the link or hard coding is configured on both sides. Check the CatOS release notes for common caveats. Verify the version of NIC driver or operating system you are running, as the latest driver or patch is often required.

q q

As a rule, try using auto-negotiation first for any type of link partner. There are obvious benefits to configuring auto-negotiation for transient devices like laptops. Auto-negotiation should also work well with non-transient devices like servers and fixed workstations or from switch-to-switch and switch-to-router. For some of the reasons mentioned above, however, negotiation issues may arise. In these cases, follow the basic troubleshooting steps outlined in the TAC links provided.

http://www.cisco.com/warp/customer/473/103.html (9 of 68) [4/18/2004 7:56:18 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

If the port speed is set to auto on a 10/100 Mbps Ethernet port, both speed and duplex are auto-negotiated. Issue the following command to set the port to auto: set port speed port range auto !--- This is the default. If hard coding the port, issue the following configuration commands: set port speed port range 10 | 100 set port duplex port range full | half Other Options When no auto-negotiation is used between switches, L1 fault indication can also be lost for certain problems. It is helpful to use L2 protocols to augment failure detection, such as aggressive UDLD.

Gigabit Ethernet
Gigabit Ethernet (GE) has an auto-negotiation procedure (IEEE 802.3z) that is more extensive than that for 10/100 Mbps Ethernet and is used to exchange flow-control parameters, remote fault information, and duplex information (even though Catalyst series Gigabit Ethernet ports only support full-duplex mode). Note that 802.3z has been superseded by IEEE 802.3:2000 specs. Refer to IEEE Standards On Line LAN/MAN Standards Subscription: Archives Operational Overview Gigabit Ethernet port negotiation is enabled by default, and the ports on both ends of a GE link must have the same setting. Unlike FE, the GE link will not come up if the ports at each end of the link are set inconsistently (the exchanged parameters are different). Also unlike FE, GE does not negotiate port speed, and you cannot disable auto-negotiation using the set port speed command. For example, assume that there are two devices, A and B. Each device can have auto-negotiation enabled or disabled. The table below is a list of possible configurations and their respective link states. Negotiation A Enabled A Disabled B Enabled up on both sides A up, B down B Disabled A down, B up down on both sides for more information.

Recommendation Enabling auto-negotiation is much more critical in a GE environment than in a 10/100 environment. In fact, auto-negotiation should only be disabled on switch ports that attach to devices not capable of supporting negotiation or where connectivity issues arise from interoperability issues. Cisco recommends that Gigabit negotiation be enabled (default) on all switch-to-switch links and generally all GE devices. Issue the following command to enable auto-negotiation: set port negotiation port range enable !--- This is the default. One known exception is when connecting to a Gigabit Switch Router (GSR) running Cisco IOS® Software earlier than

http://www.cisco.com/warp/customer/473/103.html (10 of 68) [4/18/2004 7:56:18 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

release 12.0(10)S, the release that added flow control and auto-negotiation. In this case, turn off those two features, or the switch port will report not connected and the GSR will report errors. Below is a sample command sequence.

set port flowcontrol receive port range off set port flowcontrol send port range off set port negotiation port range disable Switch-to-server connections must be looked at on a case-by-case basis. Cisco customers have encountered issues with Gigabit negotiation on Sun, HP, and IBM servers. Other Options Flow control is an optional part of the 802.3x specification and must be negotiated if used. Devices may or may not be capable of sending and/or responding to a PAUSE frame (well known MAC 01-80-C2-00-00-00 0F), and they may not agree to the flow-control request of the far-end neighbor. A port with an input buffer that is filling up sends a PAUSE frame to its link partner, which stops transmitting, holding any additional frames in the link partner's output buffers. This does not solve any steady-state over-subscription problem, but effectively makes the input buffer larger by some fraction of the partner's output buffer during bursts. This feature is best used on links between access-ports and end hosts, where the host output buffer is potentially as large as their virtual memory. Switch-to-switch use has limited benefits. Issue the following commands to control this on the switch ports:

set port flowcontrol mod/port receive | send off |on | desired

>show port flowcontrol Port ----6/1 6/2 6/3 Send FlowControl admin oper -------- -------off off off off off off Receive FlowControl admin oper -------- -------on on on on on on RxPause TxPause ------0 0 0 ------0 0 0

Note: All Catalyst modules will respond to a PAUSE frame if negotiated. Some modules (eg, WS-X5410, WS-X4306) will never send pause frames even if they negotiate to do so, as they are non-blocking.

Dynamic Trunking Protocol
Encapsulation Type Trunks extend VLANs between devices by temporarily identifying and tagging (link-local) the original Ethernet frames, thus enabling them to be multiplexed over a single link. This also ensures the separate VLAN broadcast and security domains are maintained between switches. CAM tables maintain the frame-to-VLAN mapping inside the switches. Trunking is supported on several types of L2 media, including ATM LANE, FDDI 802.10, and Ethernet, although only the latter will be presented here. ISL Operational Overview Cisco's proprietary identification or tagging scheme, Inter Switch Link (ISL), has been in use for many years. The 802.1q IEEE standard is also available.
http://www.cisco.com/warp/customer/473/103.html (11 of 68) [4/18/2004 7:56:18 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

By totally encapsulating the original frame in a two-level tagging scheme, ISL is effectively a tunneling protocol and has the additional benefit of carrying non-Ethernet frames. It adds a 26-byte header and 4-byte Frame Check Sequence (FCS) to the standard Ethernet frame - the larger Ethernet frames are expected and handled by ports configured to be trunks. ISL supports 1024 VLANs. ISL Frame Format 40 Bits Dest. Addr 01-00-0c-00-00 4 48 16 4 Bits Bits Bits Bits Type USER SA LEN 24 Bits SNAP LLC 24 Bits HSA 15 Bits Bit 16 Bits 16 Bits Variable length 32 Bits

VLAN BPDU INDEX Reserve

Encapsulated FCS Frame

AAAA03 00000C

For more information, refer to InterSwitch Link Frame Format. 802.1Q Operational Overview The IEEE 802.1q standard specifies much more than encapsulation types, including Spanning Tree enhancements, GARP (see VTP section), and 802.1p Quality of Service (QoS) tagging. The 802.1q frame format preserves the original Ethernet source address and destination address, yet switches must now expect baby-giant frames to be received, even on access ports where hosts may use tagging to express 802.1p user priority for QoS signaling. The tag is 4 bytes, so 802.1q Ethernet v2 frames are 1522 bytes, an IEEE 802.3ac working group achievement. 802.1q also supports numbering space for 4096 VLANs. All data frames transmitted and received are 802.1q-tagged except for those on the native VLAN (there is an implicit tag based on the ingress switch port configuration). Frames on the native VLAN are always transmitted untagged and normally received untagged. They may also be received tagged however. For more details, refer to VLAN Standardization via IEEE 802.10 and/or Get IEEE 802 802.1q/801.1p Frame Format Tag Header TPID 48 48 16 bits 3 bits bits bits DA SA TPID TCI 1 bit 12 bits 16 bits Variable 32 length bits FCS .

Priority CFI 0-1

Data VLAN Length/ with ID Type PAD 0-4095

0x8100 0 - 7 Recommendation

As all newer hardware supports 802.1q (and some only supports 802.1q, such as the Catalyst 4500/4000 series and CSS 11000), Cisco recommends that all new implementations follow the IEEE 802.1q standard and older networks gradually migrate from ISL. The IEEE standard will allow vendor interoperability. This will be advantageous in all Cisco environments as new host 802.1p capable NICs and devices become available. Although both ISL and 802.1q implementations are mature, the IEEE standard will ultimately have greater field exposure and greater third party support, such as network analyzer support. The lower encapsulation overhead of 802.1q compared to ISL is a minor point in 802.1q's favor as well. As the encapsulation type is negotiated between switches using DTP, with ISL chosen as the winner by default if both ends
http://www.cisco.com/warp/customer/473/103.html (12 of 68) [4/18/2004 7:56:19 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

support it, it is necessary to specify dot1q by issuing the following command:

set trunk mod/port mode dot1q If VLAN 1 is cleared from a trunk, as discussed in the In-Band Management section, although no user data is transmitted or received, the NMP continues to pass control protocols such as CDP and VTP on VLAN 1. Also, as discussed in the VLAN 1 section, CDP, VTP, and PAgP packets are always sent on VLAN 1 when trunking. When using dot1Q encapsulation, these control frames will be tagged with VLAN 1 if the switch's native VLAN has been changed. If dot1Q trunking to a router is enabled and the native VLAN has been changed on the switch, a sub-interface in VLAN 1 is needed to receive the tagged CDP frames and provide CDP neighbor visibility on the router. Note: There is a potential security consideration with dot1Q caused by the implicit tagging of the native VLAN, as it may be possible to send frames from one VLAN to another without a router. Refer to Are there Vulnerabilities in VLAN Implementations? for further details. The workaround is to use a VLAN ID for the trunk's native VLAN that is not used for end user access. The majority of Cisco customers achieve this simply by leaving VLAN 1 as the native VLAN on a trunk and assigning access ports to VLANs other than VLAN 1. Trunking Mode DTP is the second generation of Dynamic ISL (DISL), and exists to ensure that the different parameters involved in sending ISL or 802.1q frames, such as the configured encapsulation type, native VLAN, and hardware capability, are agreed upon by the switches at either end of a trunk. This also helps protect against non-trunk ports flooding tagged frames, a potentially serious security risk, by ensuring that ports and their neighbors are in consistent states. Operational Overview DTP is a L2 protocol that negotiates configuration parameters between a switch port and its neighbor. It uses another multicast MAC address (01-00-0c-cc-cc-cc) and a SNAP protocol type of 0x2004. The table below is a summary of the configuration modes. Mode Function DTP Frames Transmitted Final State (Local Port)

Auto(default)

Makes the port willing to convert the link to a trunk. The port becomes Yes, a trunk port if periodic. the neighboring port is set to on or desirable mode.

Trunking

http://www.cisco.com/warp/customer/473/103.html (13 of 68) [4/18/2004 7:56:19 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

On

Puts the port into permanent trunking mode and negotiates to convert the Yes, link into a periodic. trunk. The port becomes a trunk port even if the neighboring port does not agree to the change.

Trunking, unconditionally.

Puts the port into permanent trunking mode but prevents the port from generating DTP frames. You must Nonegotiate configure the No neighboring port manually as a trunk port to establish a trunk link. This is useful for devices that do not support DTP. Makes the port actively attempt to convert the link to a trunk link. The port becomes a Yes, trunk port if periodic. the neighboring port is set to on, desirable, or auto mode.

Trunking, unconditionally.

Desirable

It will end up in trunking state only if the remote mode is on, auto, or desirable.

http://www.cisco.com/warp/customer/473/103.html (14 of 68) [4/18/2004 7:56:19 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

Off

Puts the port into permanent non-trunking mode and negotiates to convert the link into a non-trunk link. The port becomes a non-trunk port even if the neighboring port does not agree to the change.

No in steady state, but will transmit informs to speed up Non-trunking remote end detection after the change from on.

The following are some highlights of the protocol:
q

DTP assumes a point-to-point connection, and Cisco devices will only support 802.1q trunk ports that are point-to-point. During DTP negotiation, the ports will not participate in STP. Only after the port becomes one of the three DTP types (access, ISL, or 802.1q) will the port be added to STP. Otherwise PAgP, if configured, is the next process to run before the port participates in STP. If the port is trunking in ISL mode, DTP packets are sent out on VLAN 1, otherwise (for 802.1q trunking or non-trunking ports) they are sent out on the native VLAN. In desirable mode, DTP packets transfer theVTP domain name (which must match for a negotiated trunk to come up), plus trunk configuration and admin status. Messages are sent every second during negotiation, and every 30 seconds after that. Be sure to understand that modes on, nonegotiate, and off explicitly specify in which state the port will end up. A bad configuration can lead to a dangerous/inconsistent state where one side is trunking and the other is not. A port in on, auto, or desirable mode sends DTP frames periodically. If a port in auto or desirable mode does not see a DTP packet in five minutes, it will be set to non-trunk.

q

q

q

q q

q

Refer to Configuring ISL Trunking on Catalyst 5000 and 6000 Family Switches for more ISL details. Refer to Trunking Between Catalyst 4000, 5000, and 6000 Family Switches Using 802.1q Encapsulation with Cisco CatOS System Software for more 802.1q details. Recommendation Cisco recommends an explicit trunk configuration of desirable at both ends. In this mode, network operators can trust syslog and command line status messages that a port is up and trunking, unlike on mode, which can make a port appear up even though the neighbor is misconfigured. In addition, desirable mode trunk provides stability in situations where one side of the link cannot become a trunk or drops trunk state. Issue the following command to set desirable mode:

set trunk mod/port desirable ISL | dot1q

http://www.cisco.com/warp/customer/473/103.html (15 of 68) [4/18/2004 7:56:19 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

Note: Set trunk to off on all non-trunk ports. This helps eliminate wasted negotiation time when bringing host ports up. This command is also executed when the set port host command is used; refer to the STP section for more information. Issue the following command to disable a trunk on a range of ports:

set trunk port range off !--- Ports are not trunking; part of the set port host command. Other Options Another common customer configuration uses desirable mode only at the distribution layer and the simplest default configuration (auto mode) at the access layer. Some switches, such as a Catalyst 2900XL, Cisco IOS routers, or other vendors, do not currently support trunk negotiation via DTP. Nonegotiate mode on Catalyst 4500/4000, 5500/5000, 6500/6000 switches can be used to set a port to trunk unconditionally with these devices, which may help standardize on a common setting across the campus. Issue the following command to set nonegotiate mode:

set trunk mod/port nonegotiate ISL | dot1q The reason Cisco recommends nonegotiate when connecting to a Cisco IOS router is that, when performing bridging, some DTP frames received from on mode may get back into the trunk port. Upon reception of the DTP frame, the switch port will try to renegotiate (meaning bring the trunk down and up) unnecessarily. If nonegotiate is enabled, the switch will not send DTP frames.

Spanning Tree Protocol
Basic Considerations Spanning Tree Protocol (STP) maintains a loop-free L2 environment in redundant switched and bridged networks. Without STP, frames would loop and/or multiply indefinitely, causing a network meltdown as all devices in the broadcast domain would be interrupted continuously by high traffic. Although in some respects STP is a mature protocol initially developed for slow software-based bridge specifications (IEEE 802.1d), it can be complex to implement well in large switched networks with many VLANs, many switches in a domain, multi-vendor support, and newer IEEE enhancements. For future reference, CatOS 6.x continues to take on new STP development, such as Multiple Instance Spanning Tree Protocol (MISTP), loop-guard, root-guards, and BPDU arrival time skew detection. In addition, further standardized protocols are available in CatOS 7.x, such as IEEE 802.1s shared Spanning Tree and IEEE 802.1w rapid convergence Spanning Tree. Operational Overview The root bridge election per VLAN is won by the switch with the lowest root Bridge Identifier (BID). The BID is the bridge priority combined with the switch MAC address. Initially, Bridge Protocol Data Units (BPDUs) are sent from all switches, containing the BID of each switch and the path cost to reach that switch. This enables the root bridge and the lowest-cost path to the root to be determined. Additional configuration parameters carried in BPDUs from the root override those that are locally configured so that the whole network uses consistent timers.

http://www.cisco.com/warp/customer/473/103.html (16 of 68) [4/18/2004 7:56:19 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

The topology then converges through the following steps: 1. A single root bridge is elected for the entire Spanning Tree domain. 2. One root port (facing the root bridge) is elected on every non-root bridge. 3. A designated port is elected for BPDU forwarding on every segment. 4. Non-designated ports become blocking. For more information, refer to Configuring Spanning Tree. Basic Timer Defaults (seconds) 2 Hello Name Function Controls sending of BPDUs. Controls how long a port spends in listening and learning state and influences the topology change process (see below). Controls how long the switch will maintain the current topology before looking for an alternative path. After Maxage seconds, a BPDU is considered stale and the switch looks for a new root port from the pool of blocking ports. If no blocked port is available, it will claim to be the root itself on the designated ports. Default timing to next state N/A

15

Forward Delay (Fwddelay)

20

Maxage

Port States Disabled

Meaning Administratively down.

http://www.cisco.com/warp/customer/473/103.html (17 of 68) [4/18/2004 7:56:19 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

Blocking

Receiving BPDUs and stopping user data.

Monitor reception of BPDUs. Wait 20 seconds for Maxage expiration or immediate change if direct/local link failure detected.

Listening

Sending or receiving Fwddelay timer BPDUs to check whether (wait 15 return to blocking needed. seconds) Building topology/CAM table. Fwddelay timer (wait 15 seconds) 20 + 2 (15) = 50 seconds if waiting for Maxage to expire, or 30 seconds for direct link failure

Learning

Forwarding Sending/receiving data.

Total basic topology change:

The two types of BPDUs in STP are configuration BPDUs and Topology Change Notification (TCN) BPDUs. Configuration BPDU Flow Configuration BPDUs are sourced every hello-interval from every port on the root bridge and subsequently flow to all leaf switches to maintain the state of the Spanning Tree. In steady state, BPDU flow is unidirectional: root ports and blocking ports only receive configuration BPDUs, while designated ports only send configuration BPDUs. For every BPDU received by a switch from the root, a new one is processed by the Catalyst's central NMP and sent out containing the root's information. In other words, if the root bridge is lost or all paths to the root bridge are lost, BPDUs stop being received (until the maxage timer starts re-election). TCN BPDU Flow TCN BPDUs are sourced from leaf switches and flow towards the root bridge when a topology change has been detected in the spanning tree. Root ports only send TCNs and designated ports only receive TCNs. The TCN BPDU travels towards the root ridge and is acknowledged at each step, so this is a reliable mechanism. Once it arrives at the root bridge, the root bridge alerts the entire domain that a change has occurred by sourcing Configuration BPDUs with the TCN flag set for maxage + fwddelay time (35 seconds by default). This causes all switches to change their normal CAM aging time from five minutes (by default) to the interval specified by fwddelay (15 seconds by default). Refer to Understanding Spanning Tree Protocol Topology Changes for more details. Spanning Tree Modes There are three different ways to correlate VLANs with Spanning Tree. They are listed below.

http://www.cisco.com/warp/customer/473/103.html (18 of 68) [4/18/2004 7:56:19 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management
q q q

A single Spanning Tree for all VLANs, or mono Spanning Tree Protocol, such as IEEE 802.1q. A Spanning Tree per VLAN, or shared Spanning Tree, such as Cisco PVST. A Spanning Tree per set of VLANs, or multiple Spanning Tree, such as Cisco MISTP and IEEE 802.1s.

A mono Spanning Tree for all VLANs allows only one active topology and therefore no load balancing. A STP blocked port will be blocking for all VLANs and will carry no data. One Spanning Tree per VLAN allows load balancing but requires more BPDU CPU processing as the number of VLANs increases. The CatOS release notes provide guidance on the number of logical ports recommended in the Spanning Tree per switch. For example, the Catalyst 6500/6000 Supervisor Engine 1 formula is as follows: number of ports + (number of trunks * number of VLANs on trunks) < 4000 Cisco MISTP and the new 802.1s standard allow the definition of only two active STP instances/topologies, and the mapping of all VLANs to either of these two trees. This technique allows STP to scale to many thousands of VLANs while enabling load balancing. BPDU Formats In order to support the IEEE 802.1q standard, Cisco's existing STP implementation was extended to become PVST+ by adding support for tunneling across an IEEE 802.1q mono Spanning Tree region. PVST+ is therefore compatible with both IEEE 802.1q's MST and Cisco PVST protocols without requiring extra commands or configuration. In addition, PVST+ adds verification mechanisms to ensure that there is no configuration inconsistency of port trunking and VLAN IDs across switches. The following are some operational highlights of the PVST+ protocol:
q

PVST+ interoperates with 802.1q mono Spanning Tree via the so-called Common Spanning Tree (CST) over an 802.1q trunk. The CST is always on VLAN 1, so this VLAN needs to be enabled on the trunk to interoperate with other vendors. CST BPDUs are transmitted, always untagged, to the IEEE Standard Bridge-Group (MAC Address 01-80-c2-00-00-00, DSAP 42, SSAP 42). For completeness of description, a parallel set of BPDUs are also transmitted to the Cisco shared Spanning Tree MAC address for VLAN 1. PVST+ tunnels PVST BPDUs across 802.1q VLAN regions as multicast data. Cisco's shared Spanning Tree BPDUs are transmitted to MAC address 01-00-0c-cc-cc-cd (SNAP HDLC protocol type 0x010b) for each VLAN on a trunk. BPDUs are untagged on the native VLAN and tagged for all other VLANs. PVST+ checks port and VLAN inconsistencies. PVST+ blocks those ports that receive inconsistent BPDUs in order to prevent forwarding loops. It also notifies users via syslog messages about any configuration mismatch. PVST+ is backward-compatible with existing Cisco switches running PVST on ISL trunks. ISL-encapsulated BPDUs are still transmitted or received using the IEEE MAC address. In other words, each BPDU type is link-local - there are no translation issues.

q

q

q

Recommendation All Catalyst switches have STP enabled by default. This is recommended even if a design is chosen that does not include L2 loops so that STP is not enabled in the sense that it is actively maintaining a blocked port. set spantree enable all !--- This is the default. Cisco recommends leaving STP enabled for the following reasons:
q

If there is a loop (induced by mispatching, bad cable, and so on.), STP will prevent detrimental effects to the network

http://www.cisco.com/warp/customer/473/103.html (19 of 68) [4/18/2004 7:56:19 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

caused by multicast and broadcast data.
q q

Protection against an EtherChannel breaking down. Most networks are configured with STP, giving it maximum field exposure. More exposure generally equates to stable code. Protection against dual attached NICs misbehaving (or bridging enabled on servers). The software for many protocols (such as PAgP, IGMP snooping, and trunking) is closely related to STP. Running without STP may lead to undesirable results.

q q

Do not change timers, as this may adversely affect stability. The majority of networks deployed are not tuned. The simple STP timers accessible via the command line, such as hello-interval and Maxage, are themselves comprised of a complex set of other assumed and intrinsic timers, so it is difficult to tune timers and consider all the ramifications. Moreover, there is the danger of undermining UDLD protection. Ideally, keep user traffic off the management VLAN. Especially with older Catalyst switch processors, it is best to avoid problems with STP by keeping the management VLAN separate from user data. One misbehaving end station could potentially keep the Supervisor Engine processor so busy with broadcast packets that it can miss one or more BPDUs. Newer switches with more powerful CPUs and throttling controls are relieving this consideration, however. See the In-Band Management section for more details. Do not over-design redundancy. This might lead to a troubleshooting nightmare - too many blocking ports will adversely affect long-term stability. Keep the total SPT diameter under seven hops. Try to design to the Cisco multilayer model, with its smaller switched domains, STP triangles, and deterministic blocked ports (as explained in Gigabit Campus Network Design-Principles and Architecture) wherever possible. Influence and know where Root functionality and blocked ports reside, and document them on the topology diagram. The blocked ports are where STP troubleshooting begins - what made them change from blocking to forwarding is often the key part of root cause analysis. Choose the distribution and core layers as the location of root/secondary Root, since these are considered the most stable parts of the network. Check for optimal L3 and HSRP overlay with L2 data-forwarding paths. The following command is a macro that configures the bridge priority; root sets it much lower than the default (32768), while root secondary sets it reasonably lower than the default.

set spantree root secondary vlan range Note: This macro sets the root priority to be either 8192 (by default), the current root priority minus 1 (if another root bridge is known), or the current root priority (if its MAC address is lower then the current root). Prune unnecessary VLANs off trunk-ports (a bi-directional exercise). This will limit the diameter of STP and NMP processing overhead on portions of the network where certain VLANs are not required. VTP automatic pruning does not remove STP from a trunk. Refer to the section on VTP for more information. The default VLAN 1 can also be removed from trunks using CatOS 5.4 and later. Refer to Spanning Tree Protocol Problems and Related Design Considerations for additional information. Other Options Cisco has another STP known asVLAN-bridge. This protocol operates using a destination MAC address of 01-00-0c-cd-cd-ce and protocol type of 0x010c. This is most useful if there is a need to bridge non-routable or legacy protocols between VLANs without interfering with the IEEE Spanning Tree instance(s) running on those VLANs. If VLAN interfaces for non-bridged traffic become blocked for L2 traffic (and this could easily happen if they were participating in the same STP as IP VLANs), the overlaying L3 traffic would get inadvertently pruned off as well - an unwanted side-effect. VLAN-bridge is therefore a separate instance of STP

http://www.cisco.com/warp/customer/473/103.html (20 of 68) [4/18/2004 7:56:19 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

for bridged protocols, providing a separate topology that can be manipulated without affecting IP traffic. The Cisco recommendation is to run VLAN-bridge if bridging is required between VLANs on Cisco routers such as the MSFC. PortFast PortFast is used to bypass normal Spanning Tree operation on access ports to speed up connectivity between end-stations and the services they need to connect to after link initialization. On some protocols, such as IPX/SPX, it is important to see the access port in forwarding mode immediately after the link state has gone up in order to avoid GNS problems. For more information, refer to Using Portfast and Other Commands to Fix Workstation Startup Connectivity Delays. Operational Overview PortFast skips the normal listening and learning states of STP by moving a port directly from blocking to forwarding mode after the link is known to be running. If this feature is not enabled, STP will discard all user data until it decides that the port is ready to be moved to forwarding mode. This could take up to twice the ForwardDelay time (a total of 30 seconds by default). PortFast mode will also prevent a STP TCN from being generated each time a port state changes from learning to forwarding. TCNs are not a problem by themselves, however, if a wave of TCNs are hitting the root bridge (typically in the morning when people turn on their PCs), it could extend convergence time unnecessarily. STP PortFast is particularly important in both multicast CGMP and Catalyst 5500/5000 MLS networks. TCNs in these environments can cause the static CGMP CAM table entries to be aged out, resulting in multicast packet loss until the next IGMP report, and/or flush MLS cache entries that then need to be rebuilt and could result in a router CPU spike, depending on the size of the cache. (Catalyst 6500/6000 MLS implementations and multicast entries learned from IGMP snooping are not affected.) Recommendation Cisco recommends that STP PortFast be enabled for all active host ports and disabled for switch-switch links and ports not in use. Trunking and channeling should also be disabled for all host ports. Each access port is enabled by default for trunking and channeling, yet switch neighbors are not expected by design on host ports. If these protocols are left to negotiate, the subsequent delay in port activation can lead to undesirable situations in which initial packets from workstations, such as DHCP requests, are not forwarded. CatOS 5.2 introduced a macro command, set port host port range that implements the following recommended configuration for access ports and will help auto-negotiation and connection performance significantly: set port host port range

!--- Macro command for the following commands: set spantree portfast port range enable set trunk port range off set port channel port range mode off Note: PortFast does not mean that Spanning Tree is not run at all on those ports. BPDUs are still sent, received, and processed. Other Options

http://www.cisco.com/warp/customer/473/103.html (21 of 68) [4/18/2004 7:56:19 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

PortFast BPDU-guard provides a method for preventing loops by moving a non-trunking port into an errdisable state when a BPDU is received on that port. A BPDU packet should never be received on an access port configured for PortFast, since host ports should not be attached to switches. If a BPDU is observed, it indicates an invalid and possibly dangerous configuration that needs administrative action. When the BPDU-guard feature is enabled, Spanning Tree shuts down PortFast-configured interfaces that receive BPDUs instead of putting them into the STP blocking state. The command works on a per-switch basis, not per-port, as shown below. set spantree portfast bpdu-guard enable The network manager is notified by an SNMP trap or syslog message if the port goes down. It is also possible to configure an automatic recovery time for errdisabled ports. Refer to the UDLD section for more details. For more information, refer to Spanning Tree Portfast BPDU Guard Enhancement. Note: PortFast for trunk ports was introduced in CatOS 7.x and has no effect on trunk ports in earlier releases. PortFast for trunk ports is designed to increase convergence times for L3 networks. To complement this feature, CatOS 7.x also introduced the possibility of configuring PortFast BPDU-guard on a per-port basis. UplinkFast UplinkFast provides fast STP convergence after a direct link failure in the network access layer. It operates without modifying STP, and its purpose is to speed up convergence time in a specific circumstance to less than three seconds, rather than the typical 30-second delay. For more information, refer to Understanding and Configuring the Cisco Uplink Fast Feature. Operational Overview Using Cisco's multilayer design model at the access layer, if the forwarding uplink is lost, the blocking uplink is immediately moved to a forwarding state without waiting for listening and learning states. An uplink group is a set of ports per VLAN that can be thought of as a root port and backup root port. Under normal conditions, the root port(s) are assuring connectivity from the access toward the root. If this primary root-connection fails for any reason, the backup root link kicks in immediately without having to go through typical 30 seconds of convergence delay. Because this effectively bypasses the normal STP topology change-handling process (listening and learning), an alternate topology correction mechanism is needed to update switches in the domain that local end stations are reachable via an alternate path. The access layer switch running UplinkFast also generates frames for each MAC address in its CAM to a multicast MAC address (01-00-0c-cd-cd-cd, HDLC protocol 0x200a) to update the CAM table in all switches in the domain with the new topology. Recommendation Cisco recommends that UplinkFast be enabled for switches with blocked ports, typically at the access layer. Do not use on switches without the implied topology knowledge of a backup root link - typically distribution and core switches in Cisco's multilayer design. It can be added without disruption to a production network. Issue the following command to enable UplinkFast: set spantree uplinkfast enable This command will also set the bridge priority high to minimize the risk of this becoming a root bridge and the port priority high to minimize becoming a designated port, which would break the functionality. When restoring a switch that had UplinkFast enabled, the feature has to be disabled, the uplink database cleared with "clear uplink," and the bridge

http://www.cisco.com/warp/customer/473/103.html (22 of 68) [4/18/2004 7:56:19 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

priorities restored manually. Note: The all protocols keyword for the UplinkFast command is needed when the protocol filtering feature is enabled. As the CAM will record the protocol type as well as MAC and VLAN information when protocol filtering is enabled, an UplinkFast frame needs to be generated for each protocol on each MAC address. The rate keyword indicates the packets per second of the uplinkfast topology update frames - the default is recommended. BackboneFast BackboneFast provides rapid convergence from indirect link failures. By adding functionality to STP, convergence times can typically be reduced from the default of 50 seconds to 30 seconds. Operational Overview The mechanism is initiated when a root port or blocked port on a switch receives inferior BPDUs from its designated bridge. This can happen when a downstream switch has lost its connection to the root and starts sending its own BPDUs to elect a new root. An inferior BPDU identifies a switch as both the root bridge and the designated bridge. Under normal Spanning Tree rules, the receiving switch ignores inferior BPDUs for the configured maximum aging time, 20 seconds by default. With Backbone Fast however, the switch sees the inferior BPDU as a signal that the topology may have changed, and tries to determine whether it has an alternate path to the root bridge using Root Link Query (RLQ) BPDUs . This protocol addition allows a switch to check whether the root is still available, moves a blocked port to forwarding in less time, and notifies the isolated switch that sent the inferior BPDU that the root is still there. The following are some highlights of the protocol operation:
q q

A switch transmits the RLQ packet out the root port only (that is, towards the root bridge). A switch that receives a RLQ can reply either if it is the root switch, or if it knows it has lost connection with the root. If it does not know these facts, it must forward the query out its root port. If a switch has lost connection to the root, it must reply in the negative to this query. The reply must be sent out only the port from which the query came. The root switch must always respond to this query with a positive reply. If the reply is received on a non-root port, it is discarded.

q q q q

STP convergence times can therefore be reduced by up to 20 seconds, as maxage does not need to expire. For more information, refer to Understanding and Configuring Backbone Fast on Catalyst Switches. Recommendation The Cisco recommendation is to enable BackboneFast on all switches running STP. It can be added without disruption to a production network. Issue the following command to enable BackboneFast: set spantree backbonefast enable Note: This global level command needs to be configured on all switches in a domain as it adds functionality to the STP protocol that all switches need to understand. Other Options BackboneFast is not supported on 2900XLs and 3500s. It should not be enabled if the switch domain contains these switches in addition to Catalyst 4500/4000, 5500/5000, and 6500/6000 switches. In the future, IEEE 802.1w rapid converge STP will provide similar reductions in STP convergence time and will be

http://www.cisco.com/warp/customer/473/103.html (23 of 68) [4/18/2004 7:56:19 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

interoperable with other vendors.

EtherChannel/Port Aggregation Protocol
EtherChannel technologies allow the inverse multiplexing of multiple channels (up to eight on Catalyst 6500/6000) into a single logical link. Although each platform differs from the next in implementation, it is important to understand the common requirements:
q q q

An algorithm to statistically multiplex frames over multiple channels. Creation of a logical port so that a single instance of STP can be run. A channel management protocol such as PAgP.

Frame Multiplexing EtherChannel encompasses a frame distribution algorithm that efficiently multiplexes frames across the component 10/100 or gigabit links. Differences in algorithms per platform arise from the capability of each type of hardware to extract frame header information in order to make the distribution decision. Note the following for example:
q

The Catalyst 6500/6000 has more recent switching hardware than the Catalyst 5500/5000 and can read IP Layer 4 (L4) information at wire rate in order to make a more intelligent multiplexing decision than simple MAC L2 information. The Catalyst 5500/5000 capabilities depend on the presence of an Ethernet Bundling Chip (EBC) on the module. The command show port capabilities mod/port will confirm what is possible for each port.

q

Refer to the table below, which illustrates the frame distribution algorithm in detail for each listed platform. Platform Channel Load Balancing Algorithm A Catalyst 5500/5000 with the necessary modules allows two to four links to be present per Fast EtherChannel (FEC), though they must be on the same module. Source and destination MAC address pairs determine the link chosen for frame forwarding. An X-OR operation is performed on the least significant two bits of the source MAC address and the destination MAC address. This operation yields one of four results: (0 0), (0 1), (1 0), or (1 1). Each of these values points to a link in the FEC bundle. In the case of a two-port Fast EtherChannel, only a single bit is used in the X-OR operation. Circumstances can occur where one address in the source/destination pair is a constant. For example, the destination might be a server or, even more likely, a router. In that case, statistical load balancing will be seen because the

Catalyst 5500/5000 Series

http://www.cisco.com/warp/customer/473/103.html (24 of 68) [4/18/2004 7:56:19 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

source address is always different. Catalyst 4500/4000 EtherChannel distributes frames across the links in a channel (on a single module) based on the low-order bits of the source and destination MAC addresses of each frame. In comparison with the Catalyst 5500/5000, the algorithm is more involved and uses a deterministic hash of the following fields of the MAC DA (bytes 3, 5, 6), SA (bytes 3, 5, 6), ingress port, and VLAN ID. The frame distribution method is not configurable. There are two possible hashing algorithms, depending on the Supervisor Engine hardware. The hash is a seventeenth degree polynomial implemented in hardware that, in all cases, takes the MAC address, IP address, or IP TCP/UDP port number and applies the algorithm to generate a three bit value. This is done separately for both source and destination addresses. The results are then XORd to generate another three-bit value that is used to determine which port in the channel is used to forward the packet. Channels on the Catalyst 6500/6000 can be formed between ports on any module and can be up to 8 ports.

Catalyst 4500/4000 Series

Catalyst 6500/6000 Series

The table below indicates the distribution methods supported on the various Catalyst 6500/6000 Supervisor Engine models and their default behavior. Hardware WS-F6020(L2 Engine) Description Early Supervisor Engine 1 Later Supervisor Engine 1 and Supervisor Engine 1A/PFC1 Distribution Methods L2 MAC: SA; DA; SA & DA L2 MAC: SA; DA; SA & DA L3 IP: SA; DA; SA and DA (default)

WS-F6020A(L2 Engine)WS-F6K-PFC(L3 Engine)

http://www.cisco.com/warp/customer/473/103.html (25 of 68) [4/18/2004 7:56:19 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

WS-F6K-PFC2

Supervisor Engine 2/PFC2 (needs CatOS L4 session: S 6.x) port; D port; S & D port (default)

L2 MAC: SA; DA; SA & DAL3 IP: SA; DA; SA & DA

Note: With L4 distribution, the first fragmented packet will use L4 distribution. All subsequent packets will use L3 distribution. More details of EtherChannel support on other platforms and how to configure and troubleshoot them can be found in the following documents:
q q

Understanding EtherChannel Load Balancing and Redundancy on Catalyst Switches Configuring EtherChannel Between Catalyst 4000, 5000, and 6000 Switches Running CatOS

Vendors that support FEC NICs today can be found by referring to Fast EtherChannel® and ISL on Servers and NICs-Vendor Information. Recommendation Catalyst 6500/6000 series switches perform load balancing by IP address by default. This is recommended in CatOS 5.5, assuming that IP is the dominant protocol. Issue the following command to set load balancing: set port channel all distribution ip both !--- This is the default. Catalyst 4500/4000 and 5500/5000 series frame distribution by L2 MAC address is acceptable in most networks. However, the same link will be used for all traffic if there are only two main devices talking over a channel (as SMAC and DMAC are constant). This can typically be an issue for server back up and other large file transfers or for a transit segment between two routers. Although the logical aggregate port can be managed by SNMP as a separate instance and aggregate throughput statistics gathered, Cisco still recommends managing each of the physical interfaces separately to check how the frame distribution mechanisms are working and whether statistical load balancing is being achieved. A new command, show channel traffic, in CatOS 6.x can display percentage distribution statistics more easily than checking individual port counters with show counters mod/port or show mac mod/port in CatOS 5.x. Other Options The following are possible steps to take if the relative limitations of Catalyst 4500/4000 or Catalyst 5500/5000 MAC-based algorithms are an issue, and good statistical load balancing is not being achieved:
q q

Point-deploy Catalyst 6500/6000 switches. Increase bandwidth without channeling by switching, for example, from several FE ports to one GE port, or from several GE ports to one 10 GE port. Re-address pairs of end stations with large volume flows.

q

http://www.cisco.com/warp/customer/473/103.html (26 of 68) [4/18/2004 7:56:19 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management
q

Provision dedicated links/VLANs for high bandwidth devices.

Port Aggregation Protocol PAgP is a management protocol that will check for parameter consistency at either end of the link and assist the channel in adapting to link failure or addition. PAgP does the following:
q

PAgP requires that all ports in the channel belong to the same VLAN or are configured as trunk ports. (Because dynamic VLANs can force the change of a port into a different VLAN, they are not included in EtherChannel participation.) When a bundle already exists and the configuration of one port is modified (such as changing VLAN or trunking mode), all ports in the bundle are modified to match that configuration. PAgP does not group ports that operate at different speeds or port duplex. If speed and duplex are changed when a bundle exists, PAgP changes the port speed and duplex for all ports in the bundle.

q

q

Operational Overview The PAgP port controls each individual physical (or logical) port to be grouped. PAgP packets are sent using the same multicast group MAC address that is used for CDP packets, 01-00-0c-cc-cc-cc. The protocol value is 0x0104. The following is a summary of the protocol operation:
q

As long as the physical port is up, PAgP packets are transmitted every second during detection and every 30 seconds in steady state. The protocol listens for PAgP packets that prove the physical port has a bi-directional connection to another PAgP-capable device. If data packets but no PAgP packets are received, it is assumed that the port is connected to a non-PAgP capable device. As soon as two PAgP packets have been received on a group of physical ports, it tries to form an aggregated port. If PAgP packets stop for a period, the PAgP state is torn down.

q

q

q q

Normal Processing The following concepts require defining to aid understanding of the protocol's behavior:
q

Agport a logical port composed of all physical ports in the same aggregation, it can be identified by its own SNMP ifIndex. Therefore, an agport does not contain non-operational ports. Channel an aggregation satisfying the formation criteria; it therefore may contain non-operational ports (agports are a subset of channels). Protocols including STP and VTP, but excluding CDP and DTP, run above PAgP over the agports. None of these protocols can send or receive packets until PAgP attaches their agports to one or more physical ports. Group Capability each physical port and agport possesses a configuration parameter called the group-capability. A physical port can be aggregated with another physical port if and only if they have the same group-capability. Aggregation Procedure when a physical port reaches the UpData or UpPAgP states, it is attached to an appropriate agport. When it leaves either of those states for another state, it is detached from the agport.

q

q

q

Definitions of the states and creation procedures are given in the table below. State Meaning

http://www.cisco.com/warp/customer/473/103.html (27 of 68) [4/18/2004 7:56:19 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

No PAgP packets have been received. PAgP packets are sent. The physical port is the only one UpData connected to its agport. Non-PAgP packets are passed in and out between physical port and agport. Exactly one PAgP packet has been received that proves a bi-directional connection exists to exactly one neighbor. The physical port is not connected to any agport. PAgP packets are sent and may be received.

BiDir

This physical port, perhaps in association with other physical ports, is connected to an agport. UpPAgP PAgP packets are sent and received on the physical port. Non-PAgP packets are passed in and out between physical port and agport. Both ends of both connections must agree on what the grouping is going to be, defined as the largest group of ports in the agport that is permitted by both ends of the connection. When a physical port reaches the UpPAgP state, it is assigned to the agport that has member physical ports that match the new physical port's group-capability and that are in the BiDir or UpPAgP states. (Any such BiDir ports are moved to the UpPAgP state at the same time.) If there is no agport whose constituent physical port parameters are compatible with the newly ready physical port, it is assigned to an agport with suitable parameters that has no associated physical ports. A PAgP timeout can occur on the last neighbor known on the physical port. The port timing out is removed from the agport. At the same time, all physical ports on the same agport whose timers have also timed out are removed. This enables an agport whose other end has died to be torn down all at once, instead of one physical port at a time. Behavior in Failure If a link in an existing channel is failed, (for example, port unplugged, GBIC removed or fiber broken), the agport is updated and the traffic is hashed over the remaining links without loss. Note: The behavior when failing a link in a channel by powering off or removing a module may be different. By definition, there need to be two physical ports to a channel. If one port is lost from the system in a two-port channel, the logical agport is torn down and the original physical port is re-initialized with respect to Spanning Tree. This means traffic may be discarded until STP allows the port to become available to data again. There is an exception to this rule on the Catalyst 6500/6000. In versions earlier than CatOS 6.3, an agport is not torn down during module removal if the channel is comprised of ports on modules 1 and 2 only. This difference in the two failure modes is important when planning maintenance of a network, as there may be an STP TCN to consider when performing an on-line removal or insertion of a module. As stated in the previous section, it is important to manage each physical link in the channel with the NMS since the agport may remain undisturbed through a failure. The following are suggested steps to mitigate an unwanted topology change on the Catalyst 6500/6000:
q

If a single port is used per module to form a channel, three or more modules should be used (three ports or more total). If the channel spans two modules, two ports on each module should be used (four ports total). If a two-port channel is needed across two cards, use only the Supervisor Engine ports. Upgrade to CatOS 6.3, which handles module removal without STP recalculation for channels split across modules.

q q q

http://www.cisco.com/warp/customer/473/103.html (28 of 68) [4/18/2004 7:56:19 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

Configuration Options EtherChannels can be configured in different modes, as summarized in the table below. Mode Configurable Options PAgP not in operation. The port is channeling regardless of how the neighbor port is configured. If the neighbor port mode is on, a channel is formed. The port is not channeling regardless of how the neighbor is configured.

On

Off

Auto (Default)

Aggregation is under control of the PAgP protocol. Places a port into a passive negotiating state, and no PAgP packets are sent on the interface until at least one PAgP packet is received that indicates that the sender is operating in desirable mode.

Desirable

Aggregation is under control of the PAgP protocol. Places a port into an active negotiating state, in which the port initiates negotiations with other ports by sending PAgP packets. A channel is formed with another port group in either desirable or auto mode.

An auto or desirable mode keyword. If no data packets are received on the interface, then the interface is never attached to an agport and cannot be used for data. This bi-directionality check was provided for specific Catalyst 5500/5000 hardware Non-silent (default on as some link failures result in Catalyst 5500/5000 fiber FE the channel being broken and GE ports) apart. By enabling non-silent mode, a recovering neighbor port is never allowed to come back up and break the channel
http://www.cisco.com/warp/customer/473/103.html (29 of 68) [4/18/2004 7:56:19 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

apart unnecessarily. More flexible bundling and improved bi-directionality checks are present by default in Catalyst 4500/4000 and 6500/6000 series hardware. An auto or desirable mode keyword. If no data packets are received on the interface, after a 15 second timeout period, the interface is attached by itself to an agport and can thus be used for data transmission. Silent mode also allows for channel operation when the partner can be an analyzer or server that never sends PAgP.

Silent (default on all Catalyst 6500/6000 and 4500/4000 ports and 5500/5000 copper ports)

The silent/non-silent settings affect how ports react to situations that cause unidirectional traffic or how they achieve fail-over. When a port is unable to transmit (because of a failed PHY or a broken fiber or cable, for example), this can still leave the neighbor port in an operational state. The partner continues to transmit data, but data is lost, as return traffic cannot be received. Spanning Tree loops can also form because of the unidirectional nature of the link. Some fiber ports have the desired capability of bringing the port to a non-operational state when it loses its receive signal (FEFI). This will cause the partner port to go non-operational and effectively causes the ports at both ends of the link to go down. When using devices that will transmit data (such as BPDUs) and cannot detect unidirectional conditions, non-silent mode should be used to allow the ports to remain non-operational until receive data is present and the link is verified to be bi-directional. The time it takes for PAgP to detect a unidirectional link is around 3.5 * 30 seconds = 105 seconds, where 30 seconds is the time between two successive PAgP messages. UDLD is recommended as a more rapid detector to uni-directional links. When using devices that will not transmit any data, silent mode should be used. This will force the port to become connected and operational regardless of whether received data is present or not. Additionally, for those ports that can detect the presence of a unidirectional condition, such as newer platforms using L1 FEFI and UDLD, silent mode is used by default. Verification The following table depicts a summary of all the possible PAgP channeling mode scenarios between two directly connected switches (Switch-A and Switch-B). Some of these combinations may cause STP to put the ports on the channeling side into the errdisable state (that is, some of the combinations shut down the ports on the channeling side). Switch-A Channel Mode On On On Switch-B Channel Mode On Off Auto Channel State Channel (non PAgP) Not Channel (errdisable) Not Channel (errdisable)

http://www.cisco.com/warp/customer/473/103.html (30 of 68) [4/18/2004 7:56:19 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

On Off Off Off Off Auto Auto Auto Auto Desirable Desirable Desirable Desirable

Desirable On Off Auto Desirable On Off Auto Desirable On Off Auto Desirable

Not Channel (errdisable) Not Channel (errdisable) Not Channel Not Channel Not Channel Not Channel (errdisable) Not Channel Not Channel PAgP Channel Not Channel (ErrDisable) Not Channel PAgP Channel PAgP Channel

Recommendation Cisco recommends enabling PAgP on all switch-to-switch channel connections, avoiding on mode. The preferred method is to set desirable mode at both ends of a link. The additional recommendation is to leave the silent/non-silent keyword at default - silent on Catalyst 6500/6000 and 4500/4000 switches, non-silent on Catalyst 5500/5000 fiber ports. As discussed in previous sections, explicitly configuring channeling off on all other ports is helpful for rapid data forwarding. Waiting up to 15 seconds for PAgP to timeout on a port that will not be used for channeling should be avoided, especially since the port is then handed over to STP, which itself can take 30 seconds to allow data forwarding, plus potentially 5 seconds for DTP for a total of 50 seconds. The set port host command is discussed in more detail in the STP section of this document. set port channel port range mode desirable set port channel port range mode off !--- Ports not channeled; part of the set port hostcommand. This command assigns channels an admin group number, seen with a show channel group command. Addition and removal of channeling ports to the same agport can then be managed by referring to the admin number if desired. Other Options Another common configuration for customers who have a model of minimal administration at the access layer is to set the mode to desirable at the distribution and core layers, and leave the access layer switches at the default auto configuration. When channeling to devices that do not support PAgP, the channel needs to be hard-coded on. This applies to devices such as servers, Local Director, content switches, routers, switches with older software, Catalyst XL switches, and Catalyst

http://www.cisco.com/warp/customer/473/103.html (31 of 68) [4/18/2004 7:56:19 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

8540s. Issue the following command: set port channel port range mode on The new 802.3ad IEEE Link Aggregation Control Protocol (LACP) standard, available in CatOS 7.x, will likely supersede PAgP in the long term, as it brings the benefit of cross-platform and vendor interoperability.

Unidirectional Link Detection
The UDLD feature is intended to address the following fault conditions on fiber and copper Ethernet interfaces:
q q

Monitoring physical cabling configurations and shutting down any miswired ports as errdisable. Protecting against uni-directional links. When a uni-directional link is detected, due to media or port/interface malfunction, the affected port is shut down as errdisable, and a corresponding syslog message generated.

Refer to Understanding and Configuring the Unidirectional Link Detection Protocol (UDLD) Feature for more details. Spanning Tree, with its steady state unidirectional BPDU flow, was an acute sufferer from the above failures. It is easy to see how a port may suddenly be unable to transmit BPDUs, causing an STP state change from blocking to forwarding on the neighbor, which creates a loop, since the port is still able to receive. Operational Overview UDLD is a L2 protocol working above the LLC layer (destination MAC 01-00-0c-cc-cc-cc, SNAP HDLC protocol type 0x0111). When running UDLD in combination with FEFI and auto-negotiation L1 mechanisms, it is possible to validate the physical (L1) and logical (L2) integrity of a link. UDLD has provisions for features and protection that FEFI and auto-negotiation cannot perform, namely the detection and caching of neighbor information, shutting down any misconnected ports, and detecting logical interface/port malfunctions or faults on links that are not point-to-point (those traversing media-converters or hubs). UDLD employs two basic mechanisms; it learns about the neighbors, and keeps the information up-to-date in a local cache, and sends a train of UDLD probe/echo (hello) messages whenever it detects a new neighbor or whenever a neighbor requests a re-synchronization of the cache. UDLD constantly sends probe/echo messages on all ports. Whenever a corresponding UDLD message is received on a port, a detection-phase and validation process is triggered. If all valid conditions are met (the port is bi-directional and correctly wired), the port is enabled. If not, the port is errdisable, and a syslog message is triggered. The syslog message may be similar to the following:
q q

UDLD-3-DISABLE: Unidirectional link detected on port [dec]/[dec]. Port disabled UDLD-4-ONEWAYPATH: A unidirectional link from port [dec]/[dec] to port [dec]/[dec] of device [chars] was detected

Once a link is established and classed as bi-directional, UDLD will continue to advertise probe/echo messages at a default interval of 15 seconds. The table below gives more information. Port State Undetermined Comment Detection in progress or neighboring UDLD has been disabled. Unidirectional link has been detected and the port disabled.

Not applicable UDLD has been disabled. Shutdown

Bi-directional Bi-directional link has been detected.

http://www.cisco.com/warp/customer/473/103.html (32 of 68) [4/18/2004 7:56:19 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management
q

Neighbor Cache Maintenance: UDLD periodically sends hello probe/echo packets on every active interface, in order to maintain the integrity of the UDLD neighbor cache. Whenever a hello message is received, it is cached and kept in memory for a maximum period defined as the hold-time. When the hold-time expires, the respective cache entry is aged out. If a new hello message is received within the hold-time period, the new one replaces the older entry and the corresponding time-to-live timer is reset. In order to maintain the integrity of the UDLD cache, whenever a UDLD-enabled interface gets disabled or a device is reset, all existing cache entries for the interfaces affected by the configuration change are cleared and UDLD transmits at least one message to inform respective neighbors to flush the corresponding cache entries. Echo Detection Mechanism: the echoing mechanism forms the basis of the detection algorithm. Whenever a UDLD device learns about a new neighbor or receives a resynchronization request from an out-of-synch neighbor, it starts/restarts the detection window on its side of the connection and sends a burst of echo messages in reply. Since this behavior must be the same across all neighbors, the echo sender expects to receive echos back in reply. If the detection window ends and no valid reply message has been received, the link is considered unidirectional, and a link re-establishment or port shutdown process may be triggered.

q

q

Convergence Time To prevent STP loops, CatOS 5.4(3) reduced the UDLD default message interval from 60 seconds to 15 seconds in order to shut down a unidirectional link before a blocked port was able to transition to a forwarding state. The approximate time it takes for UDLD to detect a unidirectional failure is around (2.5 * message-interval + 4 seconds), or about 41 seconds using the default message interval of 15 seconds. This is well below the 50 seconds usually needed for STP to re-converge. UDLD therefore has an assumed dependency on default Spanning Tree timers. If STP is tuned to converge more rapidly than UDLD, an alternate mechanism, such as the CatOS 6.2 loopguard feature, should be considered. Note: Beware of older releases of UDLD that use a non-configurable 60-second default message interval, as they will thus be susceptible to spanning-tree loop conditions. UDLD Aggressive Mode This feature provides enhanced protection against dangerous unidirectional link conditions in the following situations, and includes attempts to re-establish a connection with the neighbor upon failure detection:
q q

One side of a link has a port stuck (either tx and rx). One side of a link remains up while the other side of the link has gone down. This reduces the reliance on L1 FEFI mechanisms. After eight failed retries, the port is transitioned to an errdisable state, and a syslog message is logged. In these cases, UDLD aggressive mode will errdisable both of the ports on the link, which stops the loss of traffic.

q q

Aggressive mode UDLD also allows the possibility of manually configuring the UDLD probe/echo message interval to values ranging from 7-90 seconds, the default interval being 15 seconds. Recommendation For maximum protection against symptoms resulting from uni-directional links, Cisco recommends enabling aggressive mode UDLD on point-to-point FE/GE links between Cisco switches, where the message interval is set to the 15-second default. UDLD is disabled globally and enabled in readiness on fiber ports by default. As UDLD is an infrastructure protocol needed between switches only, it is disabled by default on copper ports, as these tend to be used for host access. Issue the following commands to enable UDLD:

http://www.cisco.com/warp/customer/473/103.html (33 of 68) [4/18/2004 7:56:19 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

set udld enable !--- Once globally enabled, all FE and GE fiber !--- ports have UDLD enabled by default.

set udld enable port range

!--- For additional specific ports and copper media if needed.

set udld aggressive-mode enable port range

!--- All point to point links. Note: Switches that are not aggressive-UDLD capable. Currently, the Catalyst 2900XL and Catalyst 3500XL have hard-coded message-intervals of 60 seconds, which is not considered sufficiently fast to protect against potential STP loops (default STP parameters assumed). UDLD is not easy to test without a genuinely faulty/unidirectional component in the lab, such as a defective GBIC. The protocol was designed to detect less common failure scenarios than those usually employed in a lab. For example, if performing a simple test such as unplugging one strand of a fiber in order to see the desired errdisable state, you should previously turn off L1 auto-negotiation. Otherwise, the physical port will go down, thus resetting UDLD message communication. The remote end will move to undetermined state rather than errdisable. If a port is placed in errdisable state, by default, it will remain down. Issue the following command, which will re-enable ports after a time-out interval (300 seconds by default) if desired: > (enable) set errdisable-timeout enable ? bpdu-guard !--- BPDU Port-guard.

channel-misconfig !--- Channel misconfiguration.

duplex-mismatch udld other !--- Reasons other than the above.

all !--- Apply errdisable timeout to all reasons.

http://www.cisco.com/warp/customer/473/103.html (34 of 68) [4/18/2004 7:56:19 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

Ports that are errdisabled due to uni-directional link symptoms must be manually enabled by issuing the set port enable command. Other Options If the partner device is not UDLD-capable, such as an end host or router, do not run the protocol. Issue the following command: set udld disable port range Note: UDLD will not catch every STP failure situation, such as those caused by a CPU that does not send BPDUs for a time greater than (2 * FwdDelay + Maxage). Backup solutions such as CatOS 6.2 loopguard should be considered. Furthermore, UDLD status and configuration consistency may be monitored using Cisco's UDLD SNMP MIB variables.

Management Configuration
Considerations to assist in controlling, provisioning, and troubleshooting a Catalyst network are discussed in this section.

Network Diagrams
Clear network diagrams are a fundamental part of network operations. They become critical during troubleshooting and are the single most important vehicle for communicating information while escalating to vendors and partners during an outage. Their preparation, readiness, and accessibility should not be underestimated. Recommendation Cisco recommends that you create the following three diagrams:
q

Overall Diagram even for the largest networks, a diagram that shows the end-to-end physical and logical connectivity is important. It can be common for enterprises that have implemented a hierarchical design to document each layer separately. During planning and problem solving, however, it is often a good knowledge of how the domains link together that matters. Physical Diagram shows all switch and router hardware and cabling. Trunks, links, speeds, channel groups, port numbers, slots, chassis types, software, VTP domains, root bridge, backup root bridge priority, MAC address, and blocked ports per VLAN should be labeled. It is often clearer to depict internal devices, such as the Catalyst 6500/6000 MSFC, as a router on a stick connected via a trunk.

q

http://www.cisco.com/warp/customer/473/103.html (35 of 68) [4/18/2004 7:56:19 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

q

Logical Diagram shows only L3 functionality (routers as objects, VLANs as Ethernet segments). IP addresses, subnets, secondary addressing, HSRP active and standby, access-core-distribution layers, and routing information should be labeled.

In-Band Management
Depending on the configuration, the switch in-band (internal) management interface (known as sc0) may have to handle the following data:
q q q

Switch management protocols such as SNMP, Telnet, SSH, and syslog. User data such as broadcasts and multicasts. Switch control protocols such as STP BPDUs, VTP, DTP, CDP, and so on.

It is common practice in Cisco's multilayer design to configure a management VLAN that spans a switched domain and contains all sc0 interfaces. This helps separate management traffic from user traffic and increases security of the switch management interfaces. This section describes the significance and potential problems of using the default VLAN 1 and

http://www.cisco.com/warp/customer/473/103.html (36 of 68) [4/18/2004 7:56:19 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

running management traffic to the switch in the same VLAN as user traffic. Operational Overview The primary concern over the use of VLAN 1 for user data is that the Supervisor Engine NMP in general does not need to be interrupted by much of the multicast and broadcast traffic that is generated by end-stations. Older Catalyst 5500/5000 hardware, the Supervisor Engine I and Supervisor Engine II in particular, has limited resources for dealing with this traffic, though the principle applies to all Supervisor Engines. If the Supervisor Engine CPU, buffer, or in-band channel to the backplane is fully occupied listening to unnecessary traffic, it is possible that control frames will be missed. In a worst-case scenario, this could lead to a Spanning Tree loop or EtherChannel failure. Issuing the show interface and show ip stats commands on the Catalyst can give some indication of the proportion of broadcast to unicast traffic and the proportion of IP to non-IP traffic (not typically seen in management VLANs). A further health check for older Catalyst 5500/5000 hardware is to examine the output of show inband | biga (hidden command) for resource errors (RscrcErrors), similar to buffer drops in a router. If these resource errors go up continuously, memory is not available to receive system packets, perhaps because of a significant amount of broadcast traffic in the management VLAN. A single resource error may mean that the Supervisor Engine is unable to process a packet such as BPDUs, which could quickly become a problem, as protocols such as spanning tree do not re-send missed BPDUs. Recommendation As highlighted previously in this document, VLAN 1 is a special VLAN that tags and handles most of the control plane traffic. VLAN 1 is enabled on all trunks by default. With larger campus networks, care needs to be taken about the diameter of the VLAN 1 STP domain; instability in one part of the network could affect VLAN 1, thereby influencing control-plane stability and therefore STP stability for all other VLANs. In CatOS 5.4 and later, it has been possible to limit VLAN 1 from carrying user data and running STP by issuing the following command: clear trunk mod/port vlan 1 This does not stop control packets being sent from switch to switch in VLAN 1, as seen with a network analyzer. No data will be forwarded, however, and STP will not be run over this link. Therefore, this technique can be used to break VLAN 1 up into smaller failure domains. Note: It is not currently possible to clear VLAN 1 trunks on 3500s and 2900XLs. Even if care has been taken with the campus design to constrain user VLANs to relatively small switch domains and correspondingly small failure/L3 boundaries, some customers are still tempted to treat the management VLAN differently and try to cover the whole network with a single management subnet. There is no technical reason that a central NMS application must be L2-adjacent to the devices it manages, nor is this a qualified security argument. Cisco recommends limiting the diameter of the management VLANs to the same routed domain structure as user VLANs and considering out-of-band management and/or CatOS 6.x SSH support as a way to increase network management security. Other Options There are design considerations for these Cisco recommendations in some topologies, however. For example, a desirable and common Cisco multilayer design is one that avoids the use of an active Spanning Tree. This requires constraining each IP subnet/VLAN to a single access-layer switch, or cluster of switches. In these designs, there may be no trunking configured down to the access layer. There is no easy answer to the question of whether a separate management VLAN be created and trunking enabled to carry it between L2 access and L3 distribution layers. The following are two options for design review with your Cisco engineer:
q

Option 1: trunk two or three unique VLANs from the distribution layer down to each access-layer switch. This allows for a data VLAN, a voice VLAN, and a management VLAN, for example, and still has the benefit that STP is inactive. (Note that clearing VLAN 1 from trunks needs an extra configuration step.) In this solution, there are also design points to consider in order to avoid the temporary black-holing of routed traffic during failure recovery: STP

http://www.cisco.com/warp/customer/473/103.html (37 of 68) [4/18/2004 7:56:19 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

PortFast for trunks (CatOS 7.x and later) or VLAN Autostate synchronization with STP forwarding (later than CatOS 5.5[9]).
q

Option 2: having a single VLAN for data and management may be acceptable. With newer switch hardware, such as more powerful CPUs and control-plane rate-limiting controls, plus a design with relatively small broadcast domains as advocated by the multiLayer design, the reality for many customers is that keeping the sc0 interface separate from the user data is less of an issue than it once was. A final decision is probably best taken by examining the broadcast traffic profile for that VLAN and discussing the capabilities of the switch hardware with your Cisco engineer. If the management VLAN does indeed contain all users on that access-layer switch, the use of IP input filters is highly recommended to secure the switch from users, as discussed in the security section of this document.

Out-of-Band Management
Taking the arguments of the previous section one step further, network management can be made more highly available by constructing a separate management infrastructure around the production network so that devices are always reachable remotely no matter what traffic-driven or control-plane events occur. The following two approaches are typical:
q q

Out-of-Band Management with an exclusive LAN Out-of-Band Management with terminal servers

Operational Overview Every router and switch in the network can be provided with an out-of-band Ethernet management interface on a management VLAN. One Ethernet port on each device is configured in the management VLAN and cabled outside the production network to a separate switched management network via the sc0 interface. Note that Catalyst 4500/4000 switches have a special me1 interface on the Supervisor Engine that is to be used for out-of-band management only, not as a switch port. In addition, terminal server connectivity can be achieved by configuring a Cisco 2600 or 3600 with RJ-45-to-serial cables to access the console port of every router and switch in the layout. Using a terminal server also avoids the need for configuring backup scenarios, such as modems on auxiliary ports for every device. A single modem can be configured on the auxiliary port of the terminal server, thus providing dial-up service to the other devices during a network connectivity failure. Recommendation With this arrangement, two out-of-band paths to every switch and router will be possible in addition to numerous in-band paths, thus enabling highly-available network management. Out-of-band does the following:
q q q q

Out-of-band separates management traffic from user data, Out-of-band has the management IP address in a separate subnet, VLAN, and switch for higher security. Out-of-band provides higher assurance for management data delivery during network failures. Out-of-band has no active Spanning Tree in management VLAN. Redundancy is not critical.

http://www.cisco.com/warp/customer/473/103.html (38 of 68) [4/18/2004 7:56:19 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

System Tests
Boot-up Diagnostics During system boot-up, a number of processes are performed to ensure that a reliable and operational platform is available so that faulty hardware will not disrupt the network. Catalyst boot diagnostics are split between Power-On Self Test (POST) and online diagnostics. Operational Overview Depending on the platform and hardware configuration, different diagnostics are carried out at boot-up and when a card is hot-swapped into the chassis. A higher level of diagnostics will result in a wider number of problems detected but a longer boot cycle. The following three levels of POST diagnostics may be selected (all tests check DRAM, RAM, and cache presence and size and initialize them): Operational Overview Bypass N/A 3 Not available on 4500/4000 series using CatOS 5.5 or earlier.

Minimal

Pattern-writing tests on the first MB of DRAM only. Pattern-writing tests for all memory.

Default on 5500/5000 and 30 6500/6000 series; not available on 4500/4000 series. 60 Default on 4500/4000 series.

Complete

Online Diagnostics

http://www.cisco.com/warp/customer/473/103.html (39 of 68) [4/18/2004 7:56:19 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

These tests check packet paths internally in the switch. It is important to note that online diagnostics are therefore system-wide tests, not simply port tests. On Catalyst 5500/5000 and 6500/6000 switches, tests are performed first from the standby Supervisor Engine, and again from the primary Supervisor Engine. The length of the diagnostics depends on the system configuration (number of slots, modules, ports). There are three categories of tests as follows:
q

Loopback test packets from the Supervisor Engine NMP are sent to each port, then returned to the NMP and examined for errors. Bundling test channels of up to eight ports are created and loopback tests performed to the aggregate port to verify the hashing to specific links (refer to the EtherChannel section of this document for further information). Enhanced Address Recognition Logic (EARL) test both the central Supervisor Engine and in-line Ethernet module L3 rewrite engines are tested. Hardware forwarding entries and routed ports are created before sending sample packets (for each protocol encapsulation type) from the NMP via the switching hardware on each module and back to the NMP. This is for Catalyst 6500/6000 PFC modules and newer.

q

q

Complete online diagnostics can take approximately two minutes. Minimal diagnostics do not perform bundle or rewrite testing on modules other then the Supervisor Engine, and can take approximately 90 seconds. During a memory test, when a difference is found in the pattern read back compared to the pattern written, the port state is changed to faulty. The results of these tests can be seen by issuing a show test command, followed by the module number to be examined. > show test 9 Diagnostic mode: complete (mode at next reset: complete) !--- Configuration setting. Module 9 : 4-port Multilayer Switch Line Card Status for Module 9 : PASS Port Status : Ports 1 2 3 4 ----------------. . . . Line Card Diag Status for Module 9 (. = Pass, F = Fail, N = N/A) Loopback Status [Reported by Module 1] : Ports 1 2 3 4 ----------------. . F . !--- Faulty. Channel Status : Ports 1 2 3 4 ----------------. . . . Recommendation Cisco recommends that all switches be set to use complete diagnostics to provide maximum fault detection and prevent outages during normal operations. Note: This change will not take effect until the next time the device is booted. Issue the following command to set complete diagnostics: set test diaglevel complete
http://www.cisco.com/warp/customer/473/103.html (40 of 68) [4/18/2004 7:56:20 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

Other Options In some situations, a rapid boot-up time may be preferable over waiting to run full diagnostics. There are other factors and timings involved in bringing up a system, but overall, POST and online diagnostics add around a third again in time. In testing with a fully populated single Supervisor Engine nine-slot chassis with a Catalyst 6509, the total boot time was around 380 seconds with complete diagnostics, around 300 seconds with minimal diagnostics, and only 250 seconds with diagnostics bypassed. Bypass may be configured by issuing the following command: set test diaglevel bypass Note: The Catalyst 4500/4000 will accept being configured for minimal diagnostics, though this still results in a complete test being undertaken. Minimal mode may be supported in the future on this platform. Run Time Diagnostics Once the system is operational, the switch Supervisor Engine performs various monitoring of the other modules. If a module is not reachable via the management messages (Serial Control Protocol [SCP] running over the out-of-band management bus), the Supervisor Engine will attempt to restart the card or take other action as appropriate. Operational Overview The Supervisor Engine carries out various monitoring automatically; this does not require any configuration. For the Catalyst 5500/5000 and 6500/6000, the following components of the switch are monitored:
q q q q q

NMP via a watchdog. Enhanced EARL chip errors. Inband channel from Supervisor Engine to backplane. Modules via keepalives over out-of-band channel (Catalyst 6500/6000). Active Supervisor Engine is monitored by the standby Supervisor Engine for status (Catalyst 6500/6000). Note: Since CatOS 6.2, further functionality has been added to this monitoring when issuing the set errordetection inband | port | memory enable commands. The enhancements are listed below.
r

Each Supervisor Engine sends SCP pings via the out-of-band channel to itself and the other Supervisor Engine, if present. Action is taken, such as resetting one of the Supervisor Engines, if pings are constantly lost. Each Supervisor Engine sends ICMP pings via the in-band channel to itself and the other NMP and takes action if pings are constantly lost.

r

If any of these error conditions are seen, the switch writes a syslog or EARL type error message. There is a similar function on the Catalyst 4500/4000 platform, though its internal architecture is different. Packet Buffer Diagnostics This test is for Catalyst 5500/5000 switches only. This test is designed to find failed hardware on Catalyst 5500/5000 switches that are using Ethernet modules with specific hardware that provide 10/100 Mbs connectivity between user ports and the switch backplane. As they cannot perform CRC checking for trunked frames, if a port packet buffer becomes defective during runtime, packets may get corrupted and cause CRC errors. Unfortunately, this could lead to the propagation of bad frames further into the Catalyst 5500/5000 ISL network, potentially causing control plane disruption and broadcast storms in worst-case scenarios. Newer Catalyst 5500/5000 modules and other platforms have updated hardware error checking built in and do not need the packet buffer tests, so there is no option to configure it.

http://www.cisco.com/warp/customer/473/103.html (41 of 68) [4/18/2004 7:56:20 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

Line modules needing the packet buffer diagnostics are WS-X5010, WS-X5011, WS-X5013, WS-X5020, WS-X5111, WS-X5113, WS-X5114, WS-X5201, WS-X5203, WS-X5213/a, WS-X5223, WS-X5224, WS-X5506, WS-X5509, WS-U5531, WS-U5533, and WS-U5535. Operational Overview This diagnostic checks that data stored in a specific section of the packet buffer is not accidentally being corrupted by faulty hardware. If the process reads back something different than it wrote, it shuts down the port in failed mode, since that port may be corrupting data. There is no threshold of errors needed. Failed ports cannot be enabled again until the module has been reset (or replaced). There are two modes for packet buffer tests: scheduled and on-demand. When a test begins, syslog messages are generated to indicate the expected length of the test (rounded up to the nearest minute) and the fact that the test has started. The exact length of the test varies by port type, size of the buffer, and the type of test run. On-demand tests are aggressive in order to finish within a few minutes. Since these tests actively interfere with packet memory, ports must be administratively shut down before testing. You can shut down the ports by issuing the following command: > (enable) test packetbuffer 4/1 Warning: only disabled ports may be tested on demand - 4/1 will be skipped. > (enable) set port disable 4/1 > (enable) test packetbuffer 4/1 Packet buffer test started. Estimated test time: 1 minute. %SYS-5-PKTTESTSTART:Packet buffer test started %SYS-5-PKTTESTDONE:Packet buffer test done. Use 'show test' to see test results Scheduled tests are much less aggressive than the on-demand tests, and they execute in the background. The tests are performed in parallel across multiple modules but on one port per module at a time. The test preserves, writes, and reads small sections of packet buffer memory before restoring user packet buffer data, and thus generates no errors. However, since the test is writing to buffer memory it will block incoming packets for a few milliseconds, thus causing some loss on busy links. By default there is an 8-second pause between each buffer-write test to minimize any packet loss, but this means that a system full of modules needing the packet buffer test may take over 24 hours for the test to complete. This scheduled test is enabled by default to run weekly at 03:30 on Sundays from CatOS 5.4 or later, and the test status can be confirmed with the following command: >show test packetbuffer status

!--- When test is running, the command returns !--- the following information: Current packet buffer Test Type : Test Started : Test Status : Ports under test : Estimated time left : test details scheduled 03:30:08 Jul 20 2001 26% of ports tested 10/5,11/2 11 minutes

!--- When test is not running, !--- the command returns the following information: Last Test Test Test packet buffer test details Type : scheduled Started : 03:30:08 Jul 20 2001 Finished : 06:48:57 Jul 21 2001

http://www.cisco.com/warp/customer/473/103.html (42 of 68) [4/18/2004 7:56:20 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

Recommendation The Cisco recommendation is to use the scheduled packet buffer test feature for Catalyst 5500/5000 systems, as the benefit of discovering problems on modules outweighs the risk of low packet loss. A standardized weekly time should then be scheduled across the network that will allow the customer to change links from faulty ports or RMA modules as necessary. As this test can cause some packet loss, depending on network load, it should be scheduled for quieter network times, such as 3:30 AM on a Sunday morning (which is the default). Issue the following command to set the test time: set test packetbuffer Sunday 3:30 !--- This is the default. Once enabled (as when upgrading to CatOS 5.4 and later for the first time), there is a chance that a previously hidden memory/hardware problem will be exposed, and a port will be shut down automatically. You may see the following message: %SYS-3-PKTBUFBAD:Port 1/1 failed packet buffer test Other Options If it is not acceptable to risk a low level of packet loss per-port on a weekly basis, then it is recommended to use the on-demand feature during scheduled outages. Start this feature manually on a per range basis by issuing the following command (though the port must be administratively disabled first): test packetbuffer port range

System Logging
Syslog messages are Cisco-specific and a key part of proactive fault management. A wider range of network and protocol conditions are reported using syslog than is possible via standardized SNMP. Management platforms, such as Cisco Resource Manager Essentials (RMEs) and the Network Analysis Toolkit (NATkit) make powerful use of syslog information by doing the following:
q q q

Presenting analysis by severity, message, device, and so on. Enabling filtering of messages coming in for analysis. Triggering alerting, such as pagers, or on-demand collecting of inventory and configuration changes.

Recommendation A particular point to focus on is what level of logging information is to be generated locally and held in the switch buffer as opposed to that which is sent to a syslog server (using the set logging server severity value command). Some organizations log a high level of information centrally, whereas others will go to the switch itself to look at the more detailed logs for an event or enable a higher level of syslog capture only during troubleshooting. Debugging is different on CatOS platforms than Cisco IOS Software, but detailed system logging can be enabled on a per-session basis with set logging session enable without changing what is logged by default. Cisco generally recommends bringing the spantree and system syslog facilities up to level 6, as these are key stability features to track. In addition, for multicast environments, bringing the logging level of the mcast facility up to 4 is recommended so that syslog messages are produced if router ports are deleted. Unfortunately, before CatOS 5.5(5) this could result in syslog messages being recorded for IGMP joins and leaves, which is too noisy to monitor. Finally, if IP input

http://www.cisco.com/warp/customer/473/103.html (43 of 68) [4/18/2004 7:56:20 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

lists are used, a minimum logging level of 4 is recommended to capture unauthorized login attempts. Issue the following commands to set these options: set logging buffer 500 !--- This is the default. set logging server syslog server IP address set logging server enable !--- This is the default. set logging timestamp enable set logging level spantree 6 default !--- Increase default STP syslog level. set logging level sys 6 default !--- Increase default system syslog level. set logging server severity 4 !--- This is the default; !--- it will limit messages exported to syslog server. set logging console disable Turning off console messages protects against the risk of the switch hanging as it waits for a response from a slow or non-existing terminal when message volume is high. Console logging is a high priority under CatOS and is mainly used to capture the final messages locally when troubleshooting or in a switch crash scenario. The table below provides the individual logging facilities, default levels, and recommended changes for the Catalyst 6500/6000. Each platform has slightly different facilities, depending on the features supported. Facility acl cdp cops dtp earl filesys gvrp ip kernel 1d mcast Default Level 5 4 3 8 2 2 2 2 2 3 2 Recommended Action Leave alone. Leave alone. Leave alone. Leave alone. Leave alone. Leave alone. Leave alone. Change to 4 if IP input lists used. Leave alone. Leave alone. Change to 4 if multicast used (CatOS 5.5[5] and later) .

http://www.cisco.com/warp/customer/473/103.html (44 of 68) [4/18/2004 7:56:20 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

mgmt mls pagp protfilt pruning qos radius rsvp security snmp spantree sys tac tcp telnet Tftp UDLD VMPS VTP

5 5 5 2 2 3 2 3 2 2 2 5 2 2 2 2 4 2 2

Leave alone. Leave alone. Leave alone. Leave alone. Leave alone. Leave alone. Leave alone. Leave alone. Leave alone. Leave alone. Leave alone. Change to 6. Change to 6. Leave alone. Leave alone. Leave alone. Leave alone. Leave alone. Leave alone. Leave alone.

Privatevlan 3

Note: Currently, the Catalyst switches log a configuration change syslog level-6 message for each set or clear command executed, unlike Cisco IOS Software, which triggers the message only after exiting configuration mode. If you need RMEs to back up configurations in real-time upon this trigger, then these messages also need to be sent to the RMEs syslog server. For most customers, however, periodic configuration backups for Catalyst switches are enough, and no change of the default server logging severity is needed. If you are tuning your NMS alerts, you may wish to consult the System Message Guide.

Simple Network Management Protocol
SNMP is used to retrieve statistics, counters, and tables stored in network device Management Information Bases (MIBs). The information collected can be used by NMSs (such as HP Openview) to generate real time alerts, measure availability, and produce capacity planning information, as well as helping to perform configuration and troubleshooting checks. Operational Overview With some security mechanisms, a network management station is able to retrieve information in the MIBs with SNMP protocol get and get next requests, and to change parameters by issuing the set command. Additionally, a network device can be configured to generate a trap message for the NMS for real time alerting. SNMP polling uses IP UDP port 161 and SNMP traps use port 162. Cisco supports the following versions of SNMP:
q

SNMPv1: RFC 1157 Internet Standard, using clear text community string security. An IP address access control list and password define the community of managers able to access the agent's MIB.

http://www.cisco.com/warp/customer/473/103.html (45 of 68) [4/18/2004 7:56:20 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management
q

SNMPv2C: a combination of SNMPv2, a draft Internet standard defined in RFCs 1902 through 1907, and SNMPv2C, a community-based administrative framework for SNMPv2 that is an experimental draft defined in RFC 1901. Benefits include a Bulk retrieval mechanism that supports the retrieval of tables and large quantities of information, minimizing the number of round-trips required, and improved error handling. SNMPv3: RFC 2570 proposed draft provides secure access to devices via the combination of authentication and encryption of packets over the network. The security features provided in SNMPv3 are as follows:
r r r

q

Message integrity: ensuring that a packet has not been tampered with in-transit. Authentication: determining that the message is from a valid source. Encryption: scrambling the contents of a packet to prevent it from being viewed easily by an unauthorized source.

The following table identifies the combinations of security models: Model Level v1 Authentication Encryption Result Uses a community string match for authentication. Uses a community string match for authentication. Uses a username match for authentication. Provides authentication based on the HMAC-MD5 or HMAC-SHA algorithms. Provides authentication based on the HMAC-MD5 or HMAC-SHA algorithms. Provides DES 56-bit encryption in addition to authentication based on the CBC-DES (DES-56) standard.

noAuthNoPriv, No Community String

v2c

noAuthNoPriv, No Community String noAuthNoPriv, Username

v3

No

v3

authNoPriv, MD5 Np or SHA

v3

authPriv, MD5 or SHA

DES

Please note the following about SNMPv3 objects:
q

Each user belongs to a group.

http://www.cisco.com/warp/customer/473/103.html (46 of 68) [4/18/2004 7:56:20 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management
q q q q

A group defines the access policy for a set of users. An access policy defines what SNMP objects can be accessed for reading, writing, and creating. A group determines the list of notifications its users can receive. A group also defines the security model and security level for its users.

SNMP Trap Recommendation SNMP is the foundation of all network management and is enabled and used on all networks. The SNMP agent on the switch must be set to use the version of SNMP supported by the management station. Since an agent can communicate with multiple managers, it is possible to configure the software to support communication with one management station using the SNMPv1 protocol and another using the SNMPv2 protocol, for example. Most NMS stations use SNMPv2C today under the following configuration: set snmp community read-only string

!--- Allow viewing of variables only.

set snmp community read-write string

!--- Allow setting of variables.

set snmp community read-write-all string<string> !--- Include setting of SNMP strings. Cisco recommends enabling SNMP traps for all features in use (features not used can be disabled if desired). Once a trap is enabled, it can be tested using the test snmp command and appropriate handling set up on the NMS for the error (such as a pager alert or pop-up). All traps are disabled by default and need to be added to the configuration, either individually or by using the all parameter, as shown below.

set snmp trap enable all set snmp trap server address read-only community string Available traps in CatOS 5.5 include the following: Trap auth bridge chassis config entity Authentication Bridge Chassis Configuration Entity Description

http://www.cisco.com/warp/customer/473/103.html (47 of 68) [4/18/2004 7:56:20 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

ippermit module repeater stpx syslog vmps vtp

IP permit Module Repeater Spanning Tree extension Syslog notification VLAN Membership Policy Server VLAN Trunk Protocol

Note: The syslog trap will send all syslog messaged generated by the switch to the NMS as a SNMP trap also. If syslog alerting is already being performed by an analyzer such as Cisco Works 2000 RMEs, then it may not be useful to receive this information twice. Unlike Cisco IOS Software, port level SNMP traps are disabled by default because switches can have hundreds of active interfaces. Cisco therefore recommends that key ports, such as infrastructure links to routers, switches, and main servers, have port-level SNMP traps enabled. Other ports, like user host ports, are not required, which helps to simplify network management. set port trap port range enable !--- Enable on key ports only. SNMP Polling Recommendation A network management review is recommended to discuss specific needs in detail, however, some basic Cisco philosophies in managing large networks are listed below.
q q q

Do something simple, and do it well. Reduce staff overload due to excessive data polling, collection, tools, and manual analysis. Network management is possible with just a few tools, such as HP Openview as an NMS, Cisco RMEs as a configuration, syslog, inventory, and software manager, Microsoft Excel as an NMS data analyzer, and CGI as a way to publish to the web. Publishing reports to the web allows users, such as senior management and analysts, to help themselves to information without burdening operations staff with many special requests. Find out what is working well on the network and leave it alone. Concentrate on what is not working.

q

q

The first phase of implementing NMS must be to baseline the network hardware. Much can be inferred about device and protocol health from simple CPU, memory, and buffer utilization on routers, and NMP CPU, memory, and backplane utilization on switches. Only after a hardware baseline do L2 and L3 traffic load, peak, and average baselines become fully meaningful. Baselines are usually established over several months to get visibility of daily, weekly, and quarterly trends according to the business cycle of the company. Many networks suffer NMS performance and capacity problems caused by over-polling. It is therefore recommended, once the baseline is established, to set alarm and event RMON thresholds on the devices themselves to alert the NMS on abnormal changes, thus removing polling. This enables the network to tell the operators when something is not normal rather than continuously polling to see whether everything is normal. Thresholds can be set based on various rules, such as maximum value plus a percentage or standard deviation from a mean, and are outside the scope of this document. The second phase of implementing NMS is to poll particular areas of the network in more detail with SNMP. This includes areas of doubt, areas before a change, or areas that should be characterized as working well. Use the NMS systems as a

http://www.cisco.com/warp/customer/473/103.html (48 of 68) [4/18/2004 7:56:20 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

searchlight to scan the network in detail and illuminate hot spots (do not attempt to light up the whole network). The Cisco Network Management Consulting group has suggested the following key fault MIBs to be analyzed or monitored in campus networks. More information (on performance MIBs to poll, for example) is available at Cisco Network Monitoring and Event Correlation Guidelines. Object Name Object Description OID MIB-II system uptime in sysUpTime 1/100ths of seconds Object Name 1.3.6.1.2.1.1.3 5 min < 30000 Poll Threshold Interval

Object Description

OID

Poll Threshold Interval

CISCO-PROCESS-MIB The overall CPU busy percentage cpmCPUTotal5min 1.3.6.1.4.1.9.9.109.1.1.1.1.5 10 min in the last 5 minute period Object Name Object Description CISCO-STACK-MIB sysEnableChassisTraps Indicates whether chassisAlarmOn and chassisAlarmOff traps in this MIB should be generated. Indicates whether moduleUp and moduleDown traps in this MIB should be generated. Indicates whether newRoot and topologyChange traps in the BRIDGE-MIB (RFC 1493) should be generated. 1.3.6.1.4.1.9.5.1.1.24 24 hrs 1

Baseline

OID

Poll Threshold Interval

sysEnableModuleTraps

1.3.6.1.4.1.9.5.1.1.25

24 hrs

1

sysEnableBridgeTraps

1.3.6.1.4.1.9.5.1.1.26

24 hrs

1

Indicates whether the traps in the sysEnableRepeaterTraps REPEATER-MIB (RFC1516) should be generated. Indicates whether the IP permit sysEnableIpPermitTraps traps in this MIB should be generated. Indicates whether the vmVmpsChange trap defined in CISCOVLAN-MEMBERSHIP-MIB should be generated.

1.3.6.1.4.1.9.5.1.1.29

24 hrs

1

1.3.6.1.4.1.9.5.1.1.31

24 hrs

1

sysEnableVmpsTraps

1.3.6.1.4.1.9.5.1.1.33

24 hrs

1

http://www.cisco.com/warp/customer/473/103.html (49 of 68) [4/18/2004 7:56:20 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

sysEnableConfigTraps

Indicates whether sysConfigChange trap in this MIB should be generated.

1.3.6.1.4.1.9.5.1.1.35

24 hrs

1

sysEnableStpxTrap

Indicates whether stpxInconsistencyUpdate trap in 1.3.6.1.4.1.9.5.1.1.40 the CISCO-STP-EXTENSIONS-MIB should be generated. Status of power supply 1. Detailed information on status of power supply 1. Status of power supply 2. Detailed information on status of power supply 2 Status of Chassis Fan. Detailed information on status of chassis fan. Chassis Minor Alarm Status. Chassis Major Alarm Status Chassis Temperature Alarm status. Detailed information on modules condition. Status of a redundant module. Object Description 1.3.6.1.4.1.9.5.1.2.4 1.3.6.1.4.1.9.5.1.2.5 1.3.6.1.4.1.9.5.1.2.7 1.3.6.1.4.1.9.5.1.2.8 1.3.6.1.4.1.9.5.1.2.9 1.3.6.1.4.1.9.5.1.2.10 1.3.6.1.4.1.9.5.1.2.11 1.3.6.1.4.1.9.5.1.2.12 1.3.6.1.4.1.9.5.1.2.13

24 hrs

1

chassisPs1status chassisPs1TestResult chassisPs2Status chassisPs2TestResult chassisFanStatus chassisFanTestResult chassisMinorAlarm chassis MajorAlarm chassisTempAlarm moduleStatus moduleTestResult moduleStandbyStatus Object Name

10 min As needed. 10 min As needed. 10 min As needed. 10 min 10 min 10 min

2

2

2

1 1 1 2

Operational Status of the module. 1.3.6.1.4.1.9.5.1.3.1.1.10 30 min 1.3.6.1.4.1.9.5.7.3.1.1.11 As needed.

1.3.6.1.4.1.9.5.7.3.1.1.21 30 min OID

=1 or =4

Poll Threshold Interval

CISCO-MEMORY-POOL-MIB The time (in 1/100 secs) since the last time a dot1dStpTimeSinceTopologyChange topology change was detected by the entity.

1.3.6.1.2.1.17.2.3

5 min

< 30000

http://www.cisco.com/warp/customer/473/103.html (50 of 68) [4/18/2004 7:56:20 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

dot1dStpTopChanges

The total number of topology changes detected by 1.3.6.1.2.1.17.2.4 this bridge since the management entity was last reset or initialized.

As needed.

dot1dStpPortState [1]

Port's current state as defined by application of the Spanning Tree Protocol. Return value can be one of the following: disabled As 1.3.6.1.2.1.17.2.15.1.3 (1), needed. blocking (2), listening (3), learning (4), forwarding (5), or broken (6). Object Description OID Poll Threshold Interval

Object Name

CISCO-MEMORY-POOL-MIB Indicates the number of bytes from the memory pool that are currently in use by applications on the managed device.

ciscoMemoryPoolUsed

1.3.6.1.4.1.9.9.48.1.1.1.5 30 min

Baseline

http://www.cisco.com/warp/customer/473/103.html (51 of 68) [4/18/2004 7:56:20 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

ciscoMemoryPoolFree

Indicates the number of bytes from the memory pool that are currently unused on the managed device. 1.3.6.1.4.1.9.9.48.1.1.1.6 30 min Note that the sum of ciscoMemoryPoolUsed and ciscoMemoryPoolFree is the total amount of memory in the pool.

Baseline

Indicates the largest number of contiguous bytes from the memory ciscoMemoryPoolLargestFree 1.3.6.1.4.1.9.9.48.1.1.1.7 30 min pool that are currently unused on the managed device.

Baseline

For more information on Cisco MIB support, refer to Cisco Network Management Toolkit - MIBs. Note: Some standard MIBs assume that a particular SNMP entity contains only one instance of the MIB. Thus, the standard MIB does not have any index that would allow users to directly access a particular instance of the MIB. In these cases, community string indexing is provided to access each instance of the standard MIB. The syntax is [community string]@[instance number], where instance is typically a VLAN number. Other Options The security aspects of SNMPv3 mean that its use is expected to overtake SNMPv2 in time. Cisco recommends that customers prepare for this new protocol as part of their NMS strategy. The benefits are that data can be collected securely from SNMP devices without fear of tampering or corruption. Confidential information, such as SNMP set command packets that change a switch configuration, can be encrypted to prevent its contents from being exposed on the network. In addition, different user groups can have different privileges. Note: The configuration of SNMPv3 is significantly different than the SNMPv2 command line, and increased CPU load on the Supervisor Engine is to be expected.

Remote Monitoring
RMON permits the pre-processing of MIB data by the network device itself, in preparation for common uses or application of that information by the network manager, such as performing historical baseline determination and threshold analysis. The results of RMON processing are stored in RMON MIBs for subsequent collection by an NMS, as defined in RFC 1757 . Operational Overview Catalyst switches support mini-RMON in hardware on each port, which consists of four basic RMON-1 groups: Statistics (group 1), History (group 2), Alarms (group 3), and Events (group 9). The most powerful part of RMON-1 is the threshold mechanism provided by the alarm and event groups. As discussed in the previous section, the configuration of RMON thresholds allows the switch to send an SNMP trap when an anomalous condition occurs. Once key ports have been identified, SNMP can be used to poll counters or RMON history groups and create baselines recording normal traffic activity for those ports. Next, RMON rising and falling thresholds can be set and alarms configured for when there is a defined variance from the baseline.

http://www.cisco.com/warp/customer/473/103.html (52 of 68) [4/18/2004 7:56:20 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

Configuration of thresholds is best done using an RMON management package, since successfully creating the rows of parameters in Alarm and Event tables is tedious. Commercial RMON NMS packages, such as Cisco's traffic director, part of Cisco Works 2000, incorporate GUIs that make the setting of RMON thresholds much simpler. For baseline purposes, the etherStats group provides a useful range of L2 traffic statistics. The objects in this table can be used to get statistics on unicast, multicast, and broadcast traffic as well as a variety of L2 errors. The RMON agent on the switch can also be configured to store these sampled values in the history group. This mechanism enables the amount of polling to be reduced without reducing the sample rate. Using RMON histories can give accurate baselines without substantial polling overhead. The more histories collected, however, the more switch resources are used. While switches provide only four basic groups of RMON-1, it is important not to forget the rest of RMON-1 and RMON-2. All groups are defined in RFC 2021, including UsrHistory (group 18) and ProbeConfig (group 19). L3 and higher information can be retrieved from switches using the SPAN port or VLAN ACL redirect features to copy traffic to an external RMON SwitchProbe or an internal Network Analysis Module (NAM). NAMs support all RMON groups and can even examine application layer data, including Netflow data exported from Catalysts when MLS is enabled. Running MLS means that the router will not switch all packets in a flow, so only Netflow data-export and not interface counters will give reliable VLAN accounting. You can use a SPAN port and a switch probe to capture a packet stream for a particular port, trunk, or VLAN and upload the packets for decoding by an RMON management package. The SPAN port is SNMP-controllable via the SPAN group in the CISCO-STACK-MIB, so this process is easy to automate. Traffic director makes use of these features with its roving agent feature. There are caveats to spanning a whole VLAN. Even if you use a 1Gbps probe, the entire packet stream from one VLAN or even one 1Gbps full-duplex port may exceed the bandwidth of the SPAN port. If the SPAN port is continuously running at full bandwidth, chances are data is being lost. For more details, refer to Configuring the Catalyst Switched Port Analyzer (SPAN) Feature. Recommendation Cisco recommends that RMON thresholds and alerting be deployed to help network management in a more intelligent way than SNMP polling alone. This will reduce network management traffic overhead and allow the network to alert intelligently when something has changed from the baseline. RMON needs to be driven by an external agent such as Traffic Director; there is no command line interface support. Use the following commands to enable RMON: set snmp rmon enable set snmp extendedrmon netflow enable mod

!--- For use with NAM module only. It is important to remember that the primary function of a switch is to forward frames, not to act as a large multi-port RMON probe. Therefore, as you are setting up histories and thresholds on multiple ports for multiple conditions, keep in mind that resources are being consumed. Consider a NAM module if you are scaling up RMON. Also remember the critical port rule: only poll and set thresholds on the ports identified as important in the planning stage. Memory Requirements RMON memory usage is constant across all switch platforms relating to statistics, histories, alarms, and events. RMON uses a bucket to store histories and statistics on the RMON agent (the switch, in this case). The bucket size is defined on the RMON probe (Switch Probe) or RMON application (Traffic Director), then sent to the switch to be set. Typically, memory constraints are only a consideration on older Supervisor Engines with less than 32MB of DRAM. Refer to the following guidelines:

http://www.cisco.com/warp/customer/473/103.html (53 of 68) [4/18/2004 7:56:20 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management
q

Approximately 450K of code space is added to the NMP image in order to support mini-RMON (which is four groups of RMON: statistics, history, alarms, and events). The dynamic memory requirement for RMON varies because it depends on the run-time configuration. The run-time RMON memory usage information for each mini-RMON group is explained below.
r r

Ethernet Statistics groupTakes 800 bytes for each switched Ethernet/Fast Ethernet interface. History groupFor the Ethernet interface, each configured history control entry with 50 buckets takes approximately 3.6KB memory space and 56 bytes for each additional bucket. Alarms and Events groupsTakes 2.6KB for each configured alarm and its corresponding event entries.

r q

Saving the RMON-related configuration takes approximately 20K NVRAM of space if the system total NVRAM size is 256K or more and 10K NVRAM of space if the total NVRAM size is 128K.

Network Time Protocol
The Network Time Protocol (NTP), RFC 1305 , synchronizes timekeeping among a set of distributed time-servers and clients and allows events to be correlated when system logs are created or other time-specific events occur. NTP provides client time accuracies, typically within a millisecond on LANs and up to a few tens of milliseconds on WANs, relative to a primary server synchronized to Coordinated Universal Time (UTC). Typical NTP configurations utilize multiple redundant servers and diverse network paths in order to achieve high accuracy and reliability. Some configurations include cryptographic authentication to prevent accidental or malicious protocol attacks. Operational Overview NTP was first documented in RFC 958 , but has evolved through RFC 1119 (NTP version 2) and is now in its third

version as defined in RFC 1305 . It runs over the User Datagram Protocol (UDP port 123). All NTP communication uses Coordinated Universal Time (UTC), which is the same time as Greenwich Mean Time. Accessing Public Time Servers The NTP subnet presently includes over 50 public primary servers synchronized directly to UTC by radio, satellite, or modem. Normally, client workstations and servers with a relatively small number of clients do not synchronize to primary servers. There are about 100 public secondary servers synchronized to the primary servers that provide synchronization to over 100,000 clients and servers on the Internet. The current lists are maintained on the List of Public NTP Servers page, which is updated regularly. There are numerous private primary and secondary servers not normally available to the public as well. For a list of public NTP servers and information about using them, consult the University of Delaware's Time Synchronization Server website.

Since there is no guarantee that these public Internet NTP servers will be available, or that they will produce the correct time, it is strongly advised that other options be considered. This could include making use of various standalone Global Positioning Service (GPS) devices directly connected to a number of routers. Another possible option is the use of various routers configured as Stratum 1 masters, although this is not recommended. Stratum Each NTP server adopts a stratum that indicates how far away from an external source of time the server is. Stratum 1 servers have access to some kind of external time source, such as a radio clock. Stratum 2 servers obtain time details from a nominated set of Stratum 1 servers, while Stratum 3 servers obtain time details from Stratum 2 servers, and so on. Server Peer Relationship

http://www.cisco.com/warp/customer/473/103.html (54 of 68) [4/18/2004 7:56:20 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management
q

A server is one that will respond to client requests, but will not try to incorporate any date information from a client time source. A peer is one that will respond to client requests, but will try to use the client requests as being a potential candidate for a better time source and to aid in stabilization of its clock frequency. To be a true peer, both sides of the connection should enter into a peer relationship rather than have one user a peer and the other user a server. It is also recommended that peers exchange keys so that only trusted hosts will talk to each other as peers. In a client request to a server, the server will answer the client and forget that the client ever asked a question; in a client request to a peer, the server will answer the client and keep state information about the client to track how well it is doing at timekeeping and what stratum server it is running. Note: CatOS can only act as an NTP client.

q

q

q

It is no problem for an NTP server to handle many thousands of clients. Handling hundreds of peers, however, will have memory impact, and the state maintenance will consume more CPU resources on the box as well as bandwidth. Polling The NTP protocol allows a client to query a server any time it wishes. In fact, when NTP is first configured in a Cisco device, it sends out eight queries in rapid succession at NTP_MINPOLL (24 = 16 second) intervals. The NTP_MAXPOLL is 214 seconds (which is 16,384 seconds or 4 hours, 33 minutes, 4 seconds), the maximum time it will take before NTP will poll again for a response. At present, Cisco does not have a method of manually forcing the POLL time to be set by the user. The NTP polling counter starts at 26 (64) seconds and is incremented by powers of two (as the two servers sync with each other), to 210. That is, you may expect the sync messages to be sent at an interval of 64, 128, 256, 512, or 1024 seconds per configured server or peer. The time varies between 64 seconds and 1024 seconds as a power of two based on the phase-locked-loop that sends and receives packets. If there is a lot of jitter in the time, it will poll more often. If the reference clock is accurate and the network connectivity consistent, you should see the poll-times converge on 1024 seconds between each poll. In the real world, this means that the NTP Poll Interval changes as the connection between the client and server changes. The better the connection, the longer the poll interval, meaning that the NTP client has received 8 responses for its last 8 requests (the poll interval will then be doubled). A single missed response will cause the poll interval to be halved. The poll interval starts out at 64 seconds and goes to a maximum of 1024 seconds. In the best circumstances, it will take a little over 2 hours for the poll interval to go from 64 seconds to 1024 seconds. Broadcasts NTP broadcasts are never forwarded. The ntp broadcast command will cause the router to originate NTP broadcasts on the interface on which it is configured. The ntp broadcast client command will cause the router or switch to listen to NTP broadcasts on the interface on which it is configured. NTP Traffic Levels The bandwidth utilized by NTP is minimal, since the interval between polling messages exchanged between peers usually ratchets back to no more than one message every 17 minutes (1024 seconds). With careful planning, this can be maintained within router networks over the WAN links. The NTP clients should peer to local NTP servers, not all the way across the WAN to the central site core routers who will be the stratum 2 servers. A converged NTP client will use approximately 0.6 bits/second per server. Recommendation Many customers have NTP configured in client mode today on their CatOS platforms, synchronized from several reliable feeds from the Internet or a radio clock. However, a simpler alternative to server mode when operating a large number of
http://www.cisco.com/warp/customer/473/103.html (55 of 68) [4/18/2004 7:56:20 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

switches is to enable NTP in broadcast client mode on the management VLAN in a switched domain. This mechanism allows an entire domain of Catalysts to receive a clock from a single broadcast message; however, the accuracy of timekeeping is marginally reduced because the information flow is one way. Using loopback addresses as the source of updates can also help with consistency. Security concerns can be addressed in the following two ways:
q q

filtering server updates Authentication

Time correlation of events is extremely valuable in two cases: troubleshooting and security audits. Care should be taken to protect the time sources and data, and encryption is recommended so that key events are not erased either intentionally or unintentionally. Cisco recommends the following configurations: Catalyst Configuration set ntp broadcastclient enable set ntp authentication enable set ntp key key !--- This is a Message Digest 5 (MD5) hash. set ntp timezone <zone name> set ntp summertime <date change details> Alternate Catalyst Configuration

!--- This more traditional configuration creates !--- more configuration work and NTP peerings. set set set set ntp client enable ntp server IP address of time server timezone zone name summertime date change details Router configuration

!--- This is a sample router configuration to distribute !--- NTP broadcast information to the Catalyst broadcast clients. ntp source loopback0 ntp server IP address of time server ntp update-calendar clock timezone zone name clock summer-time date change details ntp authentication key key ntp access-group access-list

!--- To filter updates to allow only trusted sources of NTP information.

http://www.cisco.com/warp/customer/473/103.html (56 of 68) [4/18/2004 7:56:20 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

Interface to campus/management VLAN containing switch sc0 ntp broadcast

Cisco Discovery Protocol
CDP exchanges information between adjacent devices over the data link layer and is extremely helpful in determining network topology and physical configuration outside of the logical or IP layer. Supported devices are mainly switches, routers, and IP phones. This section highlights some of the enhancements of CDP version 2 over version 1. Operational Overview CDP uses SNAP encapsulation with type code 2000. On Ethernet, ATM, and FDDI, the destination multicast address 01-00-0c-cc-cc-cc, HDLC protocol type 0x2000 is used. On Token Rings, the functional address c000.0800.0000 is used. CDP frames are sent periodically every minute by default. CDP messages contain one or more sub-messages that allow the destination devices to gather and store information about every neighbor device. CDP version 1 supports the following parameters: Parameter 1 2 3 Type Device-ID Address Port-ID Description Hostname of the device or hardware serial number in ASCII. The L3 address of the interface that has sent the update. The port on which the CDP update has been sent. Describes the device's functional capabilities: Router: 0x01 TB Bridge: 0x02 SR Bridge: 0x04 Switch: 0x08 Capabilities (Provides L2 and/or L3 switching) Host: 0x10 IGMP conditional filtering: 0x20 The Bridge or Switch does not forward IGMP report packets on non-routerports. Repeater: 0x40 Version A character string containing the software version (same as in show version). Hardware platform, such as WS-C5000, WS-C6009, or Cisco RSP.

4

5

6

Platform

In CDP version 2, additional protocol fields have been introduced. CDP version 2 supports any field, but the following can be particularly useful in switched environments and are used in CatOS. Note that when a switch runs CDPv1, it will drop v2 frames. When a switch running CDPv2 receives a CDPv1 frame on an interface, it will start sending out CDPv1 frames out of that interface in addition to CDPv2 frames. Parameter Type Description

http://www.cisco.com/warp/customer/473/103.html (57 of 68) [4/18/2004 7:56:20 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

9 10 11

VTP Domain Native VLAN

The VTP Domain, if configured on the device. In dot1Q, this is the untagged VLAN.

This field contains the Full/Half Duplex duplex setting of the sending port.

Recommendation CDP is enabled by default and is essential to gain visibility of adjacent devices and for troubleshooting. It is also used by network management applications to build L2 topology maps. Issue the following commands to set up CDP: set cdp enable !--- This is the default. set cdp version v2 !--- This is the default. In parts of the network where a high level of security is required (such as Internet-facing DMZs), CDP should be turned off as follows: set cdp disable port range The command show cdp neighbors displays the local CDP table. Entries marked with a star (*) indicate a VLAN mismatch; entries marked with a # indicate a duplex mismatch. This can be a valuable help for troubleshooting. > show cdp neighbors * - indicates vlan mismatch. # - indicates duplex mismatch. Port Device-ID Port-ID ----- ------------------ ------3/1 TBA04060103(swi-2) 3/1 3/8 TBA03300081(swi-3) 1/1 15/1 rtr-1-msfc VLAN 1 16/1 MSFC1b Vlan2 Other Options Some switches, like the Catalyst 6500/6000, have the ability to supply power via UTP cables to IP phones. Information received via CDP assists power management on the switch. As IP phones might have a PC connected to them, and both devices connect to the same port on the Catalyst, the switch has the ability to put the VoIP phone in a separate VLAN, the auxiliary. This allows the switch to easily apply a different Quality of Service for the VoIP traffic. In addition, if the auxiliary VLAN is modified (for example, to force the phone to use a specific VLAN or specific tagging method), this information is sent to the phone via CDP.

Platform -----------WS-C6506 WS-C6506 cisco Cat6k-MSFC cisco Cat6k-MSFC

http://www.cisco.com/warp/customer/473/103.html (58 of 68) [4/18/2004 7:56:20 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

Parameter

Type

Description Allows the VoIP traffic to be differentiated from other traffic, as by separate VLAN-id (auxiliary VLAN).

14

Appliance ID

16

The amount of power a Power Consumption VoIP phone consumes, in milliwatts.

Note: Catalyst 2900 and 3500XL switches do not currently support CDPv2.

Security Configuration
Ideally, the customer should have already established a security policy to help define what tools and technologies from Cisco are qualified. Note: Cisco IOS Software security, as opposed to CatOS, is dealt with in many documents, such as Cisco IOS Essentials.

Basic Security Features
Passwords Configure a user level password (login). Passwords are case sensitive in CatOS 5.x and later, and may be from 0 to 30 characters in length, including spaces. Set the enable password as follows:

set password password set enablepass password All passwords should meet minimum length standards (for example, six characters minimum, a mix of letters and numbers, upper- and lower-case letters) for login and enable passwords when used. These passwords are encrypted using the MD5 hashing algorithm. In order to allow for more flexibility in managing password security and device access, Cisco recommends the use of a TACACS+ server. Refer to the TACACS+ section of this document for more information. IP Permit Filters These are filters to safeguard access to the management sc0 interface via Telnet and other protocols. These are particularly important when the VLAN used for management also contains users. Issue the following commands to enable IP address and port filtering:

set ip permit enable set ip permit IP address mask Telnet|ssh|snmp|all Restricting Telnet access with the above command, however, means that access to CatOS devices may only be via a few trusted end-stations, which may be a hindrance in troubleshooting. Please keep in mind that it is possible to spoof IP addresses and to fool filtered access, so this is the first layer of protection only.

http://www.cisco.com/warp/customer/473/103.html (59 of 68) [4/18/2004 7:56:21 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

Port Security Consider utilizing port security to permit only one or several known MAC addresses to pass data on a particular port (to stop static end stations from being swapped for new stations without change control, for example). This is possible by using a static MAC addresses. set port security mod/port enable MAC address This is also possible by learning restricted MAC addresses dynamically. set port security port range enable The following options can be configured:
q

set port security mod/port age time value specifies the duration for which addresses on the port will be secured before a new address can be learned. Valid time in minutes is 10 - 1440. Default is no aging. set port securitymod/port maximum value keyword that specifies the maximum number of MAC addresses to secure on the port. Valid values are 1 (default) - 1025. set port security mod/port violation shutdown shuts down port (default) if violation occurs as well as sending syslog message (default) and discarding the traffic. set port security mod/port shutdown time value duration for which a port will remain disabled. Valid values are 10 - 1440 minutes. Default is permanently shutdown

q

q

q

With CatOS 6.x and later, Cisco has introduced 802.1x authentication that allows clients to authenticate to a central server before ports can be enabled for data. This feature is in the early stages of support on such platforms as Windows XP, but may be considered a strategic direction by many enterprises. Login Banners Create appropriate device banners to state specifically the actions taken for unauthorized access. Do not advertise site name or network data that may provide information to unauthorized users. These banners provide recourse in case a device is compromised and the perpetrator is caught:. # set banner motd ^C *** Unauthorized Access Prohibited *** *** All transactions are logged *** ------------- Notice Board ----------------Contact Joe Cisco at 1 800 go cisco for access problems---^C Physical Security Devices should not be accessible physically without proper authorization, so the equipment should be in a controlled (locked) space. To ensure that the network stays operational and unaffected by malicious tampering of environmental factors, all equipment should have proper UPS (Ywith redundant sources where possible) and temperature control (air conditioning). Remember, if physical access is breached by a person with malicious intent, disruption via password recovery or other methods is much more likely.

Terminal Access Controller Access Control System
By default, non-privileged and privileged mode passwords are global and apply to every user accessing the switch or router, either from the console port or via a Telnet session across the network. Their implementation on network devices is time consuming and non-centralized. It is also difficult to implement access restrictions using access lists that can be prone to

http://www.cisco.com/warp/customer/473/103.html (60 of 68) [4/18/2004 7:56:21 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

configuration errors. Three security systems are available to help control and police access to network devices. These use client/server architectures to place all security information in a single central database. These three security systems are listed below:
q q q

TACACS+ RADIUS Kerberos

TACACS+ is a common deployment in Cisco networks and is the focus of this chapter. It provides the following features:
q

Authentication the process of identifying and verifying a user. Several methods can be used to authenticate a user, but the most common includes a combination of user name and password. Authorization of various commands can be granted once a user is authenticated. Accounting the recording what a user is doing or has done on the device.

q q

Refer to Configuring TACACS+, RADIUS, and Kerberos on Cisco Catalyst Switches for more details. Operational Overview The TACACS+ protocol forwards usernames and passwords to the centralized server, encrypted over the network using MD5 one-way hashing (RFC 1321 over UDP (used by RADIUS):
q q

). It uses TCP port 49 as its transport protocol; this offers the following advantages

Connection oriented transport. Separate acknowledgement that a request has been received (TCP ACK), regardless of how loaded the backend authentication mechanism might be. Immediate indication of a server crash (RST packets).

q

During a session, if additional authorization checking is needed, the switch checks with TACACS+ to determine if the user is granted permission to use a particular command. This provides greater control over the commands that can be executed on the switch while de-coupling from the authentication mechanism. Using command accounting, it is possible to audit the commands a particular user has issued while attached to a particular network device.

When a user attempts a simple ASCII login by authenticating to a network device using TACACS+, the following process typically occurs:
q

When the connection is established, the switch will contact the TACACS+ daemon to obtain a username prompt, which is then displayed to the user. The user enters a username, and the switch contacts the TACACS+ daemon to obtain a password prompt. The switch displays the password prompt to the user, who then enters a password that is also sent to the TACACS+ daemon. The network device will eventually receive one of the following responses from the TACACS+ daemon:

q

http://www.cisco.com/warp/customer/473/103.html (61 of 68) [4/18/2004 7:56:21 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management
r

ACCEPT the user is authenticated and service may begin. If the network device is configured to require authorization, authorization will begin at this time. REJECT the user has failed to authenticate. The user may be denied further access or will be prompted to retry the login sequence depending on the TACACS+ daemon. ERROR an error occurred at some time during authentication. This can be either at the daemon or in the network connection between the daemon and the switch. If an ERROR response is received, the network device will typically try to use an alternative method for authenticating the user. CONTINUE the user is prompted for additional authentication information.

r

r

r q q

Users must first successfully complete TACACS+ authentication before proceeding to TACACS+ authorization. If TACACS+ authorization is required, the TACACS+ daemon is again contacted and returns an ACCEPT or REJECT authorization response. If an ACCEPT response is returned, the response will contain data in the form of attributes that are used to direct the EXEC or NETWORK session for that user, determining commands that the user can access.

Recommendation Cisco recommends the use of TACACS+, as it can be easily implemented using CiscoSecure ACS for NT, Unix, or other third-party software. TACACS+ features include detailed accounting to provide statistics on command usage and system usage, MD5 encryption algorithm, and administrative control of authentication and authorization processes. In this example, login and enable modes use the TACACS+ server for Authentication and can fall back to local authentication if the server is unavailable. This is an important back door to leave in most networks. Issue the following commands to set up TACACS+: set tacacs server server IP primary set tacacs server server IP

!--- Redundant servers are possible. set tacacs attempts 3 !--- This is the default. set tacacs key key

!--- MD5 encryption key. set tacacs timeout 15 !--- Longer server timeout (5 is default). set set set set authentication authentication authentication authentication login tacacs enable enable tacacs enable login local enable enable local enable

!--- The last two commands are the default; they allow fallback !--- to local if no TACACS+ server available.

http://www.cisco.com/warp/customer/473/103.html (62 of 68) [4/18/2004 7:56:21 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

Other Options It is possible to use TACACS+ authorization to control the commands each user or user-group can execute on the switch, but it is difficult to make a recommendation, as all customers have individual requirements in this area. Refer to Switch Access: Using Authentication, Authorization, and Accounting for more information. Finally, accounting commands provide an audit trail of what each user typed and configured. The following is an example using the common practice of receiving the audit information at the end of the command: set set set set set accounting accounting accounting accounting accounting connect enable start-stop tacacs+ exec enable start-stop tacacs+ system enable start-stop tacacs+ commands enable all start-stop tacacs+ update periodic 1

This configuration has the following features:
q q q q

The connect command enables accounting of outbound connection events on the switch such as Telnet. The exec command enables accounting of login sessions on the switch such as operations staff. The system command enables accounting of system events on the switch such as reload or reset. The commands command enables accounting of what was entered on the switch, for both show and configuration commands. Periodic updates every minute to the server are helpful to record whether users are still logged in.

q

Configuration Checklist
Below is a summary of the recommended configurations, excluding security details. Labeling all ports can be extremely helpful. You can label ports by issuing the following command: set port description descriptive name Please use the following key in conjunction with the Command tables below: Key: Bold text - recommended change Normal text - default, recommended setting Global Configuration Commands Command set vtp domain name passwordx set vtp mode transparent Comment Protect against unauthorized VTP updates from new switches. Select VTP mode promoted in this document. Refer to the VLAN Trunking Protocol section for more details.

http://www.cisco.com/warp/customer/473/103.html (63 of 68) [4/18/2004 7:56:21 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

set spantree enable all set spantree root vlan

Ensure that STP is enabled on all VLANs. Recommended to position root (and secondary root) bridges per VLAN. Enable rapid STP convergence from indirect failures (only if all switches in domain support the feature). Enable rapid STP convergence from direct failures (for access layer switches only). Enable port to be shut down automatically if there is an unauthorized Spanning Tree extension. Enable unidirectional link detection (need port level configuration as well). Enable full diagnostics at boot up (default on Catalyst 4500/4000). Enable port buffer error checking (applies to Catalyst 5500/5000 only). Maintain maximum internal syslog buffer. Configure target syslog sever for external system message logging. Allow the external logging server. Enable timestamps of messages in the log. Increase default STP syslog level. Increase default System syslog level. Allow the export of the higher severity syslog only. Disable the console unless troubleshooting. Configure the password to allow remote data collection. Configure the password to allow remote configuration.

set spantree backbonefast enable set spantree uplinkfast enable set spantree portfast bpdu-guard enable

set udld enable set test diaglevel complete set test packetbuffer sun 3:30 set logging buffer 500 set logging server IP address set logging server enable set logging timestamp enable set logging level spantree 6 default set logging level sys 6 default set logging server severity 4 set logging console disable set snmp community read-only string set snmp community read-write string

http://www.cisco.com/warp/customer/473/103.html (64 of 68) [4/18/2004 7:56:21 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

set snmp community read-write-all string set snmp trap enable all set snmp trap server address string

Configure the password to allow remote configuration including passwords. Enable SNMP traps to the NMS server for fault and event alerts. Configure the address of the NMS trap receiver.

Enable RMON for local statistic gathering. Refer to the Remote set snmp rmon enable Monitoring section for more details. set ntp Enable accurate system clock broadcastclient enable reception from an upstream router. set ntp timezone zone name set ntp summertime date change details set ntp authentication enable set ntp key key set cdp enable set tacacs server IP address primary set tacacs server IP address set tacacs attempts 3 set tacacs key key set tacacs timeout 15 set authentication login tacacs enable set authentication enable tacacs enable Set the local timezone for the device. Configure summertime if applicable for the timezone. Configure encrypted time information for security purposes. Configure the encryption key. Ensure neighbor discovery is enabled (enabled on ports by default as well). Configure the address of the AAA server. Redundant AAA servers if possible. Allow 3 password attempts for the AAA user account. Set the AAA MD5 encryption key. Allow longer server timeout (five seconds is default). Use AAA for authentication for login. Use AAA for authentication for enable mode.

set authentication login Default; allows fallback to local if local enable no AAA server available. set authentication enable local enable Default; allows fallback to local if no AAA server available.

Host Ports Configuration Commands Command Comment

http://www.cisco.com/warp/customer/473/103.html (65 of 68) [4/18/2004 7:56:21 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

set port host port range set udld disable port range set port speed port range auto set port trap port range disable

Remove unnecessary port processing. This macro sets spantree PortFast enable, channel off, trunk off. Remove unnecessary port processing (disabled on copper port by default). Use auto negotiation with up-to-date host NIC drivers. No need for SNMP traps for general users; track key ports only.

Server Configuration Commands Command set port host port range set udld disable port range set port speed port range 10 | 100 set port duplex port range full | half set port trap port range enable Comment Remove unnecessary port processing. This macro sets spantree PortFast enable, channel off, trunk off. Remove unnecessary port processing (disabled on copper port by default). Usually configure static/server ports; otherwise, use auto-negotiation. Usually static/server ports; otherwise, use auto-negotiation. Key service ports should send trap to NMS.

Unused Ports Configuration Commands Command Comment

set spantree portfast port Enable necessary port processing range disable and protection for STP. set port disable port range Disable unused ports.

Direct unauthorized traffic to set vlan unused dummy unused VLAN should port be vlan port range enabled. set trunk port range off set port channel port range mode off Disable port from trunking until administered. Disable port from channeling until administered.

Infrastructure Ports (switch-switch, switch-router) Command Comment

http://www.cisco.com/warp/customer/473/103.html (66 of 68) [4/18/2004 7:56:21 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

set udld enable port range set udld aggressive-mode enable port range set port negotiation port rangeenable set port trap port range enable set trunk port range off set trunk mod/port desirable ISL | dot1q | negotiate clear trunk mod/port vlan range set port channel port range mode off set port channel port range mode desirable set port channel all distribution ip both set trunk mod/port nonegotiate ISL | dot1Q set port negotiation mod/port disable

Enable unidirectional link detection (not default on copper ports). Enable aggressive mode (for devices that support it). Allow default GE auto-negotiation of link parameters. Allow SNMP traps for these key ports. Disable feature if not using trunks. If using trunks, dot1Q is preferred. Limit STP diameter by pruning VLANs from trunks where they are not needed. Disable feature if not using channels. If using channels, this enables PAgP. Allow L3 source/destination load balancing if using channels (default on Catalyst 6500/6000). Disable DTP if trunking to router, Catalyst 2900XL, 3500, or other vendor. Negotiation may be incompatible for some old GE devices.

Related Information
q q q q

Common CatOS Error Messages on Catalyst 4000 Series Switches Common CatOS Error Messages on Catalyst 5000/5500 Series Switches Common CatOS Error Messages on Catalyst 6000/6500 Series Switches Technical Support - Cisco Systems

All contents are Copyright © 1992-2004 Cisco Systems, Inc. All rights reserved. Important Notices and Privacy Statement.

http://www.cisco.com/warp/customer/473/103.html (67 of 68) [4/18/2004 7:56:21 PM]

Cisco - Best Practices for Catalyst 4500/4000, 5500/5000, and 6500/6000 Series Switches Running CatOS Configuration and Management

Updated: Apr 16, 2004

Document ID: 13414

http://www.cisco.com/warp/customer/473/103.html (68 of 68) [4/18/2004 7:56:21 PM]