Cisco switch configuration

This article is all about how to configure a cisco switch. In this tutorial, we will learn about basic cisco switch configuration. Switches have two types one is manageable and another is non-manageable. We only configured manageable switches because non-manageable switches do not provide facility to configuring. So now here we will learn some basic configuration on switches like how to assign the hostname to a switch, how to setup MOTD (message of the day) on a switch, and also learn how to enable DNS lookup on the switch.

In this tutorial, we also learn that how to enable synchronous logging on switches, assign a local name to an IP address, and how to configure an inactivity time-out for automatic log-off on a cisco switch. This tutorial is helpful you for the CCNA certification exam. So let’s start here how to configure a switch.

How a real switch look like

1.  How to configure a hostname on cisco switch

Now use given below command to set a hostname on a cisco switch

Switch>enable

Switch#configure terminal

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

Switch(config)#hostname jaya

jaya(config)#exit

 

2.  How to configure MOTD (message of the day) on a cisco switch

Now use given below code to set MOTD on a switch

jaya>enable

jaya#configure terminal

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

jaya(config)#banner motd # Welcome to the age of tech#

jaya(config)#exit

Note: – Here ‘#’ character is known as a delimiting character

Always remember that the banner message should be surrounded by delimiting characters and the message should not contain the delimiting character in it.

 

3. How to configure an inactivity time-out for automatic log-off on a switch

Now use given commands to configure an inactivity time-out

Sets time-out for console automatically logs off

jaya>enable

jaya#configure terminal

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

jaya(config)#line console 0

 

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

jaya(config-line)#exit

jaya(config)#exit

If you want to set console never log off then type 0 0 (minute second) in the above command instead of 3 0

 

4.  How to turn on synchronous logging on a switch

Sometimes when we type a command on the switch by using console a message will interrupt our typing and shows that message on the switch. If you want to stop these messages from interrupting your work then turn on synchronous logging on your switch.

Now to turn on synchronous logging on a switch use given below commands

jaya>enable

jaya#configure terminal

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

jaya(config)#line console 0

jaya(config-line)#logging synchronous

jaya(config-line)#exit

jaya(config)#exit

 

5.  How to assign a local name to an IP address on a cisco switch

Now use given below command to assign a local name to an IP address. Once this is completed, we can use the configured hostname for telnet or ping instead of IP address.

jaya>enable

jaya#configure terminal

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

jaya(config)#ip host jaya 1.0.0.1

jaya(config)#exit

 

6.  How to enable DNS lookup on cisco switch 

jaya>enable

jaya#configure terminal

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

jaya(config)#ip name-server 1.0.0.1

jaya(config)#exit

 

Now we learn 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.

jaya>enable

jaya#configure terminal

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

jaya(config)#no ip domain-lookup

jaya(config)#exit

 

These are the basic cisco switch configurations which are used in daily life. If you have any queries related to this solved out through the comment section and also provide feedback to us.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s