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 (see section XXX).
The initial mode is determined by the privilege level of the user logging in. If the privilege level is 0 or 1,
the user is unprivileged and begins in the (Unprivileged) Exec mode. If the privilege level is higher, the
session begins in Privileged Exec mode. The User EXEC mode contains a limited set of commands. The
command prompt shown at this level is:
SWI2210-XXXX>
The 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. Level 15 is required to have access to the full suite of commands. The reverse
operation, lowering the privilege level, is achieved with the ‘disable’ command. The command prompt
shown at this level is:
SWI2210-XXXX#
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 with one of ‘end’, ‘exit’ or Ctrl+Z.
Access to a configuration sub-mode (e.g., for Ethernet interfaces) goes through Global Configuration or
another sub-mode, i.e., it is possible to change directly from, say, VLAN sub-mode to Ethernet interface
sub-mode.
Each mode and sub-mode thus 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/sub-mode. 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, be that privileged or unprivileged, are accessible from within Global
Configuration or one of the sub-modes by using the ‘do’ command.
The ‘do’ command takes the specified command line from Exec and executes it. In the following example,
the user wants to change the IP address on the VLAN 1 interface, but wants to verify the current address
while in the sub-mode.
Example: Using ‘do’ While In a Sub-mode
SWI2210-XXXX# configure terminal
SWI2210-XXXX(config)# interface vlan 1
SWI2210-XXXX(config-if-vlan)# do show ip interface brief
Vlan Address Method Status
---- -------------------- -------- ------
1 172.16.1.15/24 DHCP UP
SWI2210-XXXX(config-if-vlan)# end
! When in Exec, no ‘do’ prefix is needed:
SWI2210-XXXX# show ip interface brief
Vlan Address Method Status
---- -------------------- -------- ------
1 172.16.1.15/24 DHCP UP