No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

AR500, AR510, and AR530 V200R007 CLI-based Configuration Guide - Ethernet Switching

This document describes the configuration of Ethernet services, including configuring transparent bridge, MAC table, link aggregation, VLANs, STP/RSTP/MSTP, and so on.The document provides the configuration procedures and configuration examples to illustrate the service configuration methods and application scenario.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Basic Concepts

Basic Concepts

Root Bridge

A tree topology must have a root. As defined in STP, the device that functions as the root of a tree network is called the root bridge.

There is only one root bridge on the entire STP network. The root bridge is the logical center of but is not necessarily at the physical center of the network. The root bridge changes dynamically with the network topology.

After network convergence completes, the root bridge generates and sends configuration BPDUs to other devices at specific intervals. Other devices process and forward the configuration BPDU to communicate the topology changes to downstream devices.

Metrics for Spanning Tree Calculation

A spanning tree is calculated based on the following metrics: bridge ID (BID), port ID (PID), and path cost.

  • BID and PID

    According to IEEE 802.1D, a BID is composed of a bridge priority (leftmost 16 bits) and a bridge MAC address (rightmost 48 bits).

    On an STP network, the device with the smallest BID is elected as the root bridge.

    IDs are classified into bridge ID (BID) and port ID (PID).

    A PID is composed of a port priority (leftmost 4 bits) and a port number (rightmost 12 bits).

    The PID is used to select the designated port.

    NOTE:

    The port priority affects the role of a port in a specified spanning tree instance. For details, see STP Topology Calculation.

  • Path cost

    The path cost is a port variable used for link selection. STP calculates path costs to select robust links and blocks redundant links, and finally trims the network into a loop-free tree topology.

    On an STP network, a port's path cost to the root bridge is the sum of the path costs of out ports between the port and the root bridge. This path cost is the root path cost.

Root Bridge, Root Port, and Designated Port

Three elements are involved in pruning a ring network into a tree network: root bridge, root port, and designated port. Figure 11-2 shows the three elements in the STP network architecture.

Figure 11-2  STP network architecture

  • Root bridge

    The root bridge is the bridge with the smallest BID. The smallest BID is discovered by exchanging configuration BPDUs.

  • Root port

    The root port on an STP device is the port with the smallest path cost to the root bridge and is responsible for forwarding data to the root bridge. An STP device has only one root port, and there is no root port on the root bridge.

  • Designated port

    Table 11-2 explains the designated bridge and designated port.

    Table 11-2  Designated bridge and designated port

    Reference Object

    Designated Bridge

    Designated Port

    Device

    A directly connected device that forwards configuration BPDUs to the device

    The designated bridge's port that forwards configuration BPDUs to the device

    LAN

    A device that forwards configuration BPDUs to the LAN

    The designated bridge's port that forwards configuration BPDUs to the LAN

    As shown in Figure 11-3, AP1 and AP2 are ports of S1; BP1 and BP2 are ports of S2; CP1 and CP2 are ports of S3.

    • S1 sends configuration BPDUs to S2 through AP1, so S1 is the designated bridge for S2, and AP1 is the designated port on S1.

    • S2 and S3 are connected to the LAN. If S2 forwards configuration BPDUs to the LAN, S2 is the designated bridge for the LAN, and BP2 is the designated port on S2.

    Figure 11-3  Designated bridge and designated port

After the root bridge, root ports, and designated ports are selected successfully, a tree topology is set up on the entire network. When the topology is stable, only the root port and designated ports forward traffic. The other ports are in the Blocking state; they only receive STP BPDUs and do not forward user traffic.

Comparison Principles

During role election, STP devices compare four fields, which form a BPDU priority vector {root ID, root path cost, sender BID, PID}.

Table 11-3 describes the four fields carried in a configuration BPDU.

Table 11-3  Four fields

Field

Description

Root ID

ID of the root bridge. Each STP network has only one root bridge.

Root path cost

Path cost to the root bridge. It is determined by the distance between the port sending the configuration BPDU and the root bridge.

Sender BID

BID of the device that sends the configuration BPDU.

PID

PID of the port that sends the configuration BPDU.

