Most switches used by small businesses and home offices typically require no configuration — they’re “plug and play.” However, it’s important to remember that plug and play doesn’t always work. In addition, these switches certainly don’t offer any troubleshooting, logging, security, or manageability.
So once you’re ready to make the jump to a more sophisticated switch, what do you need to know? Let’s answer some of the most frequently asked questions and explore the basic configuration of Cisco IOS switches.
#1: What’s the default VLAN?
The default VLAN on all switches is VLAN 1. By default, all ports on the switch are VLAN 1. With all ports in VLAN 1, all ports can communicate. As soon as you change the VLAN assignment for a switch port to another VLAN, that switch port won’t be able to communicate with the rest of the devices on other ports.
Figure A offers a look at the switch below in its default configuration. Notice how all ports are in VLAN 1.
#2: Why do I need to configure interface “vlan 1″?
If you want to be able to manage your switch remotely over the network, your switch needs an IP address. If your switch has multiple VLANs configured, and you want to be able to manage the switch from each VLAN, the switch requires an IP address on a VLAN interface in each VLAN.
To be able to manage your switch — even if all ports are left in default VLAN 1 — you still need to configure an IP address on the “vlan 1″ switch interface, which is, of course, in VLAN 1. Figure B shows how this switch has its VLAN 1 interface configured with an IP address in VLAN 1.
#3: Why does my switch need a default gateway?
Actually, your switch doesn’t have to have a default gateway configured. However, if you want to be able to communicate with your switch from another subnet, you need to configure a default gateway on the switch so it knows how to get to its local LAN switch.
Here’s how to configure a default gateway on a switch:
Switch(config)# ip default-gateway 10.92.103.254
#4: How do I get switch ports up fast?
Cisco switches can do a lot of things besides just connect regular PCs to the network. That’s why you should use the switch ports optimally — they need a little extra configuration.
To bring up a switch port for use and tell the switch that there will always be “access devices” (such as PCs) on that switch port, use the following two commands:
Switch(config)# interface FastEthernet0/48 Switch(config-if)# switchport mode access Switch(config-if)# no shutdown Switch(config-if)# spanning-tree portfast
#5 How important are speed and duplex on switch ports?
Speed and duplex are very important on switch ports. That’s not to say that speed and duplex aren’t important on switch Ethernet ports (which they are).
However, switches are all about connecting a device to the LAN, and there are many devices that need connecting, so you’re much more likely to run into speed and duplex issues on switch ports. There are always old and slow devices somewhere on the network that aren’t quite compatible with your switch, and they don’t quite negotiate the speed and duplex correctly.
Use this command to see what speed and duplex a switch port is currently running:
Switch# show interface gigabitEthernet 1/0/3
You’ll see a line like this:
Full-duplex, 100Mb/s, media type is 10/100/1000BaseTX
To change the speed or the duplex, use these commands:
Switch(config)# interface gigabitEthernet 1/0/3 Switch(config-if)# speed 100 Switch(config-if)# duplex half
Get more resources
Cisco switches are complex and can perform a wide variety of functions. To learn what else you can do with your Cisco switch, check out a few of my other Cisco switch articles:
- Evaluate the pros and cons of Cisco’s new Express 500 Series switches
- Upgrade your Cisco 2950 switch in four steps
- Lock down Cisco switch port security
- Analyze traffic on switch ports with SPAN and RSPAN
- Configure DHCP on a Cisco router or switch
- Basics of Cisco Switch Administration - Part 1
- Basics of Cisco Switch Administration - Part 2
- Video: How to Configure VLANs in the Cisco IOS
Cisco switches are very powerful, and there’s a lot to know about them. However, understanding the basics, like we covered in this article, can go a long way to comprehending the hows and whys of switch configuration.
Want to learn more about router and switch management? Automatically sign up for our free Cisco Routers and Switches newsletter, delivered each Friday!