Using the Interface Command
–
–
You must add a space between the interface numbers and the hyphen when using the
•
interface range command. For example, the command interface range fastethernet 0/1 - 5 is a
valid range; the command interface range fastethernet 0/1-5 is not a valid range.
•
The interface range command works only with VLAN interfaces that have been configured with
the interface vlan command (the show running-config privileged EXEC command displays the
configured VLAN interfaces). VLAN interfaces not displayed by the show running-config
command cannot be used with the interface range command.
All interfaces in a range must be the same type; that is, all Fast Ethernet ports, all Gigabit Ethernet
•
ports, all EtherChannel ports, or all VLAN interfaces.
This example shows how to use the interface range global configuration command to enable Fast
Ethernet interfaces 0/1 to 0/5:
Switch# configure terminal
Switch(config)# interface range fastethernet0/1 - 5
Switch(config-if-range)# no shutdown
Switch(config-if-range)#
*Oct
*Oct
*Oct
*Oct
*Oct
*Oct
changed state to up
*Oct
state to up
*Oct
state to up
This example shows how to use a comma to add different interface type strings to the range to enable all
Fast Ethernet interfaces in the range 0/1 to 0/3 and both Fast Ethernet interfaces 0/7 and 0/8:
Switch# configure terminal
Switch(config)# interface range fastethernet0/1 - 3, fastethernet0/7 - 8
Switch(config-if-range)# no shutdown
Switch(config-if-range)#
*Oct
*Oct
*Oct
*Oct
*Oct
*Oct
changed state to up
*Oct
changed state to up
*Oct
changed state to up
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 together 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.
Catalyst 2950 Desktop Switch Software Configuration Guide
9-8
gigabitethernet slot/{first port} - {last port}, where slot is 0
port-channel port-channel-number - port-channel-number, where port-channel-number is
from 1 to 6
6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up
6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet0/2, changed state to up
6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet0/3, changed state to up
6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet0/4, changed state to up
6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet0/5, changed state to up
6 08:24:36: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/05,
6 08:24:36: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed
6 08:24:36: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed
6 08:29:28: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up
6 08:29:28: %LINK-3-UPDOWN: Interface FastEthernet0/2, changed state to up
6 08:29:28: %LINK-3-UPDOWN: Interface FastEthernet0/3, changed state to up
6 08:29:28: %LINK-3-UPDOWN: Interface FastEthernet0/7, changed state to up
6 08:29:28: %LINK-3-UPDOWN: Interface FastEthernet0/8, changed state to up
6 08:29:29: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/ 7,
6 08:29:29: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/ 2,
6 08:29:29: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/ 4,
Chapter 9
Configuring Interface Characteristics
78-11380-04