Day-22: Basic and Initial Configuration Commands in Cisco Routers & Switches.

By | June 8, 2022

As we have already discussed that CISCO device has a command hierarchy and it has multiple modes in CLI.

The basic CLI modes that we will be referring to below are as follows:

Router> =User EXEC Mode
Router# = Privileged EXEC mode
Router(config)#= Global Configuration Mode
Router(config-if)# =Interface Configuration Mode
Router(config-line)# =Line Configuration Mode

How to configure the Hostname?

Router(config)#  hostname IP-NOC
IP-NOC(config)#

How To Configure IP address in a Router?

IP-NOC(config)# interface GigabitEthernet 1/1
IP-NOC(config-if)# ip address 10.0.0.1 255.255.255.0
IP-NOC(config-if)# no shutdown
IP-NOC(config-if)# exit

How to configure the IP address in a Switch?

IP-NOC(config)# interface GigabitEthernet 0/0/1
IP-NOC(config-if)#no switchport
IP-NOC(config-if)# ip address 100.0.1 255.255.255.0
IP-NOC(config-if)# no shutdown
IP-NOC(config-if)# exit
IP-NOC(config)# interface vlan 1
IP-NOC(config-if)# ip address 192.168.1.1 255.255.255.0
IP-NOC(config-if)# no shutdown
IP-NOC(config-if)# exit

How to Save your configuration?

There are 2 commands to save the configuration in switch and router.

Router# copy running-config startup-config

Or

Router# write memory

How to Erase Configuration?

Router# erase startup-config 

OR

Router# write erase

How to reboot the Router?

Router# reload

How to check the IOS Version?

Router#show version

How To Display all memory locations and file names?

Router# dir all

How to Display the saved, startup configuration file ?

Router# show running-config

Router# show startup-config

How to Prevent Syslog and event messages from interrupting CLI input ?

Router(config)#line console 0
Router(config-line)# logging synchronous

How to prevent DNS resolution attempts for mistyped commands?

Router(config)# no ip domain-lookup

How to disable Auto time out from the console?

Router(config)#line console 0
Router(config-line)# exec-timeout 0 0
Router(config-line)#exit

How to set the Login banner ?

Router(config)#banner motd #Unauthorized access to this device is prohibited!#

How to Setting Up Clock & Date?

Router#clock set 01:02:15 09 june 2022

Leave a Reply

Your email address will not be published.