Basic Cisco Router Switch Configuration

How to Configure a Router Hostname

To configure a name for router, use hostname command from Global Configuration mode.

Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname HappyRouter
HappyRouter(config)#exit
HappyRouter#


How to Configure a MOTD Banner for Router

Users will be presented with a MOTD (Message of the DAY) banner every time they attempt a connection via the console port, auxiliary port, or a telnet session to router. Use the following commands to configure a MOTD message. Here the “#” character is known as a delimiting character. The banner message should be sorrounded by delimiting character and the message should not contain the delimiting character.

HappyRouter>enable
HappyRouter#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
HappyRouter(config)#banner motd #Welcome to HappyRouter#
HappyRouter(config)#exit
HappyRouter#


How to enable DNS lookup

To configure a DNS server for your router, follow these steps.

HappyRouter>enable
HappyRouter#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
HappyRouter(config)#ip name-server 192.168.100.10
HappyRouter(config)#exit
HappyRouter#


How to turn off the automatic name resolution

The router 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.

HappyRouter>enable
HappyRouter#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
HappyRouter(config)#no ip domain-lookup
HappyRouter(config)#exit
HappyRouter#


How to assign a Local Name to an IP address

Following command assigns a host name to an IP address. Once this is completed, we can use the configured host name for telnet or ping.

HappyRouter>enable
HappyRouter#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
HappyRouter(config)#ip host PC001 192.168.100.122
HappyRouter(config)#exit
HappyRouter#


How to Turn on synchronous logging

If the router sends a message to the console while you’re entering a command, by default the router 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.

HappyRouter>enable
HappyRouter#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
HappyRouter(config)#line console 0
HappyRouter(config-line)#logging synchronous
HappyRouter(config-line)#exit
HappyRouter(config)#exit
HappyRouter#


How to configure an 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.

HappyRouter>enable
HappyRouter#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
HappyRouter(config)#line console 0
HappyRouter(config-line)#exec-timeout 3 0
HappyRouter(config-line)#exit
HappyRouter(config)#exit
HappyRouter#

2 comments: