Introduction to Cisco's Internetworking Operating System (IOS)
Up to this point, you’ve been learning about computer networking technologies and protocols, along with how certain devices operate (especially an Ethernet switch). Now we’ll focus on how to use the operating system software on an Ethernet switch. In the next chapter, you’ll configure the protocols and features discussed throughout Chapter 2, and you’ll also verify that the LAN and configurations are working correctly.
Introduction to Cisco IOS
Cisco’s IOS operating system was originally designed for Cisco routers, since Cisco primarily built routers in the 1980s. As Ethernet switches became popular in enterprise networks in the 1990s, Cisco acquired a leading switching company at the time, Kalpana, Inc., and inherited their Catalyst line of Ethernet switches. Since then, Cisco has released its enterprise Ethernet switching products under the Catalyst line.
Early Cisco switches ran an operating system called CatOS. Over time, Cisco standardized on IOS across both routers and switches. Today, modern Cisco routers and switches run a newer version called IOS-XE. Cisco IOS-XE runs on top of Linux and supports virtualization.
Accessing Cisco IOS
To access the Cisco IOS interface, you have two options:
- The Command Line Interface (CLI)
- The Graphical User Interface (GUI)
To access the CLI, you’ll need a PC or laptop with terminal emulator software installed. A common terminal emulator on Windows is PuTTY, which you can download for free.
Next, you need a physical connection between your computer and the Cisco switch. This uses a cable officially called a rollover cable. You’ll often hear it called a "“console” cable. It’s typically a flat, light-blue cable with:
- An RJ-45 connector on one end (it looks like Ethernet, but it is not Ethernet)
- A serial connector on the other end
(Image 074)
Image Title - “Rollover” or “Console” cable
(Image 075)
Image Title - Console cable Serial-to-USB adapter
Console cables can also be purchased with a native USB connector on the computer end instead of a serial connector.
(Image 076)
Image Title - Console cable with native USB connector
Once you plug the RJ-45 end of the console cable into the switch and the USB (or serial, if your computer has one) end into your computer, you can launch your terminal emulator and then power on the switch. Cisco switches typically don’t have a power switch, so plugging the power cable into an outlet powers the switch on.
To log into the switch CLI, select the option in your terminal emulator to connect using Serial (yes, even if you’re using a USB adapter or a native USB console cable). You’ll also need to choose which COM port the cable is using on your computer. On Windows, you can find this in Device Manager.
Finally, make sure the terminal settings match what the switch expects. The default settings work for most Cisco hardware:
Once connected, you should see output in the terminal emulator window. If you don’t see anything, press Enter.
The basics of Cisco IOS
When a switch boots for the first time, it often displays a dialog prompt asking whether you want to continue with the configuration dialog (a setup wizard). This wizard walks through initial setup step by step, but it’s time-consuming and may configure items you don’t need.
In CCNA-style administration, it’s preferred to enter initial configurations manually rather than using the setup wizard.
(Image 077)
Image Title - Initial Setup Wizard
User mode
After exiting the setup wizard, you’ll see the switch prompt with the default hostname and a greater-than sign. It looks like this:
When you see this prompt, you are in IOS User mode.
User mode is very limited. You can view some information on the device, such as the interface status, statistics, MAC address and routing tables, but you cannot view any of the configurations on the device. To view configurations, you need to enter Privileged EXEC mode.
Privileged EXEC mode
To move from User mode to Privileged EXEC mode (often called just “Privileged mode”), type:
Then press Enter. The prompt changes from > to #:
In Privileged mode, you can view interface status and the running configuration. Two key commands are:
The show running-config command displays the configurations currently active on the switch. As you make changes, they appear in the output.
(Image 079)
Image Title - show running-config
To see the state of switch ports (for example, whether they are connected or not connected), use show interface status.
(Image 080)
Image Title - show interface status
You can see whether a switchport has another device “connected” on the other end via an Ethernet cable and the speed of the interface (port).
At this point, the next step is usually to make configuration changes. For example, you might want a more recognizable hostname than the default Switch. From Privileged mode, you cannot make any configuration changes. To change the hostname, you must enter Global Configuration mode.
Global configuration terminal
To enter Global Configuration mode from Privileged mode, type:
The prompt changes to:
This indicates you’re in Global Configuration mode. This mode is used for configurations that affect the switch as a whole, and it also lets you enter additional sub-configuration modes.
To change the hostname from Switch to SW1, type:
Then press Enter.
(Image 081)
Image Title - Changing the hostname on the Switch
After you enter the command, the prompt updates automatically to show the new hostname.
When you’re finished configuring, you’ll typically verify your changes. To do that, you need to return to Privileged mode. In Cisco IOS, you can move up one level from your current mode by typing exit.
From Global Configuration mode, what mode does exit take you back to?
Privileged mode
Now run show running-config again to verify the change:
(Image 082)
Image Title - Reviewing configuration changes in the Running Config
In the screenshot above, you can see the new hostname (SW1).
After making configuration changes, you must save them. With Cisco IOS, changes are not saved automatically. You have to manually save them. If the switch loses power or reboots before you save, your changes will be lost.
To save your changes, type:
Then press Enter once. The switch will ask you to confirm; press Enter a second time to complete the command.
(Image 083)
Image Title - Saving the Running-Config to the Startup-Config
This copies the running configuration (stored in non-persistent memory) into NVRAM, where the startup configuration is stored. The startup configuration is what the switch loads when it boots.
Everything covered in this chapter also applies to Cisco routers, since they also use Cisco IOS and share similar commands.
In the next chapter, you’ll administer a Cisco switch and configure and verify the protocols discussed throughout Chapter 2.