Lab - Modify Default Spanning Tree Behavior

Modify Default Spanning Tree Behavior

Topology

Objective

  • observe what happens when the default spanning tree behavior is modified.

Background

Four switches have just been installed. The distribution layer switches are Catalyst 3560s, and the access layer switches are Catalyst 2960s. There are redundant uplinks between the access layer and distribution layer. Because of the possibility of bridging loops, spanning tree logically removes any redundant links. In this lab, you will see what happens when the default spanning tree behavior is modified.

Step 1: Prepare the switches for the lab.

  1. Delete vlan.dat file, erase the startup config, and reload the switches.
  2. Give each switch a hostname according to the topology diagram.
  3. Configure ports f0/7 through f0/12 on all switches to be trunks. On the 3560, first set the trunk encapsulation to dot1q. On the 2960s, only dot1q is supported, therefore the switchport trunk encapsulation command is unavailable, but the mode stll needs to be changed to trunk. If you do not set the mode of the ports to trunk, they will negotiate the operational mode according to their default DTP settings.
All Switches:
interface range f0/7-12
switchport trunk encapsulation dot1q
switchport mode trunk

Step 2: Display default spanning tree information for all switches.

IOU1#show spanning-tree 

VLAN0001
  Spanning tree enabled protocol ieee
  Root ID    Priority    32769
             Address     aabb.cc00.0100
             Cost        100
             Port        1 (Ethernet0/0)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32769  (priority 32768 sys-id-ext 1)
             Address     aabb.cc00.0500
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  300 sec

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Et0/0               Root FWD 100       128.1    Shr
Et0/1               Altn BLK 100       128.2    Shr
Et0/2               Altn BLK 100       128.3    Shr
Et0/3               Altn BLK 100       128.4    Shr
Et1/0               Altn BLK 100       128.5    Shr
Et1/1               Altn BLK 100       128.6    Shr
Et1/2               Desg FWD 100       128.7    Shr
Et1/3               Desg FWD 100       128.8    Shr
Et2/0               Desg FWD 100       128.9    Shr
Et2/1               Desg FWD 100       128.10   Shr
Et2/2               Desg FWD 100       128.11   Shr
Et2/3               Desg FWD 100       128.12   Shr
Et3/0               Desg FWD 100       128.13   Shr
Et3/1               Desg FWD 100       128.14   Shr
Et3/2               Desg FWD 100       128.15   Shr
Et3/3               Desg FWD 100       128.16   Shr 
IOU2(config-if-range)#do show spanning-tree

VLAN0001
  Spanning tree enabled protocol ieee
  Root ID    Priority    32769
             Address     aabb.cc00.0100
             This bridge is the root
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32769  (priority 32768 sys-id-ext 1)
             Address     aabb.cc00.0100
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  300 sec

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Et0/0               Desg FWD 100       128.1    Shr
Et0/1               Desg FWD 100       128.2    Shr
Et0/2               Desg FWD 100       128.3    Shr
Et0/3               Desg FWD 100       128.4    Shr
Et1/0               Desg FWD 100       128.5    Shr
Et1/1               Desg FWD 100       128.6    Shr
Et1/2               Desg FWD 100       128.7    Shr
Et1/3               Desg FWD 100       128.8    Shr
Et2/0               Desg FWD 100       128.9    Shr
Et2/1               Desg FWD 100       128.10   Shr
Et2/2               Desg FWD 100       128.11   Shr
Et2/3               Desg FWD 100       128.12   Shr
Et3/0               Desg FWD 100       128.13   Shr
Et3/1               Desg FWD 100       128.14   Shr
Et3/2               Desg FWD 100       128.15   Shr
Et3/3               Desg FWD 100       128.16   Shr 
IOU3(config-if-range)#do show spanning-tree

VLAN0001
  Spanning tree enabled protocol ieee
  Root ID    Priority    32769
             Address     aabb.cc00.0100
             Cost        100
             Port        11 (Ethernet2/2)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32769  (priority 32768 sys-id-ext 1)
             Address     aabb.cc00.0400
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  300 sec

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Et0/0               Altn BLK 100       128.1    Shr
Et0/1               Altn BLK 100       128.2    Shr
Et0/2               Desg FWD 100       128.3    Shr
Et0/3               Desg FWD 100       128.4    Shr
Et1/0               Desg FWD 100       128.5    Shr
Et1/1               Desg FWD 100       128.6    Shr
Et1/2               Desg FWD 100       128.7    Shr
Et1/3               Desg FWD 100       128.8    Shr
Et2/0               Desg FWD 100       128.9    Shr
Et2/1               Desg FWD 100       128.10   Shr
Et2/2               Root FWD 100       128.11   Shr
Et2/3               Altn BLK 100       128.12   Shr
Et3/0               Desg FWD 100       128.13   Shr
Et3/1               Desg FWD 100       128.14   Shr
Et3/2               Desg FWD 100       128.15   Shr
Et3/3               Desg FWD 100       128.16   Shr
IOU4(config-if-range)#do show spanning-tree

VLAN0001
  Spanning tree enabled protocol ieee
  Root ID    Priority    32769
             Address     aabb.cc00.0100
             Cost        100
             Port        9 (Ethernet2/0)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32769  (priority 32768 sys-id-ext 1)
             Address     aabb.cc00.0200
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  300 sec

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Et0/0               Desg FWD 100       128.1    Shr
Et0/1               Desg FWD 100       128.2    Shr
Et0/2               Desg FWD 100       128.3    Shr
Et0/3               Desg FWD 100       128.4    Shr
Et1/0               Desg FWD 100       128.5    Shr
Et1/1               Desg FWD 100       128.6    Shr
Et1/2               Desg FWD 100       128.7    Shr
Et1/3               Desg FWD 100       128.8    Shr
Et2/0               Root FWD 100       128.9    Shr
Et2/1               Altn BLK 100       128.10   Shr
Et2/2               Desg FWD 100       128.11   Shr
Et2/3               Desg FWD 100       128.12   Shr
Et3/0               Desg FWD 100       128.13   Shr
Et3/1               Desg FWD 100       128.14   Shr
Et3/2               Desg FWD 100       128.15   Shr
Et3/3               Desg FWD 100       128.16   Shr 

Are BPDUs propagated without trunk links?

Step 3: Configure specific switches to be primary and secondary root.

you cna use the debug spanning-tree events command to monitor topology changes.

To change the spanning-tree root status, use the global configuration commands spanning-tree vlan vlan_number root primary and spanning-tree vlan vlan_number root secondary.

a. Issue the debug commond on DLS2.

b. Change DLS1 to be the primary root switch.

DLS1(config)#spanning-tree vlan 1 root primary

c. Change ALS1 to the secondary root.

ALS(config)#spanning-tree vlan 1 root secondary

Spanning Tree event debugging is on
IOU2#
*Sep  3 17:12:43.429: STP: VLAN0001 heard root 24577-aabb.cc00.0400 on Et2/0
*Sep  3 17:12:43.429:     supersedes 32769-aabb.cc00.0100
*Sep  3 17:12:43.429: STP: VLAN0001 new root is 24577, aabb.cc00.0400 on port Et2/0, cost 200
*Sep  3 17:12:43.436: STP: VLAN0001 sent Topology Change Notice on Et2/0
*Sep  3 17:12:43.436: STP[1]: Generating TC trap for port Ethernet2/1
*Sep  3 17:12:43.436: STP: VLAN0001 Et2/1 -> blocking
*Sep  3 17:12:43.436: STP: VLAN0001 new root port Et2/3, cost 100
*Sep  3 17:12:43.436: STP: VLAN0001 Et2/1 -> listening
*Sep  3 17:12:43.438: STP: VLAN0001 new root port Et2/2, cost 100
*Sep  3 17:12:43.438: STP[1]: Generating TC trap for port Ethernet2/3
IOU2#
*Sep  3 17:12:43.438: STP: VLAN0001 Et2/3 -> blocking
IOU2#
*Sep  3 17:12:45.446: STP: VLAN0001 sent Topology Change Notice on Et2/2
IOU2#
*Sep  3 17:12:58.445: STP: VLAN0001 Et2/1 -> learning
IOU2#
*Sep  3 17:13:13.452: STP[1]: Generating TC trap for port Ethernet2/1
*Sep  3 17:13:13.453: STP: VLAN0001 sent Topology Change Notice on Et2/2
*Sep  3 17:13:13.453: STP: VLAN0001 Et2/1 -> forwarding
IOU2#
*Sep  3 17:14:21.602: STP: VLAN0001 heard root 20481-aabb.cc00.0500 on Et0/0
*Sep  3 17:14:21.602:     supersedes 24577-aabb.cc00.0400
*Sep  3 17:14:21.602: STP: VLAN0001 new root is 20481, aabb.cc00.0500 on port Et0/0, cost 100
*Sep  3 17:14:21.602: STP: VLAN0001 Et2/3 -> listening
*Sep  3 17:14:21.624: STP: VLAN0001 Et2/3 -> blocking
*Sep  3 17:14:21.624: STP: VLAN0001 sent Topology Change Notice on Et0/0
*Sep  3 17:14:21.625: STP[1]: Generating TC trap for port Ethernet2/2
*Sep  3 17:14:21.625: STP: VLAN0001 Et2/2 -> blocking
*Sep  3 17:14:21.625: STP[1]: Generating TC trap for port Ethernet0/1
*Sep  3 17:14:21.625: STP: VLAN0001 Et0/1 -> blocking
IOU2#
*Sep  3 17:14:44.638: STP: VLAN0001 Et2/3 -> listening
*Sep  3 17:14:44.638: STP: VLAN0001 Et2/2 -> listening
IOU2#
*Sep  3 17:14:51.758: STP: VLAN0001 Et2/3 -> blocking
*Sep  3 17:14:51.758: STP: VLAN0001 Et2/2 -> blocking
时间: 2024-10-11 18:08:58

Lab - Modify Default Spanning Tree Behavior的相关文章

Lab - Per-VLAN Spanning Tree Behavior

Per-VLAN Spanning Tree Behavior Topology Objectives: Observe the behavior of a separate spanning tree instance per VLAN. Change spanning tree mode to rapid spanning tree. Background: Four switches have just been installed. The distribution layer swit

Lab - Multiple Spanning Tree

Multiple Spanning Tree Topology Objective Obsrve te behavior of Multiple Spanning Tree(MST) Background Four switches have just been installed. The distribution Layer switches are Catalyst 3660s, and the access layer switches are Catalyst 2960. There

Project 2 - Spanning Tree Protocol

Project 2 - Spanning Tree ProtocolIn the lectures, you learned about Spanning Trees, which can be used to prevent forwardingloops on a layer 2 network. In this project, you will develop a simplified distributed version ofthe Spanning Tree Protocol th

HDU 4896 Minimal Spanning Tree(矩阵快速幂)

题意: 给你一幅这样子生成的图,求最小生成树的边权和. 思路:对于i >= 6的点连回去的5条边,打表知907^53 mod 2333333 = 1,所以x的循环节长度为54,所以9个点为一个循环,接下来的9个点连回去的边都是一样的.预处理出5个点的所有连通状态,总共只有52种,然后对于新增加一个点和前面点的连边状态可以处理出所有状态的转移.然后转移矩阵可以处理出来了,快速幂一下就可以了,对于普通的矩阵乘法是sigma( a(i, k) * b(k, j) ) (1<=k<=N), 现在

【HDU 4408】Minimum Spanning Tree(最小生成树计数)

Problem Description XXX is very interested in algorithm. After learning the Prim algorithm and Kruskal algorithm of minimum spanning tree, XXX finds that there might be multiple solutions. Given an undirected weighted graph with n (1<=n<=100) vertex

BNUOJ 26229 Red/Blue Spanning Tree

Red/Blue Spanning Tree Time Limit: 2000ms Memory Limit: 131072KB This problem will be judged on HDU. Original ID: 426364-bit integer IO format: %I64d      Java class name: Main Given an undirected, unweighted, connected graph, where each edge is colo

HDOJ 题目4408 Minimum Spanning Tree(Kruskal+Matrix_Tree)

Minimum Spanning Tree Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1408    Accepted Submission(s): 450 Problem Description XXX is very interested in algorithm. After learning the Prim algori

第四届华中区程序设计邀请赛暨武汉大学第十三届校赛 网络预选赛 Problem 1566 - C - Spanning Tree

Description You are given a graph with N nodes and M edges. Then every time you are required to add an additional edge with weight Wi connecting the node Ai and Bi in the graph, and then calculate the sum of the edges' weight of the Minimum Spanning

Geeks : Kruskal’s Minimum Spanning Tree Algorithm 最小生成树

寻找图中最小连通的路径,图如下: 算法步骤: 1. Sort all the edges in non-decreasing order of their weight. 2. Pick the smallest edge. Check if it forms a cycle with the spanning tree formed so far. If cycle is not formed, include this edge. Else, discard it. 3. Repeat st