Cisco IOS is the internetwork operating system of both the Cisco switches and routers. It has two interfaces command line interface(CLI) and Graphical User Interface(GUI). Since CCNA exam will surely test your knowledge on these interfaces, it is important to get familiar with them.
Cisco’s IOS command-line interface (CLI) is a text-based interface integrated with the IOS. When a switch or router boots up, the IOS loads the startup configuration from NVRAM and displays the IOS prompt, waiting for commands. We can enter the IOS commands at the IOS prompt.
In this article, we will see various command line modes on Cisco routers and switches. For this, we are going to use Packet Tracer. To see what is Packet Tracer and how to install it in both Linux and Windows, go here. For a startup guide on Packet Tracer, see here. Open Packet Tracer and select a Cisco 2960 switch.
Hover on the switch to see its ports.
Select a Computer from the End Devices and connect them with a Console wire. What we are simulating here is connecting to the switch from a PC through console.
Click on the Host device( Computer ). On the window that opens, click on Desktop tab and Click on Terminal.
The console opens with the switch booting. Switch finishes its booting operation and loads into user EXEC mode.
Coming to the modes of Cisco IOS, the Cisco IOS has five command line modes.
- Setup mode
- User EXEC mode
- Privileged EXEC mode
- Global configuration mode
- Specific Configuration mode
Setup mode is the initial configuration mode of Cisco switches and routers. They start in setup mode when no startup configuration exists in NVRAM. After completion of the setup mode, the Cisco IOS transitions to user EXEC mode.
User EXEC mode
The user EXEC mode is the normal operation mode on Cisco switches and routers. The Cisco IOS user EXEC prompt is the switch or router name followed by the ‘greater than’ character >. See all the commands available in user EXEC prompt by typing ‘?’
Privileged EXEC mode
Privileged EXEC mode is the advanced operation mode of Cisco IOS. It has been designed to restrict access to IOS commands that can have adverse effects on the Cisco device and its configuration. To enter privileged EXEC mode type “enable” or “en” .Privileged EXEC prompt is comprised of the switch or router name followed by the # character. To exit the privileged EXEC prompt type “disable”.
To see the commands available in privileged EXEC prompt, type ?.
Global Configuration mode
The global configuration mode is comprised of commands pertaining to the entire Cisco device. In other words, if we need to execute commands to modify the behavior of either the whole switch or the whole router we need to set the IOS in global configuration
mode. Global configuration mode can only be enabled from privileged
EXEC mode by typing “config t” or “conf t”. The prompt in this mode is comprised of the device name followed by “(config)#”.
See the commands available in this mode by typing ‘?’. If we need to execute a command not available in the global configuration mode we should prefix the command by “do”.
Specific configuration mode
The specific configuration mode is used for commands that affect the configuration of either just one part or range of components of the Cisco device. Suppose we want to work on a few interfaces (or ports) on our switch or router we need to enable specific configuration mode. We can enable specific configuration mode only from the global configuration mode by selecting the components we want to work with. The prompt in this mode is comprised of the router or switch host name followed by “(config-<component>)#”.
Let’s select interface fastethernet 0/1 by typing “interface fastethernet 0/1″.
If we want to run a command not available in specific configuration mode prefix the command by “do”. For example, run the command “do show running-config” in specific configuration mode.
We can exit from global configuration mode and specific configuration mode by typing “exit”.