10 December, 2013

Cisco CCNP Switch Chapter 8

# Root Bridge Configuration
* Configure one switch as a root bridge in a determined fashion.
* Configure another switch as a secondary root bridge, in case of primary root bridge failure.

ASw1(config)#spanning-tree extend system-id   (Priority + 12 bit VLAN ID)

# Manually setting the bridge priority value
ASw1(config)#spanning-tree vlan 10 priority  <0-61440

*Note: Bridge priority in increments of 4096 (Lower is prefered)
* If STP extended system ID is enabled, the default bridge-priority is 32,768 plus the VLAN number

# Primary and Secondary Configurations
ASw1(config)#spanning-tree vlan 10 root [ primary | secondary ]

#Change an interface's per VLAN spanning tree path cost
ASw1(config-if)#spanning-tree vlan 10 cost <1-200000000>
ASw1(config-if)#spanning-tree cost <1-200000000
   
*Note: If the vlan parameter is given, the port cost is modified only for the specified VLAN.

#Displaying STP Port Cost Values
ASw1#show spanning-tree interface fastEthernet 0/7 cost
VLAN0001            19
VLAN0006            19
VLAN0010            19
VLAN0100            19
VLAN0101            19

#Displaying STP Port Cost Values of the VLANs 
ASw1#show spanning-tree interface fastEthernet 0/7
Vlan                Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
VLAN0001            Root FWD 19        128.8    P2p
VLAN0006            Root FWD 19        128.8    P2p
VLAN0010            Root FWD 19        128.8    P2p
VLAN0100            Root FWD 19        128.8    P2p
VLAN0101            Root FWD 19        128.8    P2p

#Configuring STP Port Priority
ASw1(config-if)#spanning-tree port-priority <0-240>  (By Default is 128)

*Note: port priority in increments of 16
Ej:
ASw1(config-if)#spanning-tree vlan 10,101 port-priority 64

#Modifying STP Timers

#Number of seconds between generation of config BPDUs
ASw1(config)#spanning-tree vlan 10 hello-time <1-10>

#Maximum number of seconds the information in a BPDU is valid
ASw1(config)#spanning-tree vlan 10 max-age <6-40>

#Number of seconds for the forward delay timer    
ASw1(config)#spanning-tree vlan 10 forward-time <4-30>

#Redundant Link Convergence
* PortFast - Enables fast connectivity to be  established on access-layer switch ports to workstations that are booting.
* UplinkFast - Enables fast-uplink failover on an access-layer switch when dual up-links are connected into the distribution layer.
* BackboneFast - Enables fast convergence in the network backbone or core layer switches after a spanning-tree topology change occurs.

#PortFast
*Note:
*Port Fast Shortens the Listening and Learning states
*When a workstation link comes up, the switch imedietly moves the PortFast port into Forwarding state. Spanning-Tree loop detection
is still in operation, however, and the port moves into Blocking state if a loop is ever detected on the port.
* By default PortFast is disabled on all switch ports.

# Configure PortFast By Default
ASw1(config)#spanning-tree portfast default

# configure PortFast on specific switch port
ASw1(config-if)#spanning-tree portfast

*Note: One other benefits of PortFast is that Topology Change Notification (TCN) 

#UplinkFast
* If the primary uplink went down, up to 50 seconds could elapse before the redundant uplink could be used.
* With UplinkFast feature, when the primary root port uplink fails, another blocked uplink immediately can be brought up for use.

ASw1(config)#spanning-tree uplinkfast
ASw1(config)#spanning-tree uplinkfast max-update-rate <0-65535>

*Note: 
*The command is not allowed on the root bridge Switch 
*Range 0 to 65,535 pps (Packets Per Second)

ASw1#show spanning-tree uplinkfast
UplinkFast is enabled
Station update rate set to 150 packets/sec.
UplinkFast statistics
-----------------------
Number of transitions via uplinkFast (all VLANs)            : 2
Number of proxy multicast addresses transmitted (all VLANs) : 0
Name                 Interface List
-------------------- ------------------------------------
VLAN1                Fa1/14(fwd), Fa1/15

#BackboneFast 
* BackboneFast is simple to configure and operates by short-circuiting the Max-Age timerwhen needed.
* BackboneFast shortens the time a switch waits to detect a root path failure, ports still must go through full-length
 Forward Delay timer intervals during the Listening and Learning states. 

ASw1(config)#spanning-tree backbonefast

ASw1#show spanning-tree backbonefast
BackboneFast is enabled
BackboneFast statistics
-----------------------
Number of transition via backboneFast (all VLANs)           : 0
Number of inferior BPDUs received (all VLANs)               : 0
Number of RLQ request PDUs received (all VLANs)             : 0
Number of RLQ response PDUs received (all VLANs)            : 0
Number of RLQ request PDUs sent (all VLANs)                 : 0
Number of RLQ response PDUs sent (all VLANs)                : 0

*Note: RLQ (Root Link Query)

ASw1#show spanning-tree brief
VLAN1
  Spanning tree enabled protocol ieee
  Root ID    Priority    32768
             Address     c200.11dc.0000
             This bridge is the root
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
  Bridge ID  Priority    32768
             Address     c200.11dc.0000
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time 300
Interface                                   Designated
Name                 Port ID Prio Cost  Sts Cost  Bridge ID            Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet1/14     128.55   128    19 FWD     0 32768 c200.11dc.0000 128.55
FastEthernet1/15     128.56   128    19 FWD     0 32768 c200.11dc.0000 128.56

#Verify STP
DSw1#show spanning-tree vlan 10
VLAN0010
  Spanning tree enabled protocol ieee
  Root ID    Priority    10
             Address     001d.45a8.4080
             This bridge is the root
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
  Bridge ID  Priority    10     (priority 0 sys-id-ext 10)
             Address     001d.45a8.4080
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time 300
Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/1            Desg FWD 19        128.3    P2p
Fa0/2            Desg FWD 19        128.4    P2p
Fa0/3            Desg FWD 19        128.5    P2p
Fa0/4            Desg FWD 19        128.6    P2p
Fa0/24           Desg FWD 19        128.26   P2p

DSw1#show spanning-tree vlan 102
VLAN0102
  Spanning tree enabled protocol ieee
  Root ID    Priority    102
             Address     001d.a209.9980
             Cost        19
             Port        26 (FastEthernet0/24)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
  Bridge ID  Priority    4198   (priority 4096 sys-id-ext 102)
             Address     001d.45a8.4080
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time 300
Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/1            Desg FWD 19        128.3    P2p
Fa0/2            Desg FWD 19        128.4    P2p
Fa0/3            Desg FWD 19        128.5    P2p
Fa0/4            Desg FWD 19        128.6    P2p
Fa0/24           Root FWD 19        128.26   P2p

ASw1#show spanning-tree vlan 501
VLAN0501
  Spanning tree enabled protocol ieee
  Root ID    Priority    33269
             Address     000c.853e.cf00
             Cost        38
             Port        8 (FastEthernet0/7)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
  Bridge ID  Priority    33269  (priority 32768 sys-id-ext 501)
             Address     001e.4977.3c00
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time 300
Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Fa0/7               Root FWD 19        128.8    P2p
Fa0/8               Altn BLK 19        128.9    P2p