Basic commands of IOS

Contents of this article

In this article I describe Basic commands of IOS in Cisco Routers and switches for CCNA Exam. Basic commands of IOS in Cisco Router relates to set the hostname, password etc on first time. The result of basic commands of IOS in Cisco Router initially saved in running configuration and we need to copy the running configuration into the startup configuration. The basic commands of IOS in Cisco Router done by the CLI command lines in IOS or the router. IOS is acronym for Internetwork Operating System which is related to Cisco networking devices. IOS Internetwork Operating System provides the facility to run the basic commands of IOS of Cisco Router.

The configuration remain save in IOS memory via two way running and startup configuration. Basically running configuration is the settings which are running when a router is in functional condition. It is not necessary the running configuration remain save and come back when the router rebooted due to any reason. The startup configuration keep the setting in hard memory of router. Every time when router power on the startup configuration settings comes by default. The running configuration deleted automatically when the router goes power off. It is just like working with RAM and ROM.

The network administrator can change the configurations by basic commands of IOS in Cisco Router and maintain the networking device in a network by using Cisco IOS commands. IOS is an application which run as operating system for the networking devices like router or switch. Command Line Interface CLI in Cisco IOS provides a command line interface to a remote computer with various Cisco IOS command modes for network administrator. IOS load after a fix booting sequence every time when we boot the router or switch. On booting the router the startup configuration load in to the RAM of router So before learning about the Basic commands of IOS lets see some basic fundamentals of IOS Internetwork Operating System. You can also read the IOS booting sequence here.

Basic commands of IOS Necessity

IOS Internetwork Operating System is a Cisco propriety for Cisco networking devices like routers and switches. Network administrator can work with various Cisco IOS command modes of any networking device from a computer in the network. It is very helpful to do some configurations by basic commands of IOS in Cisco Router when a router need to be installed in the network. The basic commands of IOS run by Command Line Interface CLI in Cisco IOS. All the routing configuration and other settings saved in the IOS Internetwork Operating System of router.

IOS Internetwork Operating System provide to do any changes on any interface or the router or switch. IOS Internetwork Operating System provide to maintain the networking device from a very far location remotely. IOS of Cisco can be integrated with other networking devices like IBM and SNA. The Cisco IOS command modes are very user friendly, the user can take the help about any command from CLI for a device.

The IOS Internetwork Operating System allow to configure the encryption, routing and authentication in the router or switches. IOS Internetwork Operating System have three variants XE, XR and Nexus. The XE version available with aggregation service routers and catalyst switches. XR version available with carrier routers. Nexus allow to configure the Nexus family devices. Before IOS Internetwork Operating System Cisco run the CatOS on its networking devices. IOS Internetwork Operating System is operating system independent means you can run the IOS on windows as well as on Linux or Unix operating system. The IOS developed in the decade of 1980 for Cisco routers.

You may also like to read --  Power On a Cisco router

Types of memory used to run the Basic commands of IOS

There are multiple types of memory available in the router which takes part in the IOS Internetwork Operating System to run the Basic commands of IOS in Cisco Router. It is necessary to know about the various types of memory used in router for various purpose. We can say that each memory is responsible for different task for the IOS Internetwork Operating System. A Cisco router contains four main memories RAM, ROM, NVRAM and Flash memory.

RAM stands for Random Access Memory which is like a RAM in any computer. In a Router, RAM stores the running configuration and routing table with routing protocol. The IOS loaded in the RAM After the completion of IOS Booting sequence in the router. RAM stores the data until the router is power ON. After shutting down the router, all data stored in RAM will erase automatically.

ROM the Read Only Memory stores the data permanently in it. The ROM loaded the previously saved configuration in IOS Internetwork Operating System of router. Mostly the bootstrap start up program stored in ROM. The initial function known as POST is also stored in ROM and run during the first step of IOS Booting sequence in router.  

NVRAM memory is a type of RAM but it is Non-Volatile. The data saved previously in the NVRAM loaded after completion of IOS Booting sequence in router. It means the data stored in it doesn’t depends on Power on or off.  We can write the data multiple times on it. ROM is read only memory. The main difference between NVRAM and ROM is that data of NVRAM can be changed by configuration.

Another type of memory available in router is Flash memory. Flash memory keep save the IOS image. Flash memory is read and writable memory. In case of any error in the IOS Booting sequence the image of IOS can be used for booting the router.

The Basic commands of IOS in detail

Some basic configurations of Cisco Router are necessary to set first time. These basic configurations provide the information of router and allow you to access it. There are some common basic commands of IOS which can be used again and again during working with the CLI of a router or switch. The basic commands of IOS can be use to set some predefined mode and for navigation in the CLI of the IOS.

There are a lot of commands available in Cisco IOS for various configurations. In this article I discuss about some basic commands of IOS which are mostly used. I will also describe that How to use command Line interface perfectly. As we know there are three command modes in Cisco IOS CLI. We discuss all the command modes separately.

The hostname of router in this article is ccnatutorials.

User command mode

by default the Cisco router CLI appears in user mode. User mode can be access from telnet command if telnet password allowed to access it. So user mode can be identify by > symbol at the end of prompt following by router’s hostname. Here i am using a router whose hostname is ccnatutorials. So when we power on the router prompt the below line

 --- System Configuration Dialog ---
 Would you like to enter the initial configuration dialog? [yes/no]:  

This command line is asking whether you want to configure the basic settings firstly or do it later manually. I suggest type N here and press enter. We do the basic settings manually as per our requirement. If you press y and press enter the router will ask you to configure the basic settings. So type n and press enter you will got the below prompt in CLI

 Press RETURN to get started!
 ccnatutorials> 

TIPS you can type ? After any command to get help and press tab key to get full command syntax. Press up and down key to get previous and next commands similar to command prompt. See the example below

 ccnatutorials>en        (Now press tab key)
 ccnatutorials>enable  

Basic commands of IOS in User command mode

After power on the router in the user command mode type ? . You will get all the available commands in user mode. See the below example.

Basic commands of IOS, ccna, ccna tutorials

Enable command from Basic commands of IOS

Enable command is use to change the user mode to privilege mode. If there is enable password and enable secret password set then router will ask for password else enter into privilege mode. See the below command with password and without password.

 ccnatutorials>en
 ccnatutorials#
  
 With setting up password
  
 ccnatutorials>en
 Password:   (Enter password here, password will not be visible)
 ccnatutorials# 

Disable command from Basic commands of IOS

Opposite to enable command disable command is use to change the privilege mode to user mode. See below example

 ccnatutorials#disable
 ccnatutorials> 

Ping command from basic commands of IOS

Ping command run similarly as the command prompt in windows and linux terminal. You can ping any networking device from router CLI user mode command interface. See the below example

Basic commands of IOS, ccna, ccna tutorials

End and Exit commands from basic commands of IOS

End command change the command mode from global configuration mode to privilege mode. In privilege mode run Exit command your command mode will change to user mode. In user command mode exit command works. See the example below

 in global configuration command mode
 ccnatutorials(config)#end
 ccnatutorials#
 %SYS-5-CONFIG_I: Configured from console by console
 Router#
 
 in privilege command mode
 ccnatutorials#exit
 Router con0 is now available
 Press RETURN to get started.
 ccnatutorials> 

Show commands from basic commands of IOS

In user command mode show command have limited features to show. You can not see the running configuration or startup configuration from user command mode. You can see the following by show command from user command mode

 ccnatutorials>show ?
 arp Arp table
 cdp CDP information
 class-map Show QoS Class Map
 clock Display the system clock
 controllers Interface controllers status
 crypto Encryption module
 dot11 IEEE 802.11 show information
 flash: display information about flash: file system
 frame-relay Frame-Relay information
 history Display the session command history
 hosts IP domain-name, lookup style, nameservers, and host table
 interfaces Interface status and configuration
 ip IP information
 ipv6 IPv6 information
 lldp LLDP information
 policy-map Show QoS Policy Map
 pppoe PPPoE information
 privilege Show current privilege level
 protocols Active network routing protocols
 queue Show queue contents
 queueing Show queueing configuration
 sessions Information about Telnet connections
 ssh Status of SSH server connections
 tcp Status of TCP connections
 terminal Display terminal configuration parameters
 users Display information about terminal lines
 version System hardware and software status
 vlan-switch VTP VLAN status
 vtp Configure VLAN database 

Show command from privilege command mode

