Basic Cisco Switch Configuration
Basic Cisco Switch Configuration
In my opinion, the Cisco switches are the best in the market. Versatile, reliable, flexible
and powerful, the Cisco switch product line (such as the 2960, 3560, 3650, 3850, 4500,
6500, 9400 series etc) offer unparalleled performance and features.
Although a Cisco switch is a much simpler network device compared with other devices
(such as routers and firewalls for example), many people have difficulties to configure a
Cisco Catalyst Switch.
Unlike other lower class switch vendors (which are plug-and-play), the Cisco switch
needs some initial basic configuration in order to enable management, security and
some other important features.
In this article I will describe the basic steps needed to configure and setup a Cisco
switch from scratch. I don’t like graphical GUI or web management at all, so I will show
you command line configuration (CLI) which is much more powerful and actually forces
the administrators to learn what they are doing on the device.
Use a terminal emulation software such as PuTTY and connect to the console of the
switch. You will get the initial command prompt “Switch>”
Type “enable” and hit enter. You will get into privileged EXEC mode (“Switch#”)
Note: The switch will not ask you for a password when entering into Privileged EXEC
mode (i.e after typing “enable”) if it has the default factory configuration. See Step 3
below about setting up a password for the Privileged EXEC mode.
The password above will be used to enter into Privileged EXEC mode as described in
Step 1 above.
It is a very good security practice to lock-down all access lines of a switch with a
password. Although it is much better to configure an external AAA server (for
centralized Authentication Authorization and Accounting), in this article we will just
configure a password on each access line (VTY lines for Telnet and Console line):
STEP5: Define which IP addresses are allowed to access the switch via Telnet
access-switch1(config)# ip access-list standard TELNET-ACCESS
access-switch1(config-std-nacl)# permit 10.1.1.100
access-switch1(config-std-nacl)# permit 10.1.1.101
access-switch1(config-std-nacl)# exit
By default, all physical ports of the switch belong to the native VLAN1. One of the most
important functions of an Ethernet switch is to segment the network into multiple Layer2
VLANs (with each VLAN belonging to a different Layer3 subnet).
In order to do the above Layer2 segmentation you need to create additional VLANs
from the default VLAN1 and then assign physical ports to these new vlans. Let’s create
two new vlans (VLAN2 and VLAN3) and assign two ports to each one.
! First create the Layer2 VLANs on the switch
access-switch1(config)# vlan 2
access-switch1(config-vlan)# name TEACHERS
access-switch1(config-vlan)# exit
access-switch1(config)# vlan 3
access-switch1(config-vlan)# name STUDENTS
access-switch1(config-vlan)# exit
! Now assign the physical ports to each VLAN. Ports 1-2 are assigned to VLAN2 and
ports 3-4 to VLAN3
access-switch1(config)# exit
access-switch1# wr
The above command to save the configuration can also be accomplished with copy
run start
The above are some steps that can be followed for basic set-up of a Cisco switch. Of
course there are more things you can configure (such as SNMP servers, NTP,
AAA, Vlan trunking protocol, 802.1q Trunk ports, Layer 3 inter-vlan routing etc) but
those depend on the requirements of each particular network.
After configuring the basic steps above, let’s see some useful commands to monitor
your configuration or troubleshoot possible problems: