Basic Router Configuration
Basic Router Configuration
Swaih
Boston Router
No Command Purpose
Example:
Router> enable
2 Router#clock set 14:30:00 05 Nov 2017 Sets the local time on the router
3 Router#configure terminal = Enters global configuration mode
Router#config t
Example:
Router#configure terminal
Router(config)#
4 hostname name Specifies the name for the router, in this configuration, sets
the router name to Boston
Example:
Router(config)#hostname Boston
Boston(config)#
5 no ip domain-lookup Disables the router from translating unfamiliar words (spelling
mistake) into IP addresses.
Example:
Boston(config)#no ip domain-lookup
Boston(config)#
H.Swaih 1
H.Swaih
Boston(config)#
20 Boston(config)#no service password- Turns off password encryption
encryption
21 Boston(config)#Interface fastethernet 0/0 Move to interface fast Ethernet 0/0 configuration mode.
H.Swaih 2
H.Swaih
Example:
Boston(config)#
31 Boston(config)#ip host buffalo 172.16.20.2 Sets a local host name resolution to IP address 172.16.20.2,
After this assignment, you can use the host name rather than
an IP address when trying to Telnet or ping to that address.
32 Boston(config)# exit Move back to privileged mode.
Boston#
32 Boston#Copy running-config startup- Saves the running configuration to NVRAM “Non-volatile
config random-access memory”
Configuring a Gigabit Ethernet Interface
To configure the Gigabit Ethernet interface, you can replace no:21,22,23 and 24 from
above table to:
Example:
H.Swaih 3
H.Swaih
exec-timeout Command
Boston(config)# line console
Boston(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
Boston (config-line)#
CAUTION : exec‐timeout 0 0 is great for a lab because the console never logs out. This is
very dangerous in the real world (bad security).
CAUTION(see no 8): Enable secret password command is encrypted by default. Enable
password command is not. For this reason, recommended practice is that you never use
the enable password. Use only the enable secret password in a router configuration.
CAUTION(see no 8): You cannot set both enable secret and enable password to the
same password. Doing so defeats the use of encryption.
CAUTION(see no 20): 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
TIP (see no 28):The clock rate command is need only on a serial interface that has a DCE
cable plugged into it. There must a clock rate set on every serial link between routers. It
dose not matter which router has the DCE cable plugged into it or which interface the
cable is plugged into. Serial 0 on one router can be plugged into serial 1 on another
router.
■ Data communications equipment (DCE): A device that supplies the clocking services
to another device. Typically, this device is at the WAN access provider end of the link.
■ Data terminal equipment (DTE): A device that receives clocking services from another
device and adjusts accordingly. Typically, this device is at the WAN customer or user end
of the link.
TIP(see no 31): 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#buffalo =
Router#telnet buffalo = Router#telnet 172.16.20.2
TIP(see no 10): Ever try to type in a command and an informational line appears in the
middle of what you were typing? Lose your place? Do not know where you are in the
command, so you just press R and start all over? The logging synchronous command will
tell the router that if any informational items get displayed on the screen, your prompt
and command line should be moved to a new line, so as not to confuse you. The
informational line does not get inserted into the middle of the command you are trying
to type. If you were to continue typing, the command would execute properly, even
though it looks wrong on the screen
TIP(see no 5): Ever type in a command incorrectly and left having to wait for a minute or
two as the router tries to translate your command to a domain server of
H.Swaih 4
H.Swaih
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 as you type, especially if you are a poor
typist.
TIP (see no 32): The startup configuration is removed by using the erase startup‐config
command: Boston# erase startup‐config
TIP: Assuming that we have not overwritten the startup configuration with the changes,
we can replace the running configuration with the startup configuration. This is best
done by restarting the device using the reload command at the privileged EXEC mode
prompt. When initiating a reload, the IOS will detect that the running config has changes
that were not saved to startup configuration. A prompt will appear to ask whether to
save the changes made. To discard the changes, enter n or no. Example: Router# reload
Some show commands:
1 Router# show ? Lists all show commands available
2 Router# show ip interface brief Displays a summary of all interface, including status and IP
address assigned.
3 Router# show ip interface serial 0/0/0 Displays statistics for a specific interface (in this case, serial
0/0/0)
6 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
7 Router#show clock Displays time set on device
8 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
9 Router#show users Displays all users connected to device
H.Swaih 5
H.Swaih
Some useful commands
1.Using the Tab Key to compete commands
Router#sh “press Tab Key”=Router#show
2.Using the Question Mark for Help
Router#cl? = lists all the possible choices that start with cl (clear or clock)
3.Exit command
*Router#exit or Router>exit = Logs a user off
*Router(config‐if)#exit =Router(config)# = Move you back one level
*Router(config)#exit=Router#= Move you back one level
4.Disable command
Router#disable=Router> =move you from privileged mode back to user mode
5.logout command
Router#logout= performs the same function as exit
6.Setup Mode
Router#setup= enters startup mode from the command line
7.Keyboard Help
Ctrl+a= move cursor to beginning of line
Esc+b =move cursor back one word
Ctrl+b or left arrow = move cursor back one character
Ctrl+e= move cursor to end of line
Ctrl+f or right arrow= move cursor forward one character
Esc+f= move cursor forward one word
Ctrl+z= move you from any prompt back down to privileged mode.
8.History commands
Ctrl+P or up arrow= recall commands in the history buffer in a backward sequence,
beginning with the most recent command.
Ctrl+n or down arrow= return to more recent commands in the history duffer after
recalling commands with Ctrl+P key sequence.
H.Swaih 6