The Cisco IOS Operating
1. What is Cisco IOS?
Cisco Internetwork Operating System (IOS) is a proprietary operating system used on Cisco networking devices, such as routers, switches, and firewalls. It provides the infrastructure for managing, configuring, and securing network devices.
2. Features of Cisco IOS
Cisco IOS offers various features, including:
Command-Line Interface (CLI): The primary method to configure and manage Cisco devices.
Routing & Switching: Supports dynamic and static routing protocols (e.g., OSPF, EIGRP, BGP) and switching technologies (VLANs, STP).
Security Features: Includes access control lists (ACLs), VPN support, and firewall capabilities.
Quality of Service (QoS): Helps prioritize network traffic for optimal performance.
Network Management: Allows SNMP, logging, and monitoring for troubleshooting.
High Availability: Provides redundancy and failover mechanisms.
3. Cisco IOS Modes
Cisco IOS has different modes to configure and manage devices:
User EXEC Mode (>): Limited access, basic commands only.
>
Privileged EXEC Mode (#): Provides full access, requires authentication.
#
Global Configuration Mode ((config)#): Used for device-wide settings.
(config)#
Interface Configuration Mode ((config-if)#): Configures specific interfaces.
(config-if)#
Router Configuration Mode ((config-router)#): Used to set up routing protocols.
(config-router)#
4. Basic IOS Commands
enable – Enters privileged EXEC mode.
enable
configure terminal – Enters global configuration mode.
configure terminal
show running-config – Displays the current device configuration.
show running-config
show ip interface brief – Shows IP addresses and interface status.
show ip interface brief
interface GigabitEthernet 0/1 – Selects an interface for configuration.
interface GigabitEthernet 0/1
ip address 192.168.1.1 255.255.255.0 – Assigns an IP address to an interface.
ip address 192.168.1.1 255.255.255.0
no shutdown – Activates an interface.
no shutdown
5. Cisco IOS Versions
Cisco IOS has multiple versions and licensing models:
Classic IOS – The traditional operating system used on routers and switches.
IOS XE – A modular and scalable version used for high-end enterprise devices.
IOS XR – Designed for carrier-grade networks, supporting service providers.
NX-OS – Used for Cisco Nexus data center switches.
6. Upgrading Cisco IOS
To upgrade IOS:
Download the new IOS image from Cisco.
Copy it to the device using TFTP, FTP, or USB.
Change the boot sequence to use the new image.
Restart the device.
7. Conclusion
Cisco IOS is a powerful and versatile operating system that enables administrators to manage and secure network infrastructure efficiently. Mastering IOS commands and concepts is essential for network engineers and IT professionals.
Connecting to a Cisco Device Over the Network
To manage a Cisco router or switch remotely over the network, you can use different methods depending on the setup and security requirements. Here are the main ways to connect to a Cisco device:
Method
Description
Security Level
Telnet
Remote access using TCP port 23
Low (Not encrypted, not recommended)
SSH (Secure Shell)
Secure remote access using TCP port 22
High (Encrypted, recommended)
HTTP/HTTPS (Web Interface - CCP, ASDM)
Web-based GUI management
Medium (Depends on HTTPS use)
SNMP (Simple Network Management Protocol)
Used for monitoring and managing devices remotely
Medium (Read-only or read-write access)
Making the Initial Connection to a Cisco Device
When setting up a new Cisco router, switch, or firewall, you need to make an initial connection to configure it. This is done via a console connection before setting up network-based remote access (SSH/Telnet).
Purpose
Requirements
Console (Physical Cable)
First-time setup (out-of-band management)
Console cable (RJ-45/USB-C) and terminal software
Auxiliary Port (AUX)
Dial-up remote access (rarely used)
Modem connection
Telnet/SSH (Network-based)
Remote access after initial setup
Pre-configured IP address
For a new, unconfigured Cisco device, console access is required.
Console cable (RJ-45 to DB-9 serial) OR USB-to-serial cable
A computer with a terminal emulator (e.g., PuTTY, Tera Term, SecureCRT, Minicom on Linux/Mac)
Cisco device powered on
Connect the console cable
Plug one end into the "Console" port of the Cisco device.
Plug the other end into the serial port or USB on your computer.
If using USB, install necessary USB-to-serial drivers.
Open Terminal Software on the Computer
Use PuTTY, Tera Term, SecureCRT, or Minicom (Linux).
Set Serial Connection Parameters:
Port: (Find in Device Manager on Windows or use ls /dev/tty* on Linux/Mac)
ls /dev/tty*
Baud Rate: 9600
9600
Data Bits: 8
8
Parity: None
None
Stop Bits: 1
1
Flow Control: None
Establish the Connection
Click "Open" in PuTTY or press Enter in Minicom.
You should see a Cisco command-line interface (CLI) prompt.
When you first boot a Cisco device, it may ask:
pgsql
KopierenBearbeiten
Would you like to enter the initial configuration dialog? [yes/no]:
Type "no" to manually configure it.
Type "yes" to use the guided setup.
If you choose "no", you’ll be at the command prompt:
shell
Router>
or
Switch>
By default, you're in User EXEC mode (limited access).
To enter Privileged EXEC mode:
bash
You'll see:
Router#
Switch#
Now, you can run higher-level commands.
Router# configure terminal Router(config)# hostname MyRouter MyRouter(config)#
MyRouter(config)# line console 0 MyRouter(config-line)# password cisco123 MyRouter(config-line)# login MyRouter(config-line)# exit
MyRouter(config)# enable secret MyStrongPass
MyRouter(config)# interface GigabitEthernet 0/1 MyRouter(config-if)# ip address 192.168.1.1 255.255.255.0 MyRouter(config-if)# no shutdown MyRouter(config-if)# exit
MyRouter# write memory
MyRouter# copy running-config startup-config
After configuring an IP, test connectivity from a computer:
ping 192.168.1.1
If successful, you can now set up SSH or Telnet for remote access.
Type exit or logout to leave the session.
exit
logout
If using a console connection, close PuTTY or the terminal emulator.
The console connection is the best method for the initial setup of a Cisco device. After assigning an IP, you can enable SSH or Telnet for remote management.
Navigating the Cisco IOS Operating System
Cisco IOS (Internetwork Operating System) is a command-line interface (CLI) used for managing Cisco network devices like routers and switches. Navigating through IOS requires an understanding of command modes, command syntax, and shortcuts.
Cisco IOS operates in different modes, each with varying access levels and permissions.
Mode
Prompt
Access Level
How to Enter
How to Exit
User EXEC Mode
Basic access (view-only)
Login to the device
exit or logout
Privileged EXEC Mode
Full read access, limited config
enable (from User EXEC)
disable to return to User EXEC
disable
Global Configuration Mode
Router(config)#
Modify system settings
exit to Privileged EXEC
Interface Configuration Mode
Router(config-if)#
Configure interfaces
interface <name>
exit to Global Config
Line Configuration Mode
Router(config-line)#
Configure terminal lines (console, VTY)
line console 0 or line vty 0 4
line console 0
line vty 0 4
Router Configuration Mode
Router(config-router)#
Configure routing protocols
router <protocol>
You can navigate between different modes using these commands:
Router> enable Router#
🔹 Note: If a password is set, you'll be prompted to enter it.
Router# configure terminal Router(config)#
Router(config)# interface GigabitEthernet 0/1 Router(config-if)#
Router(config)# line vty 0 4 Router(config-line)#
Use exit to move back one level:
Router(config-if)# exit Router(config)#
Use end to return to Privileged EXEC Mode:
end
Router(config-if)# end Router#
Command
Function
Enter Privileged EXEC Mode
Return to User EXEC Mode
Enter Global Configuration Mode
Exit the current mode (one level up)
Exit to Privileged EXEC Mode
show ?
See available "show" commands
Display the current configuration
show version
Display IOS version and device details
Show IP addresses and interface statuses
copy running-config startup-config
Save the current configuration
reload
Reboot the device
Cisco IOS has several shortcuts to improve efficiency:
Shortcut
Usage
Tab Key
Auto-completes a command
?
Shows available commands or options
Ctrl + C
Aborts the current command and returns to EXEC mode
Ctrl + Z
Exits Configuration Mode and returns to EXEC mode
Up/Down Arrow Keys
Scroll through previous commands
show history
Displays the last 10 commands entered
do <command>
Runs an EXEC command from Configuration Mode (e.g., do show ip interface brief)
do show ip interface brief
Imagine you are configuring a Cisco router:
Login to the router and enter Privileged EXEC Mode
Enter Interface Configuration Mode for GigabitEthernet 0/1
Assign an IP Address and Enable the Interface
Router(config-if)# ip address 192.168.1.1 255.255.255.0 Router(config-if)# no shutdown
Exit to Global Configuration Mode
Set a Password for Privileged EXEC Mode
Router(config)# enable secret MySecurePass
Save the Configuration and Exit
Router# copy running-config startup-config Destination filename [startup-config]? (Press Enter)
Navigating Cisco IOS requires an understanding of:
Different command modes.
Moving between modes using enable, configure terminal, and exit.
Using show commands to verify settings.
Shortcuts to improve efficiency.
Cisco IOS Configuration Management
Cisco IOS configuration management involves viewing, modifying, saving, and restoring configurations on Cisco routers and switches. Proper configuration management ensures network stability, security, and recoverability in case of failures.
Cisco devices have two main types of configurations:
Configuration Type
Storage Location
Command to View
Running Configuration
The current active configuration used by the device
Stored in RAM (temporary)
Startup Configuration
The saved configuration that loads when the device reboots
Stored in NVRAM (persistent)
show startup-config
🔹 Important: The running configuration is not saved automatically. Changes must be manually saved to prevent loss after a reboot.
Router# show running-config
Displays the current configuration in RAM.
Shows settings applied in real-time.
Router# show startup-config
Displays the configuration stored in NVRAM.
This is what the device will use upon a reboot.
This mode allows you to modify settings.
Router(config)# hostname MyRouter MyRouter(config)#
Changes made in the running configuration are lost after a reboot unless saved.
Router# copy running-config startup-config
Router# write memory
🔹 This ensures changes persist after a reboot.
If a device has been restarted and lost its running configuration, you can reload the saved startup configuration.
Router# copy startup-config running-config
This restores the last saved configuration without rebooting the device.
To reset a Cisco device to factory defaults, you must erase the startup configuration and reboot.
Router# erase startup-config
Router# reload
🔹 Note: The device will reboot with the default settings, and you’ll need to configure it again.
To ensure network reliability, you should back up the configuration files to an external server (TFTP, SCP, or FTP).
Router# copy running-config tftp Address or name of remote host []? 192.168.1.100 Destination filename [router-confg]? (Press Enter)
Sends the configuration file to a TFTP server at 192.168.1.100.
Router# copy tftp running-config Address or name of remote host []? 192.168.1.100 Source filename []? router-confg
Loads the saved configuration into running-config.
🔹 Note: Restoring from running-config does not remove existing settings; it merges the new configuration. To completely overwrite, erase the startup config first.
running-config
Cisco IOS allows automatic configuration backups using the archive feature.
archive
Router(config)# archive Router(config-archive)# path flash:backup-config Router(config-archive)# maximum 5 Router(config-archive)# exit
This keeps up to 5 archived configurations stored on flash memory.
Router# archive config save
Router# show archive
If you want to check what has changed between the running and startup configurations, use:
Router# show archive config differences
This helps troubleshoot unexpected changes.
To prevent unauthorized modifications, you can enable configuration locking.
Router# configure terminal Router(config)# configuration mode exclusive auto
This prevents multiple users from modifying the configuration simultaneously.
Task
View running config
View startup config
Edit configuration
Save config to NVRAM
Restore config from NVRAM
copy startup-config running-config
Erase saved config
erase startup-config
Reload device
Backup config to TFTP
copy running-config tftp
Restore config from TFTP
copy tftp running-config
Compare configs
show archive config differences
Effective Cisco IOS configuration management ensures that:
Configurations are properly saved and backed up.
Changes are documented and can be restored if necessary.
Unauthorized modifications are prevented.
Last changed2 months ago