×

Computer Network Tutorial

Difference B/W Articles

Computer Network Practice

How to Configure Cisco Switch?

In this tutorial, we will learn about the configuration of a Cisco switch. By Mahima Rao Last updated : May 04, 2023

By default, all ports of a switch are enabled. As we are talking about layer 2 switching, there is no need to configure IP address or any routing protocol on the switch. In such a situation, the configuration is not focused on the switch.

Cisco Switch - The Normal Configuration

The normal configuration given below can be done on the switch:

  1. You can define the hostname on the switch.
  2. You can set the password for the switch.
  3. You can describe all the ports of the switch.
  4. You can set the password for the console ports.
  5. You can set the password of ports for Telnetting.

Steps (with commands) to Configure Cisco Switch

The above mentioned configuration list can be seen with the following example:

  • First, you have to execute the command execute using the command execution mode. You will see switch by default as soon as you open it. Once you run this command, you will enter into privileged execution mode. In this mode, you execute the config terminal command. By executing this command, you will be in the global configuration mode.
  • Switch>enable
    Switch# config terminal
    Switch(config)# 
    
  • You can configure your switch after coming into the global configuration mode. You use the hostname command to configure hostname on the switch. After this command, you can mention the name that you want to give to the switch.
  • Switch(config)#hostname MRSwitch
    
  • As soon as this command is executed, the name of your switch is set up.
  • MRSwitch(config)#
    
  • The switch can be protected from password so that no unauthorized person can access it. You use the enable secret command for this. After this command, you type the password you want to set for the switch.
  • MRSwitch(config)#enable secret MR123
    
  • To configure an interface of the switch, first, you have to go to the interface configuration mode. For this, use the interface command. Next, to this command, you have to type the name of the interface.
  • MRSwitch(config)# interface f0/16
    
  • To define the description of an interface, you use the description command in the interface configuration mode. Next, to this command, you write the description of that interface.
  • MRSwitch(config-if)# description Description of of/16 interface
    
  • You use the password command to set the password of any console line. But for this, you have to first go to the configuration mode of the console line you want to set. For this, you execute the line console command. Next, to this command, you type the console number of the console.
  • MRSwitch(config-if)# line console 0
    MRSwitch(config-line)#password mrconsole
    
  • After that, you can execute the login command. Anyone trying to access the console line by this command is forced to enter the password. If you do not execute the login command, then the password is set but the password is not compulsory to enter. You can execute this command even after the telnet password is set.
  • You use the line "vty" command to set the telnet password on the interfaces. Next, to this command, you give the range of virtual terminals lines. If you want to configure all 16 lines, then it gives 0 to 15 range. Then you set the telnet password with the password command and execute the login command.
  • MRSwitch(config-line)#line vty 0 15
    MRSwitch(config-line)#password mrtelnet
    MRSwitch(config-line)#login
    



Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.