Basic Cisco Switch Configuration

Rashmi Bhardwaj | Blog,Config & Troubleshoot,Routing & Switching
Advertisements

Configurations for Basic Cisco Switches –

This article is quite handy for IT network guys to perform Basic Cisco Switch Configuration. Below are the few of commonly used configuration commands on Catalyst family switches

CONFIGURE SWITCH HOSTNAME –

Hostname” command is configured from Global Configuration mode.

switch>enable

switch#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

switch(config)#hostname SW1

SW1(config)#exit

 

CONFIGURE BANNER –

Users will be presented with a MOTD (Message of the DAY) banner every time they attempt a connection via the console port, auxiliary port, SSH or a telnet session to Cisco switch. Here the “#” character is known as a delimiting character. The banner message should be surrounded by delimiting character.

Advertisements

SW1>enable

SW1#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

SW1(config)#banner motd #Welcome to Switching World#

SW1(config)#exit

SW1#

 

CONFIGURE DNS SERVER –

SW1>enable

SW1#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

SW1(config)#ip name-server 1.1.1.1

SW1(config)#exit

SW1#

 

DISABLE DOMAIN LOOKUP –

How to turn off the automatic name resolution for a Cisco Switch

The Cisco switch is set by default to try to resolve any word that is not a command to a DNS server at address 255.255.255.255. We can turn off this by using the following command.

SW1>enable

SW1#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

SW1(config)#no ip domain-lookup

SW1(config)#exit

SW1#

 

COFIGURE TO TURN ON SYNCHRONOUS LOGGING –

If the Cisco Switch IOS sends a message to the console while you’re entering a command, by default the switch will interrupt your work to show the message.

If you want the information sent to console not interrupt the command you are typing, turn on synchronous logging.

SW1>enable

SW1#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

SW1(config)#line console 0

SW1(config-line)#logging synchronous

SW1(config-line)#exit

SW1(config)#exit

SW1#

 

CONFIGURE INACTIVITY TIME-OUT FOR AUTOMATIC LOG-OFF

Sets time limit when console automatically logs off. Set to 0 0 (minutes seconds) means console never logs off.

SW1>enable

SW1#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

SW1(config)#line console 0

SW1(config-line)#exec-timeout 3 0

SW1(config-line)#exit

SW1(config)#exit

 

CONFIGURE CONSOLE LOGIN PASSWORD

SW1>enable

SW1#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

SW1(config)#line console 0

SW1(config-line)#password cisco                     ———“cisco” is password

SW1(config-line)#Login

SW1(config-line)#exit

SW1(config)#exit

 

CONFIGURE REMOTE LOGIN PASSWORD

SW1>enable

SW1#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

SW1(config)#line vty 0 15

SW1(config-line)#password cisco                     ——— “cisco” is password

SW1(config-line)#Login

SW1(config-line)#exit

SW1(config)#exit

 

CONFIGURE LOCAL DATABASE USERNAME PASSWORD

SW1>enable

SW1#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

SW1(config)#username ABC password cisco                     ——— “ABC” is Username and “cisco” is password

SW1(config)#line console 0

SW1(config-line)#Login local

SW1(config-line)#exit

SW1(config)#exit

Or

SW1>enable

SW1#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

SW1(config)#username ABC secret cisco                     ——— “ABC” is Username and “cisco” is password

SW1(config)#line console 0

SW1(config-line)#Login local

SW1(config-line)#exit

SW1(config)#exit

 

Along with User Exec mode we can also secure Privilege Exec mode. Two commands are available for it.

SW1(config)# enable password cisco            ——— “cisco” is password

or

SW1(config)# enable secret cisco123             ———“cisco123” is secret password

 

RESET SWITCH TO FACTORY DEFAULTS

SW1>enable

SW1#delete flash:vlan.dat

Delete filename [vlan.dat]?                   [Press Enter Key]

Delete flash:vlan.dat? [confirm]          [ Reconfirm by pressing enter key]

SW1#erase startup-config

SW1#reload

 

Hope you would have understood basic cisco switch configuration. Read our blogs on other types of configuration –

Cisco Layer 2 Switch IP Address & Default Gateway Configuration

Switch Stacking Basic Setup and Configuration Steps

Spine and leaf architecture cisco

ABOUT THE AUTHOR


Leave a Comment

Your email address will not be published. Required fields are marked *

Shopping Cart