Ø USER
MODE, denoted by ( Router> )
Ø List of
User mode commands
Router >Enable (to go to privilege mode)
Router >show clock (to check current date and time)
Router >show flash: (to check contents of Flash)
Router >show hardware (to check hardware and software
details)
Router >show inventory (to check hardware and software
details)
Router >show version (to check hardware and software
specifications)
Router >show ip interface fastEthernet 0/0 (for a particular
interface)
Router >show ip interface brief (brief information of all
interfaces)
Ø PRIVILEGE
MODE, denoted by ( Router# )
Ø List of
Privilege mode commands
Router #configure terminal (to go to global configuration mode)
Router #show clock (to check current date and time)
Router #show flash: (to check contents of Flash)
Router #show hardware (to check hardware and software details)
Router #show history (to check previous commands)
Router #show inventory (to check hardware and software details)
Router #show privilege (to check current privilege level)
Router #show version (to check hardware and software
specifications)
Router #show ip interface fastEthernet 0/0 (for a particular
interface)
Router #show ip interface brief (brief information of all interfaces)
Router #show running-config (to check RAM configurations)
Router #show startup-config (to check NVRAM contents)
Router #write memory (save configurations from RAM to NVRAM)
Router#copy running-config startup-config (copy contents of RAM
into NVRAM)
Router#copy startup-config running-config (copy contents of
NVRAM into RAM)
Router #erase startup-config (to delete contents of NVRAM)
Router#delete flash: filename (to delete a file from flash)
Router #reload (to power cycle/reload/restart device)
Router #show users (to check for users currently accessing the
router.)
Ø GLOBAL
CONFIGURATION MODE, denoted by Router(config)#
Ø List of
basic Global mode commands
Router(config)#hostname I-Medita (to assign a name/hostname to
router)
I-Medita(config)#banner motd *message* (to assign a message of
the day banner)
I-Medita(config)#banner login *message* (to assign a login
banner)
Ø
Configure CONSOLE
password
Router(config)#line console 0
Router(config-line)#password cisco
Router(config-line)#login
Ø
Configure AUXILIARY (AUX)
password
Router(config)#line aux 0
Router(config-line)#password cisco
Router(config-line)#login
Ø
Configure VTY password
(for single user)
Router(config)#line vty 0
Router(config-line)#password cisco
Router(config-line)#login
Ø
Configure VTY password
(for multiple users, say 4)
Router(config)#line vty 0 3
Router(config-line)#password cisco
Router(config-line)#login
Ø Configure
ENABLE MODE password
Router(config)#enable password cisco
Ø Configure
ENABLE MODE (SECRET) password
Router(config)#enable secret ccna
v NOTE: YOU CAN’T USE SAME PASSWORD FOR ENABLE PASSWORD AND ENABLE
SECRET.
Ø To
encrypt all password
Router(config)#service password-encryption
Ø
Remove CONSOLE password
Router(config)#line console 0
Router(config-line)#no password
Router(config-line)#no login
Ø
Remove AUXILIARY password
Router(config)#line aux 0
Router(config-line)#no password
Router(config-line)#no login
Ø
Remove VTY password (for
single user)
Router(config)#line vty 0
Router(config-line)#no password
Router(config-line)#no login
Ø
Remove VTY password (for
multiple users, say 4)
Router(config)#line vty 0 3
Router(config-line)#no password
Router(config-line)#no login
Ø Remove
ENABLE MODE password
Router(config)#no enable password
Ø Remove
ENABLE MODE (SECRET) password
Router(config)#no enable secret
Ø To
assign IP address on an interface
I-Medita(config)#interface fastEthernet 0/0
I-Medita(config-if)#ip address 1.0.0.1 255.0.0.0
I-Medita(config-if)#no shutdown
Ø Steps
for password recovery on a router
·
Power off/on the router.
·
Press Ctrl+Pause/Break.
·
Router will go into rommon
mode (rommon>)
·
At rommon mode, give
following commands:
rommon>confreg 0x2142
rommon>reset
·
Now when router will reboot,
it will not demand any type of password.
·
Router#copy startup-config
running-config
·
Do the desired
configurations. Write the configurations.
·
At global mode, give
following commands:
Router(config)#config-register
0x2102 and reload the router.
Ø IOS
Backup
·
Assign an IP address on
router interface. Connect router with the device where you want to take backup
of IOS.
·
Assign same range IP address
on device. Device can be a dedicated TFTP server or a device acting as a
server.
·
Ensure the reachability.
·
Give following commands:
Router#Copy
flash: tftp:
Source
filename: Give the filename to be copied.
Address
or name of remote host: Enter the IP address of remote host or the device where
you want to take backup.
Ø IOS
RECOVERY / DISASTER RECOVERY COMMANDS
·
At rommon mode, give
following commands:
·
rommon>tftpdnld
·
rommon>IP_ADDRESS=
·
rommon>IP_SUBNET_MASK=
·
rommon>DEFAULT_GATEWAY=
·
rommon>TFTP_SERVER=
·
rommon>TFTP_FILE=
·
rommon>FE_PORT= (optional
field)
·
rommon>tftpdnld
·
Enter yes in dialogue box.
Ø To skip
DNS server lookup
Router(config)#no ip domain lookup
Ø To
synchronize log messages
Router(config)#line con 0
Router(config-line)#logging synchronous.
Ø To
disable log messages
Router(config)# no logging console
Ø To remote access (TELNET) a router
·
Give IP on router interface.
Router(config)#interface
fastEthernet 0/0
Router(config-if)#ip address
1.0.0.1 255.0.0.0
Router(config-if)#no
shutdown
·
Give Enable mode password or
Enable secret
Router(config)#Enable
password/secret “ccna”
· Give line vty mode password
Router(config)#line vty 0
Router(config)#transport
input telnet
Router(config-line)#password
ccna
Router(config-line)#login
· Assign same range IP on device from where you want to remote
access router.
· Go to command prompt and enter telnet command:
PC>telnet 1.0.0.1
Ø To
remote access a router via SSH
·
Give IP on router interface.
Router(config)#interface
fastEthernet 0/0
Router(config-if)#ip address
1.0.0.1 255.0.0.0
Router(config-if)#no
shutdown
·
Give Enable mode password or
Enable secret
Router(config)#Enable
password/secret “ccna”
·
Create an username and
assign a password
Router(config)#username ccna
password ccna
·
Assign a hostname of router
other than Router
Router(config)#hostname
“I-Medita”
· Create a domain name
Router(config)#ip domain
name “ccna”
· Generate a crypto key
Router(config)#crypto key
generate rsa (Rivest-Shamir-Adleman)
Enter any number between
360-2048 (most preferred value is >768).
The larger the number you
enter, bigger will the key. It will become harder for someone to crack. Also the
larger the key, CPU will require large resource for encryption and decryption.
· Go to line vty mode and give following commands:
Router(config)#line vty 0
Router(config)#transport
input ssh
Router(config-line)#password
ccna
Router(config-line)#login
local
· Router(config)#ip ssh version 2
· Assign same range IP on device from where you want to remote
access router.
· SSH ver 1(IPsec DES) & SSH ver 2 (3DES).
· If IOS supports K9, then it supports encryption.
Ø How to
assign privilege levels
· Privilege level range is from 0-15
· 0 means conditional access, 15 means full access.
· 1-14 means no global mode access
Comments
Post a Comment