Buffl

Capital 4: The Cisco IOS Operating

as
by abdullah S.

The Cisco IOS Operating

The Cisco IOS Operating System

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.

  • Interface Configuration Mode ((config-if)#): Configures specific interfaces.

  • Router Configuration Mode ((config-router)#): Used to set up routing protocols.

4. Basic IOS Commands

  • enable – Enters privileged EXEC mode.

  • configure terminal – Enters global configuration mode.

  • show running-config – Displays the current device configuration.

  • show ip interface brief – Shows IP addresses and interface status.

  • interface GigabitEthernet 0/1 – Selects an interface for configuration.

  • ip address 192.168.1.1 255.255.255.0 – Assigns an IP address to an interface.

  • no shutdown – Activates an interface.

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:

  1. Download the new IOS image from Cisco.

  2. Copy it to the device using TFTP, FTP, or USB.

  3. Change the boot sequence to use the new image.

  4. 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.

Making the Initial Connection to a Cisco Device

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).

1. Methods for Initial Connection

Method

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.

2. Connecting via Console Cable (Recommended for First-Time Setup)

What You Need:

  • 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

Steps to Connect:

  1. 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.

  2. Open Terminal Software on the Computer

    • Use PuTTY, Tera Term, SecureCRT, or Minicom (Linux).

  3. Set Serial Connection Parameters:

    • Port: (Find in Device Manager on Windows or use ls /dev/tty* on Linux/Mac)

    • Baud Rate: 9600

    • Data Bits: 8

    • Parity: None

    • Stop Bits: 1

    • Flow Control: None

  4. Establish the Connection

    • Click "Open" in PuTTY or press Enter in Minicom.

    • You should see a Cisco command-line interface (CLI) prompt.

3. Initial Device Setup in CLI

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

KopierenBearbeiten

Router>

or

shell

KopierenBearbeiten

Switch>

4. Entering Privileged EXEC Mode

By default, you're in User EXEC mode (limited access).

To enter Privileged EXEC mode:

bash

KopierenBearbeiten

enable

You'll see:

bash

KopierenBearbeiten

Router#

or

bash

KopierenBearbeiten

Switch#

Now, you can run higher-level commands.

5. Basic Initial Configuration Commands

Set a Hostname:

bash

KopierenBearbeiten

Router# configure terminal Router(config)# hostname MyRouter MyRouter(config)#

Set a Console Password:

bash

KopierenBearbeiten

MyRouter(config)# line console 0 MyRouter(config-line)# password cisco123 MyRouter(config-line)# login MyRouter(config-line)# exit

Set a Privileged EXEC Password:

bash

KopierenBearbeiten

MyRouter(config)# enable secret MyStrongPass

Configure an IP Address (for Remote Access)

bash

KopierenBearbeiten

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

Save the Configuration:

bash

KopierenBearbeiten

MyRouter# write memory

or

bash

KopierenBearbeiten

MyRouter# copy running-config startup-config

6. Testing the Connection

After configuring an IP, test connectivity from a computer:

bash

KopierenBearbeiten

ping 192.168.1.1

If successful, you can now set up SSH or Telnet for remote access.

7. Exiting and Disconnecting

  • Type exit or logout to leave the session.

  • If using a console connection, close PuTTY or the terminal emulator.

Conclusion

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


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.

1. Cisco IOS Command Modes

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

Router>

Basic access (view-only)

Login to the device

exit or logout

Privileged EXEC Mode

Router#

Full read access, limited config

enable (from User EXEC)

disable to return to User EXEC

Global Configuration Mode

Router(config)#

Modify system settings

configure terminal

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

exit to Global Config

Router Configuration Mode

Router(config-router)#

Configure routing protocols

router <protocol>

exit to Global Config

2. Moving Between Modes

You can navigate between different modes using these commands:

From User EXEC Mode to Privileged EXEC Mode:

bash

KopierenBearbeiten

Router> enable Router#

🔹 Note: If a password is set, you'll be prompted to enter it.

From Privileged EXEC Mode to Global Configuration Mode:

bash

KopierenBearbeiten

Router# configure terminal Router(config)#

From Global Configuration Mode to Interface Configuration Mode:

bash

KopierenBearbeiten

Router(config)# interface GigabitEthernet 0/1 Router(config-if)#

From Global Configuration Mode to Line Configuration Mode:

bash

KopierenBearbeiten

Router(config)# line vty 0 4 Router(config-line)#

Going Back to Previous Mode:

  • Use exit to move back one level:

    bash

    KopierenBearbeiten

    Router(config-if)# exit Router(config)#

  • Use end to return to Privileged EXEC Mode:

    bash

    KopierenBearbeiten

    Router(config-if)# end Router#

3. Useful Cisco IOS Commands for Navigation

Command

Function

enable

Enter Privileged EXEC Mode

disable

Return to User EXEC Mode

configure terminal

Enter Global Configuration Mode

exit

Exit the current mode (one level up)

end

Exit to Privileged EXEC Mode

show ?

See available "show" commands

show running-config

Display the current configuration

show version

Display IOS version and device details

show ip interface brief

Show IP addresses and interface statuses

copy running-config startup-config

Save the current configuration

reload

Reboot the device

4. Command Shortcuts

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)

