Presentation is loading. Please wait.

Presentation is loading. Please wait.

CIT 384: Network Administration

Similar presentations


Presentation on theme: "CIT 384: Network Administration"— Presentation transcript:

1 CIT 384: Network Administration
Spanning Tree Protocol CIT 384: Network Administration

2 CIT 384: Network Administration
Topics Redundant LAN Problems 802.1d Spanning Tree CIT 384: Network Administration

3 Redundant LAN Problems
Broadcast Storms Forwarding of frame repeatedly on same links, consuming most bandwidth. MAC Table Instability Continual updating of a switch’s MAC address table with incorrect entries in reaction to looping frames, resulting in frames being sent to the wrong locations. Multiple Frame Transmission Looping frames result in multiple copies of same frame being received by destination host, confusing some apps. CIT 384: Network Administration

4 CIT 384: Network Administration
Broadcast Storms Bob sends broadcast from SW3 forwards broadcast to SW1 and SW2 SW3 learns that Bob is on port Fa 0/13 SW2 forwards broadcast to SW1 and SW3 SW3 learns that Bob is on port Gi 0/2 CIT 384: Network Administration

5 Blocking and Forwarding Ports
STP prevents loops by placing switch ports that could cause loops in a Blocking State. Blocking State ports only process STP pkts. Forwarding State ports act normally. CIT 384: Network Administration

6 CIT 384: Network Administration
Spanning Tree A tree is a type of graph, such that there is one and only one path joining any 2 vertices A spanning tree is a tree that spans all vertices of the original graph. Image from CIT 384: Network Administration

7 CIT 384: Network Administration
Forwarding Criteria STP elects a root switch. STP puts all working interfaces on root switch in Forwarding State. Each nonroot switch considers one of its ports to have least administrative cost between itself and root switch. STP puts this least root cost interface, called the switch’s root port, in Forwarding State. For switch’s attached to the same Ethernet segment, the switch with the lowest admin cost is placed in Forwarding State. The lowest-cost switch on each segment is called the designated bridge and that port is the Designated Port. All other ports are in Blocking State. CIT 384: Network Administration

8 Algorhyme by Radia Perlman
I think that I shall never see A graph more lovely than a tree. A tree whose crucial property Is loop-free connectivity. A tree which must be sure to span So packets can reach every LAN. First the Root must be selected By ID it is elected. Least cost paths from Root are traced In the tree these paths are placed. A mesh is made by folks like me Then bridges find a spanning tree. CIT 384: Network Administration

9 Bridge ID and Hello BPDU
Bridge ID: 8-byte value unique to switch 2 byte priority field + 6 byte MAC address Bridge Protocol Data Units (BPDU) Hello BPDU sends switch’s bridge ID and other values: Field Description Root Bridge ID Bridge ID of switch that sender believes is the current root bridge. Sender Bridge ID Bridge ID of sender of Hello BPDU Cost to reach root STP cost between this switch and root Timer values Hello, MaxAge, Fwd Delay timer values CIT 384: Network Administration

10 CIT 384: Network Administration
Root Bridge Election Root Bridge has lowest BridgeID. Since first digits are priority, lowest pri wins. If priority ties, then lowest MAC address wins. Election process Switches claim to be root, sending Hello BPDUs with their own ID as the root ID. If switch hears a Hello with a lower root ID, then it starts forwarding that ID as root ID. After a root is chosen, only root sends Hello BPDUs, but other switches forward them. CIT 384: Network Administration

11 CIT 384: Network Administration
Root Bridge Election Image from CIT 384: Network Administration

12 CIT 384: Network Administration
Choosing a Root Port Root port is port with lowest STP cost to reach the root switch. Cost = Hello cost + STP port cost If multiple ports have least cost, choose: Port with lowest configured port priority, or if that ties Port with lowest internal port number CIT 384: Network Administration

13 CIT 384: Network Administration
Choosing Root Ports Image from CIT 384: Network Administration

14 Choosing a Designated Port
Choose a DP on each LAN segment. DP is switch port that advertised lowest Hello on segment. All DPs are placed into Forwarding State. Default port costs based on Ethernet speed: Ethernet Speed Original Default Cost Revised IEEE Cost 10 Mbps 100 100 Mbps 10 19 1 Gbps 1 4 10 Gbps 2 CIT 384: Network Administration

15 CIT 384: Network Administration
Final Port States Image from CIT 384: Network Administration

16 Final STP State of Example
Interface State Reason SW1, Gi0/1 Forwarding Interface on root switch SW1, Gi0/2 SW2, Gi0/2 Root port SW2, Gi0/1 Designated port on LAN segment to SW3. SW3, Gi0/1 SW3, Gi0/2 Blocking Not a root port or a designated port CIT 384: Network Administration

17 Reacting to Network Changes
Root switch sends Hello BPDU every 2 sec. Switches forward Hello BPDUs from root. Changing root cost and sender bridge ID. If switch does not receive Hello BPDU for Max Age, it will start changing STP topology. Max Age is 10 times Hello timer by default. Switch will decide if it’s the new root bridge. If not, will recalculate RP and DPs. CIT 384: Network Administration

18 Reacting to Network Changes
SW3 fails to receive Hello BPDUs on Gi0/1. SW3 decides SW1 is still root based on forwarded Hello from SW2. SW3 re-evaluates RP, decides on Gi0/2. CIT 384: Network Administration

19 Intermediate STP states
Direct Block to Forward transition can temporarily cause a loop. STP uses intermediate states. Listening: Does not forward frames. Old, now incorrect MAC table entries timed out during state, because these entries would cause temporary loops. Learning: Does not forward frames, but switch begins to learn MAC table entries in this state. Remains in state for Forward Delay timer. CIT 384: Network Administration

20 CIT 384: Network Administration
EtherChannel Combine parallel connections of equal speed between same pair of switches into a single link. EtherChannel link fails only when all connections fail, avoiding STP convergence unless all fail. CIT 384: Network Administration

21 CIT 384: Network Administration
EtherChannel (config)# interface fa 0/3 (config-if)# channel-group 1 mode on (config)# interface fa 0/4 EtherChannel Modes on: both sides must be an EtherChannel auto: wait for other side to negotiate EtherChannel (other side must be on or desirable) desirable: attempt to negotiate EtherChannel CIT 384: Network Administration

22 PortFast and BPDU Guard
A PortFast port is always in Forwarding State. Bypasses any choices about STP topology. Only safe for ports that do not connect to other bridges or switches. BPDU Guard disables port if BPDUs received. Useful in combination with PortFast. Prevents end-user from introducing a switch with low bridge ID that becomes root switch. CIT 384: Network Administration

23 CIT 384: Network Administration
Rapid STP (802.1w) RSTP reduces convergence time STP takes MaxAge + 2*ForwardDelay=50s RSTP typically converges under 10s RSTP categories physical connectivity Link-type point-to-point Link-type shared Edge type RSTP will not improve convergence in networks that use hubs (shared connections.) CIT 384: Network Administration

24 RSTP Link and Edge Types
CIT 384: Network Administration

25 CIT 384: Network Administration
RSTP Port Roles Alternate: best alternative to current RP. Backup: second link to same LAN segment. CIT 384: Network Administration

26 CIT 384: Network Administration
RSTP Changes Edge-Type Immediately places edge ports in Forwarding state like Cisco’s PortFast feature. Link-Type Shared Behave identically to STP. Link-Type Point-to-Point MaxAge = 3 * Hello timer = 6s Does not use Listening state when changing. Reduces time required in Learning state by sending RSTP messages to negotiate. CIT 384: Network Administration

27 RSTP Convergence Example
SW4 selects port on new link as root port. SW4 temp blocks all other link-type ports to avoid loops. SW4 negotiates with SW1 using RSTP proposal and agreement messages, allowing SW1 and SW4 to place ports in Forwarding state immediately. CIT 384: Network Administration

28 RSTP Convergence Example
SW4 forwards new root BPDU to SW3 SW3 changes root port to port to SW4. SW3 blocks all other link-type ports. CIT 384: Network Administration

29 RSTP Convergence Example
SW3 and SW4 negotiate. SW4 forwards to root through SW3. SW3 maintains blocking on port to SW2. CIT 384: Network Administration

30 CIT 384: Network Administration
VLANs and STP Cisco proprietary per-VLAN STP variants PVST+ for STP, PVRST for RSTP Multiple Instances of Spanning Trees (MIST) IEEE 802.1s standard supports only RSTP CIT 384: Network Administration

31 CIT 384: Network Administration
Bridge IDs with VLANs STP System ID extension 16-bit priority = 4-bit priority + 12-bit VLAN ID Example: priority = 8 VLAN 1 = 32,769, VLAN 2 = 32,770, etc. CIT 384: Network Administration

32 STP Defaults and Options
Setting Default Commands Bridge ID Priority = VLAN ID System: Burned in MAC spanning-tree vlan vlan-id root [ primary | secondary ] spanning-tree vlan vlan-id priority priority Port Cost 100 for 10Mbps, 19 for 100Mbps, 4 for 1 Gbps, 2 for 10 Gbps spanning-tree vlan vlan-id cost cost PortFast Not enabled spanning-tree portfast BPDU Guard spanning-tree bpduguard enable CIT 384: Network Administration

33 CIT 384: Network Administration
STP Status Example SW1#show spanning-tree vlan 3 VLAN0003 Spanning tree enabled protocol ieee Root ID Priority Address e Cost Port (FastEthernet0/16) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority (priority sys-id-ext 3) Address e86a.6f80 Aging Time 300 Interface Role Sts Cost Prio.Nbr Type Fa0/ Desg FWD P2p Fa0/ Root FWD P2p Fa0/ Altn BLK P2p SW1#show spanning-tree root Root Hello Max Fwd Vlan Root ID Cost Time Age Dly Root Port VLAN e Fa0/16 VLAN e Fa0/16 VLAN e Fa0/16 VLAN e Fa0/16 CIT 384: Network Administration

34 CIT 384: Network Administration
References James Boney, Cisco IOS in a Nutshell, 2nd edition, O’Reilly, 2005. Cisco, Cisco Connection Documentation, Cisco, Internetworking Basics, Matthew Gast, Wireless Networks: The Definitive Guide, O’Reilly, 2005. Wendell Odom, CCNA Official Exam Certification Library, 3rd edition, Cisco Press, 2007. CIT 384: Network Administration


Download ppt "CIT 384: Network Administration"

Similar presentations


Ads by Google