My Blog List

  • Majeshir Anupras Alankar - मराठी भाषा सौंदर्याने नटलेली आहे. तिला अनेक अलंकार प्राप्त आहेत. त्यापैकी अनुप्रास हा एक शब्दालंकार. एखाद्या वाक्यात किंवा कवितेच्या चरणामध्ये जेव्हा एका...
    3 years ago

Friday, October 29, 2010

Understanding Nexus -- Part 14 -- STP in Nexus

For most of the people, STP on Nexus is quite confusing. This post is just for them to elaborate the STP functions as well as to answer some of the frequently asked questions.

STP was implemented to provide a loop-free connectivity at Layer 2 network. Later it got updated to Rapid STP. And Cisco has it's own implementation standard which is known as Rapid PVST+, which is default on Nexus.

All other things like Election of Root Bridge and all are same as in IOS. So if you are familiar with it, you got the same mechanism in Nexus.

You can run either Rapid PVST+ or MST within each virtual device context or in switch (VDC - we will discuss it later). You cannot run both STP modes simultaneously in a VDC.

Both MST and Rapid PVST+ on Nexus are backward compatible with switches running PVST+.

MST interoperates with switches running PVST+ and Rapid PVST+ by leveraging PVST+ simulation. PVST simulation is enabled by default on Nexus systems running MST. The standard compliant MST can also interoperate with Cisco's pre-standard MSTP.

When pre-standard BPDUs are received, the Nexus system translates the BPDU contents to IEEE 802.1Q MSTP format for processing. As a result, the 2 MST regions will merge into one and no MST region boundary will be formed.

However, there are a few exceptions where a MST region boundary will be formed on links where switches with Cisco's pre-standard MSTP are connected.

Some differences exist in STP feature support between NX-OS and IOS. These differences include:
  • The NX-OS only support Rapid-PVST+ and MST.
  • PVST+, MISTP and VLAN bridge are not supported.
  • Since PVST+ is not supported, Backbonefast and uplinkfast are not supported
  • Each VDC will only support a single STP. However, different STP (Rapid PVST+ or MST) can be enabled on separate virtual device context (VDC).
  • Both NX-OS and Native IOS 12.2(33)H and later release support standard compliant MST. Prior to 12.2(33)H release, the software only support prestandard MST.
  • Introduction of Spanning-tree port types configuration which include edge (portfast), network (inter-switch) and normal. The introduction of port type edge change portfast related IOS commands However, the NX-OS will accept the command in IOS format and convert it to NX-OS format.
  • Dispute mechanism is enabled by default.
  • Bridge Assurance (BA) is enabled by default. The feature is operational only on ports configured as STP network type.
  • PVST simulation can be disabled to detect and avoid accidental connection to switches configured with Rapid-PVST and PVST+.
  • Nexus system does not recalculate STP cost after physical member ports were shut down.
Overview

Rapid PVST+ provides for rapid recovery of connectivity for edge ports, new root ports, and ports connected through point-to-point links as follows:

Edge ports — immediate transitions to the forwarding state. (same as previously known Cisco-proprietary feature named PortFast.)
Root port — If Rapid PVST+ selects a new root port, it blocks the old root port and immediately transitions the new root port to the forwarding state.
Point-to-point links — If you connect a port to another port through a point-to-point link and the local port becomes a designated port, it negotiates a rapid transition with the other port by using the proposal-agreement handshake to ensure a loop-free topology.

Rapid PVST+ achieves rapid transition to the forwarding state only on edge ports and point-to-point links.

Protocol Timers
Variable Description
Hello timer Determines how often each device broadcasts BPDUs to other network devices. The default is 2 seconds, and the range is from 1 to 10.
Forward delay timer Determines how long each of the listening and learning states last before the port begins forwarding. This timer is generally not used by the protocol, but it is used when interoperating with 802.1D spanning tree. The default is 15 seconds, and the range is from 4 to 30 seconds.
Maximum age timer Determines the mount of time protocol information received on a port is stored by the network device. This timer is generally not used by the protocol, but it is used when interoperating with 802.1D spanning tree. The default is 20 seconds; the range is from 6 to 40 seconds.

 

Port Roles

Rapid PVST+ provides rapid convergence by assigning port roles. Rapid PVST+ select the device with the highest switch priority (lowest numerical priority value) as the root bridge.

Root Port — Provides the best path (lowest cost) towards the root bridge.

Designated Port — Connects to the designated device that has the lowest path cost when forwarding packets from that LAN to the root bridge. The port through which the designated device is attached to the LAN is called the designated port.

Alternate port — Offers an alternate path toward the root bridge. An alternate port provides a path to another device in the topology.

Backup port — Acts as a backup for the path provided by a designated port toward the leaves of the spanning tree. A backup port can exist only when two ports are connected in a loopback by a point-to-point link or when a device has two or more connections to a shared LAN segment. A backup port provides another path in the topology to the device.

Disabled port — Has no role within the operation of the spanning tree.

 

 

 

 

Rapid PVST+ Port State
Each Layer 2 LAN port on the device that uses Rapid PVST+ or MST exists in one of the following four states:
Blocking—The Layer 2 LAN port does not participate in frame forwarding.
Learning—The Layer 2 LAN port prepares to participate in frame forwarding.
Forwarding—The Layer 2 LAN port forwards frames.
Disabled—The Layer 2 LAN port does not participate in STP and is not forwarding frames.


When the STP algorithm places a Layer 2 LAN port in the forwarding state, the following process occurs:
1. The port is put into blocking state while it waits for protocol information that suggests it should go to the learning state.
2. The port waits for the forward delay timer to expire, then moves to the learning state, and restarts the forward delay timer.
3. In the learning state, the port continues to block data frames, as it learns the mac address information of the end-stations for the forwarding database.
4. The port waits for the forward delay timer to expire and then moves to the forwarding state, where both learning and frame forwarding are enabled.

 

Blocking State
Does not forward any frames.
In blocking state Port performs as follows:

  1.  Discards frames received from the attached segment.
  2.  Discards frames switched from another port for forwarding.
  3.  Does not incorporate the end station location into its address database. (There is no learning on a blocking Layer 2 LAN port, so there is no address database update.)
  4.  Receives BPDUs and directs them to the system module.
  5.  Receives, processes, and transmits BPDUs received from the system module.
  6.  Receives and responds to control plane messages.


Learning State
A port in learning state prepares to participate in frame forwarding by learning the MAC addresses for the frames. The Layer 2 LAN port enters the learning state from the blocking state.
In learning state Port performs as follows:

  1.  Discards frames received from the attached segment.
  2.  Discards frames switched from another port for forwarding.
  3.  Incorporates the end station location into its address database.
  4.  Receives BPDUs and directs them to the system module.
  5.  Receives, processes, and transmits BPDUs received from the system module.
  6.  Receives and responds to control plane messages.


Forwarding State
A Layer 2 LAN port in the forwarding state starts forwarding data frames.
In the forwarding state Port performs as follows:

  1.  Forwards frames received from the attached segment.
  2.  Forwards frames switched from another port for forwarding.
  3.  Incorporates the end station location information into its address database.
  4.  Receives BPDUs and directs them to the system module.
  5.  Processes BPDUs received from the system module.
  6.  Receives and responds to control plane messages.


Disabled State
A Layer 2 LAN port in the disabled state does not participate in frame forwarding or STP. A Layer 2 LAN port in the disabled state is virtually nonoperational.
A disabled Layer 2 LAN port performs as follows:

  1.  Discards frames received from the attached segment.
  2.  Discards frames switched from another port for forwarding.
  3.  Does not incorporate the end station location into its address database. (There is no learning, so there is no address database update.)
  4.  Does not receive BPDUs from neighbors.
  5.  Does not receive BPDUs for transmission from the system module.


Port Cost

Rapid PVST+ uses the short (16-bit) path-cost method to calculate the cost by default. With the short path-cost method, you can assign any value in the range of 1 to 65535. However, you can configure the device to use the long (32-bit) path-cost method, which allows you to assign any value in the range of 1 to 200,000,000. You configure the path-cost calculation method globally.

 


Bandwidth

Short Path-Cost Method of Port Cost

Long Path-Cost Method of Port Cost

10 Mbps

100

2,000,000

100 Mbps

19

200,000

1 Gigabit Ethernet

4

20,000

10 Gigabit Ethernet

2

2,000


STP Config

n7000(config)# vlan 20,30 
      - Make sure you create the VLAN
n7000(config)# spanning-tree mode rapid-pvst
      - Rapid-PVST is the default
n7000(config)# spanning-tree vlan 20 root primary
      - Decrements Priority to 24,596 to increase the probability for it to become root
n7000(config)# spanning-tree vlan 30 root secondary
      - Decrements Priority to 28,672 to increase the probability for it to become the backup for the root


Spanning-Tree Port Types

STP supports three different port types Edge, Network & Normal.
The default port type is normal. An Edge port type can be configured, so an interface immediately forwards traffic (IOS “Portfast”) and the Network port type can be configured to enable Bridge Assurance on an interface.

n7000(config-if-range)# spanning-tree port type ?
 edge     Consider the interface as edge port (enable portfast)
 network  Consider the interface as inter-switch link
 normal   Consider the interface as normal spanning tree port

Only configure ports that connect to a single end station as edge ports.

No comments:

Post a Comment