Table Of Contents
Prerequisites for Interface Range Specification
Restrictions for Interface Range Specification
Information About Interface Range Specification
Overview of Interface Range Specification
Benefits of Interface Range Specification
How to Configure Interface Range Specification
Configuring a Range of Interfaces
Configuration Examples For Interface Range Specification
Range Macro Definition: Example
Single Range Configuration: Example
Multiple Range Configuration: Example
Feature Information for Interface Range Specification
Interface Range Specification
First Published: November 27, 2000Last Updated: January 07, 2011The Interface Range Specification feature allows specification of a range of interfaces to which subsequent commands are applied and supports definition of macros that contain an interface range.
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 for Interface Range Specification" section.
Use Cisco Feature Navigator to find information about platform support and Cisco IOS and Catalyst OS software image support. To access Cisco Feature Navigator, go to http://tools.cisco.com/ITDIT/CFN/jsp/index.jsp. An account on Cisco.com is not required.
Contents
•Prerequisites for Interface Range Specification
•Restrictions for Interface Range Specification
•Information About Interface Range Specification
•How to Configure Interface Range Specification
•Configuration Examples For Interface Range Specification
•Feature Information for Interface Range Specification
Prerequisites for Interface Range Specification
VLAN switch virtual interfaces (SVIs) are required for the interface range specification.
Restrictions for Interface Range Specification
Each command you enter while you are in interface configuration mode with the range keyword is executed as it is entered. The commands are not batched together for execution after you exit interface mode. If you exit interface configuration mode while the commands are being executed, some commands may not be executed on some interfaces in the range. Wait until the command prompt reappears before exiting interface configuration mode.
The interface range command works only with VLAN interfaces that have been created with the interface vlan command (the show running-configuration command displays the VLAN interfaces). VLAN interfaces not displayed by the show running-configuration command cannot be used with the interface range command.
Information About Interface Range Specification
•Overview of Interface Range Specification
•Benefits of Interface Range Specification
Overview of Interface Range Specification
The Interface Range Specification feature allows specification of a range of interfaces to which subsequent commands are applied and supports definition of macros that contain an interface range. The Interface Range Specification feature is implemented with the range keyword, which is used with the interface command. In the interface configuration mode with the range keyword, all entered commands are applied to all interfaces within the range until you exit the interface configuration mode.
Benefits of Interface Range Specification
The Interface Range Specification feature makes configuration easier because:
•Identical commands can be entered once for a range of interfaces, rather than being entered separately for each interface.
•Interface ranges can be saved as macros.
How to Configure Interface Range Specification
•Configuring a Range of Interfaces
Defining a Range Macro
To define an interface range macro, perform this task:
SUMMARY STEPS
1. enable
2. configure terminal
3. define interface-range macro-name interface-range
4. end
DETAILED STEPS
Configuring a Range of Interfaces
To configure a range of interfaces, perform this task:
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
What to Do Next
You can verify the configuration of a range of Interfaces by using the show running-configuration command.
Configuration Examples For Interface Range Specification
This section provides the following configuration examples:
•Range Macro Definition: Example
•Single Range Configuration: Example
•Multiple Range Configuration: Example
Range Macro Definition: Example
This example shows how to define an interface-range macro named enet_list to select Fast Ethernet interfaces 5/1 through 5/4:
Router(config)# define interface-range enet_list fastethernet 5/1 - 4Router(config)#Single Range Configuration: Example
This example shows how to reenable all Fast Ethernet interfaces 5/1 to 5/5:
Router(config)# interface range fastethernet 5/1 - 5Router(config-if)# no shutdownRouter(config-if)#*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 upRouter(config-if)#Multiple Range Configuration: Example
This example shows how to use a comma to add different interface type strings to the range to reenable all Fast Ethernet interfaces in the range 5/1 to 5/5 and both Gigabit Ethernet interfaces 1/1 and 1/2:
Router(config-if)# interface range fastethernet 5/1 - 5 , gigabitethernet 1/1 - 2Router(config-if)# no shutdownRouter(config-if)#*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 toup*Oct 6 08:29:28: %LINK-3-UPDOWN: Interface GigabitEthernet1/2, changed state toup*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 upRouter(config-if)#Additional References
Related Documents
Standards
MIBs
RFCs
Technical Assistance
Feature Information for Interface Range Specification
Table 1 lists the features in this module and provides links to specific configuration information. Only features that were introduced or modified in Cisco IOS Release 12.1(5)T or a later release appear in the table.
Not all commands may be available in your Cisco IOS software release. For release information about a specific command, see the command reference documentation.
Use Cisco Feature Navigator to find information about platform support and software image support. Cisco Feature Navigator enables you to determine which Cisco IOS and Catalyst OS software images support a specific software release, feature set, or platform. To access Cisco Feature Navigator, go to http://tools.cisco.com/ITDIT/CFN/jsp/index.jsp. An account on Cisco.com is not required.
Note Table 1 lists only the Cisco IOS software release that introduced support for a given feature in a given Cisco IOS software release train. Unless noted otherwise, subsequent releases of that Cisco IOS software release train also support that feature.
Cisco and the Cisco Logo are trademarks of Cisco Systems, Inc. and/or its affiliates in the U.S. and other countries. A listing of Cisco's trademarks can be found at www.cisco.com/go/trademarks. Third party trademarks mentioned are the property of their respective owners. The use of the word partner does not imply a partnership relationship between Cisco and any other company. (1005R)
Any Internet Protocol (IP) addresses and phone numbers used in this document are not intended to be actual addresses and phone numbers. Any examples, command display output, network topology diagrams, and other figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses or phone numbers in illustrative content is unintentional and coincidental.
© 2000—2011 Cisco Systems, Inc. All rights reserved.