PASSWORDS
1. Router(config)#enable password test
Sets enable password to test
2. Router(config)#enable secret vinita
Sets enable secret password to Vinita
3. Router(config)#line console 0
Router(config-line)#password console
Router(config-line)#login
Enters console line mode
Sets console line mode password to console
Enables password checking at login
4. Router(config)#line vty 0 4
Router(config-line)#password telnet
Router(config-line)#login
Enters vty line mode for all five vty lines
Sets vty password to telnet
Enables password checking at login
5. Router(config)#line aux 0
Router(config-line)#password aux
Router(config-line)#login
Sets auxiliary line mode password to aux
Enters auxiliary line mode
Enables password checking at login
Note: The enable secret password is encrypted by default. The enable password
is not. In this case we need to use “service password-encryption”
Customize
1. Router(config)#interface fastethernet 0/0
Router(config-if)#description Student Lab
LAN
Moves to Fast Ethernet 0/0 interface configuration mode
Optional descriptor of the link is locally significant
2. Router(config)#banner motd # Next Schedule
metting with manager is Postponed #
Creating a Message of the Day Banner.
The MOTD banner is displayed on all terminals and is useful for sending messages that
affect all users. Use the no banner motd command to disable the MOTD banner. The
MOTD banner displays before the login prompt and the login banner, if one has been
created.
3. Router(config)#banner login # Unauthorized
access is prohibited!Enter your username
and password.#
The login banner displays before the username and password login prompts. Use the no
banner login command to disable the login banner. The MOTD banner displays before the
login banner.
4. Router(config)#ip host Lucknow 172.16.1.1
Assigning a Local Host Name to an IP Address.
5. Router(config)#no ip domain-lookup
The no ip domain-lookup Command
Turns off trying to automatically resolve an unrecognized command to a local host name
Ever type in a command incorrectly and are left having 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 Domain Name System
(DNS) server at address 255.255.255.255. If you are not going to set up DNS, turn off this
feature to save you time as you type, especially if you are a poor typist.
6. Router(config)#line console 0
Router(config-line)#exec-timeout 0 0
The logging synchronous Command
Sets the time limit when the console automatically logs off. Set to 0 0 (minutes seconds)
means the console never logs off.
The command exec-timeout 0 0 is great for a lab environment because the console never logs
out. This is considered to be bad security and is dangerous in the real world. The default for
the exec-timeout command is 10 minutes and zero (0) seconds (exec-timeout 10 0).
Saving and erasing configurations
1. Router#copy running-config startup-
config
Saves the running configuration to local NVRAM
2. Router#copy running-config tftp
Saves the running configuration remotely to a TFTP server
3. Router#erase startup-config
Deletes the startup configuration file from NVRAM
Clock Commands
1. Router# clock set 10:50:00 Oct 26 2006
Configure the clock
2. Router# show clock
View the time
3. Router(config)# clock timezone CST -6
Configure the time zone
Routing Protocols
RIP:
Router(config)#router rip
Router(config-router)#version 2
Router(config-router)#network 192.168.0.0
*Router(config-router)#timers basic 30 180
180 240
**Router(config-router)#passive-interface
Fa0/0 **
*adjust the timers (update, invalid, holddown, and flush timers)
**You will need to stop the updates from being broadcasted to the internet. For this
purpose, use the ‘passive interface’ command. This command prevents the interface from
forwarding any RIP broadcasts, but keeps the interface listening to what others are saying in
RIP.
EIGRP:
Router(config)#router eigrp 1
Router(config-router)#network 172.16.0.0
Router(config-router)#network 192.168.10.8
0.0.0.3
Router(config-router)#no auto-summary
Router(config-router)#redistribute static
Related commands:
1. Setting bandwidth(in kilobits)
Router(config)#int s0/0/1
Router(config-if)#bandwidth 1024
*Router(config-if)#ip bandwidth-percent
eigrp 1 50
* used to configure the percentage of bandwidth that may be used by EIGRP on an
interface.
2. View detailed information about the metrics
R2#show ip eigrp topology 192.168.1.0
3. Configuring Hello Intervals and Hold Times
Router(config)#int s0/0/1
Router(config-if)#ip hello-interval eigrp 1
60
Router(config-if)#ip hold-time eigrp 1 180
OSPF:
router(config)#router ospf 1
router(config-router)#network 10.130.8.0
0.0.0.255 area 0
router(config-router)#default-information
originate
Related commands:
1. #show ip ospf neighbor (for DR/BDR)
2. #show ip ospf interface
3. #show ip ospf
4. The OSPF router-id command
Router(config)#router ospf process-id
Router(config-router)#router-id ip-
address
5. Modifying the Router ID
Router#clear ip ospf process
6. Bandwidth, Cost, Hello-interval, Dead-interval
Router(config)#int s0/0/1
Router(config-if)#bandwidth bandwidth 64
Router(config-if)#ip ospf cost 1562
Router(config-if)#ip ospf hello-interval 54
Router(config-if)#ip ospf dead-interval 5
Interfaces
1. Loopback interface
Router(config)#int loopback 3
Router(config-if)#ip address 10.10.10.1
255.255.255.0
2. Default route
Router(config)# ip route 0.0.0.0 0.0.0.0
[next_hop_address]
Note: next_hop_address means the interface of the other Router through which the packets
will be sent.
3. Static route
Router(config)# ip route [source_net_addr]
[sub_mask] [next_hop_address]
Router(config)# ip route 192.168.8.0
255.255.248.0 192.168.9.2
Note:If possible, it is easier to manually summarize the source network addresses to on
address and then use it. If it’s not possible, each network has to be added one after another.
Checking commands
#show ip protocols (verify protocol)
#show ip route (examine the routing tables)
#show interface se0/0/1 (examine the actual values
used for bandwidth, delay, reliability, and load in the
computation of the routing metric)
Pc>cmd> ipconfig /all (for MAC address and others)