Home » Computer Networks

Configuring Cisco Switches in Networking

In this tutorial, we are going to learn how to configure Cisco switches in network?
Submitted by Mahima Rao, on November 22, 2018

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.

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.

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

Ad: Are you a blogger? Join our Blogging forum.



Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing » Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates

© https://www.includehelp.com some rights reserved.