The vlan-mapping modulo command configures VLAN-to-instance mapping based on a default algorithm.
The undo vlan-mapping modulo command restores the default mapping.
By default, all VLANs are mapped to Common and Internal Spanning Tree (CIST), namely, instance 0.
Usage Scenario
Multiple Spanning Tree Protocol (MSTP) divides a switching network into multiple regions, each of which has independent Multiple Spanning Trees. Each spanning tree is called a Multiple Spanning Tree instance (MSTI), and each region is called a Multiple Spanning Tree (MST) region.
Two devices belong to the same MST region only when their following configurations are the same:Precautions
The instance command is recommended because VLAN-to-instance mapping based on the algorithm cannot meet actual mapping requirements.
In the vlan-mapping modulo command, a VLAN is mapped to an instance based on this formula: Instance ID = MOD (VLAN ID-1)/Modulo value + 1. In the formula, MOD (VLAN ID-1)/Modulo value means the remainder of (VLAN ID-1) divided by the modulo value. For example, if the modulo is 16, VLAN 1 is mapped to MSTI 1, VLAN 2 to MSTI 2, VLAN 16 to MSTI 16, and VLAN 17 to MSTI 1.