In this article we will help you understand Cisco IOS and Juniper JUNOS command line configurational modes that are first thing that you must know if you want to get into Cisco or Juniper device configuration. This modes will enable you to access different levels of configuration. In this manner you will be allowed to set the device up and running.
There are three modes and one submode: User EXEC, Privileged EXEC, Global configuration and configuration subcommand mode, or context.
User EXEC – User EXEC commands allow you to connect to remote devices, change terminal settings on a temporary basis, perform basic tests, and list system information. The EXEC commands available at the user level are a subset of those available at the privileged level. When we connect to the Cisco device by one of possible options (console, Telnet, and SSH) we are entering the first place of the CLI called user EXEC mode. User EXEC mode, sometimes also called user mode, allows the user to look around but not break anything. The “EXEC mode” part of the name refers to the fact that in this mode, when you enter a command, the switch executes the command and then displays messages that describe the command’s results.
Privileged EXEC mode – Cisco IOS supports a more powerful EXEC mode called enable mode (also known as privileged mode or privileged EXEC mode). Privileged EXEC commands set operating parameters. The privileged command set includes those commands contained in user EXEC mode, and also the configure command through which you can access the remaining command modes. Privileged EXEC mode also includes high-level testing commands, such as debug. Enable mode is so named because the enable command is used to reach this mode, as shown in basic router configuration. Privileged mode earns its name because powerful, or privileged, commands can be executed there. For example, you can use the reload command, which tells the switch to reinitialize or reboot Cisco IOS, only from enable mode.
- The most popular command in privileged EXEC mode if the command for configuring the password for reaching enable mode. This commands is the enable secret password command, where we can pick any password we want. If the enable password is not set, Cisco IOS will not let remote Telnet and SSH users from getting into enable mode, but Cisco IOS does allow a console user to enter enable mode. This is made like this so that users outside the locked room where the switch is situated cannot get access without additional configuration by the engineer.
Global configuration – Global configuration commands apply to features that affect the system as a whole. Configuration mode is a mode for the Cisco CLI like user mode and privileged mode. User mode lets you issue show and some more simple commands and display information. Privileged mode supports a lot more of commands compared to user mode, this means all different commands that might harm the device. We need to know that none of the commands in user or privileged mode changes the device configuration. Configuration mode accepts configuration commands, than commands tell the device the details of what to do, and how to do it. Commands they are entered in configuration mode update the active configuration file (running-configuration). These changes to the configuration occur immediately each time you press the Enter key at the end of a command, the command is entered directly into running configuration in Ram of switch or router.
Context – Context-setting commands tell the device the topic about which you will enter the next few configuration commands, for example the Interface context command will allow you to configure and modify everything about one interface or range of interfaces. More importantly, the context tells the switch or router the topic you care about right now, so when you use the ? to get help, the switch or router gives you help about that topic only.
Example of context command:Interface configuration – Interface configuration commands modify the operation of an interface such as an Ethernet or serial port. Many features are enabled on a per-interface basis. Interface configuration commands always follow an interface global configuration command, which defines the interface type. – Enter the interface type number command from global configuration mode. For example, enter the interface fastEthernet 0/0 command to configure the Fast Ethernet interface.
Example of entering and exiting all configuration modes:
This is shown when you connect to Cisco device. The User EXEC mode prompt is a right angle bracket (>):
With enable command we enter the privileged EXEC mode where we see that prompt is a pound sign (#).
With configure terminal command we enter the Global configuration mode where we see that prompt is a pound sign with config before (config)#.
To exit some of these modes and enter the lowest one, just type exit:
If you are interested in more details about device configuration, be free to visit basic Cisco and Juniper device configuration article.
The Junos OS command-line interface (CLI) is the software interface you use to connect to a device running Junos OS whether from the console or through a network.
The Junos OS CLI is a Juniper Networks-specific command shell that runs on top of a FreeBSD UNIX-based operating system kernel. By leveraging industry-standard tools and utilities, the CLI provides a powerful set of commands that you can use to monitor and configure devices running Junos OS. The CLI is a straightforward command interface. You type commands on a single line, and the commands are executed when you press Enter.
The Junos OS command-line interface (CLI) commands and statements are organized under two command modes and various hierarchies.
The Junos OS CLI has two modes:
Operational mode – This mode displays the current status of the device. In operational mode, you enter commands to monitor and troubleshoot the Junos OS, devices, and network connectivity.
Configuration mode – A configuration for a device running on Junos OS is stored as a hierarchy of statements. In configuration mode, you enter these statements to define all properties of the Junos OS, including interfaces, general routing information, routing protocols, user access, and several system and hardware properties.
When you enter configuration mode, you are actually viewing and changing a file called the candidate configuration. The candidate configuration file enables you to make configuration changes without causing operational changes to the current operating configuration, called the active configuration. The router or switch does not implement the changes you added to the candidate configuration file until you commit them, which activates the configuration on the router or switch. Candidate configurations enable you to alter your configuration without causing potential damage to your current network operations.
CLI commands are organized in a hierarchy. Commands that perform a similar function are grouped together under the same level of the hierarchy. For example, all commands that display information about the system and the system software are grouped under the show system command, and all commands that display information about the routing table are grouped under the show route command.
To execute a command, you enter the full command name, starting at the top level of the hierarchy. For example, to display a brief view of the routes in the routing table, use the command show route brief.
To log in to a router and start the CLI:
Log in as root.
The root login account has superuser privileges, with access to all commands and
Start the CLI:
root# cli root@>
The > command prompt shows you are in operational mode. Later, when you enter configuration mode, the prompt will change to #.
When you monitor and configure a device running Junos OS, you may need to switch between operational mode and configuration mode. When you change to configuration mode, the command prompt also changes. The operational mode prompt is a right angle bracket (>) and the configuration mode prompt is a pound sign (#).
Example of switch between operational mode and configuration mode:
When you log in to the router and type the cli command, you are automatically in operational mode:
--- JUNOS 9.2B1.8 built 2008-05-09 23:41:29 UTC % cli
To enter configuration mode, type the configure command or the edit command from the CLI operation mode. For example:
The CLI prompt changes from user@host> to user@host# and a banner appears to indicate the hierarchy level.
You can return to operational mode in one of the following ways:
To commit the configuration and exit:
 user@host# commit and-quit commit complete
To exit without committing:
 user@host# exit Exiting configuration mode user@host>
Device configuration in more details, be free to visit basic Cisco and Juniper device configuration article.