9-7
Catalyst 2950 Desktop Switch Software Configuration Guide
78-14982-01
Chapter 9 Configuri ng th e Switch Interfaces Using the Interface Command
gigabitethernet slot/{fi r s t po rt } - {last po rt}, where slot is 0
port-channel port-channel-number - port-channel-number, where port-channel-number is
from 1 to 6
You must add a space between the interface numbers and the hyphen when using the
interface range command. For example, the command inte rface ra nge fasteth ernet 0/1 - 5 is a
valid range; the command int erfac e ran ge faste the rnet 0/1-5 is not a valid range.
The in terfac e ran ge command works only with VLAN interfaces that have been configured with
the interface vlan command (the show running-config privileged EX EC c om mand ou tput shows
the configured VLAN interfaces). VLAN interfaces that do not appear by using the show
running-config comm an d c a nno t be u sed w i th t h e in terf ace ran ge command.
All interfaces in a range must be the same type; that is, all Fast Ethernet ports, all Gigabit Ethernet
ports, al l EtherCh annel po rts, or VLAN interfaces .
This exam ple shows how to use the interface range global configuration co mman d to enabl e 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 6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up
*Oct 6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet0/2, changed state to up
*Oct 6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet0/3, changed state to up
*Oct 6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet0/4, changed state to up
*Oct 6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet0/5, changed state to up
*Oct 6 08:24:36: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/05,
changed state to up
*Oct 6 08:24:36: %LINEP ROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed
state to up
*Oct 6 08:24:36: %LINEP ROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed
state to up
This e xam ple s ho ws how to use a co mma to add di f fer ent inter fa ce t ype stri ngs t o the ran ge to en able all
Fast Ethernet inter faces in the range 0/1 to 0/3 an d Gigabit Ethernet interface s 0/1 and 0/2:
Switch# configure terminal
Switch(config)# interface range fastethernet0/1 - 3, gigabitethernet0/1 - 2
Switch(config-if-range)# no shutdown
Switch(config-if-range)#
*Oct 6 08:29:28: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up
*Oct 6 08:29:28: %LINK-3-UPDOWN: Interface FastEthernet0/2, changed state to up
*Oct 6 08:29:28: %LINK-3-UPDOWN: Interface FastEthernet0/3, changed state to up
*Oct 6 08:29:28: %LINK-3-UPDOWN: Interface GigabitEthernet0/1, changed state to up
*Oct 6 08:29:28: %LINK-3-UPDOWN: Interface GigabitEthernet0/2, changed state to up
*Oct 6 08:29:29: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/ 1,
changed state to up
*Oct 6 08:29:29: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/ 2,
changed state to up
*Oct 6 08:29:29: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/ 3,
changed state to up
If yo u enter multiple co nfigurati on co mm an ds while you are in inter f ace-range mode, each comman d is
executed as it is entered. The commands are not batched together and executed after you exit
interface- range mod e. If you exit interfac e-range con figuration mo de whil e the comma nds are being
executed, some comman d s mi ght n ot be executed o n all interf ac es in th e ra nge. Wait until the com mand
prompt re appears bef ore exiting int erface-ra nge co nfiguration mo de.