Understanding Modes and Sub-Modes

The ICLI implements a number of modes that control the available command set. The modes are further influenced by the privilege level of the user; some modes or commands are only accessible to administrators while others require no privileges beyond login.

There are three major modes: Exec, Privileged Exec, and Config. Under Config, there exist a number of sub-modes. The sub-modes allow configuration of specific VLANs, Ethernet interfaces, etc.

It is possible for a user to transition between these modes using certain commands, subject to the user’s privilege level and the current session privilege level

The initial mode is determined by the privilege level of the user logging in. If the privilege level is zero or one the user is unprivileged and begins in the (Unprivileged) Exec mode. If the privilege level is higher, the session begins in Privileged Exec mode.

A user can raise the Exec mode privilege level to a higher value if an enable password has been configured for that level. This elevation is done with the enable level command, where level is a value between 1 and 15. The reverse operation (lowering the privilege level) is achieved with the disable command.

Once in Privileged Exec mode, it is possible to enter into the global configuration mode by entering the command configure terminal. Exit from global configuration is achieved by typing end or exit and then pressing Enter or pressing Ctrl-Z.

Access to a configuration sub-mode (for example, Ethernet interfaces) goes through global configuration or another sub-mode. Thus, it is possible to change directly from VLAN sub-mode to Ethernet interface sub-mode, for instance.

Thus, each mode and sub-mode implements a scope for commands. Inside each mode, a particular subset of commands is available. To get to other commands, one must generally change mode/submode. This is necessary because there are commands with identical prefixes in different modes. For example, there are commands that begin with ‘ip’ in Privileged Exec, global configuration, and VLAN Interface Configuration modes.

There are two exceptions to this:

  • While in a configuration sub-mode, access to global configuration mode commands is possible as long as there is no ambiguity. Execution of a global configuration command exits the sub-mode.

  • Exec mode commands (whether privileged or unprivileged) are accessible from within global configuration or one of the sub-modes by using the do command.

The do command takes an arbitrary command line from Exec and executes it. In the following example, the user wants to change the IP address on the VLAN 1 interface and uses do to verify the current address while in the sub-mode.

Last updated