OSI Model Quiz — Test Your Networking Knowledge (20 Questions)
Free OSI model quiz with 20 questions — test your networking knowledge and prepare for CCNA, Network+, and…
Cisco IOS (Internetwork Operating System) is the operating system running on most Cisco routers and switches. It provides the command-line interface, the routing and switching feature set, and the configuration model that has become the de facto standard for network CLIs, enough so that many other vendors offer an “IOS-like” mode.
The mode you are in determines which commands exist, and the prompt tells you which one that is.
| Mode | Prompt | Enter with | Can do |
|---|---|---|---|
| User EXEC | Router> | Log in | Basic show commands, ping, telnet |
| Privileged EXEC | Router# | enable | All show commands, debug, copy, reload |
| Global config | Router(config)# | configure terminal | Device-wide settings |
| Interface config | Router(config-if)# | interface Gi0/1 | Per-interface settings |
| Line config | Router(config-line)# | line vty 0 15 | Console and remote access settings |
| Router config | Router(config-router)# | router ospf 1 | Routing protocol settings |
| ROMMON | rommon 1> | Break during boot | Password recovery, image recovery |
exit moves back one level. end or Ctrl+Z jumps straight to privileged EXEC from anywhere.
A physical connection that works even when the network does not. Use it for initial setup, password recovery and any change that might cost you network access.
| Setting | Value |
|---|---|
| Baud rate | 9600 |
| Data bits | 8 |
| Parity | None |
| Stop bits | 1 |
| Flow control | None |
Remembered as 9600 8-N-1. Modern devices use USB or micro-USB console ports; older ones use an RJ45 console port with a rollover cable, the connector is 8P8C like Ethernet but carries RS-232 and is not electrically compatible with a network port.
Router(config)# hostname R1
R1(config)# ip domain-name example.com
R1(config)# crypto key generate rsa modulus 2048
R1(config)# username admin privilege 15 secret StrongPassword
R1(config)# ip ssh version 2
R1(config)# line vty 0 15
R1(config-line)# transport input ssh
R1(config-line)# login local
R1(config-line)# exec-timeout 10 0Three details matter here. The hostname and domain name must be set before generating keys, or the command fails. Use a 2048-bit modulus at minimum. And transport input ssh disables Telnet, which sends passwords in clear text and should be off everywhere.
Use secret rather than password: secret stores a proper hash, while password with service password-encryption uses a trivially reversible Type 7 obfuscation that is not encryption at all.
R1(config)# enable secret StrongEnablePassword
R1(config)# service password-encryption! What is this device?
show version ! model, IOS version, uptime, config register
show inventory ! hardware and serial numbers
show running-config ! current configuration
! Interfaces
show ip interface brief ! the fastest overview of every interface
show interfaces GigabitEthernet0/1
show interfaces status ! switches, port status, VLAN, speed, duplex
! Layer 2
show vlan brief
show mac address-table
show spanning-tree
show cdp neighbors detail ! what is plugged into what
! Layer 3
show ip route
show ip protocols
show ip arp
! Health
show processes cpu sorted
show memory statistics
show loggingshow running-config | include ospf ! matching lines only
show running-config | section interface ! whole config sections
show running-config | begin line vty ! from here onward
show interfaces | exclude 0 packets ! hide matching lines
show ip route | count ^O ! count OSPF routes| section is particularly useful, it returns the entire block, not just the matching line.
| Key | Action |
|---|---|
| Tab | Complete the current command |
? | Show available options at this point |
| Ctrl+A / Ctrl+E | Jump to start / end of line |
| Ctrl+Z | Return to privileged EXEC |
| Ctrl+Shift+6 | Abort a running command, escapes a hung ping or traceroute |
| ↑ / ↓ | Command history |
do | Run an EXEC command from config mode: do show ip int brief |
Two quality-of-life settings worth applying immediately on any device you work on:
R1(config)# no ip domain-lookup ! stop typos being treated as hostnames
R1(config)# line console 0
R1(config-line)# logging synchronous ! stop log messages interrupting your typingWithout no ip domain-lookup, mistyping a command makes the device try to resolve it as a hostname and hang for thirty seconds. It is the single most irritating default in IOS.
0x2102) determines where to look for the IOS image.R1# show version | include register
R1# show boot
R1(config)# boot system flash:c2900-universalk9-mz.SPA.157-3.M4.binSetting the register to 0x2142 skips step 5, which is how password recovery works.
| Classic IOS | IOS-XE | NX-OS | |
|---|---|---|---|
| Architecture | Monolithic, single process | Linux kernel with IOS as a daemon | Linux-based, modular |
| Process restart without reboot | No | Yes | Yes |
| Programmability | Minimal | NETCONF, RESTCONF, guest shell, Python | Extensive, plus Python and Bash |
| Found on | Older ISR, Catalyst 2960/3560 | Catalyst 9000, ISR 4000, ASR 1000 | Nexus data centre switches |
| CLI | — | Very similar to IOS | Similar but with real differences |
The practical significance of IOS-XE is fault isolation and automation. A crashed process can restart without taking the device down, and the platform supports model-driven configuration through NETCONF and RESTCONF, which is what network automation tooling targets.
9600 baud, 8 data bits, no parity, 1 stop bit, no flow control, “9600 8-N-1”.
enable password and enable secret?enable secret stores a proper hash and takes precedence. enable password is stored in clear text, or with Type 7 obfuscation that is reversible in seconds. Always use secret.
Console in, reboot, break into ROMMON, set the configuration register to 0x2142 so the startup config is skipped, boot, copy the startup config into running config, change the password, set the register back to 0x2102, and save.
IOS treats an unrecognised command as a hostname and attempts to resolve it via DNS. no ip domain-lookup stops this, and it should be one of the first commands on any lab device.
Architecturally it is quite different, a Linux kernel running IOS as one process among several, which enables process restart, containers and model-driven programmability. The CLI is deliberately similar so existing knowledge transfers.
The running config in RAM (lost on reboot) and the startup config in NVRAM (persistent). See running vs startup configuration.