Here you can see the running configurations and startup configuration. To see the interface configurations show command run from privilege mode. See the below example.

 ccnatutorials#show running-config  
 Building configuration...
 Current configuration : 583 bytes
 !
 version 15.4
 no service timestamps log datetime msec
 no service timestamps debug datetime msec
 no service password-encryption
 !
 hostname ccnatutorials
 
 ip cef
 no ipv6 cef
 
 no ip domain-lookup
 
 spanning-tree mode pvst
 
 interface GigabitEthernet0/0/0
 no ip address
 duplex auto
 speed auto
 shutdown
 !
 interface GigabitEthernet0/0/1
 no ip address
 duplex auto
 speed auto
 shutdown
 !
 interface Vlan1
 no ip address
 shutdown
 !user command mode
 ip classless
 !
 ip flow-export version 9
 
 line con 0
 !
 line aux 0
 !
 line vty 0 4
 login
 end
 Router# 

Similarly you can see the startup configuration by show command in privilege mode. To check the gigabit Ethernet interface following command run in privilege command mode

 ccnatutorials#show interfaces gigabitEthernet 0/0/0
 GigabitEthernet0/0/0 is administratively down, line protocol is down (disabled)
 Hardware is Lance, address is 0007.ec28.b601 (bia 0007.ec28.b601)
 MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec,
 reliability 255/255, txload 1/255, rxload 1/255
 Encapsulation ARPA, loopback not set
 Full-duplex, 100Mb/s, media type is RJ45
 ARP type: ARPA, ARP Timeout 04:00:00,  
 Last input 00:00:08, output 00:00:05, output hang never
 Last clearing of "show interface" counters never
 Input queue: 0/75/0 (size/max/drops); Total output drops: 0
 Queueing strategy: fifo
 Output queue :0/40 (size/max)
 5 minute input rate 0 bits/sec, 0 packets/sec
 5 minute output rate 0 bits/sec, 0 packets/sec
 0 packets input, 0 bytes, 0 no buffer
 Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
 0 input packets with dribble condition detected
 0 packets output, 0 bytes, 0 underruns
 0 output errors, 0 collisions, 1 interface resets
 0 babbles, 0 late collision, 0 deferred
 0 lost carrier, 0 no carrier
 --More--  

 to check all interfaces run the following command show ip interfaces
 
 
 ccnatutorials#show ip interface  
 GigabitEthernet0/0/0 is administratively down, line protocol is down (disabled)
 Internet protocol processing disabled
 GigabitEthernet0/0/1 is administratively down, line protocol is down (disabled)
 Internet protocol processing disabled
 Vlan1 is administratively down, line protocol is down
 Internet protocol processing disabled 

Copy command from basic commands of IOS

you can copy the configuration from one to another by using this command following can be copied

Basic commands of IOS, ccna, ccna tutorials

Erase command from basic commands of IOS

Erase command delete the configuration which you want to delete and reload.

 ccnatutorials#erase startup-config  
 Erasing the nvram filesystem will remove all configuration files! Continue? [confirm]
 [OK]
 Erase of nvram: complete
 %SYS-7-NV_BLOCK_INIT: Initialized the geometry of nvram
 ccnatutorials# 

some common administrative configuration commands are hostname, banner discussed in previous article. See the example below

 Router(config)#hostname ccnatutorials
 ccnatutorials(config)#banner ?
 login Set login banner
 motd Set Message of the Day banner
 ccnatutorials(config)#banner login c
 Enter TEXT message. End with the character 'c'.
 this the login banner text which will be display on every login c
  
 ccnatutorials(config)# 

Do command from basic commands of IOS

Some commands can not be run from all command modes for example if you want to run show ip interface from global command mode, you will get an error. To run these special command a DO command is added from IOS version 12.3. you can run these commands from global command mode. See the below example

 ccnatutorials(config)#show ip interface
                                 ^
 % Invalid input detected at '^' marker.
 
 
 Similar command run with do then command executed successfully
 
 
 ccnatutorials(config)#do show ip interface
 GigabitEthernet0/0/0 is administratively down, line protocol is down (disabled)
 Internet protocol processing disabled
 GigabitEthernet0/0/1 is administratively down, line protocol is down (disabled)
 Internet protocol processing disabled
 Vlan1 is administratively down, line protocol is down
 Internet protocol processing disabled
 
  ccnatutorials(config)# 

These are some basic commands used by network administrator in all routers. After doing practice on above all commands in various command modes. I hope you can use all command modes efficiently. Practice all above commands to get perfection in CLI. Remaining commands will be discussed in next articles.

You may also like to read --  NAT Translation Entries in a router: A Step-by-Step Guide to Verification

In this article I described the basic commands of IOS in networking devices. For any query or suggestion on this article you may contact us or drop a comment below. Your suggestions are always welcome by us.

Share this article in your social circle :)
,

Leave a Reply

Your email address will not be published. Required fields are marked *