
- •Warning and Disclaimer
- •Feedback Information
- •Trademark Acknowledgments
- •About the Author
- •About the Technical Reviewers
- •Dedication
- •Acknowledgments
- •Contents at a Glance
- •Contents
- •Icons Used in This Book
- •Command Syntax Conventions
- •Cisco’s Motivation: Certifying Partners
- •Format of the CCNA Exams
- •What’s on the CCNA Exams
- •ICND Exam Topics
- •Cross-Reference Between Exam Topics and Book Parts
- •CCNA Exam Topics
- •INTRO and ICND Course Outlines
- •Objectives and Methods
- •Book Features
- •How This Book Is Organized
- •Part I: LAN Switching
- •Part II: TCP/IP
- •Part III: Wide-Area Networks
- •Part IV: Network Security
- •Part V: Final Preparation
- •Part VI: Appendixes
- •How to Use These Books to Prepare for the CCNA Exam
- •For More Information
- •Part I: LAN Switching
- •“Do I Know This Already?” Quiz
- •Foundation Topics
- •Brief Review of LAN Switching
- •The Forward-Versus-Filter Decision
- •How Switches Learn MAC Addresses
- •Forwarding Unknown Unicasts and Broadcasts
- •LAN Switch Logic Summary
- •Basic Switch Operation
- •Foundation Summary
- •Spanning Tree Protocol
- •“Do I Know This Already?” Quiz
- •Foundation Topics
- •Spanning Tree Protocol
- •What IEEE 802.1d Spanning Tree Does
- •How Spanning Tree Works
- •Electing the Root and Discovering Root Ports and Designated Ports
- •Reacting to Changes in the Network
- •Spanning Tree Protocol Summary
- •Optional STP Features
- •EtherChannel
- •PortFast
- •Rapid Spanning Tree (IEEE 802.1w)
- •RSTP Link and Edge Types
- •RSTP Port States
- •RSTP Port Roles
- •RSTP Convergence
- •Edge-Type Behavior and PortFast
- •Link-Type Shared
- •Link-Type Point-to-Point
- •An Example of Speedy RSTP Convergence
- •Basic STP show Commands
- •Changing STP Port Costs and Bridge Priority
- •Foundation Summary
- •Foundation Summary
- •Virtual LANs and Trunking
- •“Do I Know This Already?” Quiz
- •Foundation Topics
- •Review of Virtual LAN Concepts
- •Trunking with ISL and 802.1Q
- •ISL and 802.1Q Compared
- •VLAN Trunking Protocol (VTP)
- •How VTP Works
- •VTP Pruning
- •Foundation Summary
- •Part II: TCP/IP
- •IP Addressing and Subnetting
- •“Do I Know This Already?” Quiz
- •Foundation Topics
- •IP Addressing Review
- •IP Subnetting
- •Analyzing and Interpreting IP Addresses and Subnets
- •Math Operations Used to Answer Subnetting Questions
- •Converting IP Addresses from Decimal to Binary and Back Again
- •The Boolean AND Operation
- •How Many Hosts and How Many Subnets?
- •What Is the Subnet Number, and What Are the IP Addresses in the Subnet?
- •Finding the Subnet Number
- •Finding the Subnet Broadcast Address
- •Finding the Range of Valid IP Addresses in a Subnet
- •Finding the Answers Without Using Binary
- •Easier Math with Easy Masks
- •Which Subnet Masks Meet the Stated Design Requirements?
- •What Are the Other Subnet Numbers?
- •Foundation Summary
- •“Do I Know This Already?” Quiz
- •Foundation Topics
- •Extended ping Command
- •Distance Vector Concepts
- •Distance Vector Loop-Avoidance Features
- •Route Poisoning
- •Split Horizon
- •Split Horizon with Poison Reverse
- •Hold-Down Timer
- •Triggered (Flash) Updates
- •RIP and IGRP
- •IGRP Metrics
- •Examination of RIP and IGRP debug and show Commands
- •Issues When Multiple Routes to the Same Subnet Exist
- •Administrative Distance
- •Foundation Summary
- •“Do I Know This Already?” Quiz
- •Foundation Topics
- •Link-State Routing Protocol and OSPF Concepts
- •Steady-State Operation
- •Loop Avoidance
- •Scaling OSPF Through Hierarchical Design
- •OSPF Areas
- •Stub Areas
- •Summary: Comparing Link-State and OSPF to Distance Vector Protocols
- •Balanced Hybrid Routing Protocol and EIGRP Concepts
- •EIGRP Loop Avoidance
- •EIGRP Summary
- •Foundation Summary
- •“Do I Know This Already?” Quiz
- •Foundation Topics
- •Route Summarization and Variable-Length Subnet Masks
- •Route Summarization Concepts
- •VLSM
- •Route Summarization Strategies
- •Sample “Best” Summary on Seville
- •Sample “Best” Summary on Yosemite
- •Classless Routing Protocols and Classless Routing
- •Classless and Classful Routing Protocols
- •Autosummarization
- •Classful and Classless Routing
- •Default Routes
- •Classless Routing
- •Foundation Summary
- •Advanced TCP/IP Topics
- •“Do I Know This Already?” Quiz
- •Foundation Topics
- •Scaling the IP Address Space for the Internet
- •CIDR
- •Private Addressing
- •Network Address Translation
- •Static NAT
- •Dynamic NAT
- •Overloading NAT with Port Address Translation (PAT)
- •Translating Overlapping Addresses
- •Miscellaneous TCP/IP Topics
- •Internet Control Message Protocol (ICMP)
- •ICMP Echo Request and Echo Reply
- •Destination Unreachable ICMP Message
- •Time Exceeded ICMP Message
- •Redirect ICMP Message
- •Secondary IP Addressing
- •FTP and TFTP
- •TFTP
- •MTU and Fragmentation
- •Foundation Summary
- •Part III: Wide-Area Networks
- •“Do I Know This Already?” Quiz
- •Foundation Topics
- •Review of WAN Basics
- •Physical Components of Point-to-Point Leased Lines
- •Data-Link Protocols for Point-to-Point Leased Lines
- •HDLC and PPP Compared
- •Looped Link Detection
- •Enhanced Error Detection
- •Authentication Over WAN Links
- •PAP and CHAP Authentication
- •Foundation Summary
- •“Do I Know This Already?” Quiz
- •Foundation Topics
- •ISDN Protocols and Design
- •Typical Uses of ISDN
- •ISDN Channels
- •ISDN Protocols
- •ISDN BRI Function Groups and Reference Points
- •ISDN PRI Function Groups and Reference Points
- •BRI and PRI Encoding and Framing
- •PRI Encoding
- •PRI Framing
- •BRI Framing and Encoding
- •DDR Step 1: Routing Packets Out the Interface to Be Dialed
- •DDR Step 2: Determining the Subset of the Packets That Trigger the Dialing Process
- •DDR Step 3: Dialing (Signaling)
- •DDR Step 4: Determining When the Connection Is Terminated
- •ISDN and DDR show and debug Commands
- •Multilink PPP
- •Foundation Summary
- •Frame Relay
- •“Do I Know This Already?” Quiz
- •Foundation Topics
- •Frame Relay Protocols
- •Frame Relay Standards
- •Virtual Circuits
- •LMI and Encapsulation Types
- •DLCI Addressing Details
- •Network Layer Concerns with Frame Relay
- •Layer 3 Addressing with Frame Relay
- •Frame Relay Layer 3 Addressing: One Subnet Containing All Frame Relay DTEs
- •Frame Relay Layer 3 Addressing: One Subnet Per VC
- •Frame Relay Layer 3 Addressing: Hybrid Approach
- •Broadcast Handling
- •Frame Relay Service Interworking
- •A Fully-Meshed Network with One IP Subnet
- •Frame Relay Address Mapping
- •A Partially-Meshed Network with One IP Subnet Per VC
- •A Partially-Meshed Network with Some Fully-Meshed Parts
- •Foundation Summary
- •Part IV: Network Security
- •IP Access Control List Security
- •“Do I Know This Already?” Quiz
- •Foundation Topics
- •Standard IP Access Control Lists
- •IP Standard ACL Concepts
- •Wildcard Masks
- •Standard IP ACL: Example 2
- •Extended IP Access Control Lists
- •Extended IP ACL Concepts
- •Extended IP Access Lists: Example 1
- •Extended IP Access Lists: Example 2
- •Miscellaneous ACL Topics
- •Named IP Access Lists
- •Controlling Telnet Access with ACLs
- •ACL Implementation Considerations
- •Foundation Summary
- •Part V: Final Preparation
- •Final Preparation
- •Suggestions for Final Preparation
- •Preparing for the Exam Experience
- •Final Lab Scenarios
- •Scenario 1
- •Scenario 1, Part A: Planning
- •Solutions to Scenario 1, Part A: Planning
- •Scenario 2
- •Scenario 2, Part A: Planning
- •Solutions to Scenario 2, Part A: Planning
- •Part VI: Appendixes
- •Glossary
- •Answers to the “Do I Know This Already?” Quizzes and Q&A Questions
- •Chapter 1
- •“Do I Know This Already?” Quiz
- •Chapter 2
- •“Do I Know This Already?” Quiz
- •Chapter 3
- •“Do I Know This Already?” Quiz
- •Chapter 4
- •“Do I Know This Already?” Quiz
- •Chapter 5
- •“Do I Know This Already?” Quiz
- •Chapter 6
- •“Do I Know This Already?” Quiz
- •Chapter 7
- •“Do I Know This Already?” Quiz
- •Chapter 8
- •“Do I Know This Already?” Quiz
- •Chapter 9
- •“Do I Know This Already?” Quiz
- •Chapter 10
- •“Do I Know This Already?” Quiz
- •Chapter 11
- •“Do I Know This Already?” Quiz
- •Chapter 12
- •“Do I Know This Already?” Quiz
- •Using the Simulation Software for the Hands-on Exercises
- •Accessing NetSim from the CD
- •Hands-on Exercises Available with NetSim
- •Scenarios
- •Labs
- •Listing of the Hands-on Exercises
- •How You Should Proceed with NetSim
- •Considerations When Using NetSim
- •Routing Protocol Overview
- •Comparing and Contrasting IP Routing Protocols
- •Routing Through the Internet with the Border Gateway Protocol
- •RIP Version 2
- •The Integrated IS-IS Link State Routing Protocol
- •Summary of Interior Routing Protocols
- •Numbering Ports (Interfaces)

