Download Exploration_LAN_Switching_Chapter5

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Power over Ethernet wikipedia , lookup

IEEE 802.1aq wikipedia , lookup

Airborne Networking wikipedia , lookup

Zero-configuration networking wikipedia , lookup

Parallel port wikipedia , lookup

Nonblocking minimal spanning switch wikipedia , lookup

Cracking of wireless networks wikipedia , lookup

Network tap wikipedia , lookup

Virtual LAN wikipedia , lookup

Cisco Systems wikipedia , lookup

Spanning Tree Protocol wikipedia , lookup

Transcript
Implement Spanning
Tree Protocols
LAN Switching and Wireless – Chapter 5
ITE I Chapter 6
© 2006 Cisco Systems, Inc. All rights reserved.
Cisco Public
1
Objectives

Explain the role of redundancy in a converged
network

Summarize how STP works to eliminate Layer 2 loops
in a converged network

Explain how the STP algorithm uses three steps to
converge on a loop-free topology

Implement rapid per VLAN spanning tree (rapid
PVST+) in a LAN to prevent loops between redundant
switches.
ITE 1 Chapter 6
© 2006 Cisco Systems, Inc. All rights reserved.
Cisco Public
2
Redundancy in a hierarchical network
 The hierarchical design model addresses issues found in the flat
model network topologies.
 One of the issues is redundancy. Layer 2 redundancy improves the
availability of the network by implementing alternate network paths
by adding equipment and cabling.
 Having multiple paths for data to traverse the network allows for a
single path to be disrupted without impacting the connectivity of
devices on the network.
 In a hierarchical design, redundancy is achieved at the
distribution and core layers through additional hardware
and alternate paths through the additional hardware.
ITE 1 Chapter 6
© 2006 Cisco Systems, Inc. All rights reserved.
Cisco Public
3
Role of Redundancy in a Converged
Switched Network
 Redundancy in a hierarchical network
ITE 1 Chapter 6
© 2006 Cisco Systems, Inc. All rights reserved.
Cisco Public
4
Issues with Redundancy
 Layer 2 Loops
 When multiple paths exist between two devices on the network
and STP has been disabled on those switches, a Layer 2 loop can
occur.
 Ethernet frames do not have a time to live (TTL) like IP packets
traversing routers.
 If they are not terminated properly on a switched network, they
continue to bounce from switch to switch endlessly or until a link is
disrupted and breaks the loop.
 Broadcast frames are forwarded out all switch ports, except the
originating port.
 If there is more than one path for the frame to be forwarded out, it
can result in an endless loop.
ITE 1 Chapter 6
© 2006 Cisco Systems, Inc. All rights reserved.
Cisco Public
5
Conti…
 Broadcast Storms
 A broadcast storm occurs when there are so many broadcast
frames caught in a Layer 2 loop that all available bandwidth is
consumed.
 A broadcast storm is inevitable on a looped network. As more
devices send broadcasts out on the network, more and more traffic
gets caught in the loop, eventually creating a broadcast storm that
causes the network to fail.
 broadcast traffic that is being flooded endlessly around the looped
network can cause the end device to malfunction because of the
high processing requirements for sustaining such a high traffic load
on network interface card
ITE 1 Chapter 6
© 2006 Cisco Systems, Inc. All rights reserved.
Cisco Public
6
Conti…
 Duplicate Unicast Frames
 Unicast frames sent onto a looped network can result in duplicate
frames arriving at the destination device.
 Most upper layer protocols are not designed to recognize or cope
with duplicate transmissions.
 In general, protocols that make use of a sequence-numbering
mechanism assume that the transmission has failed and that the
sequence number has recycled for another communication
session.
 Fortunately, switches are capable of detecting loops on
a network. The Spanning Tree Protocol (STP)
eliminates these loop issues. You will learn about STP
in the next section.
ITE 1 Chapter 6
© 2006 Cisco Systems, Inc. All rights reserved.
Cisco Public
7
Real-world Redundancy Issues
 Loops in the wiring closet
 If the network cables are not properly labeled when they are
terminated in the patch panel in the wiring closet, it is difficult to
determine where the destination is for the patch panel port on the
network.
 Network loops that are a result of accidental duplicate connections
in the wiring closets are a common occurrence.
ITE 1 Chapter 6
© 2006 Cisco Systems, Inc. All rights reserved.
Cisco Public
8
Conti…
 Loops in the Cubicles
 Because of insufficient network data connections, some end users
have a personal hub or switch located in their working
environment.
 Allowing all devices connected to the personal hub or switch to
gain access to the network.
 So the end user can accidentally interconnect the switches or
hubs.
ITE 1 Chapter 6
© 2006 Cisco Systems, Inc. All rights reserved.
Cisco Public
9
Spanning Tree Algorithm
 STP Topology
 Loops and duplicate frames can have severe consequences on a
network. The Spanning Tree Protocol (STP) was developed to
address these issues.
 STP ensures that there is only one logical path between all
destinations on the network by intentionally blocking redundant
paths that could cause a loop.
 his does not include bridge protocol data unit (BPDU) frames that
are used by STP to prevent loops.
 If the path is ever needed to compensate for a network cable or
switch failure, STP recalculates the paths and unblocks the
necessary ports to allow the redundant path to become active.
ITE 1 Chapter 6
© 2006 Cisco Systems, Inc. All rights reserved.
Cisco Public
10
Conti…
 STP Algorithm
 STP uses the Spanning Tree Algorithm (STA) to determine which
switch ports on a network need to be blocked to prevent loops.
 The STA designates a single switch as the root bridge as a
reference point for all calculations
 After the root bridge has been determined, the STA calculates the
shortest path to the root bridge.
 The path costs are calculated using port cost values associated
with port speeds for each switch port along a given path. The sum
of the port cost values determines the overall path cost to the root
bridge.
ITE 1 Chapter 6
© 2006 Cisco Systems, Inc. All rights reserved.
Cisco Public
11
Conti…
 Port roles
 Port can be in any of the following:
 Root ports - Switch ports closest to the root bridge.
 Designated ports - All non-root ports that are still permitted to
forward traffic on the network.
 Non-designated ports - All ports configured to be in a blocking
state to prevent loops.
 Disabled Port
 The disabled port is a switch port that is administratively shut
down.
ITE 1 Chapter 6
© 2006 Cisco Systems, Inc. All rights reserved.
Cisco Public
12
Configure Port Priority
 You can configure the port priority value using the spanning-tree
port-priority value interface configuration mode command.
 The port priority values range from 0 - 240, in increments of 16.
 The default port priority value is 128.
 As with bridge priority, lower port priority values give the port
higher priority.
 Verifying Port Roles and Port Priority
 To verify the port roles and port priorities for the switch ports, use
the show spanning-tree privileged EXEC mode command.
ITE 1 Chapter 6
© 2006 Cisco Systems, Inc. All rights reserved.
Cisco Public
13
Port States
 Blocking – The port is a non-designated port and does not
participate in frame forwarding. The port receives BPDU frames to
determine the location and root ID of the root bridge switch
 Listening –At this point, the switch port is not only receiving BPDU
frames, it is also transmitting its own BPDU frames and informing
adjacent switches
 Learning –The port prepares to participate in frame forwarding
and begins to populate the MAC address table.
 Forwarding – The port is considered part of the active topology
and forwards frames and also sends and receives BPDU frames.
 Disabled - The Layer 2 port does not participate in spanning tree
and does not forward frames.
ITE 1 Chapter 6
© 2006 Cisco Systems, Inc. All rights reserved.
Cisco Public
14
BPDU Timers
 The amount of time that a port stays in the various port states
depends on the BPDU timers. The following timers determine STP
performance and state changes:
 Hello time - 2 Seconds by default but can be tuned between 1 to
10
 Forward delay –The forward delay is the time spent in the
listening and learning state. 15 Seconds by default but can be
tuned between 4 to 30
 Maximum age - The max age timer controls the maximum length
of time a switch port saves configuration BPDU information.
This is 20 seconds by default, but can be tuned to be between 6
and 40 seconds.
ITE 1 Chapter 6
© 2006 Cisco Systems, Inc. All rights reserved.
Cisco Public
15
Cisco PortFast Technology
 PortFast is a Cisco technology. When a switch port configured with
PortFast is configured as an access port, that port transitions from
blocking to forwarding state immediately, bypassing the typical
STP listening and learning states.
 PortFast is disabled on all interfaces by default.
 To configure PortFast on a switch port, enter the spanning-tree
portfast interface configuration mode command on each interface
that PortFast is to be enabled.
 Edge Ports
 An RSTP edge port is a switch port that is never intended to be
connected to another switch device. It immediately transitions to
the forwarding state when enabled.
ITE 1 Chapter 6
© 2006 Cisco Systems, Inc. All rights reserved.
Cisco Public
16
STP Convergence Steps
 Step 1. Elect a root bridge
 Step 2. Elect root ports
 Step 3. Elect designated and non-designated ports
 Verification
 Show spanning-tree
ITE 1 Chapter 6
© 2006 Cisco Systems, Inc. All rights reserved.
Cisco Public
17
Cisco and STP variants
 Cisco Proprietary
 Per-VLAN spanning tree protocol (PVST) - Maintains a
spanning-tree instance for each VLAN configured in the network. It
uses the Cisco proprietary ISL trunking protocol
 Per-VLAN spanning tree protocol plus (PVST+) - Cisco
developed PVST+ to provide support for IEEE 802.1Q trunking.
PVST+ provides the same functionality as PVST, including the
Cisco proprietary STP extensions. PVST+ is not supported on nonCisco devices.
ITE 1 Chapter 6
© 2006 Cisco Systems, Inc. All rights reserved.
Cisco Public
18
Conti…
 IEEE Standards
 Rapid spanning tree protocol (RSTP) - Implements the Ciscoproprietary STP extensions
 Multiple STP (MSTP) - Enables multiple VLANs to be mapped to
the same spanning-tree instance
ITE 1 Chapter 6
© 2006 Cisco Systems, Inc. All rights reserved.
Cisco Public
19
Final Points
 Keep STP Even If It Is Unnecessary
 Do not disable STP.
 STP is not very processor-intensive.
 The few BPDUs sent on each link do not reduce bandwidth.
 But a bridge network without STP can go down in a fraction of a
second.
 Keep Traffic off the Administrative VLAN.
 A high rate of broadcast or multicast traffic on the administrative
VLAN adversely effects the CPU’s ability to process vital BPDUs.
ITE 1 Chapter 6
© 2006 Cisco Systems, Inc. All rights reserved.
Cisco Public
20
Conti…
 Keep user traffic off the administrative VLAN.
 Do Not Have a Single VLAN Span the Entire Network.
 VLAN 1 serves as an administrative VLAN, where all switches are
accessible in the same IP subnet.
 A bridging loop on VLAN 1 affects all trunks and can bring down
the network.
 Segment the bridging domains using high-speed Layer 3 switches.
ITE 1 Chapter 6
© 2006 Cisco Systems, Inc. All rights reserved.
Cisco Public
21
Troubleshoot a Failure
 Unfortunately, there is no systematic procedure to troubleshoot an
STP issue. This section summarizes some of the actions that are
available to you.
 Topology of the bridge network
 Location of the root bridge
 Location of the blocked ports and the redundant links
 PortFast Configuration Error
 Network Diameter Issues
 Another issue that is not well known relates to the diameter of the
switched network. The conservative default values for the STP
timers impose a maximum network diameter of seven.
ITE 1 Chapter 6
© 2006 Cisco Systems, Inc. All rights reserved.
Cisco Public
22
Conti…
 STP algorithm
ITE 1 Chapter 6
© 2006 Cisco Systems, Inc. All rights reserved.
Cisco Public
23
Root Bridge
 Every spanning-tree instance (switched LAN or broadcast domain)
has a switch designated as the root bridge.
 All switches in the broadcast domain participate in the election
process
 After a switch boots, it sends out BPDU frames containing the
switch BID and the root ID every 2 seconds.
 If the root ID from the BPDU received is lower than the root ID on
the receiving switch, the receiving switch updates its root ID
identifying the adjacent switch as the root bridge.
ITE 1 Chapter 6
© 2006 Cisco Systems, Inc. All rights reserved.
Cisco Public
24
Conti…
 Role of the BID in STP
ITE 1 Chapter 6
© 2006 Cisco Systems, Inc. All rights reserved.
Cisco Public
25
Best Paths to the Root Bridge
 After root bridge selection, the STA starts the process of
determining the best paths to the root bridge from all destinations
in the broadcast domain.
 The default port costs are defined by the speed at which the port
