Identifying Interfaces on a Stack-Capable Switch: Examples
To configure 10/100/1000 port 4 on a standalone switch, enter this command:
Switch(config)# interface gigabitethernet1/0/4
Configuring a Range of Interfaces: Examples
This example shows how to use the interface range global configuration command to set the speed to 100
Mb/s on ports 1 to 4 on switch 1:
Switch# configure terminal
Switch(config)# interface range gigabitethernet1/0/1 - 4
Switch(config-if-range)# speed 100
This example shows how to use a comma to add different interface type strings to the range to enable Gigabit
Ethernet ports 1 to 3 and 10-Gigabit Ethernet ports 1 and 2 to receive flow-control pause frames:
Switch# configure terminal
Switch(config)# interface range gigabitethernet1/0/1 - 3 , tengigabitethernet1/0/1 - 2
Switch(config-if-range)# flowcontrol receive on
If you enter multiple configuration commands while you are in interface-range mode, each command is
executed as it is entered. The commands are not batched and executed after you exit interface-range mode. If
you exit interface-range configuration mode while the commands are being executed, some commands might
not be executed on all interfaces in the range. Wait until the command prompt reappears before exiting
interface-range configuration mode.
Configuring and Using Interface Range Macros: Examples
This example shows how to define an interface-range named enet_list to include ports 1 and 2 on switch 1
and to verify the macro configuration:
Switch# configure terminal
Switch(config)# define interface-range enet_list gigabitethernet1/0/1 - 2
Switch(config)# end
Switch# show running-config | include define
define interface-range enet_list GigabitEthernet1/0/1 - 2
This example shows how to create a multiple-interface macro named macro1:
Switch# configure terminal
Switch(config)# define interface-range macro1 gigabitethernet1/0/1 - 2, gigabitethernet1/0/5
- 7, tengigabitethernet1/0/1 -2
Switch(config)# end
This example shows how to enter interface-range configuration mode for the interface-range macro enet_list:
Switch# configure terminal
Switch(config)# interface range macro enet_list
Switch(config-if-range)#
Catalyst 2960-XR Switch Interface and Hardware Component Configuration Guide, Cisco IOS Release 15.0(2)EX1
OL-29420-01 39
Configuring Interface Characteristics
Identifying Interfaces on a Stack-Capable Switch: Examples