Interface and Hardware Component Configuration Guide, Cisco IOS XE Release 3SE (Cisco WLC 5700 Series)
Interface Range Specification
Downloads: This chapterpdf (PDF - 127.0KB) The complete bookPDF (PDF - 2.21MB) | The complete bookePub (ePub - 204.0KB) | Feedback

Interface Range Specification

Interface Range Specification

Last Updated: February 20, 2013

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

Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and 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 module.

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.

Benefits of the 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 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
  Command or Action Purpose
Step 1
enable


Example:

Device> enable

 

Enables privileged EXEC mode.

  • Enter your password if prompted.
 
Step 2
configure terminal


Example:

Device# configure terminal

 

Enters global configuration mode.

 
Step 3
define interface-range macro-name interface-range


Example:

Device(config)# define interface-range macro1 ethernet 1/2 - 5

 

Defines the interface-range macro and saves it in NVRAM.

  • interface-range--Type of interface range. See the usage guidelines for this command in the Cisco IOS Interface and Hardware Component Command Reference. In the example, the interface-typeslot/first-interfacelast-interface format to used to enter the interface range.
 
Step 4
end


Example:

Device(config)# end

 

Returns to privileged EXEC mode.

 

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
  Command or Action Purpose
Step 1
enable


Example:

Device> enable

 

Enables privileged EXEC mode.

  • Enter your password if prompted.
 
Step 2
configure terminal


Example:

Device# configure terminal

 

Enters global configuration mode.

 
Step 3
interface range macro macro-name


Example:

Device(config)# interface range macro macro1

 

Enables an interface-range macro.

  • You can enter one macro or up to five comma-separated ranges.
 
Step 4
interface range vlan vlan-id - vlan-id[, vlan vlan-id - vlan-id...]


Example:

Device(config)# interface range vlan 500 - 506

 

Enables the VLAN IDs.

  • Comma-separated ranges can include both VLANs and physical interfaces.
 
Step 5
interface range {ethernet | fastethernet | gigabitethernet} slot/interface - interface [, {ethernet | fastethernet | gigabitethernet} slot/interface - interface...]


Example:

Device(config)# interface range fastethernet 5/1 - 5 , gigabitethernet 1/1 - 2

 

Selects the range of interfaces to be configured.

  • The space before the dash is required. For example, the command interface range gigabitethernet 1/2 - 5 is valid; the command interface range gigabitethernet 1/2-5 is not valid.
 
Step 6
end


Example:

Device(config-if-range)# end

 

Returns to privileged EXEC mode.

 

What to Do Next

You can verify the configuration of a range of interfaces by using the show running-config command.

Configuration Examples for the Interface Range Specification

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 - 4 

Example: 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 up

Example: 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 up

Additional References

Related Documents

Related Topic

Document Title

Cisco IOS commands

Cisco IOS Master Command List, All Releases

Interface commands: define interface-range, interface range, and interface vlan.

Cisco IOS Interface and Hardware Component Command Reference

Configuration commands: show running-config.

Cisco IOS Configuration Fundamentals Command Reference

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.

http://www.cisco.com/cisco/web/support/index.html

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.

Cisco and the Cisco logo are trademarks or registered trademarks of Cisco and/or its affiliates in the U.S. and other countries. To view a list of Cisco trademarks, go to this URL: 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. (1110R)

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.

© 2013 Cisco Systems, Inc. All rights reserved.