Wednesday, 28 December 2016

CCNP SWITCH ENHANCEMENT IN STP : PVST & RSTP PART FOUR

Enhancement in STP

Port fast, Uplink fast and Backbonefast

Port Fast :- Port fast is a feature which will make a  switchport comes directly in the Forwarding state instead  of waiting 50 sec and processing every state of  (Blocking,Listining,Learning) before coming in the
forwarding state. Recomended to enable on the Access ports  only.

sw(config)#spanning-tree portfast

 Uplink Fast :- suppose When a switch has two paths to reach  the root bridge then by default one of the uplink will be  disabled by the STP, and if the active uplink goes down  then the secondary link will take 60 sec to comes in the  active state and we cannot run portfast in this situation,  so to reduce this we use uplink fast. uplink fast  feature is enabled globally not on the port basis as  portfast

sw(config)# spanning-tree uplinkfast

 Backbone fast :- Backbone fast feature is used for indirect  link failures to the root bridge/switch. Backbone fast  feature uses the Root link query protocol to detect  indirect link failures. Backbone fast feature is enabled  globally and has to be enable on all the switches in the  network.

Backbone-fast applies when the switch receives an inferior BPDU. An inferior BPDU is a BPDU that is received by the secondary root switch telling that it is the actual root switch.

The secondary root switch denies that and sends the actual root switch path to the inferior switch.
sw(config)#spanning-tree backbonefast

Per-VLAN STP
STP doesn't guarantee an optimized loop-free network. PVST supports one instance of STP per VLAN.

Lab on PVST



do this on SW1, SW2 as in  SW0
SW0(config)#int range fa0/1 - 2
SW0(config-if-range)#switchport mode trunk
SW0(config)#vlan 10
SW0(config-vlan)#vlan 20

now on SW0 run these commands:


SW0(config)#spanning-tree vlan 10 root primary
SW0(config)#spanning-tree vlan 20 root secondary

now move to SW2 and fire following commands:

SW2(config)#spanning-tree vlan 10 root secondary
SW2(config)#spanning-tree vlan 20 root primary


check the output on SW0 & SW2
SW0#sh spanning-tree
VLAN0001
  Spanning tree enabled protocol ieee
  Root ID    Priority    32769
             Address     0050.0FBE.28E6
             Cost        19
             Port        2(FastEthernet0/2)
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32769  (priority 32768 sys-id-ext 1)
             Address     0060.3E0B.8459
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  20

Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/2            Root FWD 19        128.2    P2p
Fa0/1            Desg FWD 19        128.1    P2p

VLAN0010
  Spanning tree enabled protocol ieee
  Root ID    Priority    24586
             Address     0060.3E0B.8459
             This bridge is the root
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    24586  (priority 24576 sys-id-ext 10)
             Address     0060.3E0B.8459
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  20

Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/2            Desg FWD 19        128.2    P2p
Fa0/1            Desg FWD 19        128.1    P2p

VLAN0020
  Spanning tree enabled protocol ieee
  Root ID    Priority    24596
             Address     0050.0FBE.28E6
             Cost        19
             Port        2(FastEthernet0/2)
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    28692  (priority 28672 sys-id-ext 20)
             Address     0060.3E0B.8459
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  20

Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/2            Root FWD 19        128.2    P2p
Fa0/1            Desg FWD 19        128.1    P2p

Yep this is root for vlan 10


Now output at SW2
SW2#sh spanning-tree
VLAN0001
  Spanning tree enabled protocol ieee
  Root ID    Priority    32769
             Address     0050.0FBE.28E6
             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     0050.0FBE.28E6
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  20

Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/1            Desg FWD 19        128.1    P2p
Fa0/2            Desg FWD 19        128.2    P2p

VLAN0010
  Spanning tree enabled protocol ieee
  Root ID    Priority    24586
             Address     0060.3E0B.8459
             Cost        19
             Port        1(FastEthernet0/1)
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    28682  (priority 28672 sys-id-ext 10)
             Address     0050.0FBE.28E6
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  20

Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/1            Root FWD 19        128.1    P2p
Fa0/2            Desg FWD 19        128.2    P2p

VLAN0020
  Spanning tree enabled protocol ieee
  Root ID    Priority    24596
             Address     0050.0FBE.28E6
             This bridge is the root
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    24596  (priority 24576 sys-id-ext 20)
             Address     0050.0FBE.28E6
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  20

Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/1            Desg FWD 19        128.1    P2p
Fa0/2            Desg FWD 19        128.2    P2p


Yep this is root for vlan 20.

Rapid Spanning Tree Protocol


The 802.1d standard was designed back when waiting for 30 to 50 seconds for layer 2 convergence wasn’t a problem. However,  in today’s networks, this can cause serious performance problems for networks that use real-time applications, such as  voice over IP (VoIP) or video.

The Rapid Spanning Tree Protocol (RSTP) is an IEEE standard, defined in 802.1w, which is interoperable with 802.1d and an extension to it. With RSTP, there are only three port states:
discarding (it is basically the grouping of 802.1d’s blocking, listening, and disabled states).

Learning

Forwarding

Additional Port Roles
With RSTP, there is still a root switch and there are still root and designated ports, performing the same roles as those in 802.1d. However, RSTP adds two additional port types: alternate ports and backup ports.
These two ports are similar to the ports in a blocking state in 802.1d.
An alternate port is a port that has an alternative path or paths to the root but is currently in a discarding state.
backup port is a port on a segment that could be used to reach the root switch, but an active port is already designated for the segment.
The best way to look at this is that an alternate port is a secondary, unused root port, and a backup port is a secondary, unused designated port.

RSTP BPDUs
With 802.1w, if a BPDU is not received in three expected hello periods (6 seconds), STP information can be aged out instantly  and the switch considers that its neighbor is lost and actions should be taken. This is different from 802.1d, where the switch  had to miss the BPDUs from the root—here, if the switch misses three consecutive hellos from a neighbor, actions are immediately taken.


Lab on RSTP


on each & every switch enable rapid-pvst

SW0(config)#spanning-tree mode rapid-pvst 

then on switch SW1 & SW2 run 

SW1(config-if)#switchport mode access 
SW1(config-if)#spanning-tree portfast

and you can verify your configuration 

SW2#show spanning-tree 
VLAN0001
  Spanning tree enabled protocol rstp
  Root ID    Priority    32769
             Address     0001.C915.C4CA
             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     0001.C915.C4CA
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  20

Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/3            Desg FWD 19        128.3    P2p
Fa0/1            Desg FWD 19        128.1    P2p
Fa0/2            Desg FWD 19        128.2    P2p\


No comments:

Post a Comment