ignated port (DP) for the segment. Disable all other root paths: Any active port that is not a RP or a DP is a blocked port (BP). The aforementioned rules assume that there is no tie in determining the cost of paths. In reality, such ties can happen and the protocol includes a set of rules to select a unique least- cost path in the case of several types of ties. An example of the calculation of the spanning tree through the assignment of a role to each active port is shown in Figure B.2. B.3 Bridge Protocol Data Units The earlier-mentioned rules require knowledge of the entire network to be implemented. The bridges have to determine the root bridge and compute the port roles (root, desig- nated, or blocked) with only the information they have. To exchange information about bridge IDs and root path costs, the bridges use control data frames called bridge protocol data units (BPDUs). The BPDU fields are shown in Figure B.3. A bridge sends a BPDU frame using the unique MAC address of the port itself as a source address and the STP multicast address 01:80:C2:00:00:00 as a destination address. There are three types of BPDUs: 1. Configuration BPDU (CBPDU), used for spanning tree computation 2. Topology change notification (TCN) BPDU, used to announce changes in the net- work topology 3. Topology change notification acknowledgment (TCA) BPDUs are exchanged regularly (every 2s by default) and enable switches to keep track of network changes and to start and stop forwarding at ports as required. Appendix B: Spanning Tree Protocol Protocol Flags Root ID Bridge Hello Forward identifier delay 2 Byte priority 2 Byte priority 6 Byte ID (MAC address) 6 Byte ID (MAC address) FIGURE B.3 BPDU field structure. B.3.1 Configuration Bridge Data Units Configuration bridge data units (BDUs) are used to construct the spanning tree by a coor- dinated activity of all the network switches. Each switch determines the state of all its ports on the ground of the knowledge it has of the network and of the steps we have described in Section B.2.