52 Chapter 2: Spanning Tree Protocol
Table 2-7 lists the port role terms for STP and RSTP.
Table 2-7 RSTP and STP Port Roles
RSTP Role |
STP Role |
Definition |
|
|
|
Root port |
Root port |
A single port on each switch in which the switch hears |
|
|
the best BPDU out of all the received BPDUs. |
|
|
|
Designated port |
Designated port |
Of all switch ports on all switches attached to the |
|
|
same segment/collision domain, the port that |
|
|
advertises the “best” root BPDU. |
|
|
|
Alternate port |
— |
A port on a switch that receives a suboptimal root |
|
|
BPDU. |
|
|
|
Backup port |
— |
A nondesignated port on a switch that is attached to |
|
|
the same segment/collision domain as another port |
|
|
on the same switch. |
|
|
|
Disabled |
— |
A port that is administratively disabled. |
|
|
|
RSTP Convergence
This section on RSTP started by telling you how similar RSTP is to STP—how they both choose a root using the same rules, choose designated ports using the same rules, and so forth. If RSTP did only the same things as STP, there would have been no need to update the original 802.1d STP standard with the new 802.1w RSTP standard. The main reason for the new standard is to improve convergence time.
The next section provides a glimpse of the detailed workings of RSTP and how it improves convergence.
Edge-Type Behavior and PortFast
RSTP improves convergence for edge-type connections by immediately placing the port in forwarding state when the link is physically active. In effect, RSTP treats these ports just like Cisco’s proprietary PortFast feature. In fact, on Cisco switches, to enable RSTP on edge interfaces, you simply configure PortFast.
Link-Type Shared
RSTP doesn’t do anything differently from STP on link-type shared links. However, because most of the links between switches today are not shared, but full-duplex point-to-point links, it doesn’t matter.
Link-Type Point-to-Point
RSTP improves convergence over full-duplex links between switches—the links that RSTP calls “link-type point-to-point.” The first improvement made by RSTP over these types of links relates to how STP uses MaxAge. STP requires that a switch that no longer receives root

