Chapter 2
Catalyst 2960 Switch Cisco IOS Commands
Valid values for port-range type and interface:
•
•
•
•
When you define a range, you must enter a space between the first entry and the hyphen (-):
interface range gigabitethernet0/1 -2
When you define multiple ranges, you must still enter a space after the first entry and before the
comma (,):
interface range fastethernet0/1 - 2, gigabitethernet0/1 - 2
You cannot specify both a macro and an interface range in the same command.
You can also specify a single interface in port-range. The command is then similar to the interface
interface-id global configuration command.
For more information about configuring interface ranges, see the software configuration guide for this
release.
Examples
This example shows how to use the interface range command to enter interface-range configuration
mode to apply commands to two ports:
Switch(config)# interface range gigabitethernet0/1 - 2
Switch(config-if-range)#
This example shows how to use a port-range macro macro1 for the same function. The advantage is that
you can reuse macro1 until you delete it.
Switch(config)# define interface-range macro1 gigabitethernet0/1 - 2
Switch(config)# interface range macro macro1
Switch(config-if-range)#
OL-8604-04
vlan vlan-ID, where VLAN ID is from 1 to 4094
Although the command-line interface (CLI) shows options to set multiple VLANs, these are
Note
not supported.
fastethernet module/{first port} - {last port}, where module is always 0
gigabitethernet module/{first port} - {last port}, where module is always 0
For physical interfaces:
module is always 0
–
the range is type 0/number - number (for example, gigabitethernet0/1 - 2)
–
port-channel port-channel-number - port-channel-number, where port-channel-number is from 1
to 6
When you use the interface range command with port channels, the first and last port
Note
channel number in the range must be active port channels.
Catalyst 2960 Switch Command Reference
interface range
2-115