Basic configuration on cicso switches

CCNA

This article is all about how to configure a switch same as a router. In this tutorial, we will learn about that how to configure a switch, how to set hostname for a switch, how to set a banner on the switch, how to assign a local name to a IP address on switch, how to turn on synchronous logging on switch, how to set a automatic log off time on a switch and also learn that how to enable DNS lookup for a switch. This tutorial is helpful to you in understand switch configuration and It also helps you in networking related interviews and jobs.

Also Read: How to configure DHCP, DNS, HTTP servers in Cisco packet tracer along with switches?

Now here, I will run a command on a switch and explain its working in detail. So let’s start here.

How to set a hostname on cisco switch

Switch>enable

Switch#configure terminal

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

Switch(config)#hostname deepika

deepika(config)#exit

deepika#

This command is used for set hostname on the switch if you want to set your name on switch write your name in command instead of deepika. After that switch shows your name instead of deepika on it.

How to set a banner on the switch, in other words, MOTD(message of the day)

This message will be displayed every time on users screen when they attempt a connection via console port, auxiliary port, SSH or telnet session to the cisco switch

Use the following below-given command to set a MOTD on switch

deepika>enable

deepika#configure terminal

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

deepika(config)#banner motd #Welcome to the HACKERS NATION.#

deepika(config)#exit

Note:- Here the ‘#’ character is known as delimiting character.

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

How to assign a local name to an ip address on switch

use given below code to assign a name to an ip

deepika>enable

deepika#configure terminal

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

deepika(config)#ip host deepika 192.168.1.0

deepika(config)#exit

By this command you assign a name to an IP address. when this is completed, we can use the configured hostname for telnet and ping on a switch instead of ip address.

How to turn on synchronous logging on a switch

Sometimes cicso switch IOS sends a message to the console while you are entering a command in it, by default the switch will interrupt your work to show the message.

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

deepika>enable

deepika#configure terminal

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

deepika(config)#line console 0

deepika(config-line)#logging synchronous

deepika(config-line)#exit

deepika(config)#exit

How to set an inactivity time-out for automatic log off

Sets time limit when console automatically log off by using given below command

deepika>enable

deepika#configure terminal

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

deepika(config)#line console 0

deepika(config-line)#exec-timeout 4 0

deepika(config-line)#exit

deepika(config)#exit

If you wants to set your console at never log off then we type 0 0 instead of 4 0 (minutes seconds) to set console on never log off

How to enable DNS lookup for cicso switch

deepika>enable

deepika#configure terminal

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

deepika(config)#ip name-server 192.168.1.1

deepika(config)#exit

 

By using these commands cisco switch is set to default to resolve any word that is not a command to DNS server at address 255.255.255.255. Now to stop this process we use following below-given command to stop it.

deepika>enable

deepika#configure terminal

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

deepika(config)#no ip domain-lookup

deepika(config)#exit

THAT’S IT

Now your switch is configured as you desired, practice this lab to want to more perfection in cisco switch configuration. And if you have any query regarding this article then comment below and submit your query. I will be there to solve your query as soon as possible.

Your thoughts?

This site uses Akismet to reduce spam. Learn how your comment data is processed.