1-153) A spanning tree is calculated as follows:z Determining the root bridgeRoot bridges are selected by configuration BPDU comparing. The switch with the smallest root ID ischosen as the root bridge.z Determining the root portFor each switch in a network, the port on which the configuration BPDU with the highest priority isreceived is chosen as the root port of the switch.z Determining the designated portFirst, the switch calculates a designated port configuration BPDU for each of its ports using the root portconfiguration BPDU and the root port path cost, with the root ID being replaced with that of the root portconfiguration BPDU, root path cost being replaced with the sum of the root path cost of the root portconfiguration BPDU and the path cost of the root port, the ID of the designated bridge being replacedwith that of the switch, and the ID of the designated port being replaced with that of the port.The switch then compares the calculated configuration BPDU with the original configuration BPDUreceived from the corresponding port on another switch. If the latter takes precedence over the former,the switch blocks the local port and keeps the port's configuration BPDU unchanged, so that the portcan only receive configuration messages and cannot forward packets. Otherwise, the switch sets thelocal port to the designated port, replaces the original configuration BPDU of the port with the calculatedone and advertises it regularly.MSTP Implementation on SwitchesMSTP is compatible with both STP and RSTP. That is, MSTP-enabled switches can recognize theprotocol packets of STP and RSTP and use them for spanning tree calculation. In addition to the basicMSTP functions, H3C series switches also provide the following functions for users to manage theirswitches.z Root bridge holdz Root bridge backupz Root guardz BPDU guardz Loop guardz TC-BPDU attack guardz BPDU packet dropSTP-related StandardsSTP-related standards include the following.z IEEE 802.1D: spanning tree protocolz IEEE 802.1w: rapid spanning tree protocolz IEEE 802.1s: multiple spanning tree protocolConfiguring Root BridgeComplete the following tasks to configure the root bridge: