< Home

vlan-mapping modulo

Function

The vlan-mapping modulo command enables VLAN-to-instance mapping assignment based on a default algorithm.

The undo vlan-mapping modulo command restores the default mapping.

By default, all VLANs are mapped to CIST, namely, spanning tree instance 0.

Format

vlan-mapping modulo modulo

undo vlan-mapping modulo

Parameters

Parameter Description Value
modulo Specifies the value of a module.

The value is an integer ranging from 1 to 64.

Views

MST region view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

MSTP divides a switching network into multiple regions, each of which has multiple spanning trees that are independent of each other. Each spanning tree is called an MSTI and each region is called an MST region.

Two switching devices belong to the same MST region only when they have the following same configurations:
  • MST region name
  • Mappings between MSTIs and VLANs
  • MST region revision level
The vlan-mapping modulo command is used to enable VLAN-to-instance mapping assignment based on a default algorithm.

In the command, vlan-mapping modulo indicates that the formula (VLAN ID-1)%modulo+1 is used. In the formula, (VLAN ID-1)%modulo means the remainder of (VLAN ID-1) divided by the value of modulo. This formula is used to map a VLAN to the corresponding MSTI. The calculation result of the formula is ID of the mapping MSTI. For example, if the modulus is 16, the switch maps VLAN 1 to MSTI 1, VLAN 2 to MSTI 2 VLAN 16 to MSTI 16, VLAN 17 to MSTI 1, and so on.

Precautions

The instance instance-id vlan { vlan-id [ to vlan-id ] }&<1-10> command is recommended because VLAN-to-instance mapping assignments cannot meet actual mapping requirements.

VBST does not support regions. Therefore, this command does not take effect when the spanning tree protocol is VBST.

Example

# Map all VLANs to spanning tree instances modulo 16.

<HUAWEI> system-view
[HUAWEI] stp region-configuration
[HUAWEI-mst-region] vlan-mapping modulo 16
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic