- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
01-Bulk Interface Commands | 64.18 KB |
For information about the models of the Ethernet interface cards and subcards mentioned in this document, see the installation guide.
interface range
interface range interface-list
View
System view
Default level
2: System level
Parameters
interface-list: Interface list in the format of interface-list = { interface-type interface-number1 [ to interface-type interface-number2 ] }&<1-5>. interface-type interface-number specifies an interface by its type and number. &<1-5> indicates that you can specify up to five interfaces or interface lists. When you specify the to keyword in interface-type interface-number1 to interface-type interface-number2, the interface before and after the to keyword must be on the same Ethernet interface card or subcard, and the interface number before to must be no greater than the one after to.
Description
Use interface range to create an interface range and enter interface range view.
To configure multiple interfaces, for example, shut down multiple interfaces, you must enter the view of each interface, and execute the related command for each interface. The interface range command allows you to batch configure interfaces. By using the interface range command, you can add different types of interfaces to the interface range and enter interface range view.
After you enter the interface range view, enter ? after the command line interface prompt to view the commands supported by the first interface in the interface range.
In interface range view, you can execute only the commands supported by the first command in the interface range.
Executing the display this command in interface range view displays the effective configuration of the first interface in the interface range.
The configuration made in interface range view takes effect on all member interfaces of the interface range. If a member interface does not support a command or a command fails on a member interface, the system prompts the information, and the other member interfaces are not affected.
Examples
# Shut down interfaces GigabitEthernet 3/0/1 through GigabitEthernet 3/0/24, and VLAN-interface 2.
<Sysname> system-view
[Sysname] interface range GigabitEthernet 3/0/1 to GigabitEthernet 3/0/24 Vlan-interface 2
[Sysname-if-range] shutdown
interface range name
Syntax
interface range name name [ interface interface-list ]
undo interface range name name
View
System view
Default level
2: System level
Parameters
name: Interface range name, which is a string of 1 to 32 characters.
interface-list: Interface list in the format of interface-list = { interface-type interface-number1 [ to interface-type interface-number2 ] }&<1-5>.interface-type interface-number specifies an interface by its type and number.&<1-5> indicates that you can specify up to five interfaces or interface lists. When you specify the to keyword in interface-type interface-number1 to interface-type interface-number2, the interface before and after the to keyword must be on the same Ethernet interface card or subcard, and the interface number before to must be no greater than the one after to.
Description
Use interface range name name interface interface-list to create an interface range, configure a name for the interface range, add interfaces to the interface range, and enter the interface range view.
Use interface range name without the interface keyword to enter the view of an interface range with the specified name.
Use undo interface range name to delete the interface range with the specified name.
To configure multiple interfaces, for example, shut down multiple interfaces, you must enter the view of each interface, and execute the related command for each interface. The interface range name command allows you to batch configure interfaces. By using the interface range name command, you can add different types of interfaces to the interface range and enter interface range view. The configuration made in interface range view takes effect on all member interfaces of the interface range.
Either the interface range name or interface range command can create an interface range. The interface range name command delivers the following benefits:
· You can use the interface range name command to create an interface range and configure a name for the interface range, add interfaces to the interface range multiple times, and use names to distinguish interface ranges.
· You can enter the interface range name to enter its view, rather than input an interface list. This reduces the configuration workload.
· You can use the display current-configuration | include interface range command to view the member interfaces of an interface range.
After you enter the interface range view, enter ? after the command line interface prompt to view the commands supported by the first interface in the interface range.
Executing the display this command in interface range view displays the effective configuration of the first interface in the interface range.
Do not configure a nonconfigurable interface as the first interface of an interface range.
The configuration made in interface range view takes effect on all member interfaces of the interface range. If a member interface does not support a command or a command fails on a member interface, the system prompts the information, and the other member interfaces are not affected.
To bulk configure interfaces, follow these guidelines:
· Do not assign an aggregate interface and any of its member interfaces to an interface range at the same time. Some commands, after being executed on both an aggregate interface and its member interfaces, can break up the aggregation.
· No limit is set on the maximum number of interfaces in an interface range. The more interfaces in an interface range, the longer the command execution time.
· No limit is set on the maximum number of interface range names. To guarantee the performance of the interface range feature, H3C recommends that you configure less than 1000 interface range names.
Examples
# Add GigabitEthernet 3/0/1 through GigabitEthernet 3/0/12 to interface range named myEthPort, and enter the interface range view.
<Sysname> system-view
[Sysname] interface range name myEthPort interface GigabitEthernet 3/0/1 to GigabitEthernet 3/0/12
[Sysname-if-range-myEthPort]
# Enter the view of interface range named myEthPort.
<Sysname> system-view
[Sysname] interface range name myEthPort
[Sysname-if-range-myEthPort]