S7C5 – Spanning Tree Protocol
Download
Report
Transcript S7C5 – Spanning Tree Protocol
S7C5 – Spanning Tree Protocol
And other topics
Switch Port Aggregation
• Bundling
– Combining 2 to 8 links of FE (Fast Ethernet) or
GE (Gigabit)
• Full duplex bandwidth of up to 1600 Mbps or 16
Gbps
– Load balancing can be implemented
– Several bundles can provide redundancy
– Redundancy can be provided from within bundle
» One link goes down; another link takes over
Bundling
• Usually, contiguous ports required
• Usually, two or four ports must be bundled
• Generally, all ports must belong to same
vlan
• Ports should have same speed and duplex
setting before bundling
Bundling Continued
• IOS-based switches distribute by low-order bits of
source MAC address
• (config-if)#port group G# distribution source
• CLI-based switches may require no configuration:
if they do
• Switch> (enable) set port channel all distribution
IP|MAC Source|Destination|both
– If MAC addresses are remaining constant, use IP
addresses
Port Aggregation Protocol
(PAgP)
• Provides automatic EtherChannel
configuration and negotiation between
switches
– Ports with same neighbor device ID and port
group capability will be bundled as
bidirectional, point to point link
• Identify static VLANS or trunking
– On off auto desirable modes
EtherChannel Port Guidlines
• All ports should be assigned to same VLAN or
configured for trunking
• If a trunk link, all ports should have same trunk
mode and carry same VLANs
• All ports should have same speed and duplex
mode
• All ports should be static VLAN ports
• All ports should be enabled (disabled port is
viewed as failed link)
EtherChannel Configuration
• CLI
– (enable) set port channel 2/2-6 mode on
• IOS-based
– (config-if)# port group 4 distribution source
• Show commands
– Show port channel info
– Show port group 5
– Show port channel statistics
Spanning Tree Protocol
• Provides network redundancy and load balancing
to allow switch to recover from failures without
intervention
– Layer 2 switch mimics transparent bridge
•
•
•
•
•
•
No initial knowledge of location of end devices
Listens to frames coming into ports to id host
Updates bridging table
Sends broadcasts out all ports
Unknown destination addresses treated as broadcast
Frames forwarded across bridge can’t be modified
Bridging Loops
• Process of forwarding a single frame around and
around between two switches
• Learned location of PC keeps changing as frames
get looped
– Unicast frame can cause a bridging loop
• Break by disconnecting switch ports or shutting a
switch down
• Better to prevent loops
– Use STP (prevents loops but maintains redundant
paths) – redundant paths placed in blocking or standby
BPDU
• STP Multicast address is 01-80-c2-00-00-00
• Configuration BPDU – used to elect
reference points
– Hello sent every 2 seconds
• Topology Change Notification – (TCN) –
announces changes in network topology
Root Bridge Election
• Unique Bridge ID – 8 bytes
– Bridge priority (2 bytes) 0-65535; default
32768
– MAC address (6 bytes) – can be supervisor
module, backplane, or from pool – is
hardcoded, unique, and can’t be changed
• Switch with lowest Bridge ID is elected root
– Ongoing process
Root Ports
• Each non-root switch elects a root port
– Evaluate root path cost
• Cumulative cost of all links leading to root bridge
• Each switch link has cost called pathcost
– 1 byte value based on link bandwidth
» 100 mbps
old was 10; new is 19
» 1 gbps
old was 1; new is 4
– Catalyst 5000 uses older linear scale; 4000 and 6000 use nonlinear scale
• Costs calculated as BPDU comes in to port NOT as they go out
STP Decisions
•
•
•
•
Lowest Root Bridge ID
Lowest Root path cost to root bridge
Lowest sender bridge ID
Lowest port ID
STP States
• Disabled – shut down by network administrator or
by system
• Blocking – when switch initializes – received
BPDUs
• Listening – thinks can be elected root or
designated port
• Learning – learns MAC addresses
• Forwarding – sends and receives data frames and
sends and receives BPDUs
– Show spantree 3/4
STP Timers
• Hello Time 2 seconds
• Forward Delay
15 + 15 seconds
• Maximum Age
20 seconds
– Assumed diameter is 7 switches
• If necessary, modify on root bridge switch only
Types of SPT
• Common Spanning Tree (CST)
– IEEE 802.1q
• Single instance of STP for all VLANs
– All BPDUs transmitted over VLAN 2
• Per-VLAN Spanning Tree (PVST)
– Cisco proprietary STP
• Separate instance of STP for each individual VLAN
– Allows load balancing over redundant links
– Requires ISL trunking
• PVST+
– Translates between groups of CST and PVST switches
Redundant Link Convergence
• Portfast – enables fast connectivity to be
established on access layer switch ports to
workstations
• UplinkFast --- enables fast uplink failover
on an access layer switch when dual uplinks
are connected to distribution layer
• BackboneFast – enables fast convergence in
network backbone (core) after STP change
STP Configuration Commands
Task
CLI-Based
IOS-Based
Enable STP
Set spantree
enable [all] ¾
Spantree vlanlist
View STP
Show spantree
vlan 1
Show spantree
¾
Set spantree
priority 34544
Show spantree
vlan 1
Show spantree
¾
Spanning-tree
vlan 2 priority
Set Bridge
Prioriety
Configuration Commands Cont’d
Set Root Bridge Set spantree root
[secondary] vlan
1[dia 4] [hello
6]
Set port costs
Set spantree
Spanning-tree
portcost ¾ 25
[vlan 2] cost 45
Set port priority Set spantree
portpri ¾ 565
Set spantree
portvlanpri ¾
Spanning-tree
[vlan 3] portpriority 45
Configuration Commands Cont’d
Set STP timers
Set spantree hello 5 vlan 5
Set spantree root [secondary]
[vlan 4] [dia 5] hello 5
Spanning-tree vlan 5 hellotime 4
Set portfast
Set spantree portfast ¾
enable
Spanning-tree portfast
Set UplinkFast
Set spantree uplinkfast
enable rate 20 all-protocols
on
Spanning-tree uplinkfast
[maxupdate-rate 45]
Set backbone fast
Set spantree backbonefast
enable