Administrator Guide

Layer 2 Switching Commands 397
port-range
—A list of valid ports to configure. Separate non-consecutive
ports with a comma and no spaces; use a hyphen to designate a range of
ports. For more detailed information, see Operating on Multiple Objects
(Range). The command line buffer parses up to the maximum number of
command line characters possible in the port-range parameter.
port-type
—Shows all interfaces of the specified type.
Default Configuration
This command has no default configuration.
Command Mode
Global Configuration, Interface Range and Interface modes
User Guidelines
Commands under the interface range context are executed independently on
each active interface in the range. If the command returns an error on one of
the active interfaces, it does not stop executing commands on other active
interfaces.
If a range of interfaces is specified using the dash notation, the beginning
range number (to the left of the hyphen) must be less than or equal to the
last number (to the right of the hyphen).
Example
The following example shows how gigabitethernet ports 5/0/18 to 5/0/20 and
3/0/1 to 3/0/24 are ranged to receive the same command.
console(config)# interface range gigabitethernet 5/0/18-20,3/0/1-24
console(config-if-range)#
The following example shows how all gigabitethernet ports can be configured
at once.
console(config)# interface range gigabitethernet all
console(config-if-range)#
The following examples demonstrate various valid interface ranges:
console(config)#interface range gigabitEthernet 1/0/1-20
console(config)#interface range gi1/0/20-48
console(config)#interface range gi1/0/1,gi1/0/48
console(config)#interface range gi2/0/1-10,gi1/0/30
console(config)#interface range gi1/0/1-10,gi1/0/30-48
2CSNXXX_SWUM204.book Page 397 Monday, January 25, 2016 1:25 PM