viernes, 9 de agosto de 2013

CCNA 640-802 Lab - Configure, verify, and troubleshoot RSTP operation

Exam: 640-802

Exam Objective: Configure, verify, and troubleshoot RSTP operation



Contents

  • Introduction
  • Technology Background
  • Lab Scenario
  • Lab Objectives
  • Lab Solution

Introduction

Loops on a layer 2 network can be very dangerous. Spanning Tree Protocol (STP) is used to make the layer 2 network loop free. There are two STP standards defined by IEEE - 802.1d (STP) and 802.1w (Rapid STP). As per IEEE standards, a switch can run one STP instance only. Cisco implements a changed to this by allowing one STP instance per VLAN. 802.1w on Cisco Switches is also known as Per VLAN Rapid Spanning Tree Protocol (PVRST).

Technology Background

STP works by identifying all the links in the network and then blocking all redundant links. To do this STP first elects a Root Bridge. Root bridge is the bridge with the best Bridge ID. Bridge ID is a combination of priority and the base MAC address of the switch. Priority is a configurable value between 0 to 61440 in increments of 4096. The default priority on Cisco switches is 32768. The lower the priority and MAC address the better.
The root bridge is the center of the network. All decisions are taken from the prespective of the root bridge. Switches send Bridge Protocol Data Unit (BPDU) out every port. The BPDUs contain amongst other information the BridgeID. By comparing the BridgeIDs the root bridge is selected.
Once the root bridge is elected the rest of the switches in the network (called Non-root Bridge) will select one port which is their lowest cost way to the Root bridge - This port is called the root port.. The cost is determined by the bandwidth. Then port cost is used to find the lowest cost port connecting a network segement to the switch - This port is called the designated port. Root ports, designated ports and all port on the root bridge are in Forwarding mode. Rest of the ports go into a blocked or alternate mode.
Ports in Forwarding mode will send and receive data and BPDUs. Blocked ports will not send or receive data but will receive BPDUs. Alternate ports are redundant root ports which can be used as soon as the root port goes down.
In Figure 1, if bridge priorities are left at default then, Switch1 will become the root bridge because of the lowest base MAC address. Switch2's root port will be fa0/2 due to lower path cost. Switch3's root port will be fa0/1. Switch2's fa0/1 and Switch3's fa0/2 ports will be the alternate ports.

 

Figure 1
If we need to get Switch2 elected as the root bridge then we will need to lower its priority.
If a host is connected to a host then STP can be disabled on that port by enabling Portfast mode on it. This will ensure that the port goes into forwarding as soon as it comes up.
By default IEEE 802.1d is enabled on most Cisco switches. It can be changed to RSTP with the following global configuration mode command:
spanning-tree mode rapid-pvst
The priority of a Switch can be changed for a VLAN to make it the root bridge of the VLAN using the following command:
spanning-tree vlan <vlan#> priority <priority>
The cost of port can also be modified by using the following interface command:
spanning-tree cost <cost>

To enable portfast on a port use the spanning-tree portfast command on the interface mode.
Spanning tree operation can be verified using the show spanning-tree vlan <vlan#> command

Lab Scenario

We have a network running 802.1D. We need to make the following changes in the network:
  • Use 802.1w instead of 802.1d
  • Make SwitchC the root bridge for VLAN 2
  • There will be a host connect to SwitchB on port fa0/10. Disable STP on this port.
The network is shown in Figure 2.


 

Figure 2

Lab Objectives

  • Enable Rapid PVSTP on all switches
  • Change the priority of SwitchC for VLAN 2
  • Enable Portfast on fa0/10 on SwitchB

Lab Solution

First STP mode needs to be changed on all switches:
SwitchA(config)#spanning-tree mode rapid-pvst
SwitchB(config)#spanning-tree mode rapid-pvst
SwitchC(config)#spanning-tree mode rapid-pvst
SwitchD(config)#spanning-tree mode rapid-pvst
To make SwitchC the root bridge let's change its priority to 4096
SwitchC(config)#spanning-tree vlan 2 priority 4096
Since the rest of the switches are at default priority (32768) SwitchC will become the root bridge for VLAN 2.
To disable STP on fa0/10 on SwitchB, we will need to enable Portfast on it:
SwitchB(config)#interface fa0/10
SwitchB(config-if)#spanning-tree portfast
Let's verify the spanning-tree operations on SwitchC and SwitchA:
SwitchC#show spanning-tree vlan 2
VLAN0002
  Spanning tree enabled protocol rstp
  Root ID    Priority    4098
             Address     0014.a93f.8380
             This bridge is the root
             Hello Time   2 sec Max Age 20 sec Forward Delay 15 sec
  Bridge ID Priority    4098   (priority 4096 sys-id-ext 2)
             Address     0014.a93f.8380
             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.17   P2p
Fa0/2              Desg FWD 19         128.20   P2p
SwitchA#show spanning-tree vlan 2
VLAN0002
  Spanning tree enabled protocol rstp
  Root ID    Priority    4098
             Address     0014.a93f.8380
             Cost        23
             Port        1 (FastEthernet0/1)
             Hello Time   2 sec Max Age 20 sec Forward Delay 15 sec
  Bridge ID Priority    32770 (priority 32768 sys-id-ext 2)
             Address     0013.c3e8.2500
             Hello Time   2 sec Max Age 20 sec Forward Delay 15 sec
             Aging Time 300
Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Fa0/1              Root FWD 19         128.15   P2p
Fa0/2              Altn BLK 100        128.19   P2p
Note in the output that SwitchC is the root bridge and SwitchA's fa0/1 is the root port since its cost is lower that fa0/2's cost.


References:
Catalyst 2950 and Catalyst 2955 Switch Software Configuration Guide - Configuring STP
http://www.cisco.com/en/US/docs/switches/lan/catalyst2950/software/release/12.1_22_ea5/configuration/guide/swstp.html

No hay comentarios.:

Publicar un comentario