After a device on the STP network receives a configuration BPDU, it compares the fields listed in Table 11-3 with its own values. The four comparison principles are as follows:

  • Smallest BID: used to select the root bridge. Devices on an STP network select the device with the smallest BID based on the root ID field in Table 11-3.
  • Smallest root path cost: used to select the root port on a non-root bridge. On the root bridge, the path cost of each port is 0.
  • Smallest sender BID: used to select the root port among ports with the same root path cost. The port with the smallest BID is selected as the root port in STP calculation. For example, S2 has a smaller BID than S3 in Figure 11-2. If the BPDUs received on port A and port B of S4 contain the same root path cost, port B becomes the root port on S4 because the BPDU received on port B has a smaller sender BID.
  • Smallest PID: used to determine which port should be blocked when multiple ports have the same root path cost. The port with the greatest PID is blocked. The PIDs are compared in the scenario shown in Figure 11-4. The BPDUs received on port A and port B of S1 contain the same root path cost and sender BID. Port A has a smaller PID than port B. Therefore, port B is blocked to prevent loops.
    Figure 11-4  Scenario where PIDs need to be compared

Port States

Table 11-4 describes the possible states of ports on an STP device.

Table 11-4  STP port states

Port State

Purpose

Description

Forwarding

A port in Forwarding state can forward user traffic and process BPDUs.

Only the root port and designated port can enter the Forwarding state.

Learning

When a port is in Learning state, the device creates MAC address entries based on user traffic received on the port but does not forward user traffic through the port.

This is a transitional state, which is designed to prevent temporary loops.

Listening

All ports are in Listening state before the root bridge, root port, and designated port are selected.

This is a transitional state.

Blocking

A port in Blocking state receives and forwards only BPDUs, and does not forward user traffic.

This is the final state of a blocked port.

Disabled

A port in Disabled state does not process BPDUs or forward user traffic.

The port is Down.

Figure 11-5 shows the state transitions of a port.

Figure 11-5  STP state transitions of a port

NOTE:

By default, a Huawei network device uses the MSTP mode. After a device transitions from the MSTP mode to the STP mode, its STP ports support only those states defined in MSTP, which are Forwarding, Learning, and Discarding. Table 11-5 describes the three port states.

Table 11-5  MSTP port states

Port State

Description

Forwarding

A port in Forwarding state can forward user traffic and process BPDUs.

Learning

This is a transitional state. When a port is in Learning state, it can send and receive BPDUs, but does not forward user traffic. The device creates MAC address entries based on user traffic received on the port but does not forward user traffic through the port.

Discarding

A port in the Discarding state can only receive BPDUs.

The following parameters affect the STP port states and convergence.

  • Hello Time

    The Hello Time specifies the interval at which an STP device sends configuration BPDUs to detect link failures.

    When the Hello Time is changed, the new value takes effect only after a new root bridge is elected. The new root bridge adds the new Hello Time value in BPDUs it sends to non-root bridges. When the network topology changes, TCN BPDUs are transmitted immediately, independent of the Hello Time.

  • Forward Delay

    The Forward Delay timer specifies the length of delay before a port state transition. When a link fails, STP calculation is triggered and the spanning tree structure changes. However, new configuration BPDUs cannot be immediately spread over the entire network. If the new root port and designated port forward data immediately, transient loops may occur. Therefore, STP defines a port state transition delay mechanism. The newly selected root port and designated port must wait for two Forward Delay intervals before transitioning to the Forwarding state. Within this period, the new configuration BPDUs can be transmitted over the network, preventing transient loops.

    The default Forward Delay timer value is 15 seconds. This means that the port stays in the Listening state for 15 seconds and then stays in the Learning state for another 15 seconds before transitioning to the Forwarding state. The port does not forward user traffic when it is in the Listening or Learning state, which is key to preventing transient loops.

  • Max Age

    The Max Age specifies the aging time of BPDUs. This parameter is configurable on the root bridge.

    The Max Age is spread to the entire network with configuration BPDUs. After a non-root bridge receives a configuration BPDU, it compares the Message Age value with the Max Age value in the received configuration BPDU.
    • If the Message Age value is smaller than or equal to the Max Age value, the non-root bridge forwards the configuration BPDU.
    • If the Message Age value is larger than the Max Age value, the non-root bridge discards the configuration BPDU. When this happens, the network size is considered too large and the non-root bridge disconnects from the root bridge.

    If the configuration BPDU is sent from the root bridge, the value of Message Age is 0. Otherwise, the value of Message Age is the total time spent to transmit the BPDU from the root bridge to the local bridge, including the transmission delay. In real world situations, the Message Age value of a configuration BPDU increases by 1 each time the configuration BPDU passes through a bridge.

Table 11-6 provides the timer values defined in IEEE 802.1D.

Table 11-6  Values of STP timer parameters

Parameter

Default Value

Value Range

Hello Time

200 centiseconds (2 seconds)

100-1000

Max Age

2000 centiseconds (20 seconds)

600-4000

Forward Delay

1500 centiseconds (15 seconds)

400-3000

Translation
Download
Updated: 2019-05-25

Document ID: EDOC1000097279

Views: 20093

Downloads: 64

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next