< Home

portswitch batch

Function

The portswitch batch command switches Ethernet interfaces from the Layer-3 mode to the Layer-2 mode in a batch.

The undo portswitch batch command switches Ethernet interfaces from the Layer-2 mode to the Layer-3 mode in a batch.

Format

portswitch batch interface-type { interface-number1 [ to interface-number2 ] } &<1-10>

undo portswitch batch interface-type { interface-number1 [ to interface-number2 ] } &<1-10>

Parameters

Parameter Description Value
interface-type Specifies the interface type. It must be Ethernet interfaces, such as Ethernet, Eth-Trunk. -
interface-number Specifies the interface number. -

Views

System view

Default Level

2: Configuration level

Usage Guidelines

When using the parameter to to describe the port range, note the following:

  • The port number before to is smaller than that after to.

  • The port types are the same.

  • The ports between the ranges exist.

A list of portswitch batch command supports up to 10 port ranges expressed by to.

If IP addresses on Ethernet interfaces are unnumbered, the portswitch batch command will be unavailable on these interfaces.

When you run this command, do not configure other functions on this interface; otherwise, the switchover fails.

Example

# Switch GigabitEthernet 0/0/1 and GigabitEthernet 0/0/2 to the Layer-2 mode.

<sysname> system-view
[sysname] portswitch batch GigabitEthernet 0/0/1 1/0/2
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >