How to Configure Cisco Switch | Easy Tutorial
This article is about the How to Configure Cisco Switch, a complete guide for configuration of Cisco Switch for a Beginner. For ease of understanding we are diving this tutorial into following basic steps :
- Access your Cisco Switch for Configurations
- Check the default or Current configurations on Switch
- Set Host-name on Cisco Switch
- Configuring Vlan on Switch
- Assign IP address to Cisco Switch
- Secure Your Switch with Basic Passwords
- Access and trunk port Configurations
Access your Cisco Switch for Configurations
For access your Cisco switch you may need a console cable. Power-on your Cisco switch. Now make a console connection for Basic Cisco Switch Configuration. You need a console cable for this, you can understand the whole process with the following figure.
Using a console or rollover cable, you can connect the switch to your computer. Once you have the physical cable connection, you are required a software for getting the configuration interface on your PC. For this you can use a famous software known as Putty, you can download it free from internet. Open the putty and you can try the following basic configurations for console connection to your Switch.
On successful connection you will see initial command-prompt “Switch>”. Type the command “enable” & press enter key to get in to privileged_mode with symbol (“Switch#”). This mode is know as privileged EXEC mode. You can learn more basic Cisco commands here.
Check the default or Current configurations on Switch
For checking the default or current configuration on switch you can use the command “show ruuning-configuration” in privileged EXEC mode. This command will show all configurations on switch. With the running configurations you can examine the different setting on switch like:
- IOS version of Cisco Switch
- Host-name of Cisco Switch
- IP configurations of different physical and virtual interfaces on switch
- Routing protocols configurations
- Different switch password
- etc
If you are using a new Cisco Switch then you need to configure it at own. In next steps you will learn the basic configurations of Cisco Switch.
Set Host-name on Cisco Switch
One of the basic setting initially you need to configure is to change the host-name of your switch. You can use the following configurations for setting host-name on Cisco Switch.
Switch>enable
Switch(config)#configure terminal
Switch(config)#hostname S1
S1(config)#exit
Configuring Vlan on Switch
With the VLAN you can reduce size of the broadcast-domain, and you can divide your network into different small network segments. Suppose you have two departments in your organization i.e. IT and HR , in such case you divide your network devices into two different network segment with using VLANs. And in this scenario you dont need the additional physical extra switch. You can create the vlans on your switch with the following commands:
Switch3(config)#vlan 10
Switch3(config-vlan)#exit
Switch3(config)#vlan 20
Switch3(config-vlan)#exit
Above command will create two vlans and you can assign IT department users to vlan 10 and HR department users to VLan 20. For assigning a port to VLan you can review the following commands:
s1(config) # interface range fe 0 / 1 - 2
s1(config -if-range) # switchport mode access
s1(config -if-range) # switchport access vlan 10
s1(config -if-range) # exit
s 1(config) # interface range fe 0 / 3 – 4
s 1 (config -if-range) # switchport mode access
s1(config- if-range) # switchport access vlan 20
s 1(config- if-range) # exit
With the above configuration port 1 and 2 are assign a vlan 10 (IT department) & interfaces f3 and f4 are assigned to vlan 20 (HR). You can learn more about inter-vlan routing from Here.
Assign IP address to Cisco Switch
You can assign IP address on Cisco switch if your switch have the layer-3 capability. If you dont have a layer-3 switch then you can even assign an IP address to vlan interface for management purposes. For assigning an IP address to Cisco Switch you need to access the respective interface and then use the following commands:
Sw2(config)#interface vlan 10
Sw2 (config -if) #ip address 172.111.1.11 255.255.255.0
Sw2(config -if) # no shutdown
For assigning an IP address to physical interface on Cisco switch you can user the same commands:
Sw2(config)#interface f0/1
Sw2 (config -if) #ip address 192.167.1.11 255.255.255.0
Sw2(config -if) # no shutdown
Secure Your Switch with Basic Passwords
You can set the different password on Cisco switch in order to make it secure. For setting the login password or enable password to cisco switch . You can use the following commands on Cisco Switch:
Sw1#configure t
Sw1(config) # line console 0
Sw1(config - line) # password CISCO
Sw1(config-line)#login
For the remote access or telnet access you can configure the password in following way:
Sw1(config-line)#line vty 0 15
Sw1(config-line)#password cisco
Sw1(config-line)#login
Sw1(config-line)#exit
Access and trunk port Configurations
There are different type of port that you can configure on your Cisco Switch like Access port and trunk port. Access port can carry the traffic of single Vlan only . Access port can be use to connect a PC or IP phone with your Cisco switch. Trunk port can carry the traffic for multiple vlans, Normally these port are use for connecting two switches with each other. Following are basic configuration examples of access and trunk ports:
For Trunk configurations you can use the following commands:
Sw1(config)# interface f 0/1 Sw1(config-if)# switchport mode trunk Sw1(config-if)# switchport trunk native vlan 10
For access port configurations you can review the following cisco configurations:
Sw1(config)# interface f0/1
Sw1(config-if)# switchport mode access
Sw1(config-if)# end
For more detailed on switch network you can visit How to design switch network.
Tutorial on Cisco Router Configuration CCNA
I hope this is informative for you, i tried to share the very basic information regarding the Cisco switch configuration in this article. I tried to cover the maximum content of the topic. If you believe that some info is still be the part of this article then please share your views in comments for further addition. Thank you for visiting and reading this…!
Most Asked BGP Interview Questions