37• Boundary port—Connects an MST region to another MST region or to an STP/RSTP-running router.In MSTP calculation, a boundary port’s role on an MSTI is consistent with its role on the CIST. Butthat is not true with master ports. A master port on MSTIs is a root port on the CIST.Port statesIn MSTP, a port may be in one of the following states:• Forwarding—the port receives and sends BPDUs, learns MAC addresses, and forwards user traffic.• Learning—the port receives and sends BPDUs, learns MAC addresses, but does not forward usertraffic. Learning is an intermediate port state.• Discarding—the port receives and sends BPDUs, but does not learn MAC addresses or forwardsuser traffic.NOTE:When in different MSTIs, a port can be in different states.A port state is not exclusively associated with a port role. Table 6 lists the port state(s) supported by eachport role ("√" indicates that the port supports this state, and "—" indicates that the port does not supportthis state).Table 6 Port states supported by different port rolesPort role (right) Root port/masterport Designated port Alternate port Backup portPort state(below)Forwarding √ √ — —Learning √ √ — —Discarding √ √ √ √How MSTP worksMSTP divides an entire Layer 2 network into multiple MST regions, which are interconnected by acalculated CST. Inside an MST region, multiple spanning trees are calculated, each being an MSTI.Among these MSTIs, MSTI 0 is the IST. Similar to STP, MSTP uses configuration BPDUs to calculatespanning trees. The only difference between the two protocols is that an MSTP BPDU carries the MSTPconfiguration on the router from which this BPDU is sent.CIST calculationThe calculation of a CIST tree is also the process of configuration BPDU comparison. During this process,the router with the highest priority is elected as the root bridge of the CIST. MSTP generates an IST withineach MST region through calculation, and, at the same time, MSTP regards each MST region as a singlerouter and generates a CST among these MST regions through calculation. The CST and ISTs constitutethe CIST of the entire network.MSTI calculationWithin an MST region, MSTP generates different MSTIs for different VLANs based on theVLAN-to-instance mappings. MSTP performs a separate calculation process, which is similar to spanningtree calculation in STP, for each spanning tree. For more information, see “Calculation process of the STPalgorithm.”