< Home

portswitch batch

Function

The portswitch batch command changes the working mode of Ethernet interfaces from Layer 3 mode to Layer 2 mode in batches.

The undo portswitch batch command changes the working mode of Ethernet interfaces from Layer 2 mode to Layer 3 mode in batches.

By default, the working mode of the interface is Layer 2 mode.

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 interface-number1 [ to interface-number2 ]
Specifies interfaces of which the working mode needs to be changed.
  • interface-number1 specifies the number of the first interface.
  • interface-number2 specifies the number of the last interface.

    The value of interface-number2 must be larger than the value of interface-number1. interface-number1 and interface-number2 specify the range of interfaces.

  • If to interface-number2 is not specified, only the working mode of the interface specified by interface-number1 is changed.

NOTE:

You can specify a maximum of 10 interface number ranges at a time. The entered ranges cannot overlap.

-

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

You can run the portswitch batch or undo portswitch batch command to change the working mode of interfaces in batches.

Precautions

  • The mode switching function takes effect when the interface only has attribute configurations (for example, shutdown and description configurations). If the service configuration (for example, port link-type access configuration) exists on the interface, you must clear the service configuration before running this command.

  • The minimum interval between running the portswitch batch and undo portswitch batch commands must be 30s.

Only interfaces on the S5720-EI, S5720-HI, S5730-HI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-EI, S6720-HI, S6720S-EI, S6730-H, S6730S-H, S6730-S, and S6730S-S support switching between Layer 2 and Layer 3 modes.

Ethernet interfaces working at Layer 3 support IP address configuration.

Example

# Change the working mode of GE0/0/1, 0/0/2, and 0/0/3 to Layer 2 mode.

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