Cisco IOS Modes – User, Privileged, Config & Interface
1. Why IOS Has Multiple Modes
Cisco IOS (Internetwork Operating System) uses a hierarchical mode structure to protect the device from accidental or unauthorised changes. Every command in IOS is only available at a specific mode level — you cannot run a configuration command from user mode, and you cannot run a detailed debug command until you have reached privileged EXEC mode. This design enforces a clear separation between viewing state (lower modes) and changing state (higher modes).
Understanding which mode you are in — identified by the prompt on screen — is the first skill every Cisco engineer must master. An incorrect command at the wrong mode simply returns an error; understanding why that error occurs and how to reach the correct mode quickly is fundamental to working efficiently at the CLI.
| Mode | Prompt | Purpose | Access Restricted? |
|---|---|---|---|
| User EXEC | Router> |
Basic monitoring; limited show commands; no configuration | Password optional (line password or AAA) |
| Privileged EXEC | Router# |
Full show commands; debug; copy; reload; entry point to config modes | Yes — enable password or enable secret |
| Global Configuration | Router(config)# |
Device-wide configuration: hostname, routing, ACLs, AAA | Requires Privileged EXEC first |
| Interface Configuration | Router(config-if)# |
Configure a specific interface: IP address, description, speed | Entered from Global Config |
| Line Configuration | Router(config-line)# |
Configure console, VTY, and auxiliary lines: passwords, timeouts | Entered from Global Config |
| Router / Protocol Config | Router(config-router)# |
Configure routing process: OSPF, EIGRP, BGP, RIP networks | Entered from Global Config |
| Sub-Interface Config | Router(config-subif)# |
Configure logical sub-interfaces (GRE, Router-on-a-Stick) | Entered from Global Config |
| VLAN Config | Switch(config-vlan)# |
Configure VLAN parameters: name, state (on switches) | Entered from Global Config |
Related pages: SSH Configuration | show running-config | show ip route | show ip interface brief | show ip protocols | AAA Overview | AAA Authentication Methods | OSPF Overview | EIGRP Overview | Hostname, Banner & Password Lab | Console & VTY Line Configuration Lab | SSH Configuration Lab | Basic Interface Configuration Lab | Login Security & Brute-Force Protection Lab | Saving & Managing Cisco Configurations Lab
2. IOS Mode Navigation Map
IOS MODE HIERARCHY — Routers and Switches
[Power on / Console / SSH login]
│
▼
┌───────────────────────────────────────────────────┐
│ USER EXEC MODE │
│ Prompt: Router> or Switch> │
│ Commands: ping, traceroute, show version, │
│ telnet, disconnect, enable │
└───────────────────────────┬───────────────────────┘
│ enable (+ password if set)
│
▼
┌───────────────────────────────────────────────────┐
│ PRIVILEGED EXEC MODE │
│ Prompt: Router# or Switch# │
│ Commands: ALL show commands, debug, copy, │
│ reload, write, configure terminal │
└───────────────────────────┬───────────────────────┘
┌──────────────┘
│ configure terminal (conf t)
│
▼
┌─────────────────────────────────────────────────────────────────────┐
│ GLOBAL CONFIGURATION MODE │
│ Prompt: Router(config)# │
│ Commands: hostname, ip route, access-list, aaa, ntp, logging │
└──┬──────────────────────────────────────────────────────────────┬──┘
│ │
│ interface Gi0/0 line vty 0 15 router ospf 1 │
│ line con 0 router eigrp 100 │
▼ ▼ ▼ │
┌──────────────────┐ ┌──────────────────┐ ┌──────────────┐ │
│INTERFACE CONFIG │ │LINE CONFIG │ │ROUTER CONFIG │ │
│Router(config-if)#│ │Router(config- │ │Router(config-│ │
│ │ │line)# │ │router)# │ │
└──────────────────┘ └──────────────────┘ └──────────────┘ │
│ vlan 10
▼
┌───────────────┐
│VLAN CONFIG │
│Switch(config- │
│vlan)# │
└───────────────┘
NAVIGATION COMMANDS — memorise these:
┌──────────────────────────────────────────────────────────────────┐
│ enable — User EXEC → Privileged EXEC │
│ configure terminal (conf t) — Priv EXEC → Global Config │
│ interface — Global Config → Interface Config │
│ line — Global Config → Line Config │
│ router — Global Config → Router Config │
│ exit — Back one level (any sub-mode → parent) │
│ end or Ctrl+Z — ANY mode → Privileged EXEC (instant escape) │
│ disable — Privileged EXEC → User EXEC │
└──────────────────────────────────────────────────────────────────┘
3. User EXEC Mode
User EXEC mode is the entry-level access mode. It is the first mode a user reaches after logging in via the console port, an SSH session, or a Telnet connection. The prompt ends with a greater-than sign (>). User EXEC mode is intentionally restricted — it provides enough visibility to confirm basic device state but prevents any changes or detailed inspection.
Router> Switch>
3.1 Commands Available in User EXEC Mode
| Command | Purpose |
|---|---|
enable |
Enter Privileged EXEC mode (prompts for enable password if configured) |
ping <ip> |
Send ICMP echo requests to test basic reachability |
traceroute <ip> |
Trace the Layer 3 path to a destination |
show version |
Display IOS version, uptime, hardware model, and memory |
show ip interface brief |
Quick summary of all interfaces and their IP/status (read-only) |
telnet <ip> |
Open a Telnet session to another device |
ssh -l <user> <ip> |
Open an SSH session to another device |
disconnect |
Terminate an active SSH/Telnet session |
logout / exit |
Log out from the current session and return to the login prompt |
? |
List all commands available in the current mode (context-sensitive help) |
show commands (such as
show running-config, show ip route, and
show interfaces) are not available in User EXEC mode.
They require Privileged EXEC. If a show command is refused with
% Invalid input detected, move to Privileged EXEC first
with enable.
4. Privileged EXEC Mode
Privileged EXEC mode is the full-access operational mode. The prompt
ends with a hash / pound sign (#). From here, an engineer can run
any show command, execute debug, manage files,
save or reload the configuration, and enter Global Configuration mode to
make changes. This mode is protected by an enable password or, more
securely, an enable secret (which uses MD5 hashing).
Router# Switch# Entering Privileged EXEC: Router> enable Password: **** ← Enable secret/password entered here (not echoed) Router# Returning to User EXEC: Router# disable Router>
4.1 Key Commands in Privileged EXEC Mode
| Category | Example Commands | Purpose |
|---|---|---|
| Show / Verify | show running-configshow startup-configshow ip routeshow interfacesshow versionshow ip ospf neighbor |
Display all current configuration and device state; most
show commands require Privileged EXEC |
| Debug | debug ip ospf eventsdebug ip icmpundebug all |
Enable real-time event tracing; produces verbose output;
always disable with undebug all after use |
| File / Config Management | copy running-config startup-configcopy running-config tftpwrite memory (or wr)erase startup-config |
Save running configuration to NVRAM; back up to TFTP; erase the saved config |
| Reload / Reset | reloadboot system |
Restart the device; specify alternate boot image |
| Enter Config Mode | configure terminal (or conf t) |
Transition to Global Configuration mode to make changes |
| Clock / Time | clock set 09:14:22 14 March 2025 |
Manually set the hardware clock (normally done by NTP) |
| Terminal | terminal length 0terminal monitor |
Disable paging (prevent --More-- prompts); enable syslog in VTY session |
enable secret
<password> — it stores the password as an MD5 hash in the config.
enable password stores the password in plain text (or weak Type 7
encryption with service password-encryption). If both are
configured, enable secret always takes precedence.
5. Global Configuration Mode
Global Configuration mode is the top-level configuration mode —
commands entered here affect the entire device. The prompt is
Router(config)#. This mode is entered from Privileged EXEC
with configure terminal (abbreviated conf t).
Router# configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)#
5.1 Key Global Configuration Commands
| Command | Purpose |
|---|---|
hostname <name> |
Set the device hostname — immediately changes the CLI prompt |
enable secret <password> |
Set the privileged EXEC password (MD5-hashed) |
service password-encryption |
Apply weak Type 7 encryption to all plain-text passwords in config |
ip route <dest> <mask> <next-hop> |
Add a static route to the routing table |
ip domain-name <name> |
Set the domain name — required for generating RSA keys for SSH |
crypto key generate rsa modulus 2048 |
Generate RSA key pair to enable SSH |
username <name> privilege <lvl> secret <pass> |
Create a local user account with a specific privilege level |
aaa new-model |
Enable the AAA security framework |
no ip domain-lookup |
Disable DNS lookup — prevents the router from trying to resolve mistyped commands as hostnames (a lab essential) |
banner motd # message # |
Set the Message-of-the-Day banner displayed at login |
ip access-list standard <name> |
Create/enter a named standard ACL |
logging host <ip> |
Configure remote syslog server |
ntp server <ip> |
Configure NTP server for time synchronisation |
6. Interface Configuration Mode
Interface Configuration mode is entered from Global Config by
specifying the interface type and number. The prompt changes to
Router(config-if)#. All commands entered here apply
only to the selected interface — changing to a different interface
requires a new interface command.
! Enter interface config mode: Router(config)# interface GigabitEthernet0/0 Router(config-if)# ! Shorthand accepted: Router(config)# interface gi0/0 ← abbreviated Router(config)# interface gi 0/0 ← with space Router(config)# interface g0/0 ← minimal abbreviation
6.1 Key Interface Configuration Commands
| Command | Purpose |
|---|---|
ip address <ip> <mask> |
Assign an IPv4 address to the interface |
ipv6 address <addr>/<prefix> |
Assign an IPv6 address to the interface |
no shutdown |
Enable the interface (interfaces are administratively down by default on routers) |
shutdown |
Administratively disable the interface |
description <text> |
Add a human-readable label to the interface (for documentation) |
speed <10|100|1000|auto> |
Set the interface speed (default auto) |
duplex <half|full|auto> |
Set the duplex mode (default auto) |
switchport mode access |
Set switch port as an access port (Layer 2, one VLAN) |
switchport access vlan <id> |
Assign the access port to a specific VLAN |
switchport mode trunk |
Set switch port as a trunk port (carries multiple VLANs) |
ip helper-address <ip> |
Configure DHCP relay — forward broadcasts to a remote DHCP server |
ip access-group <name> <in|out> |
Apply an ACL to the interface in the specified direction |
spanning-tree portfast |
Enable PortFast on an access port (skip STP listening/learning) |
6.2 Moving Between Interfaces
! Move directly from one interface to another (no need to exit first): Router(config-if)# interface GigabitEthernet0/1 Router(config-if)# ← Now in Gi0/1 context ! Return to Global Config: Router(config-if)# exit Router(config)# ! Jump directly to Privileged EXEC from any config sub-mode: Router(config-if)# end Router# ! OR use Ctrl+Z — same effect as 'end'
7. Line Configuration Mode
Line Configuration mode is used to configure the management access
lines of the device — the console port, VTY (virtual terminal) lines for
SSH/Telnet, and the auxiliary port. The prompt is
Router(config-line)#.
! Console line (physical console port): Router(config)# line console 0 Router(config-line)# ! VTY lines for SSH / Telnet (0-4 allows 5 simultaneous sessions): Router(config)# line vty 0 4 Router(config-line)# ! All VTY lines (0-15 allows 16 simultaneous sessions): Router(config)# line vty 0 15 Router(config-line)# ! Auxiliary port (serial modem access): Router(config)# line aux 0 Router(config-line)#
7.1 Key Line Configuration Commands
| Command | Purpose |
|---|---|
password <password> |
Set the line password (used with login, not
login local) |
login |
Require the line password for access; used with the
password command |
login local |
Require a local username/password from the device's user database
(requires username commands in global config) |
transport input ssh |
Allow only SSH connections on VTY lines (disables Telnet) |
transport input telnet ssh |
Allow both Telnet and SSH (not recommended for production) |
transport input none |
Block all remote access to VTY lines |
exec-timeout <min> <sec> |
Set the idle session timeout — exec-timeout 5 0 disconnects
after 5 minutes of inactivity |
exec-timeout 0 0 |
Disable idle timeout — session never disconnects (lab use only) |
logging synchronous |
Prevent syslog messages from interrupting command typing by re-displaying the current input after a log message |
access-class <acl> in |
Apply an ACL to restrict which source IPs can connect to VTY lines |
8. Router / Routing Process Configuration Mode
Router Configuration mode (also called Routing Process mode) is entered
to configure dynamic routing protocols — OSPF, EIGRP, BGP, RIP, and others.
The prompt is Router(config-router)#. Commands here apply to
the specific routing process started with the router command.
! Enter OSPF routing process (process ID 1): Router(config)# router ospf 1 Router(config-router)# ! Enter EIGRP routing process (AS 100): Router(config)# router eigrp 100 Router(config-router)# ! Enter BGP (AS 65001): Router(config)# router bgp 65001 Router(config-router)# ! Enter RIPv2: Router(config)# router rip Router(config-router)# version 2
8.1 Common Router Process Commands
| Protocol | Key Commands in (config-router)# |
|---|---|
| OSPF | network <ip> <wildcard> area <n>,
router-id <ip>,
passive-interface <intf>,
default-information originate |
| EIGRP | network <ip> <wildcard>,
no auto-summary,
passive-interface <intf>,
eigrp router-id <ip> |
| BGP | neighbor <ip> remote-as <n>,
network <ip> mask <mask>,
bgp router-id <ip> |
| RIP | version 2,
network <classful-ip>,
no auto-summary,
passive-interface <intf> |
9. Other Configuration Sub-Modes
9.1 Sub-Interface Configuration Mode
! Create and enter a logical sub-interface (used for ROAS, GRE): Router(config)# interface GigabitEthernet0/0.10 Router(config-subif)# ! Key sub-interface commands: Router(config-subif)# encapsulation dot1q 10 ! Tag for VLAN 10 Router(config-subif)# ip address 192.168.10.1 255.255.255.0 Router(config-subif)# description Sales-VLAN-Gateway
9.2 VLAN Configuration Mode (Switches)
! Create and name a VLAN: Switch(config)# vlan 10 Switch(config-vlan)# name Sales Switch(config-vlan)# state active ! or 'suspend' Switch(config-vlan)# exit ! Create multiple VLANs quickly: Switch(config)# vlan 10 Switch(config-vlan)# name Sales Switch(config)# vlan 20 Switch(config-vlan)# name Finance Switch(config)# vlan 30 Switch(config-vlan)# name Engineering
9.3 Named ACL Configuration Mode
! Create/enter a named extended ACL: Router(config)# ip access-list extended BLOCK-HTTP Router(config-ext-nacl)# deny tcp any any eq 80 Router(config-ext-nacl)# permit ip any any Router(config-ext-nacl)# exit ! Named standard ACL: Router(config)# ip access-list standard MGMT-ACCESS Router(config-std-nacl)# permit 10.0.0.0 0.0.0.255 Router(config-std-nacl)# deny any
10. Complete Navigation Example – Router Configuration
The following is a complete walkthrough showing all mode transitions during a typical initial router setup, demonstrating how to navigate the IOS mode hierarchy efficiently.
! ═══════════════════════════════════════════════════════════════════ ! Starting from User EXEC after console login ! ═══════════════════════════════════════════════════════════════════ Router> Router> enable Password: (enable secret entered) Router# ! ── Enter Global Config ────────────────────────────────────────── Router# configure terminal Router(config)# ! ── Set hostname ───────────────────────────────────────────────── Router(config)# hostname HQ-Router HQ-Router(config)# ← Prompt changes immediately ! ── Set enable secret ──────────────────────────────────────────── HQ-Router(config)# enable secret Str0ngEnableP@ss HQ-Router(config)# service password-encryption ! ── Disable DNS lookup ─────────────────────────────────────────── HQ-Router(config)# no ip domain-lookup ! ── Configure interface ────────────────────────────────────────── HQ-Router(config)# interface GigabitEthernet0/0 HQ-Router(config-if)# description Link-to-ISP HQ-Router(config-if)# ip address 203.0.113.1 255.255.255.252 HQ-Router(config-if)# no shutdown HQ-Router(config-if)# ! ── Move directly to another interface ─────────────────────────── HQ-Router(config-if)# interface GigabitEthernet0/1 HQ-Router(config-if)# description LAN-Interface HQ-Router(config-if)# ip address 192.168.1.1 255.255.255.0 HQ-Router(config-if)# no shutdown ! ── Return to Global Config ────────────────────────────────────── HQ-Router(config-if)# exit HQ-Router(config)# ! ── Configure VTY lines for SSH only ───────────────────────────── HQ-Router(config)# line vty 0 15 HQ-Router(config-line)# login local HQ-Router(config-line)# transport input ssh HQ-Router(config-line)# exec-timeout 10 0 HQ-Router(config-line)# logging synchronous ! ── Jump back to Privileged EXEC from any sub-mode ─────────────── HQ-Router(config-line)# end HQ-Router# ! ── Save the configuration ─────────────────────────────────────── HQ-Router# copy running-config startup-config Destination filename [startup-config]? Building configuration... [OK] HQ-Router#
11. Useful IOS CLI Tips
| Tip | How It Works | Example |
|---|---|---|
| Command abbreviation | Any command can be shortened to the minimum unique prefix — IOS auto-completes if the abbreviation is unambiguous | conf t = configure terminalsh ip int br = show ip interface brief |
| Context-sensitive help (?) | Typing ? alone lists all valid commands;
typing a partial command then ? lists completions |
sh? — lists all commands starting with "sh"show ip ? — lists all sub-options after "show ip" |
| Tab completion | Press Tab to auto-complete a partially typed command | conf<Tab> → configure |
| Command history | Up/down arrow keys cycle through previously entered commands;
show history lists recent commands |
↑ arrow recalls the last command for re-entry or editing |
| Ctrl+Z / end | Instantly exit from any configuration sub-mode back to Privileged
EXEC — faster than multiple exit commands |
From (config-if)# → press Ctrl+Z → # |
| no command | Prepend no to any command to negate (remove) it |
no ip address removes the IP addressno shutdown enables an interfaceno logging console disables console logging |
| terminal length 0 | Disables the --More-- pagination prompt — all output
scrolls continuously; useful for copying configs |
Router# terminal length 0 |
| do command | Run a Privileged EXEC command from inside a configuration sub-mode without exiting — very useful for verifying while configuring | HQ-Router(config-if)# do show ip interface brief |
12. Common Mode Mistakes and How to Avoid Them
| Mistake | What Happens | Fix |
|---|---|---|
Trying to run show running-config from User EXEC |
% Invalid input detected at '^' marker — the command
is not available at this mode level |
Type enable first to enter Privileged EXEC |
Typing configuration commands in Privileged EXEC (without conf t) |
% Invalid input detected — config commands are only
available in configuration modes |
Enter configure terminal first, then retype the command |
Forgetting no shutdown on a newly configured interface |
Interface stays administratively down even though it has an IP; routing protocols will not form adjacencies | While in (config-if)#, type no shutdown |
| Mistyping a hostname that IOS tries to DNS-resolve | Router freezes for 30–60 seconds while trying to resolve the typo
as a DNS name (e.g., Router# shwo ip route) |
Press Ctrl+C to abort; then configure
no ip domain-lookup in Global Config to prevent this |
| Changes lost after reboot | Running configuration changes exist only in RAM and are lost when the device restarts | Always save: copy running-config startup-config or
write memory |
Using enable password instead of enable secret |
Password is stored in plain text (or weak reversible Type 7 cipher)
in the running config — visible in show running-config |
Always use enable secret — stored as a one-way MD5 hash |
13. Key Terms Quick Reference
| Term | Definition |
|---|---|
| User EXEC Mode | Entry-level IOS mode (prompt Router>); limited read-only commands; no configuration capability; entered on login |
| Privileged EXEC Mode | Full operational mode (prompt Router#); all show/debug/file commands; gateway to configuration modes; requires enable secret |
| Global Configuration Mode | Device-wide configuration mode (prompt Router(config)#); entered with configure terminal; hostname, routes, AAA, banners configured here |
| Interface Configuration Mode | Single-interface configuration mode (prompt Router(config-if)#); entered with interface <type> <number>; IP addresses, shutdown, description |
| Line Configuration Mode | Management line configuration mode (prompt Router(config-line)#); entered with line console 0 or line vty 0 15; passwords, transport, timeouts |
| Router Configuration Mode | Routing process mode (prompt Router(config-router)#); entered with router ospf, router eigrp, etc.; routing protocol parameters |
| enable | Command typed in User EXEC to enter Privileged EXEC mode; prompts for the enable secret if one is configured |
| configure terminal | Command typed in Privileged EXEC to enter Global Configuration mode; abbreviated conf t |
| exit | Moves back one mode level (from any sub-mode to its parent) |
| end / Ctrl+Z | Exits from any configuration mode directly back to Privileged EXEC in one step, regardless of nesting depth |
| enable secret | Cisco IOS global config command that sets the Privileged EXEC password stored as an MD5 hash; always preferred over enable password |
| do | A prefix that allows Privileged EXEC commands (show, copy) to be run from inside any configuration sub-mode without exiting |
| no command | Prepending no to any IOS configuration command negates or removes that configuration |
| Running Configuration | The currently active configuration stored in RAM; immediately reflects all changes; lost on reboot unless saved to startup-config |
| Startup Configuration | The configuration stored in NVRAM; loaded into RAM on boot; updated with copy running-config startup-config |