Router Modes:
Router> User mode
Router# Privilege mode
Router(config)# Configuration mode
Router(config-if)# Interface configuration mode
Router(config-subif) Sub Interface configuration mode
Router(config-line)# Line mode
Router(config-router)# Router configuration mode
Global configuration mode in detail:
Router> Can see Router config, but cannot change any settings
Router# Can see Router config and move to config make changes
Router#conf t // configure terminal is shortly used as “conf t”
Router(config)# // Always try to use tab which will reduce time as well as gives the correct command
#Moves to global config mode, here you can do any changes with router
Configuring a Router name
Router(config)# hostname Area1-router
Area1-router(config)# // See the router name changed once new hostname is set
Configuring Passwords
Area1-Router(config)#
Area1-Router(config)#enable password cisco //Sets enable password
Area1-Router(config)#enable secret class //Sets enable secret password
Area1-Router(config)#line con 0 //Enters console-line mode
Area1-Router(config-line)#password console //Sets console-line mode password to console
Area1-Router(config-line)#login //Enables password checking at login
Area1-Router(config)#line vty 0 4 //Enters vty line mode for all 5 vty lines
Area1-Router(config-line)#password telnet //Sets vty password to telnet
Area1-Router(config-line)#login //Enables password checking at login
Area1-Router(config)#line aux 0 //Enters auxiliary line mode
Router(config-line)#password auxillary //Sets auxiliary line mode password to auxillary
Router(config-line)#login //Enables password checking at login
HINT:
Enable secret password is encrypted by default.
You cannot set both enable secret and enable password to the same password.
Password Encryption
Area1-Router(config)#service password encryption //Applies a weak encryption to passwords
Area1-Router(config)#no service password encryption //Turns off password encryption
HINT:
If you have turned on service password encryption, used it, and then turned it off, any passwords that you have encrypted will stay encrypted.
New passwords will remain unencrypted
Show Commands
Area1-Router#show ? //Lists all show commands available
Area1-Router#show interfaces //Displays statistics for all interfaces
Area1-Router#show interface serial 0/1 //Displays statistics for a specific interface, in this case Serial 0/1
Area1-Router#show ip interface brief //Displays a summary of all interfaces, including status and IP address assigned
Area1-Router#show controllers serial 0 //Displays statistics for interface hardware. Statistics display if the clock rate is set and if the cable is DCE, DTE, or not attached
Area1-Router#show clock //Displays time set on device
Area1-Router#show hosts //Displays local host-to-IP address cache. These are the names and addresses of hosts on the network to which you can connect
Area1-Router#show users //Displays all users connected to device
Area1-Router#show history //Displays history of commands used
Area1-Router#show flash //Displays info about Flash memory
Area1-Router#show version //Displays info about loaded software version
Area1-Router#show arp //Displays the ARP table
Area1-Router#show protocols //Displays status of configured Layer 3 protocols
Area1-Router#show startup-config //Displays configuration saved in NVRAM
Area1-Router#show running-config //Displays configuration currently running in RAM
HINT:
The clock rate command is used only on a serial interface that has a DCE cable plugged into it. There must be a clock rate set on every serial link between routers.
It does not matter which router has the DCE cable plugged into it, or which interface the cable is plugged into. Serial0/0 on one router can be plugged into Serial0/1 on another router.
Configuring an Ethernet/Fast Ethernet Interface
Area1-Router(config)#int s0/1 // Moves to interface S0/1 mode
Area1-Router(config-if)#exit
Area1-Router(config-if)#
Area1-Router(config-if)#int S0/1
Area1-Router(config-if)#int e0/1 In int S0/1 // move to E0/1
//Prompt will not change, you have to be careful
Area1-Router(config-if)#description Link to ISP //Optional descriptor of the link is locally significant
Area1-Router(config-if)#ip address 192.168.10.1 255.255.255.0 //Assigns address and subnet mask to interface
Area1-Router(config-if)#clock rate 56000 //Assigns a clock rate for the interface
Area1-Router(config-if)#no shut //Turns interface on
Creating a banner:
Area1-Router(config)#banner motd # This is a secure system. Authorized Personnel Only! # //Start and end message with #
HINT:
# is known as a delimiting character. The delimiting character must surround the banner message and can be any character so long as it is not a character used within the body of the message
Setting Time-Zone:
Area1-Router(config)#clock timezone EST –5 //Sets the time zone for display purposes. Based on coordinated universal time (Eastern Standard Time is 5 hours behind UTC)
Area1-Router(config)#ip host India-router 172.16.1.3 //Assigns a host name to the IP address. After this assignment, you can use the host name instead of an IP address when trying to Telnet or ping to that address
Area1-Router#ping India-router
=
Area1-Router#ping 172.16.1.3
HINT:
The default port number in the ip host command is 23, or Telnet. If you want to Telnet to a device, just enter the IP host name itself:
Router helpers/speeders:
Area1-router(config#)exec-timeout Command 23
Area1-router(config#)no ip domain-lookup Command
HINT:
Every time you type a command incorrectly you have to wait for a minute or two as the router tries to translate your command to a domain server of
255.255.255.255? 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.
If you are not going to set up DNS, turn this feature off to save you time.
logging synchronous Command
Area1-Router(config)#line con 0
Area1-Router(config-line)#logging synchronous //Turns on synchronous logging. Information items sent to console will not interrupt the command you are typing. The command will be moved to a new line
Area1-Router(config)#line con 0
Area1-Router(config-line)#exec-timeout 0 0 //Sets time limit when console automatically logs off. Set to 0 0 (minutes seconds) means console never logs off
Area1-Router(config-line)#
HINT:
exec-timeout 0 0 //It is a great for a lab because the console never logs out. This is very dangerous in the real world (bad security).
Saving and Erasing Configurations
Running-config is still in dynamic memory. Reload the router to clear the running-config.
Area1-Router#copy run start //Saves the running-config to local NVRAM
Area1-Router#copy run tftp //Saves the running-config remotely to TFTP server
Area1-Router#erase start //Deletes the startup-config file from NVRAM
Here is a related post you maybe interested in: General Switch commands