Rapid Spanning Tree (IEEE 802.1w) 53
BPDUs in its root port must wait for MaxAge seconds before starting convergence. MaxAge defaults to 20 seconds. RSTP recognizes the loss of the path to the root bridge, through the root port, in 3 times the hello timer, or 6 seconds with a default hello timer value of 2 seconds. So RSTP recognizes a lost path to the root much more quickly.
RSTP removes the need for listening state and reduces the time required for learning state by actively discovering the network’s new state. STP passively waits on new BPDUs, and reacts to them, during the listening and learning states. With RSTP, the switches negotiate with neighboring switches. When ports that can be transitioned immediately to forwarding state are discovered, they are transitioned immediately. In many cases, the process takes only a second or two for the whole RSTP domain.
An Example of Speedy RSTP Convergence
Rather than explain every nuance of RSTP convergence, one example will give you plenty of knowledge about the process. Figure 2-9 shows a network that explains RSTP convergence.
Figure 2-9 RSTP Convergence Example: Steps 1 and 2
Step 1 |
Step 2 |
|
|
Root |
|
SW1 |
|||
|
|||
|
|
Better |
|
SW2 |
|||
|
|
Root |
|
|
|
BPDU |
|
|
|
|
SW3
SW4
SW1 |
Root |
|
|
||
SW2 |
|
|
SW3 |
Old, No |
|
Longer as |
||
|
||
|
Good Root |
|
|
BPDU |
|
SW4 |
|
Figure 2-9 sets up the problem. On the left, in Step 1, the network has no redundancy. RSTP has placed all link-type point-to-point links in forwarding state. To add redundancy, the network engineer adds another link-type point-to-point link between SW1 and SW4, as shown on the right. So, RSTP convergence needs to occur.
The first step of convergence occurs when SW4 realizes that it is receiving a better BPDU than the one that entered from SW3. Because both the old and new root BPDUs advertise the same switch, SW1, the new, “better” BPDU coming over the direct link from SW1 must be better because of lower cost. Regardless of the reason, SW4 needs to transition to forwarding state on the new link to SW1, because it is now SW4’s root port.

54 Chapter 2: Spanning Tree Protocol
At this point, RSTP behavior diverges from STP. RSTP on SW4 now temporarily blocks all other link-type ports. By doing so, SW4 prevents the possibility of introducing loops. Then SW4 negotiates with its neighbor on the new root port, SW1, using RSTP Proposal and Agreement messages. As a result, SW4 and SW1 agree that they can each place their respective ends of the new link into forwarding state immediately. Figure 2-10 shows this third step.
Figure 2-10 RSTP Convergence Example: Steps 3 and 4
Step 3 |
Step 4 |
Negotiations
(Proposal and Agreement)
Results in
Immediate
Forwarding
State
SW1 |
Root |
|
|
SW2 |
|
SW3 |
Blocking — |
|
|
|
Prevents |
|
Loops While |
|
Negotiating |
SW4 |
|
|
SW1 |
Root |
|
|
|
|
SW2 |
Old, No |
|
Longer as |
|
|
|
|
|
|
Good Root |
|
|
BPDU |
|
SW3 |
Better |
|
|
Root |
|
|
BPDU |
SW4 Still |
SW4 |
|
Blocking! |
|
|
Why can SW1 and SW4 place their ends of the new link in forwarding state without causing a loop? Because SW4 blocks on all other link-type ports. In other words, it blocks on all other ports connected to other bridges or switches. That’s the key to understanding RSTP convergence. A switch knows it needs to change to a new root port. It blocks on all other links and then negotiates to bring the new root port to forwarding state. Essentially, SW4 tells SW1 to trust it and start forwarding, because SW4 promises to block all other ports until it is sure that it can move some of them back to forwarding state.
The process is not yet complete, however. The RSTP topology currently shows SW4 blocking, which in this example is not the final, best topology.
SW4 and SW3 repeat the same process that SW1 and SW4 just performed. In Step 4, SW4 still blocks, preventing loops. However, SW4 forwards the new root BPDU to SW3, so SW3 hears two BPDUs now. In this example, assume that SW3 thinks that the BPDU from SW4 is better than the one received from SW2—which makes SW3 repeat the same process that SW4 just performed. It follows this general flow from this point:
1.SW3 decides to change its root port based on this new BPDU from SW4.
2.SW3 blocks all other link-type ports. (RSTP calls this process synchronization.)

