Path cost, Calculation process of the stp algorithm, Calculation process – H3C Technologies H3C S5560 Series Switches User Manual

Page 96

Advertising
background image

62

Figure 20 Designated bridges and designated ports

Path cost

Path cost is a reference value used for link selection in STP. To prune the network into a loop-free tree, STP

calculates path costs to select the most robust links and block redundant links that are less robust.

Calculation process of the STP algorithm

The spanning tree calculation process described in the following sections is an example of a simplified

process.

Calculation process

The STP algorithm uses the following calculation process:

1.

Initialize the network.
Upon initialization of a device, each port generates a BPDU with the following contents:

{

The port as the designated port.

{

The device as the root bridge.

{

0 as the root path cost.

{

The device ID as the designated bridge ID.

2.

Select the root bridge.
Initially, each STP-enabled device on the network assumes itself to be the root bridge, with its own
device ID as the root bridge ID. By exchanging configuration BPDUs, the devices compare their

root bridge IDs to elect the device with the smallest root bridge ID as the root bridge.

3.

Root port and designated ports selection on the non-root bridges.

Step

Description

1

A non-root–bridge device regards the port on which it received the optimum configuration
BPDU as the root port.

Table 6

describes how the optimum configuration BPDU is selected.

Device A

Device B

Device C

Port A1

Port A2

Port B1

Port C1

Port B2

Port C2

LAN

Advertising