Contents
- Interface Range Specification
- Finding Feature Information
- Prerequisites for the Interface Range Specification
- Restrictions for the Interface Range Specification
- Information About the Interface Range Specification
- Overview of the Interface Range Specification
- Benefits of the Interface Range Specification
- How to Configure the Interface Range Specification
- Defining an Interface-Range Macro
- Configuring a Range of Interfaces
- What to Do Next
- Configuration Examples for the Interface Range Specification
- Example: Range Macro Definition
- Example: Single Range Configuration
- Example: Multiple Range Configuration
- Additional References
- Feature Information for the Interface Range Specification
Interface Range Specification
First Published: November 27, 2000
Last Updated: January 07, 2011
The Interface Range Specification feature allows specification of a range of interfaces to which subsequent commands are applied and supports the definition of macros that contain an interface range.
- Finding Feature Information
- Prerequisites for the Interface Range Specification
- Restrictions for the Interface Range Specification
- Information About the Interface Range Specification
- How to Configure the Interface Range Specification
- Configuration Examples for the Interface Range Specification
- Additional References
- Feature Information for the Interface Range Specification
Finding Feature Information
Your software release may not support all the features documented in this module. For the latest feature information and caveats, see the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the Feature Information Table at the end of this document.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.
Prerequisites for the Interface Range Specification
VLAN switch virtual interfaces (SVIs) are required for the interface range specification.
Restrictions for the Interface Range Specification
While you are in interface range configuration mode, each command that you enter is executed as it is entered. The commands are not batched for execution after you exit interface range configuration mode. If you exit interface range configuration mode while the commands are being executed, some commands might not be executed on some interfaces in the range. Wait until the command prompt reappears before exiting interface range configuration mode.
The interface range command works only with VLAN interfaces that have been created with the interface vlan command (the show running-config command displays the VLAN interfaces). VLAN interfaces not displayed by the show running-config command cannot be used with the interface range command.
Information About the Interface Range Specification
Overview of the Interface Range Specification
The Interface Range Specification feature allows specification of a range of interfaces to which subsequent commands are applied, and it supports the definition of macros that contain an interface range. The Interface Range Specification feature is implemented with the interface range command, which causes the device to enter interface range configuration mode. In this mode, all entered commands are applied to all interfaces within the range at the time the commands are entered.
How to Configure the Interface Range Specification
Defining an Interface-Range Macro
SUMMARY STEPS
1. enable
2. configure terminal
3. define interface-range macro-name interface-range
4. end
DETAILED STEPS
Configuring a Range of Interfaces
SUMMARY STEPS
1. enable
2. configure terminal
3. interface range macro macro-name
4. interface range vlan vlan-id - vlan-id[, vlan vlan-id - vlan-id...]
5. interface range {ethernet | fastethernet | gigabitethernet} slot/interface - interface [, {ethernet | fastethernet | gigabitethernet} slot/interface - interface...]
6. end
DETAILED STEPS
Configuration Examples for the Interface Range Specification
- Example: Range Macro Definition
- Example: Single Range Configuration
- Example: Multiple Range Configuration
Example: Range Macro Definition
This example shows how to define an interface-range macro named enet_list to select Fast Ethernet interfaces 5/1 through 5/4:
Device(config)# define interface-range enet_list fastethernet 5/1 - 4Example: Single Range Configuration
This example shows how to re-enable all Fast Ethernet interfaces 5/1 to 5/5:
Device(config)# interface range fastethernet 5/1 - 5 Device(config-if-range)# no shutdown Device(config-if-range)# *Oct 6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet5/1, changed state to up *Oct 6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet5/2, changed state to up *Oct 6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet5/3, changed state to up *Oct 6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet5/4, changed state to up *Oct 6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet5/5, changed state to up *Oct 6 08:24:36: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet5/ 5, changed state to up *Oct 6 08:24:36: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet5/ 3, changed state to up *Oct 6 08:24:36: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet5/ 4, changed state to upExample: Multiple Range Configuration
This example shows how to use a comma to add different interface type strings to the range to re-enable all Fast Ethernet interfaces in the range 5/1 to 5/5 and both Gigabit Ethernet interfaces 1/1 and 1/2:
Device(config-if)# interface range fastethernet 5/1 - 5 , gigabitethernet 1/1 - 2 Device(config-if-range)# no shutdown Device(config-if-range)# *Oct 6 08:29:28: %LINK-3-UPDOWN: Interface FastEthernet5/1, changed state to up *Oct 6 08:29:28: %LINK-3-UPDOWN: Interface FastEthernet5/2, changed state to up *Oct 6 08:29:28: %LINK-3-UPDOWN: Interface FastEthernet5/3, changed state to up *Oct 6 08:29:28: %LINK-3-UPDOWN: Interface FastEthernet5/4, changed state to up *Oct 6 08:29:28: %LINK-3-UPDOWN: Interface FastEthernet5/5, changed state to up *Oct 6 08:29:28: %LINK-3-UPDOWN: Interface GigabitEthernet1/1, changed state to up *Oct 6 08:29:28: %LINK-3-UPDOWN: Interface GigabitEthernet1/2, changed state to up *Oct 6 08:29:29: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet5/ 5, changed state to up *Oct 6 08:29:29: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet5/ 3, changed state to up *Oct 6 08:29:29: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet5/ 4, changed state to upAdditional References
Related Documents
Related Topic
Document Title
Cisco IOS commands
Interface commands: define interface-range, interface range, and interface vlan.
Cisco IOS Interface and Hardware Component Command Reference
Configuration commands: show running-config.
Technical Assistance
Description
Link
The Cisco Support and Documentation website provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password.
Feature Information for the Interface Range Specification
The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.
Table 1 Feature Information for the Interface Range Specification Feature Name
Releases
Feature Information
Interface Range Specification
12.1(5)T
12.2(2)D
12.2(4)B
12.2(8)T
12.2(14)SX
12.2(33)SRA
Cisco IOS XE Release 3.2SE
The Interface Range Specification feature allows specification of a range of interfaces to which subsequent commands are applied, and it supports the definition of macros that contain an interface range.
The following commands were introduced or modified: define interface-range, interface range.