Defining And Using Interface-Range Macros - Cisco 4500M Software Manual

Software guide
Table of Contents

Advertisement

Chapter 4
Configuring Interfaces
This example shows how to reenable all Fast Ethernet interfaces 5/1 to 5/5:
Switch(config)# interface range fastethernet 5/1 - 5
Switch(config-if-range)# no shutdown
Switch(config-if-range)#
*Oct
*Oct
*Oct
*Oct
*Oct
*Oct
5, changed state to up
*Oct
3, changed state to up
*Oct
4, changed state to up
Switch(config-if)#
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:
Switch(config-if)# interface range fastethernet 5/1 - 5, gigabitethernet 1/1 - 2
Switch(config-if)# no shutdown
Switch(config-if)#
*Oct
*Oct
*Oct
*Oct
*Oct
*Oct
up
*Oct
up
*Oct
5, changed state to up
*Oct
3, changed state to up
*Oct
4, changed state to up
Switch(config-if)#
If you enter multiple configuration commands while you are in interface-range configuration mode, each
command is run as it is entered (they are not batched together and run after you exit interface-range
configuration mode). If you exit interface-range configuration mode while the commands are being run,
some commands might not be run on all interfaces in the range. Wait until the command prompt is
displayed before exiting interface-range configuration mode.

Defining and Using Interface-Range Macros

You can define an interface-range macro to automatically select a range of interfaces for configuration.
Before you can use the macro keyword in the interface-range macro command string, you must define
the macro.
OL-6696-01
6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet5/1, changed state to up
6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet5/2, changed state to up
6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet5/3, changed state to up
6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet5/4, changed state to up
6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet5/5, changed state to up
6 08:24:36: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet5/
6 08:24:36: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet5/
6 08:24:36: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet5/
6 08:29:28: %LINK-3-UPDOWN: Interface FastEthernet5/1, changed state to up
6 08:29:28: %LINK-3-UPDOWN: Interface FastEthernet5/2, changed state to up
6 08:29:28: %LINK-3-UPDOWN: Interface FastEthernet5/3, changed state to up
6 08:29:28: %LINK-3-UPDOWN: Interface FastEthernet5/4, changed state to up
6 08:29:28: %LINK-3-UPDOWN: Interface FastEthernet5/5, changed state to up
6 08:29:28: %LINK-3-UPDOWN: Interface GigabitEthernet1/1, changed state to
6 08:29:28: %LINK-3-UPDOWN: Interface GigabitEthernet1/2, changed state to
6 08:29:29: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet5/
6 08:29:29: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet5/
6 08:29:29: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet5/
Defining and Using Interface-Range Macros
Software Configuration Guide—Release 12.2(25)EW
4-5

Advertisement

Table of Contents
loading

This manual is also suitable for:

4500 series

Table of Contents