• Post author:Bhaskar Soni
  • Post published:
  • Post category:Networking
  • Post comments:0 Comments
  • Reading time:5 mins read

Last updated: 23 October 2026. Applies to Cisco IOS and IOS XE routers (for example ISR 1000/4000 and Catalyst 8000 series) and to Cisco Packet Tracer labs.

A router is a specialised computer that forwards packets between networks. Like a PC, it has a CPU, memory, storage and an operating system; on Cisco devices that operating system is Cisco IOS (Internetwork Operating System), or IOS XE on most current models. This guide explains the router’s hardware components, how it boots, the IOS command modes, the commands you will use every day, and a secure starting configuration.

Router hardware components: CPU, RAM, NVRAM, flash, ROM and interfaces

What is Cisco IOS?

Cisco IOS is the software that runs routing, switching, security and management functions on Cisco devices. It provides the command-line interface (CLI) used to configure everything from IP addresses to routing protocols and ACLs. IOS XE runs the same familiar CLI on top of a Linux-based system, which adds features such as programmability (NETCONF/RESTCONF) and a more modular software architecture. Commands in this guide work on both.

Router memory components

MemoryKeeps content after power-off?What it stores
ROMYesPower-on self-test (POST), the bootstrap program and ROMMON, a minimal recovery environment
FlashYesThe IOS image(s); can hold more than one version so you can upgrade or roll back
NVRAMYesThe startup configuration (startup-config) and, on many platforms, the configuration register
RAMNoThe running IOS, the running configuration, routing tables, ARP cache and packet buffers

The key idea: changes you make are applied to the running-config in RAM immediately, but they are lost on reboot unless you save them to the startup-config in NVRAM.

Router interfaces

  • LAN/WAN interfaces: GigabitEthernet (for example Gi0/0/0), 10-Gigabit, and on older routers FastEthernet and serial interfaces.
  • Logical interfaces: loopback (always up; used for router IDs and management), sub-interfaces (for inter-VLAN routing) and tunnels.
  • Management ports: the console port (local access with a rollover or USB cable), the AUX port on older models, and a dedicated management Ethernet port on many current routers.

How a Cisco router boots

  1. POST: the hardware is tested from ROM.
  2. Bootstrap: the bootstrap program in ROM starts and reads the configuration register.
  3. Locate and load IOS: normally from flash (or as set by boot system commands); it can fall back to a TFTP server, and if no image is found the router stops in ROMMON.
  4. Load the configuration: IOS copies the startup-config from NVRAM into RAM. If there is none, it starts the initial configuration dialog (setup mode).

The configuration register: 0x2102 and 0x2142

ValueEffect
0x2102Normal boot: load IOS from flash and the startup-config from NVRAM
0x2142Boot IOS but ignore the startup-config; used for password recovery

Check the current value at the end of show version, and change it with config-register 0x2102 (takes effect at the next reload).

IOS command modes

ModePromptHow to enterUsed for
User EXECRouter>Log inBasic monitoring
Privileged EXECRouter#enableAll show commands, copy, reload, debug
Global configurationRouter(config)#configure terminalDevice-wide settings
Interface configurationRouter(config-if)#interface Gi0/0/0IP addresses, ACLs, descriptions
Line configurationRouter(config-line)#line vty 0 4 / line console 0Remote and console access
Router configurationRouter(config-router)#router ospf 1Routing protocols

Use exit to go back one level and end (or Ctrl+Z) to return to privileged EXEC. Press ? for help and Tab to complete commands. In configuration mode, prefix a show command with do (for example do show ip interface brief).

Essential show commands

Router# show version              ! IOS version, uptime, memory, config register
Router# show ip interface brief   ! every interface, its IP and up/down status
Router# show running-config       ! current configuration in RAM
Router# show startup-config       ! saved configuration in NVRAM
Router# show ip route             ! routing table
Router# show interfaces Gi0/0/0   ! detailed counters and errors
Router# show flash:               ! IOS images and files in flash

A secure starting configuration

This baseline sets a hostname, strong passwords and SSH-only remote access. Replace the names, addresses and passwords with your own:

Router(config)# hostname R1
R1(config)# no ip domain-lookup
R1(config)# enable secret Use-A-Long-Unique-Passphrase
R1(config)# service password-encryption
R1(config)# banner motd # Authorised access only #
R1(config)# username admin privilege 15 secret Another-Long-Passphrase
R1(config)# ip domain-name example.local
R1(config)# crypto key generate rsa modulus 2048
R1(config)# ip ssh version 2
R1(config)# line console 0
R1(config-line)# login local
R1(config-line)# exec-timeout 10 0
R1(config-line)# exit
R1(config)# line vty 0 4
R1(config-line)# login local
R1(config-line)# transport input ssh
R1(config-line)# exec-timeout 10 0
R1(config-line)# exit
R1(config)# interface GigabitEthernet0/0/0
R1(config-if)# description LAN
R1(config-if)# ip address 192.168.1.1 255.255.255.0
R1(config-if)# no shutdown
R1(config-if)# end
R1# copy running-config startup-config

Use secret rather than password, because password values are stored in weak, reversible formats. To limit SSH access to an admin subnet, add a standard ACL with access-class on the VTY lines.

Password recovery (overview)

  1. Connect to the console and power-cycle the router; send a Break signal during boot to enter ROMMON.
  2. Set confreg 0x2142 and reset, so the router boots without loading the saved configuration.
  3. Enter privileged mode, then run copy startup-config running-config to load the old configuration.
  4. Set a new enable secret, restore config-register 0x2102, and save with copy running-config startup-config.

Because anyone with console access can do this, routers must be kept in locked racks or rooms. Some platforms let you disable password recovery (no service password-recovery), which forces a configuration wipe instead.

Frequently asked questions

What is the difference between running-config and startup-config?

The running-config is the active configuration in RAM; the startup-config is the saved copy in NVRAM that loads at boot. Save with copy running-config startup-config (or write memory).

How do I practise Cisco IOS without a real router?

Use Cisco Packet Tracer (free with a Cisco Networking Academy account) or Cisco Modeling Labs / GNS3 with official images for more realistic labs.

Related: What is routing? · Routing protocols · CCNA interview questions

Need help with network security? We review router and firewall configurations, ACLs and segmentation as part of our VAPT services and hardening audits. Contact us for a quote.

Post author avatar

Bhaskar Soni

Bhaskar Soni is a Security Engineer and the founder of Youngster Company, based in Ahmedabad, Gujarat. He works hands-on with Linux server hardening, vulnerability assessment and penetration testing (VAPT), ISO 27001 compliance and OSINT investigations. He writes practical, tested guides for IT professionals and Indian businesses, and every article on this site is written or reviewed by him.

Leave a Reply