Switch Configuration Command List
The following table lists common switch configuration commands:
Task
|
Command
|
Move to interface configuration mode
|
switch(config)#interface FastEthernet 0/14
switch(config)#interface GigabitEthernet 0/1
|
Move to configuration mode for a range of interfaces
|
switch(config)#interface range fastethernet 0/14 - 24
switch(config)#interface range gigabitethernet 0/1 - 4
switch(config)#interface range fa 0/1 - 4 , 7 - 10
switch(config)#interface range fa 0/8 - 9 , gi 0/1 – 2
|
Set the port speed on the interface
|
switch(config-if)#speed 10 switch(config-if)#speed 100 switch(config-if)#speed 1000 switch(config-if)#speed auto
|
Set the duplex mode on the interface
|
switch(config-if)#duplex half switch(config-if)#duplex full switch(config-if)#duplex auto
|
Enable or disable the interface
|
switch(config-if)#no shutdown switch(config-if)#shutdown
|
Show interface status of all ports
|
switch#show interface status
|
Show line and protocol status of all ports
|
switch#show ip interface brief
|
Be aware of the following switch configuration details:
- All switch ports are enabled (no shutdown) by default.
- Port numbering on some switches begins at 1, not 0. For example, FastEthernet 0/1 is the first FastEthernet port on a 2960 switch.
- Through auto-negotiation, the 10/100/1000 ports configure themselves to operate at the speed of attached devices. If the attached ports do not support auto-negotiation, you can explicitly set the speed and duplex parameters.
- If the speed and duplex settings are set to auto, the switch will use auto-MDIX to sense the cable type (crossover or straight-through) connected to the port and will automatically adapt itself to the cable type used. When you manually configure the speed or duplex setting, it disables auto-MDIX so you will need to be sure to use the correct cable.
- The 2960 switch always uses the store-and-forward switching method. On other switch models, you might be able to configure the switching method.