A system and method runs a multiple spanning tree protocol (MSTP) in a computer network having a very large number of bridge domains. The computer network includes a plurality of intermediate network devices, each having a plurality of ports for forwarding network messages. Within each device, a plurality of bridge domains are defined, each bridge domain is identified by a Virtual Local Area Network (VLAN) Identifier (VID), and one or more device ports. For each port, a separate mapping of VIDs to Multiple Spanning Tree Instances (MSTIs), based on the bridge domains defined at the port, is established. Each mapping is converted to a port-based configuration digest, which is entered into Spanning Tree Protocol (STP) control messages sent from the respective port. Ports receiving STP control messages whose configuration digest values that match the configuration digests values computed for the ports are said to be in the same Multiple Spanning Tree region. Ports whose configuration digests differ from the configuration digests of received STP control messages are said to be in different regions.