User Tools

Site Tools


icnd2:spanning-tree

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
icnd2:spanning-tree [2024/04/24 17:13]
114.119.141.71 old revision restored (2018/01/13 10:48)
icnd2:spanning-tree [2024/05/15 02:53] (current)
114.119.138.183 old revision restored (2024/02/13 19:32)
Line 1: Line 1:
 =====WHY===== =====WHY=====
-Frame Loop Prevention Mechanism. Achieved by blocking all but one ROOT port to a ROOT switch. Redundant links are then blocked to create a loop-free environment.+Frame Loop Prevention Mechanism. Achieved by blocking all but one **''ROOT''** port to a **''ROOT''** switch. Redundant links are then blocked to create a loop-free environment.
  
 =====CONCEPT===== =====CONCEPT=====
-  * It does this with Each Switch broadcasting a BPDU, made up of that SW's Priority + MAC. Default Priority is 32768. The SW with the lowest BPDU (superior) is elected the ROOT BRIDGE.  +  * It does this with Each Switch broadcasting a **''HELLO BPDU''**, made up of that SW'**''Priority + MAC''**. Default Priority is 32768. The SW with the **''lowest BPDU''** (superior) is elected the ROOT BRIDGE.  
-  * Each SW will then determine a ROOT PORT, one per SW. A DESIGNATED port is then elected on each segment. There can only be one DESIGNATED port per SEGMENT/LINK.  +  * Each SW will then determine a **''ROOT PORT''**, one per SW. A **''DESIGNATED''** port is then elected on each segment.  
-  * Any port that is not DESIGNATED or a ROOT port, is then set to a BLOCKING state.+  * There can only be **one DESIGNATED port per SEGMENT/LINK. ** 
 +  * Any port that is **not** **''DESIGNATED''** or a **''ROOT''** port, is then set to a **''BLOCKING''** state. 
 +Note that once a ROOT Bridge is elected, all other bridges will only forward HELLO BPDU's **originating** from the **''ROOT BRIDGE''**. The Root cost is incremented as the **''HELLO BPDU''** is **received (COST=$COST+$PORT_COST)**. The Root Cost starts off @ 0 from the **''ROOT''**. Each subsequent Bridge tacks on it's **COST TO THE ROOT BRIDGE** as it is **received**. 
  
 ==TO DETERMINE A DESIGNATED PORT:== ==TO DETERMINE A DESIGNATED PORT:==
Line 13: Line 16:
  
 =====COMMANDS:===== =====COMMANDS:=====
-==Quickly setting a PRIMARY and SECONDARY ROOT:==+====Quickly setting a PRIMARY and SECONDARY ROOT:====
 <code>SW1(config)#spanning-tree vlan 1 root primary  <code>SW1(config)#spanning-tree vlan 1 root primary 
 SW1(config)#spanning-tree vlan 1 root secondary</code> SW1(config)#spanning-tree vlan 1 root secondary</code>
-==Manually set Bridge Priority for Root Election:==+ 
 +====Manually set Bridge Priority for Root Election:====
 <code>SW2(config)#spanning-tree vlan 1 priority ? <code>SW2(config)#spanning-tree vlan 1 priority ?
   <0-61440>  bridge priority in increments of 4096   <0-61440>  bridge priority in increments of 4096
Line 25: Line 29:
 Vlan                         Bridge ID              Time  Age  Dly  Protocol Vlan                         Bridge ID              Time  Age  Dly  Protocol
 ---------------- --------------------------------- -----  ---  ---  -------- ---------------- --------------------------------- -----  ---  ---  --------
-VLAN0001         4097(4096,      1) 0019.e86a.2280    2    20   15  ieee +VLAN0001         4097(4096,      1) 0019.e86a.2280    2    20   15  ieee      <-- LOWER PRIORITY = ROOT BRIDGE! 
-VLAN0002         32770(32768,    2) 0019.e86a.2280    2    20   15  ieee +VLAN0002         32770(32768,    2) 0019.e86a.2280    2    20   15  ieee</code> 
-   + 
-  </code>+====Manually Define Port Cost for Root Port Election:==== 
 +<code>SW2(config)#int fa0/1 
 +SW2(config-if)#spanning-tree vlan 2 cost 1 
 +SW2(config-if)# 
 + 
 +SW2(config-if)#do sh spann int fa0/1
  
 +Vlan                Role Sts Cost      Prio.Nbr Type
 +------------------- ---- --- --------- -------- --------------------------------
 +VLAN0001            Desg FWD 19        128.1    P2p
 +VLAN0002            Root FWD 1         128.1    P2p       <-- NOTICE THE COST! LOWER COST = ROOT PORT!</code>
icnd2/spanning-tree.1713978784.txt.gz · Last modified: 2024/04/24 17:13 by 114.119.141.71