The portswitch batch command changes the mode of Ethernet interfaces from Layer 3 to Layer 2 in batches.
The undo portswitch batch command changes the mode of Ethernet interfaces from Layer 2 to Layer 3 in batches.
By default, an Ethernet interface works in Layer 3 mode.
Usage Scenario
By default, Ethernet interfaces of Layer 3 devices such as the Router operate in Layer 3 mode. If these interfaces need to be added to a VLAN or other Layer 2 configurations need to be performed on these interfaces, the mode of these interfaces needs to be switched to Layer 2.
If the mode of multiple interfaces needs to be changed in batches, either from Layer 3 to Layer 2, or from Layer 2 to Layer 3, run the portswitch batch or the undo portswitch batch command.Precautions
When you run this command on an interface, the mode switching configuration takes effect when only attribute configurations (such as shutdown and description configurations) or configurations that are supported on Layer 2 or Layer 3 interfaces (such as modelacp and lacp system-id configurations) exist on the interface. Configurations that are not supported by the interface mode after the switch should not exist.
When an interface range is specified, ensure that the following conditions are met: