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

S9300, S9300E, and S9300X V200R012C00 Configuration Guide - Ethernet Switching

This document describes the configuration of Ethernet services, including configuring MAC address table, link aggregation, VLANs, VLAN aggregation, MUX VLAN, VLAN termination, Voice VLAN, VLAN mapping, QinQ, GVRP, STP/RSTP/MSTP, VBST, SEP, RRPP, ERPS, LBDT, HVRP, and Layer 2 protocol transparent transmission.
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).
STP Topology Calculation

STP Topology Calculation

After STP is enabled on all devices on a network, all devices consider themselves the root bridge. All ports on the devices are in Listening state (they only transmit and receive BPDUs and do not forward user traffic). Then the devices select the root bridge, root ports, and designated ports based on configuration BPDUs.

BPDU Exchange

Figure 13-8 shows the initial information exchange process. The four parameters in a pair of brackets represent the root ID (S1_MAC and S2_MAC are BIDs of the two devices), root path cost, sender BID, and PID carried in configuration BPDUs. Configuration BPDUs are sent at Hello intervals.

Figure 13-8  Initial BPDU exchange

STP Algorithm Implementation

  1. Initialization

    Because each bridge considers itself the root bridge, the BPDU sent from a port is set as follows:

    The root ID is the BID of the local bridge, the root path cost is the accumulative path cost from the port to the local bridge, the sender BID is the BID of the local bridge, and the PID is the ID of the port that sends the BPDU.

  2. Root bridge election

    During network initialization, every device considers itself the root bridge and sets the root ID to its own BID. Then devices exchange configuration BPDUs and compare their root IDs to find the device with the smallest BID, which finally becomes the root bridge.

  3. Root port and designated port selection

    Table 13-7 describes the process of selecting the root port and designated port.

    Table 13-7  Selecting the root port and designated port
    Step Process
    1 A non-bridge device selects the port that receives the configuration BPDU with the highest priority as the root port. Table 13-8 describes the process of selecting the configuration BPDU with the highest priority.
    2 The device generates a configuration BPDU for each port and calculates the fields in the configuration BPDU based on the configuration BPDU on the root port and path cost of the root port. The details are as follows:
    • Replaces the root ID with the root ID in the configuration BPDU on the root port.
    • Replaces the root path cost with the accumulated root path cost in the configuration BPDU on the root port and the path cost of the root port.
    • Replaces the sender BID with the local BID.
    • Replaces the PID with the local port ID.
    3 The device selects the port state by comparing the calculated configuration BPDU with the configuration BPDU received on the port. The details are as follows:
    • If the calculated configuration BPDU is superior, the port is selected as the designated port and periodically sends the calculated configuration BPDU.
    • If the port's own configuration BPDU is superior, the configuration BPDU on the port is not updated and the port is blocked. Then the port only receives BPDUs, and does not forward data or send BPDUs.
    Table 13-8  Selecting the configuration BPDU with the highest priority
    Step Process
    1 Each port decides how to process the received configuration BPDU by comparing it with its own configuration BPDU. The details are as follows:
    • If the received configuration BPDU is inferior, the port discards the received configuration BPDU and retains its own configuration BPDU.
    • If the received configuration BPDU is superior, the port replaces its own configuration BPDU with the received one.
    • If the received configuration BPDU is the same, the port discards the received configuration BPDU.
    2 The device compares configuration BPDUs on all the ports and selects the one with the highest priority.

Example of STP Topology Calculation

After the root bridge, root ports, and designated ports are selected successfully, a tree topology is set up on the entire network. The following example illustrates how STP calculation is implemented.

Figure 13-9  STP networking and calculated topology

As shown in Figure 13-9, DeviceA, DeviceB, and DeviceC are deployed on the network, with priorities 0, 1, and 2, respectively. The path costs between DeviceA and DeviceB, DeviceA and DeviceC, and DeviceB and DeviceC are 5, 10, and 4, respectively.

Table 13-9  Initial state of each device
Device Port Configuration BPDU
DeviceA Port A1 {0, 0, 0, Port A1}
Port A2 {0, 0, 0, Port A2}
DeviceB Port B1 {1, 0, 1, Port B1}
Port B2 {1, 0, 1, Port B2}
DeviceC Port C1 {2, 0, 2, Port C1}
Port C2 {2, 0, 2, Port C2}
NOTE:
The fields that are compared in a configuration BPDU are {root ID, root path cost, sender BID, PID}.
Table 13-10  Topology calculation process and resulting configuration BPDU
Device Process Resulting Configuration BPDU
DeviceA
  • Port A1 receives the configuration BPDU {1, 0, 1, Port B1} from Port B1 and finds it inferior to its own configuration BPDU {0, 0, 0, Port A1}, so Port A1 discards the received configuration BPDU.
  • Port A2 receives the configuration BPDU {2, 0, 2, Port C1} from Port C1 and finds its own configuration BPDU {0, 0, 0, Port A2} with a higher priority, so Port A2 discards the received configuration BPDU.
  • DeviceA finds that the root bridge and designated bridge specified in the configuration BPDUs on its ports are both itself. Therefore, DeviceA considers itself as the root bridge and periodically sends configuration BPDUs from each port without modifying the BPDUs.
  • Port A1: {0, 0, 0, Port A1}
  • Port A2: {0, 0, 0, Port A2}
DeviceB
  • Port B1 receives the configuration BPDU {0, 0, 0, Port A1} from Port A1 and finds it superior to its own configuration BPDU {0, 0, 0, Port B1}, so Port B1 updates its configuration BPDU.
  • Port B2 receives the configuration BPDU {2, 0, 2, Port C2} from Port C2 and finds it inferior to its own configuration BPDU {1, 0, 1, Port B2}, so Port B2 discards the received configuration BPDU.
  • Port B1: {0, 0, 0, Port A1}
  • Port B2: {1, 0, 1, Port B2}
  • DeviceB compares the configuration BPDU on each port and finds that Port B1 has optimal configuration BPDU. DeviceB selects Port B1 as the root port and retains the configuration BPDU on Port B1.
  • DeviceB calculates the configuration BPDU {0, 5, 1, Port B2} for Port B2 based on the configuration BPDU and path cost of the root port, and compares the calculated configuration BPDU with the original configuration BPDU {1, 0, 1, Port B2} on Port B2. The calculated configuration BPDU is superior to the original one, so DeviceB selects Port B2 as the designated port, replaces Port B2's configuration BPDU with the calculated one, and periodically sends the configuration BPDU from Port B2.
  • Root port (Port B1): {0, 0, 0, Port A1}
  • Designated port (Port B2): {0, 5, 1, Port B2}
DeviceC
  • Port C1 receives the configuration BPDU {0, 0, 0, Port A2} from Port A2 and finds it superior to its own configuration BPDU {2, 0, 2, Port C1}, so Port C1 updates its configuration BPDU.
  • Port C2 receives the configuration BPDU {1, 0, 1, Port B2} from Port B2 and finds it superior to its own configuration BPDU {1, 0, 1, Port B2}, so Port C2 updates its configuration BPDU.
  • Port C1: {0, 0, 0, Port A2}
  • Port C2: {1, 0, 1, Port B2}
  • DeviceC compares the configuration BPDU on each port and finds that the configuration BPDU on Port C1 is optimal. DeviceC selects Port C1 as the root port and retains the configuration BPDU on Port C1.
  • DeviceC calculates the configuration BPDU {0, 10, 2, Port C2} for Port C2 based on the configuration BPDU and path cost of the root port, and compares the calculated configuration BPDU with the original configuration BPDU {1, 0, 1, Port B2} on Port C2. The calculated configuration BPDU is superior to the original one, so DeviceC selects Port C2 as the designated port and replaces its configuration BPDU with the calculated one.
  • Root port (Port C1): {0, 0, 0, Port A2}
  • Designated port (Port C2): {0, 10, 2, Port C2}
  • Port C2 receives the configuration BPDU {0, 5, 1, Port B2} from Port B2 and finds it superior to its own configuration BPDU {0, 10, 2, Port C2}, so Port C2 updates its configuration BPDU.
  • Port C1 receives the configuration BPDU {0, 0, 0, Port A2} from Port A2 and finds it the same as its own configuration BPDU, so Port C1 discards the received configuration BPDU.
  • Port C1: {0, 0, 0, Port A2}
  • Port C2: {0, 5, 1, Port B2}
  • The root path cost of Port C1 is 10 (root path cost 0 in the received configuration BPDU plus the link path cost 10), and the root path cost of Port C2 is 9 (root path cost 5 in the received configuration BPDU plus the link path cost 4). DeviceC finds that Port C2 has a smaller root path cost and therefore considers the configuration BPDU of Port C2 superior to that of Port C1. DeviceC then selects Port C2 as the root port and retains its configuration BPDU.
  • DeviceC calculates the configuration BPDU {0, 9, 2, Port C1} for Port C1 based on the configuration BPDU and path cost of the root port, and finds the calculated configuration BPDU inferior to the original configuration BPDU {0, 0, 0, Port A2} on Port C2. DeviceC blocks Port C1 and does not update its configuration BPDU. Port C1 no longer forwards data until STP recalculation is triggered, for example, when the link between DeviceB and DeviceC is Down.
  • Blocked port (Port C1): {0, 0, 0, Port A2}
  • Root port (Port C2): {0, 5, 1, Port B2}

After the topology becomes stable, the root bridge still sends configuration BPDUs at a specific interval. If the received configuration BPDU is superior, a non-root bridge replaces the configuration BPDU on the corresponding port with the received configuration BPDU. If the received configuration BPDU is inferior or the same, a non-root bridge discards the received configuration BPDU.

STP Topology Changes

Figure 13-10 shows the packet transmission process after an STP topology change.

Figure 13-10  Packet transmission after a topology change

The following is the process that takes place after a topology change occurs:

  1. When the status of the interface at point T changes, a downstream device continuously sends TCN BPDUs to the upstream device to inform the upstream device and root bridge of topology changes.
  2. The upstream device processes only the TCN BPDUs received on the designated port and drops TCN BPDUs on other ports.
  3. The upstream device sets the TC and TCA bits of the Flags field in the configuration BPDUs to 1 and returns the configuration BPDUs to instruct the downstream device to stop sending TCN BPDUs.
  4. The upstream device sends a copy of the TCN BPDUs toward the root bridge.
  5. Steps 1, 2, 3 and 4 are repeated until the root bridge receives the TCN BPDUs.
  6. The root bridge sets the TC and TCA bits of the Flags field in the configuration BPDUs to 1. The TC bit of 1 informs the downstream device of topology changes and instructs the downstream device to delete MAC address entries. In this manner, fast network convergence is achieved. The TCA bit of 1 informs the downstream device that the topology changes are known and instructs the downstream device to stop sending TCN BPDUs.
Translation
Download
Updated: 2019-01-18

Document ID: EDOC1100038290

Views: 101232

Downloads: 24

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