Rapid Spanning Tree (IEEE 802.1w) 55
3.SW3 and SW4 negotiate.
4.As a result of the negotiation, SW4 and SW3 can transition to forwarding on their interfaces on either end of the link-type point-to-point link.
5.SW3 maintains blocking state on all other link-type ports until the next step in the logic.
Figure 2-11 shows some of these steps in the Step 5 portion on the left and the resulting behavior in Step 6 on the right.
Figure 2-11 RSTP Convergence Example: Steps 5 and 6
Step 5 |
|
|
Step 6 |
||||
|
|
|
|
Root |
|
|
|
SW1 |
|
|
SW1 |
||||
|
|
|
|||||
|
|
|
|
|
|
|
|
SW2 |
|
|
|
SW2 |
Blocking —
Prevents
Loops While
Negotiating
SW3 |
|
SW3 |
Negotiations (Proposal and Agreement)
Old BPDU Is Better than One from SW3
Not as Good as BPDU from SW3
SW4 |
|
SW4 |
SW3 stills blocks on its upper interface at this point. Notice that SW2 is now receiving two BPDUs, but the same old BPDU it had been receiving all along is still the better BPDU. So SW2 takes no action. And RSTP is finished converging!
Although it took several pages to explain, the process in this example might take as little as 1 second. For the ICND exam, you should remember the terms relating to RSTP, as well as the concept that RSTP improves convergence time compared to STP.

56 Chapter 2: Spanning Tree Protocol
Spanning Tree Protocol Configuration
Cisco switches use STP by default. You can buy some switches, connect them with Ethernet cables in a redundant topology, and STP will ensure that no loops exist. And you never even to think about changing any of the settings!
You might want to change some of STP’s default settings. You might also want to use different settings for different virtual LANs (VLANs, which are covered in Chapter 3, “Virtual LANs and Trunking”). This section lists configuration and show commands for STP on the 2950 series switches. It also shows a simple example of how to examine STP parameters and change some common STP parameters.
Table 2-8 lists some of the 2950 commands relating to STP.
Table 2-8 Configuration and Operations Commands from This Chapter for 2950 Switches
Command |
Description |
|
|
spanning-tree vlan vlan-id root |
Global configuration command that changes |
|
this switch to the root switch. The switch’s |
|
priority is changed to the lower of either |
|
24,576 or 100 less than the priority of the |
|
current root bridge when the command was |
|
issued. |
|
|
spanning-tree vlan vlan-id {priority priority} |
Global configuration command that changes |
|
the bridge priority of this switch for the |
|
specified VLAN. |
|
|
spanning-tree cost cost |
Interface subcommand that changes the STP |
|
cost to the configured value. |
|
|
channel-group channel-group-number mode |
Interface subcommand that enables |
{auto | desirable | on} |
EtherChannel on the interface. |
|
|
show spanning-tree |
EXEC command that lists details about the |
|
state of STP on the switch, including the |
|
state of each port. |
|
|
show spanning-tree interface interface-id |
EXEC command that lists STP information |
|
only for the specified port. |
|
|
show spanning-tree vlan vlan-id |
EXEC command that lists STP information |
|
for the specified VLAN. |
|
|
debug spanning-tree |
EXEC command that causes the switch to |
|
provide informational messages about |
|
changes in the STP topology. |
|
|
show etherchannel [channel-group-number] |
EXEC command that lists information about |
{brief | detail | port | port-channel | summary} |
the state of EtherChannels on this switch. |
|
|