operates.
 10-Gb/s Ethernet ports have a port cost of 2,
 1-Gb/s Ethernet ports have a port cost of 4,
 100-Mb/s Fast Ethernet ports have a port cost of 19, and
 10-Mb/s Ethernet ports have a port cost of 100.
 show spanning-tree ,show spanning-tree details
 Note: These cost are revised ones by IEEE.
ITE 1 Chapter 6
© 2006 Cisco Systems, Inc. All rights reserved.
Cisco Public
26
The BPDU Fields
 The BPDU frame contains 12 distinct fields that are used to convey
path and priority information that STP uses to determine the root
bridge and paths to the root bridge.
 The first four fields identify the protocol, version, message type,
and status flags.
 The next four fields are used to identify the root bridge and the cost
of the path to the root bridge.
 The last four fields are all timer fields that determine how
frequently BPDU messages are sent, and how long the information
received through the BPDU process (next topic) is retained.
 Note:-The role of the timer fields will be covered in more detail later
in this course.
ITE 1 Chapter 6
© 2006 Cisco Systems, Inc. All rights reserved.
Cisco Public
27
Conti…
 Role of the BPDU in STP
ITE 1 Chapter 6
© 2006 Cisco Systems, Inc. All rights reserved.
Cisco Public
28
The BPDU Process
 Each switch in the broadcast domain initially assumes that it is the
root bridge for the spanning-tree instance, so the BPDU frames
sent contain the BID of the local switch as the root ID.
 By default, BPDU frames are sent every 2 seconds after a switch
is booted; that is, the default value of the hello timer specified in
the BPDU frame is 2 seconds.
 Each switch maintains local information about its own BID, the root
ID, and the path cost to the root.
ITE 1 Chapter 6
© 2006 Cisco Systems, Inc. All rights reserved.
Cisco Public
29
BID
 The BID field of a BPDU frame contains three separate
fields:
 bridge priority,
 extended system ID, and
 MAC address.
Each field is used during the root bridge election.
ITE 1 Chapter 6
© 2006 Cisco Systems, Inc. All rights reserved.
Cisco Public
30
Conti…
 Bridge Priority
 The bridge priority is a customizable value that you can use to
influence which switch becomes the root bridge.
 The default value for the priority of all Cisco switches is 32768. The
priority range is between 1 and 65536; therefore, 1 is the highest
priority.
 Extended System ID
 Extended system ID field contains the ID of the VLAN with which
the BPDU is associated.
 The increment for the bridge priority value changes from 1 to 4096.
Therefore, bridge priority values can only be multiples of 4096.
ITE 1 Chapter 6
© 2006 Cisco Systems, Inc. All rights reserved.
Cisco Public
31
Conti…
 MAC Address
 When two switches are configured with the same priority. The MAC
address is then the deciding factor on which switch is going to
become the root bridge.
 The MAC address with the lowest hexadecimal value is considered
to be the preferred root bridge.
ITE 1 Chapter 6
© 2006 Cisco Systems, Inc. All rights reserved.
Cisco Public
32
Configure and Verify the BID
 Method 1
 To ensure that the switch has the lowest bridge priority value, use
the spanning-tree vlan vlan-id root primary command in global
configuration mode.
 If an alternate root bridge is desired, use the spanning-tree vlan
vlan-id root secondary global configuration mode command.
 Method 2
 Another method for configuring the bridge priority value is using
the spanning-tree vlan vlan-id priority value global configuration
mode command.
ITE 1 Chapter 6
© 2006 Cisco Systems, Inc. All rights reserved.
Cisco Public
33
Summary
 Spanning Tree Protocol (STP) is used to prevent loops
from being formed on redundant networks
 STP uses different port states & timers to logically
prevent loops
 There is at least one switch in a network that serves as
the root bridge
Root bridge is elected using information found in BPDU frames
 Root ports are determined by the spanning tree
algorithm and are closest to the root bridge
ITE 1 Chapter 6
© 2006 Cisco Systems, Inc. All rights reserved.
Cisco Public
34
Summary
 STP lengthy convergence time (50 seconds) facilitated
the development of:
RSTP
convergence time is slightly over 6 seconds
Rapid PVST+
adds VLAN support to RSTP
is the preferred spanning-tree protocol on a Cisco switch
netowrk
ITE 1 Chapter 6
© 2006 Cisco Systems, Inc. All rights reserved.
Cisco Public
35
ITE 1 Chapter 6
© 2006 Cisco Systems, Inc. All rights reserved.
Cisco Public
36