meta data for this page
  •  

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
network:switches:cisco:cli:stp [2024/08/19 12:43] – removed - external edit (Unknown date) 127.0.0.1network:switches:cisco:cli:stp [2024/08/19 14:19] (current) niziak
Line 1: Line 1:
 +====== STP / RSTP ======
  
 +===== getting info =====
 +
 +<code>
 +show spanning-tree
 +show spanning-tree bridge
 +show spanning-tree detail
 +show spanning-tree vlan 28
 +</code>
 +
 +===== RSTP =====
 +
 +<code>
 +show spanning-tree summary
 +enable
 +config
 +spanning-tree mode ?
 +spanning-tree mode rapid-pvst
 +
 +spanning-tree vlan 1 priority 57344
 +spanning-tree vlan 2 priority 57344
 +spanning-tree vlan 28 priority 57344
 +spanning-tree vlan 255 priority 57344
 +end
 +show spanning-tree bridge
 +wr
 +</code>
 +
 +Disable STP:
 +
 +<code>
 +enable
 +config terminal
 +Switch(config)#no spanning-tree vlan 1-2,28,36,255
 +wr
 +copy run star
 +</code>
 +
 +Enable STP trunk on one port:
 +<code>
 +interface GigabitEthernet1/1
 +no switchport nonegotiate
 +switchport mode dynamic auto
 +end
 +</code>
 +
 +===== Inconsistent port type =====
 +
 +Port ''Gi0/48'' is an uplink to another switch:
 +
 +<code>
 +.Aug 19 10:12:00.074: %SPANTREE-7-RECV_1Q_NON_TRUNK: Received 802.1Q BPDU on non trunk GigabitEthernet0/48 VLAN1.
 +.Aug 19 10:12:00.074: %SPANTREE-7-BLOCK_PORT_TYPE: Blocking GigabitEthernet0/48 on VLAN0001. Inconsistent port type.
 +.Aug 19 10:12:18.395: %SPANTREE-2-UNBLOCK_CONSIST_PORT: Unblocking GigabitEthernet0/48 on VLAN0001. Port consistency restored.
 +</code>
 +
 +Setup uplink port as ''trunk''
 +<code>
 +enable
 +conf term
 +interface Gi0/48
 +spanning-tree portfast trunk
 +switchport mode trunk
 +</code>
 +
 +Setup all end-user ports ''0-47'' as:
 +<code>
 +enable
 +conf term
 +interface range Gi0/1-47
 +no switchport mode trunk
 +spanning-tree portfast
 +# optional
 +# don't expect bpdu packets - but it can create loops in LAN!
 +spanning-tree bpdufilter enable
 +spanning-tree bpduguard disable
 +</code>