5. Example Navigation Walkthrough

Imagine you are configuring a Cisco router:

  1. Login to the router and enter Privileged EXEC Mode

    bash

    KopierenBearbeiten

    Router> enable Router#

  2. Enter Global Configuration Mode

    bash

    KopierenBearbeiten

    Router# configure terminal Router(config)#

  3. Enter Interface Configuration Mode for GigabitEthernet 0/1

    bash

    KopierenBearbeiten

    Router(config)# interface GigabitEthernet 0/1 Router(config-if)#

  4. Assign an IP Address and Enable the Interface

    bash

    KopierenBearbeiten

    Router(config-if)# ip address 192.168.1.1 255.255.255.0 Router(config-if)# no shutdown

  5. Exit to Global Configuration Mode

    bash

    KopierenBearbeiten

    Router(config-if)# exit Router(config)#

  6. Set a Password for Privileged EXEC Mode

    bash

    KopierenBearbeiten

    Router(config)# enable secret MySecurePass

  7. Save the Configuration and Exit

    bash

    KopierenBearbeiten

    Router# copy running-config startup-config Destination filename [startup-config]? (Press Enter)

6. Conclusion

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

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.

1. Types of Cisco IOS Configurations

Cisco devices have two main types of configurations:

Configuration Type

Description

Storage Location

Command to View

Running Configuration

The current active configuration used by the device

Stored in RAM (temporary)

show running-config

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.

2. Viewing Configuration

Check Running Configuration (Active Settings)

bash

KopierenBearbeiten

Router# show running-config

  • Displays the current configuration in RAM.

  • Shows settings applied in real-time.

Check Startup Configuration (Saved Settings)

bash

KopierenBearbeiten

Router# show startup-config

  • Displays the configuration stored in NVRAM.

  • This is what the device will use upon a reboot.

3. Editing Configuration

Enter Global Configuration Mode

bash

KopierenBearbeiten

Router# configure terminal Router(config)#

This mode allows you to modify settings.

Example: Configure a Hostname

bash

KopierenBearbeiten

Router(config)# hostname MyRouter MyRouter(config)#

Example: Configure an IP Address on an Interface

bash

KopierenBearbeiten

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

Example: Set a Console Password

bash

KopierenBearbeiten

MyRouter(config)# line console 0 MyRouter(config-line)# password cisco123 MyRouter(config-line)# login MyRouter(config-line)# exit

4. Saving Configuration Changes

Changes made in the running configuration are lost after a reboot unless saved.

Save Running Config to Startup Config (NVRAM)

bash

KopierenBearbeiten

Router# copy running-config startup-config

or

bash

KopierenBearbeiten

Router# write memory

🔹 This ensures changes persist after a reboot.

5. Restoring Configuration

If a device has been restarted and lost its running configuration, you can reload the saved startup configuration.

Reload Configuration Without Rebooting

bash

KopierenBearbeiten

Router# copy startup-config running-config

This restores the last saved configuration without rebooting the device.

6. Erasing Configuration

To reset a Cisco device to factory defaults, you must erase the startup configuration and reboot.

Erase Startup Configuration (NVRAM)

bash

KopierenBearbeiten

Router# erase startup-config

Reload the Device (Reboot)

bash

KopierenBearbeiten

Router# reload

🔹 Note: The device will reboot with the default settings, and you’ll need to configure it again.

7. Backing Up and Restoring Configurations

To ensure network reliability, you should back up the configuration files to an external server (TFTP, SCP, or FTP).

Backup Configuration to a TFTP Server

bash

KopierenBearbeiten

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.

Restore Configuration from a TFTP Server

bash

KopierenBearbeiten

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.

8. Using Configuration Archives (Cisco IOS Archive Feature)

Cisco IOS allows automatic configuration backups using the archive feature.

Enable Configuration Archiving

bash

KopierenBearbeiten

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.

Manually Save an Archive

bash

KopierenBearbeiten

Router# archive config save

View Archived Configurations

bash

KopierenBearbeiten

Router# show archive

9. Comparing Configuration Files

If you want to check what has changed between the running and startup configurations, use:

bash

KopierenBearbeiten

Router# show archive config differences

This helps troubleshoot unexpected changes.

10. Locking Configuration to Prevent Unauthorized Changes

To prevent unauthorized modifications, you can enable configuration locking.

Enable Configuration Lock

bash

KopierenBearbeiten

Router# configure terminal Router(config)# configuration mode exclusive auto

This prevents multiple users from modifying the configuration simultaneously.

11. Summary

Task

Command

View running config

show running-config

View startup config

show startup-config

Edit configuration

configure terminal

Save config to NVRAM

copy running-config startup-config

Restore config from NVRAM

copy startup-config running-config

Erase saved config

erase startup-config

Reload device

reload

Backup config to TFTP

copy running-config tftp

Restore config from TFTP

copy tftp running-config

Compare configs

show archive config differences

Conclusion

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.


Author

abdullah S.

Information

Last changed