General Networking Tutorial: CISCO Router Internetnetwork Operating System(IOS) CLI Basics
by: jawahar, 7/12/2005 8:12:54 PM, Views: 4054
To understand the CISCO Router CLI commands, basic usage and configuration of cisco routers you have to understand the command line interface(cli) of the cisco ios. It is through the CLI, every instructions or commands are given to the router(it is like the command prompt in windows or shell prompt in linux).
The command line interface(cli) has the following modes or levels of access for the execution of the router commands.
1. User execution mode 2. Privilege execution mode 3. Global configuration mode 3.1 interface configuration mode 3.2 sub-interface configuration mode 3.3 line configuration mode 3.4 router configuration mode
1. User execution mode
a. to view the statistics of the router b. we cannot do any modifications to the configuration in this mode.
Examples :
To view help type the command as follows in the router command prompt :
router>?
To display commands starting with letter 's'
router>s?
2. Privilege execution mode
here changes can be made and will affect the configuration of this router
a. To enter into privilege mode from user mode :
router>enable
then the prompt changes to
router#
b. To quit
router#logout
c. To view various parameters that can be used with the 'show' command :
router# show ?
d. To view the ios version:
router# show version
e. To copy the configuration from dram(temporary memory) to nvram(permanent memory) :
f. to view the content of the running config(dram) :
router# show running-config (or) router# sh run
g. to view the content of the startup config(nvram) :
router# show startup-config (or) router# sh start
h. to view the commands previously typed in the cli (by default 10 entries are shown)
router# show history
i. to change the default history size
router# terminal history size 20
j. to view the history size setting
router# show terminal
k. to view content of flash memory
router# show flash
l. to view the settings of the ethernet port 0
router# show int e0
m. to view the settings of the serial port 0
router# show int s0
n. to view the settings of all interfaces
router# show interfaces
o. to view the settings of all interfaces
router# show ip interface brief <-- to view only minimal details
3. Global configuration mode (the settings affects all interfaces and neighboring routers)
a. to enter into global configuration mode :
router# config terminal (or) conf t
then the prompt becomes
router(config)#
3.1 interface configuration mode :
a. to enable ethernet port 0 of the router :
router(config)# interface ethernet 0 (or) router(config)# int e0
then the prompt becomes
router(config-if)# ip address <ip address> <smask> router(config-if)# no shutdown (or) router(config-if)# no shut <-- to enable e0 router(config-if)# exit
b. to enable serial port 0 of the router :
router(config)# interface ethernet 0 (or) router(config)# int e0
then the prompt becomes
router(config-if)# ip address <ip address> <smask> router(config-if)# no shutdown (or) router(config-if)# no shut <-- to enable e0 router(config-if)# clock rate 64000 <-- only if the cable end is dce router(config-if)# exit
3.2 sub-interface configuration mode
a. to configure ethernet port 0.1
router(config)# interface ethernet 0.1 router(config-sub-if)# ip address <ip address> <smask> router(config-sub-if)# no shutdown router(config-sub-if)# exit
router(config)# router rip router(config-router)# network <network ip> router(config-router)# network <network ip> ... upto number of networks to be advertised) router(config-line)# exit
b. to remove a network from rip
router(config)# router rip router(config-router)# no network <net ip>
there are more commands and configurations that can be used in various above modes. the above commands are just examples. if you have more detailed document feel free to add it to Expertsforge