Router Access Modes
When we access router command prompt the router will display different modes. According to the modes, privileges and rights are assigned to the user.
User mode
In this mode, we can display basic parameter and status of the router we can test connectivity and perform telnet to other devices. In this mode we are not enable to manage & configure router.
Privileged mode
In this mode, we can display all information, configuration, perform administration task, debugging, testing and connectivity with other devices. We are not able to perform here configuration editing of the router.
The command to enter in this mode is ‘enable’. We have to enter enable
password or enable secret password to enter in this mode. Enable secret has more priority than enable password. If both passwords are configured then only enable secret will work.
Global configuration
This mode is used for the configuration of global parameters in the router. Global parameters applied to the entire router. For e.g: - router hostname or access list of router The command enter in this mode is ‘configure terminal’.
Line configuration mode
This mode is used to configure lines like console, vty and auxiliary. There are main types of line that are configured.
(i) Console
router(config)#line console 0
(ii) Auxiliary
router(config)#line aux 0
(iii) Telnet or vty
router(config)#line vty 0 4
Interface configuration mode
This mode is used to configure router interfaces. For e.g:- Ethernet, Serial, BRI etc.
Router(config)#interface <type> <number>
Router(config)#interface serial 1
Routing configuration mode
This mode is used to configure routing protocol like RIP, EIGRP, OSPF etc.
Router(config)#router <protocol> [<option>]
Router(config)#router rip
Router(config)#router eigrp 10
Configuring Password
There are five types of password available in a router
(1) Console Password
router#configure terminal
router(config)#line console 0
router(config-line)#password <word>
router(config-line)#login
router(config-line)#exit
To erase password do all steps with no command.
router#configure terminal
router(config)#line vty 0 4
router(config-line)#password <word>
router(config-line)#login
router(config-line)#exit
(3) Auxiliary Password
router#configure terminal
router(config)#line Aux 0
router(config-line)#password <word>
router(config-line)#login
router(config-line)#exit
(4) Enable Password
router>enable
router#configure terminal
router(config)#enable password <word>
router(config)#exit
(5) Enable Secret Password
Enable Password is the clear text password. It is stored as clear text in configuration where as enable secret password is the encrypted password with MD5 (Media Digest 5) algorithm.
Router>enable
Router#configure terminal
Router(config)#enable secret <word>
Router(config)#exit
Encryption all passwords
All passwords other than enable secret password are clear text password. We can encrypt all passwords using level 7 algorithm. The command to encrypt all password are
Router#configure terminal
Router(config)#service password-encryption
Managing Configuration
There are two types of configuration present in a router
(1) Startup Configuration
(2) Running Configuration.
(1) Startup configuration is stored in the NVRAM. Startup configuration is used to save settings in a router. Startup configuration is loaded at the time of booting in to the Primary RAM.
(2) Running Configuration is present in the Primary RAM wherever we run a command for configuration, this command is written in the running configuration.
To save configuration
Router#copy running-configuration startup-configuration
To abort configuration
Router#copy startup-configuration running-configuration
To display running-configuration
Router#show running-configuration
To display startup configuration
Router#show startup-configuration
To erase old configuration
Router#erase startup-configuration
Router#reload
Save[y/n]:n
Access Router using console
Com/Port--------DB9------------------------Console
Cisco Console RJ45 Router
In windows
Click start=> program=> accessories=> comm.(communication)=> hyperterminal
Type any name
Select com port
Set settings
Speed 9600 stop bit 1
Data bits 8
Parity no
Click ok
Press shift+home to default prompt
CISCO command line shortcuts
Tab – to auto complete command ? – To take help
Ctrl+P – to recall previous command
Ctrl+N – next command
Ctrl+Z – alternate to ‘end’ command
Ctrl+C – to abort
Q – to quit
Ctrl+Shift+6 – to break connection
Command line editing shortcuts
Ctrl+A – to move cursor at start of line
Ctrl+E – to move cursor at end of line
Ctrl+ B – to move cursor one character back
Ctrl+F – to move cursor one character forward
Ctrl+W – to delete word one by one word back
Ctrl+D – to delete one character
Ctrl+U – to delete one line
Esc+B – to take cursor one word back
Esc+F – to take cursor one word forward
Configuring HostName
Router#configure terminal
Router#hostname <name>
<name>#exit or end or /\z
Configuration Interfaces
Interfaces configuration is one of the most important part of the router configuration. By default, all interfaces of Cisco router are in disabled mode. We have to use different commands as our requirement to enable and configure the interface.
Configuring IP, Mask and Enabling the Interface
Router#configure terminal
Router(config)#interface <type> <no>
Router(config-if)#ip address <ip> <mask>
Router(config-if)#no shutdown
Router(config-if)#exit
Interface Numbers
Interface numbers start from 0 for each type of interface some routers will directly used interface number while other router will use slot no/port no addressing technique.
Eth 0 Slot 1 Slot 0
Serial 0 Serial 1/0 Serial 0/0
Serial 1 Serial 1/1
To configure Interface description
Router#configure terminal
Router(config)#interface <type> <no>
Router(config-if)#description <line>
Configuring optional parameter on LAN interface
Router#configure terminal
Router(config)#interface <type> <no>
Router(config-if)#duplex <half|full|auto>
Router(config-if)#speed <10|100|auto>
Router(config-if)#end
Configuring optional parameter on WAN interface
Router#configure terminal
Router(config)#interfac <type> <no>
Router(config-if)#encapsulation <protocol>
Router(config-if)#clock rate <value>
Router(config-if)#end
To display interface status
Router#show interfaces (to show all interfaces)
Router#show interface <type> <no>
This command will display following parameters about an interface
When we access router command prompt the router will display different modes. According to the modes, privileges and rights are assigned to the user.
User mode
In this mode, we can display basic parameter and status of the router we can test connectivity and perform telnet to other devices. In this mode we are not enable to manage & configure router.
Privileged mode
In this mode, we can display all information, configuration, perform administration task, debugging, testing and connectivity with other devices. We are not able to perform here configuration editing of the router.
The command to enter in this mode is ‘enable’. We have to enter enable
password or enable secret password to enter in this mode. Enable secret has more priority than enable password. If both passwords are configured then only enable secret will work.
Global configuration
This mode is used for the configuration of global parameters in the router. Global parameters applied to the entire router. For e.g: - router hostname or access list of router The command enter in this mode is ‘configure terminal’.
Line configuration mode
This mode is used to configure lines like console, vty and auxiliary. There are main types of line that are configured.
(i) Console
router(config)#line console 0
(ii) Auxiliary
router(config)#line aux 0
(iii) Telnet or vty
router(config)#line vty 0 4
Interface configuration mode
This mode is used to configure router interfaces. For e.g:- Ethernet, Serial, BRI etc.
Router(config)#interface <type> <number>
Router(config)#interface serial 1
Routing configuration mode
This mode is used to configure routing protocol like RIP, EIGRP, OSPF etc.
Router(config)#router <protocol> [<option>]
Router(config)#router rip
Router(config)#router eigrp 10
Configuring Password
There are five types of password available in a router
(1) Console Password
router#configure terminal
router(config)#line console 0
router(config-line)#password <word>
router(config-line)#login
router(config-line)#exit
To erase password do all steps with no command.
router#configure terminal
router(config)#line vty 0 4
router(config-line)#password <word>
router(config-line)#login
router(config-line)#exit
(3) Auxiliary Password
router#configure terminal
router(config)#line Aux 0
router(config-line)#password <word>
router(config-line)#login
router(config-line)#exit
(4) Enable Password
router>enable
router#configure terminal
router(config)#enable password <word>
router(config)#exit
(5) Enable Secret Password
Enable Password is the clear text password. It is stored as clear text in configuration where as enable secret password is the encrypted password with MD5 (Media Digest 5) algorithm.
Router>enable
Router#configure terminal
Router(config)#enable secret <word>
Router(config)#exit
Encryption all passwords
All passwords other than enable secret password are clear text password. We can encrypt all passwords using level 7 algorithm. The command to encrypt all password are
Router#configure terminal
Router(config)#service password-encryption
Managing Configuration
There are two types of configuration present in a router
(1) Startup Configuration
(2) Running Configuration.
(1) Startup configuration is stored in the NVRAM. Startup configuration is used to save settings in a router. Startup configuration is loaded at the time of booting in to the Primary RAM.
(2) Running Configuration is present in the Primary RAM wherever we run a command for configuration, this command is written in the running configuration.
To save configuration
Router#copy running-configuration startup-configuration
Or
Router#writeTo abort configuration
Router#copy startup-configuration running-configuration
To display running-configuration
Router#show running-configuration
To display startup configuration
Router#show startup-configuration
To erase old configuration
Router#erase startup-configuration
Router#reload
Save[y/n]:n
Access Router using console
Com/Port--------DB9------------------------Console
Cisco Console RJ45 Router
In windows
Click start=> program=> accessories=> comm.(communication)=> hyperterminal
Type any name
Select com port
Set settings
Speed 9600 stop bit 1
Data bits 8
Parity no
Click ok
Press shift+home to default prompt
CISCO command line shortcuts
Tab – to auto complete command ? – To take help
Ctrl+P – to recall previous command
Ctrl+N – next command
Ctrl+Z – alternate to ‘end’ command
Ctrl+C – to abort
Q – to quit
Ctrl+Shift+6 – to break connection
Command line editing shortcuts
Ctrl+A – to move cursor at start of line
Ctrl+E – to move cursor at end of line
Ctrl+ B – to move cursor one character back
Ctrl+F – to move cursor one character forward
Ctrl+W – to delete word one by one word back
Ctrl+D – to delete one character
Ctrl+U – to delete one line
Esc+B – to take cursor one word back
Esc+F – to take cursor one word forward
Configuring HostName
Router#configure terminal
Router#hostname <name>
<name>#exit or end or /\z
Configuration Interfaces
Interfaces configuration is one of the most important part of the router configuration. By default, all interfaces of Cisco router are in disabled mode. We have to use different commands as our requirement to enable and configure the interface.
Configuring IP, Mask and Enabling the Interface
Router#configure terminal
Router(config)#interface <type> <no>
Router(config-if)#ip address <ip> <mask>
Router(config-if)#no shutdown
Router(config-if)#exit
Interface Numbers
Interface numbers start from 0 for each type of interface some routers will directly used interface number while other router will use slot no/port no addressing technique.
Eth 0 Slot 1 Slot 0
Serial 0 Serial 1/0 Serial 0/0
Serial 1 Serial 1/1
To configure Interface description
Router#configure terminal
Router(config)#interface <type> <no>
Router(config-if)#description <line>
Configuring optional parameter on LAN interface
Router#configure terminal
Router(config)#interface <type> <no>
Router(config-if)#duplex <half|full|auto>
Router(config-if)#speed <10|100|auto>
Router(config-if)#end
Configuring optional parameter on WAN interface
Router#configure terminal
Router(config)#interfac <type> <no>
Router(config-if)#encapsulation <protocol>
Router(config-if)#clock rate <value>
Router(config-if)#end
To display interface status
Router#show interfaces (to show all interfaces)
Router#show interface <type> <no>
This command will display following parameters about an interface
- Status
- Mac address
- IP Address
- Subnet mask
- Hardware type / manufacturer
- Bandwidth
- Reliability
- Delay
- Load ( Tx load Rx load)
- Encapsulation
- ARP type (if applicable)
- Keep alive
- Queuing strategy
- Input queue details Output queue details.
- Traffic rate (In packet per second, bit per second)
- Input packet details
- Output packet details
- Modem signals (wan interface only)
- M.T.U maximum transmission rate (mostly 1500 bytes
Configuring sub interface
Sub interface are required in different scenario. For e.g:- in Ethernet we need sub interface for Vlan communication and in frame relay we need sub interface for multipoint connectivity. Sub interface means creating a logical interface from physical interface.
Router#config ter
Router(config)#interface <type> <no> <subint no>
Router(config-subif)#
Router(config-subif)#end
Router(config)#interface serial 0.2
Configuring secondary IP
Router#config terminal
Router(config)#interface <type> <no>
Router(config-if)#IP address 192.168.10.5 255.255.255.0
Router(config-if)#IP address 192.168.10.18 255.255.255.0 secondary
Router(config-if)#no shutdown (to enable the interface because they always shutdown)
Router(config-if)#exit
Router#show run (to display secondary IP)
Managing Command Line History
We can use CTRL+P & CTRL+N shortcuts to display command history. By default router will up to 10 commands. In the command line history, we can use following commands to edit this setting
To display commands present in history
Router#show history
To display history size
Router#show terminal
To change history size
Router#config terminal
Router(config)#line console 0
Router(config-if)#history size <value(0-256)>
Router(config-if)#exit
Configuring Banners
Banners are just a message that can appear at different prompts according to the type Different banners are: -
Message of the day (motd)
This banner appear at every access method
Login
Appear before login prompt
Exec
Appear after we enter to the execution mode
Incoming
Appear for incoming connections
Syntax:-
Router#config terminal
Router(config)#banner <type> <delimation char>
Text Massage
<delimation char>
Router(config)#
Example:-
Router#config terminal
Router(config)#banner motd $
This router is distribution 3600 router connected to Reliance $.
Router(config)#
To configure synchronous logging on console
Router#config terminal
Router(config)#line console 0
Router(config)#logging synchronous
Router(config)#exit
Configuring Router Clock
We can configure router clock with the help of two methods.
(1) Configure clock locally
(2) Configure clock on NTP server (Network Time Protocol)
Router does not have battery to save the clock setting. So that clock will reset to the default on reboot.
To display clock
Router#show clock
To configure clock
Router#clock set hh:mm:ss day month year
00-23: 00-59:00-59 1-31 JAN-DEC 1993-2035
To configure clock from NTP server
Router#config terminal
Router(config)#ntp server <IP address>
Router(config)#exit
C:\>ping pool.ntp.org
To get ntp server ip from internet
C:\>route print
Rahul Khadse

Posted in: