CCNA | P2: Implementing Ethernet LANs | C1: Using the Command-Line Interface

CCNA | P2: Implementing Ethernet LANs | C1: Using the Command-Line Interface

Welcome to the exciting world of Cisco IOS CLI (Command-Line Interface)! šŸŽ‰

In this post, weā€™ll dive into the basics of Cisco IOS and how to access the CLI. Letā€™s get started! šŸš€

Cisco devices, including routers and switches, are primarily configured using a text-based interface known as the CLI. You might be thinking, ā€œIsnā€™t that a bit old-fashioned?ā€ But trust me, with the plethora of commands at your disposal, the CLI is far more efficient than any graphical interface. Plus, itā€™s a breeze to replicate configurations across devices.

Lesson Contents

Accessing the Cisco IOS CLI

Before we can start flexing our command muscles, we need to gain access to the CLI. There are three ways to do this:

  • Console
  • Telnet
  • SSH

The console is a physical port on the switch that provides access to the CLI. It's typically our go-to method when configuring the switch for the first time. For remote access, we can use either Telnet or SSH.

Console Cabling

If you take a look at the switch image below, you'll find one or two physical connectors for the console. On the left side of the 2960 Catalyst switch, for instance, you'll see a light blue RJ45 port and a micro-USB port next to it. While older switches only have the RJ45 port, newer switches (and other devices) often come with both options.

switch.webp

Don't be fooled by the RJ45 portā€”it's not an Ethernet port. We use this connection to link the switch to a serial port on your computer using a special cable known as a Cisco console cable.

console.webp

Modern computers or laptops often lack these serial ports, so you might need to use a serial-to-USB cable instead. This cable emulates a serial port and has a USB connection.

usb_to_console.webp

Once you've connected your computer to the switch, we can fire up a terminal application to access the CLI.

Terminal Emulator

There are numerous terminal emulator applications out there. If you're new to this, I recommend starting with Putty. It's free and allows you to connect using a serial connection, Telnet, and SSH.

Once you've downloaded it, you'll see the main screen. Make sure you select the "Serial" option. The default speed is 9600 (baud rate). The COM port will depend on your computerā€”it might be COM1, but if you're unsure, check the device manager in Windows.

For a detailed guide on how to connect to cisco devices using putty,

follow below from cisco

https://www.cisco.com/c/en/us/support/docs/smb/switches/cisco-small-business-300-series-managed-switches/smb4984-access-the-cli-via-putty-using-a-console-connection-on-300-a.html

Now, power on your switch or, if it's already powered on, pull the plug so it can reload.

First Boot

When the switch boots, you'll see a lot of information on the console. First, it will initialize the flash memory,

Boot Sector Filesystem (bs) installed, fsid: 2
Base ethernet MAC Address: 00:11:bb:0b:36:00
Xmodem file system is available.
The password-recovery mechanism is disabled.
Initializing Flash...
flashfs[0]: 14 files, 4 directories
flashfs[0]: 0 orphaned files, 0 orphaned directories
flashfs[0]: Total bytes: 15998976
flashfs[0]: Bytes used: 12794368
flashfs[0]: Bytes available: 3204608
flashfs[0]: flashfs fsck took 9 seconds.
...done Initializing Flash.
done.

which contains the IOS image (Operating System) of the switch. Next, it will load the IOS image from the flash memory.

Loading "flash:/c3560-ipservicesk9-mz.122-
55.SE10.bin"...@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
File "flash:/c3560-ipservicesk9-mz.122-55.SE10.bin" uncompressed and installed, entry point: 0x1000000
executing...

The IOS image is compressed, so the switch decompresses the image and loads it in RAM.

After the first boot, you'll encounter the Restricted Rights Legend.

Restricted Rights Legend
Use, duplication, or disclosure by the Government is
subject to restrictions as set forth in subparagraph
(c) of the Commercial Computer Software - Restricted
Rights clause at FAR sec. 52.227-19 and subparagraph
(c) (1) (ii) of the Rights in Technical Data and Computer
Software clause at DFARS sec. 252.227-7013.
        Cisco Systems, Inc.
        170 West Tasman Drive
        San Jose, California 95134-1706
        
        
Cisco IOS Software, C3560 Software (C3560-IPSERVICESK9-M), Version 
12.2(55)SE10, RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2015 by Cisco Systems, Inc.
Compiled Wed 11-Feb-15 11:34 by prod_rel_team
Image text-base: 0x01000000, data-base: 0x02F00000

This is a legal notice that outlines the restrictions on the use, duplication, or disclosure of the software by the Government. It's important to note that these restrictions are in accordance with the Commercial Computer Software - Restricted Rights clause at FAR sec. 52.227-19 and the Rights in Technical Data and Computer Software clause at DFARS sec. 252.227-7013.

The software in question is the Cisco IOS Software, C3560 Software (C3560-IPSERVICESK9-M), Version 12.2(55)SE10. This is the version of the IOS image that's now up and running on your device.

Next, the IOS initializes the flash memory.

Initializing flashfs...

flashfs[1]: 14 files, 4 directories
flashfs[1]: 0 orphaned files, 0 orphaned directories
flashfs[1]: Total bytes: 15998976
flashfs[1]: Bytes used: 12794368
flashfs[1]: Bytes available: 3204608
flashfs[1]: flashfs fsck took 1 seconds.
flashfs[1]: Initialization complete....done Initializing flashfs.

The flash memory contains 14 files and 4 directories, with no orphaned files or directories. The total bytes are 15998976, with 12794368 bytes used and 3204608 bytes available.

The IOS then starts with a Power on Self Test (POST) for some of the switch components.

POST: CPU MIC register Tests : Begin
POST: CPU MIC register Tests : End, Status Passed

POST: PortASIC Memory Tests : Begin
POST: PortASIC Memory Tests : End, Status Passed

POST: CPU MIC interface Loopback Tests : Begin
POST: CPU MIC interface Loopback Tests : End, Status Passed

POST: PortASIC RingLoopback Tests : Begin
POST: PortASIC RingLoopback Tests : End, Status Passed

POST: Inline Power Controller Tests : Begin
POST: Inline Power Controller Tests : End, Status Passed

POST: PortASIC CAM Subsystem Tests : Begin
POST: PortASIC CAM Subsystem Tests : End, Status Passed

POST: PortASIC Port Loopback Tests : Begin
POST: PortASIC Port Loopback Tests : End, Status Passed

Waiting for Port download...Complete

This includes tests for the CPU MIC register, PortASIC Memory, CPU MIC interface Loopback, PortASIC RingLoopback, Inline Power Controller, PortASIC CAM Subsystem, and PortASIC Port Loopback. All these tests pass successfully.

The device then waits for Port download, which completes successfully.

It then warns us about the cryptographic features:

This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.
A summary of U.S. laws governing Cisco cryptographic products may be found 
at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html

If you require further assistance please contact us by sending email [email protected].

Now, you might be wondering what a switch has to do with cryptography. Depending on your IOS image, your switch is able to run an SSH server. This allows for encrypted remote access. Another feature that uses cryptography is SNMP version 3, which is used by network management software to read statistics from the switch. However, in certain countries, cryptography is forbidden or limited.

The final part of the boot process provides a wealth of information about the switch. Here's what you'll see:

cisco WS-C3560-24PS (PowerPC405) processor (revision G0) with 131072K bytes of memory.
Processor board ID CAT0832N0G3
Last reset from power-on
1 Virtual Ethernet interface
24 FastEthernet interfaces
2 Gigabit Ethernet interfaces
The password-recovery mechanism is disabled.

512K bytes of flash-simulated non-volatile configuration memory.
Base ethernet MAC Address : 00:11:BB:0B:36:00
Motherboard assembly number : 73-9299-01
Power supply part number : 341-0029-03
Motherboard serial number : CAT083107CZ
Power supply serial number : DTH08282MZA
Model revision number : G0
Motherboard revision number : E0
Model number : WS-C3560-24PS-S
System serial number : CAT0832N0G3
Top Assembly Part Number : 800-24791-01
Top Assembly Revision Number : K0
Version ID : N/A
Hardware Board Revision Number : 0x09

Switch Ports Model SW Version SW Image
------ ----- ----- ---------- ----------
* 1 26 WS-C3560-24PS 12.2(55)SE10 C3560-IPSERVICESK9-M
  • The switch model : cisco WS-C3560-24PS (PowerPC405) processor (revision G0) with 131072K bytes of memory.
  • Processor board ID : CAT0832N0G3
  • Last reset from power-on
  • 1 Virtual Ethernet interface
  • 24 FastEthernet interfaces
  • 2 Gigabit Ethernet interfaces
  • The password-recovery mechanism is disabled.

You'll also see details about the flash-simulated non-volatile configuration memory, the base ethernet MAC Address, the motherboard assembly number, power supply part number, motherboard serial number, power supply serial number, model revision number, motherboard revision number, model number, system serial number, top assembly part number, top assembly revision number, version ID, and hardware board revision number.

The switch ports model, SW version, and SW image are also displayed.

Once all this information is presented, you'll see the message: "Press RETURN to get started!"

Press RETURN to get started!

Now, it's up to us to configure the switch.

If your switch doesn't already have a configuration, you might see a message about the System Configuration Dialog and an Enable secret warning.

        --- System Configuration Dialog ---
Enable secret warning
----------------------------------
In order to access the device manager, an enable secret is required
If you enter the initial configuration dialog, you will be prompted for
the enable secret
If you choose not to enter the intial configuration dialog, or if you exit 
setup without setting the enable secret,
please set an enable secret using the following CLI in configuration mode-
enable secret 0 <cleartext password>
----------------------------------

Would you like to enter the initial configuration dialog? [yes/no]:

If you see this, type "no" to continue so that we can start with a blank configuration. We will configure the device ourselves.

Once the switch has booted and we have pressed the enter key, we end up in what we call the user mode or user EXEC mode.

Exec Mode

In this mode, we have permission to use some simple commands but we are restricted from configuring anything or using more advanced commands.

The command line will show you this:

Switch>

The > symbol tells us that we are currently in user mode. To get full access to the switch, we have to enter privileged mode, also called enabled mode. Here is how to do this:

Switch> **enable** 
Switch#

You'll see that the > symbol changes to #. This tells us we are now in enabled mode, granting us full access to the switch.

The disable command lets you jump back to user mode.

Switch#disable
Switch>

If you're working with used hardware, it's possible that the previous owner didn't erase the switch's configuration. But don't worry, we've got you covered! Here's how you can start with a clean slate:

Erasing the Switch Configuration

To wipe the configuration of the switch, type erase startup-config. The switch will then ask you to confirm the removal of all configuration files. You'll see a [confirm] promptā€”just press enter to proceed. You don't need to type "confirm".

Switch#erase startup-config
Erasing the nvram filesystem will remove all configuration files! Continue? 
[confirm]
[OK]
Erase of nvram: complete

Switches also store VLAN (Virtual LAN) information in a separate file. We'll delve into what a VLAN is and its functions in a future lesson. For now, let's ensure it's deleted. Type delete flash:vlan.dat to delete the file. Again, you'll see a [confirm] promptā€”press enter to confirm. If you get an error message saying there's no such file, don't fret! It simply means someone else has already deleted the VLAN information, and you can continue.

Switch#delete flash:vlan.dat
Delete filename [vlan.dat]?
Delete flash:vlan.dat? [confirm]

Finally, type reload and the switch will reboot. You'll see a [confirm] promptā€”press enter to proceed.

Switch#reload
Proceed with reload? [confirm]

Once the switch has reloaded, we can start exploring the power of show commands. These commands are probably the most used in Cisco IOS, as they allow us to fetch any information from the switch. Let's dive in!

Show Commands

Let's start with a simple example. Say we want to see some general information about the switch. We can use the show version command:

Switch#show version

Cisco IOS Software, C3560 Software (C3560-IPSERVICESK9-M), Version 12.2(55)SE10, RELEASE SOFTWARE (fc2)

Technical Support:http://www.cisco.com/techsupport

Copyright (c) 1986-2015 by Cisco Systems, Inc.
Compiled Wed 11-Feb-15 11:34 by prod_rel_team
Image text-base: 0x01000000, data-base: 0x02F00000

ROM: Bootstrap program is C3560 boot loader
BOOTLDR: C3560 Boot Loader (C3560-HBOOT-M) Version 12.2(44)SE5, RELEASE 
SOFTWARE (fc1)

Switch uptime is 54 minutes
System returned to ROM by power-on
System image file is "flash:/c3560-ipservicesk9-mz.122-55.SE10.bin"


This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.

A summary of U.S. laws governing Cisco cryptographic products may be found 
at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html

If you require further assistance please contact us by sending email to
[email protected].

cisco WS-C3560-24PS (PowerPC405) processor (revision G0) with 131072K bytes 
of memory.
Processor board ID CAT0832N0G3
Last reset from power-on
1 Virtual Ethernet interface
24 FastEthernet interfaces
2 Gigabit Ethernet interfaces
The password-recovery mechanism is disabled.

512K bytes of flash-simulated non-volatile configuration memory.
Base ethernet MAC Address : 00:11:BB:0B:36:00
Motherboard assembly number : 73-9299-01
Power supply part number : 341-0029-03
Motherboard serial number : CAT083107CZ
Power supply serial number : DTH08282MZA
Model revision number : G0
Motherboard revision number : E0
Model number : WS-C3560-24PS-S
System serial number : CAT0832N0G3
Top Assembly Part Number : 800-24791-01
Top Assembly Revision Number : K0
Version ID : N/A
Hardware Board Revision Number : 0x09

Switch Ports Model SW Version SW Image
------ ----- ----- ---------- ----------
* 1 26 WS-C3560-24PS 12.2(55)SE10 C3560-IPSERVICESK9-M

Configuration register is 0xF

This command gives us a wealth of information about the switch, including the model, IOS image, and more. It tells us about the Cisco IOS Software, the switch uptime, the system image file, and even the base ethernet MAC Address.

But what if we want to see what MAC addresses the switch has learned? There's a command for that too:

Switch# **show mac address-table dynamic** 
        Mac Address Table
-------------------------------------------

Vlan Mac Address Type Ports
---- ----------- -------- -----
1 0050.568e.d3c8 DYNAMIC Fa0/12
Total Mac Addresses for this criterion: 1

The show mac address-table dynamic command tells us all MAC addresses that the switch has learned. In this example, it only learned one MAC address on interface Fa0/12 (FastEthernet port 12).

If you want to see the entire configuration of the switch, you can use the show running-config command:

Switch# **show running-config** 
Building configuration...

Current configuration : 1237 bytes
!
version 12.2
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Switch
!
boot-start-marker
boot-end-marker
!
!
!
!
no aaa new-model
system mtu routing 1504
!
!
!
!
!         
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
!
!
!
interface FastEthernet0/1
!
interface FastEthernet0/2
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!         
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
 no ip address
!
ip classless
ip http server
ip http secure-server
!
!
!
!
!
line con 0
line vty 5 15
!
end

The show running-config command gives us the entire active configuration of the switch. Even though we haven't configured anything yet, there is a basic configuration.

Throughout these Cisco lessons, you'll see a lot of show commands that I use to explain things. There are also debug commands. These show commands only produce "static" information. If you want to see changes, you have to use the same show command a couple of times. Debug commands allow us to see things in real-time. You will see some examples of debug commands in other lessons.

Let's dive into the configuration of a Cisco switch. We'll start by changing the hostname and setting a password for the console line.

Configuration

When you take a new switch out of the box, it will work right away with its default (empty) configuration. It will behave just like any other unmanaged switch, learning MAC addresses and forwarding Ethernet frames.

However, you probably want to make some changes to the configuration of your switch. Change its default hostname, perhaps add an IP address so you can manage it remotely, etc. To do this, we have to use configuration mode. In this mode, we can make changes to the configuration of the switch.

Here's how you enter configuration mode:

Switch>enable
Switch#configure terminal

First, you need to make sure you are in enable mode. Now you can use the configure terminal command to enter configuration mode. Now we can make changes to the switch.

Let's start with something simple, let's change the name of our switch with the hostname command:

Switch(config)#hostname SW1
SW1(config)#

You can see this is applied immediately. Our switch is now called SW1.

The command above was executed in "global" configuration mode. When we want to make changes to interfaces or console settings, we have to dive into one of the configuration sub modes. Let me give you an example, let's say we want to add a password to the console:

SW1(config)#line console 0
SW1(config-line)#password cisco
SW1(config-line)#login

First, we use the line console 0 command to dive into the line configuration. You can recognize this because it shows (config-line). I used the password command to specify a password (cisco) and the login command to tell the switch to ask for this password. Next time you access the console, it will ask for this password.

If I want to get back to global configuration, I have to type exit or press CTRL+Z:

SW1(config-line)#exit
SW1(config)#

I'm now back in the global configuration mode.

Let me give you one more example, let's say we want to make changes to one of our interfaces:

SW1(config)#interface FastEthernet 0/1
SW1(config-if)#

First, I use the interface command and specify the interface that I want to make changes to. You can see we are now in the interface sub-mode as it shows (config-if) to us.

Once you enter the interface configuration, the switch does not show you which interface you selected. Only that you are in the sub-mode configuration.

I can now make some changes to this interface, let's try a few commands:

SW1(config-if)#description CONNECTION_TO_DESKTOP
SW1(config-if)#duplex full
SW1(config-if)#speed 100

Above you can see I added a description and changed the duplex/speed settings of this interface. If I want to get back, I can use the exit command or CTRL-Z:

SW1(config-if)#exit
SW1(config)#

The first time, it jumps back to global configuration mode. The second time I do it, we jump back to enable mode and exit the configuration mode:

SW1(config)#
exitSW1#

cli_modes.webp

Saving the Configuration

We entered a couple of commands but once we pull the power plug, everything is gone. Why? Everything we configure on our switch is applied to the running configuration. This configuration is only active in RAM, pull the plug and it's gone.

If we want to save our configuration, we have to save it as the startup configuration which is saved in NVRAM. Next time we boot our switch, it will look for the startup configuration and use that.

Here's how to copy our running configuration to the startup configuration:

SW1#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...[OK]
0 bytes copied in 1.182 secs (0 bytes/sec)

Use the copy command to copy the running configuration to the startup configuration.

Another popular command to save your configuration is wr. This is short for write and the old command to save your configuration.

The Cisco IOS Command-Line Interface (CLI) is designed to be user-friendly and has some features to help you if you're unsure about how to proceed.

Question Mark

If you're not sure what the command was or how to type it, the question mark is your friend. If you use it, it will tell you all possible commands. For example:

SW1# **?** 
Exec commands:
    access-enable Create a temporary Access-List entry
    access-template Create a temporary Access-List entry
    archive manage archive files
    beep Blocks Extensible Exchange Protocol commands
    cd Change current directory
    clear Reset functions
    clock Manage the system clock
    cns CNS agents
    configure Enter configuration mode

This will list all the exec commands. The question mark works in user, enable, and configuration mode, so feel free to try it everywhere. It also helps you find out which commands are possible. For example:

SW1#cl?

clear clock

If you type cl?, then the CLI tells you there are two possible commands: clear and clock.

SW1# **clock ?** 
    set Set the time and date

Abbreviation

There's no need to type the exact command for the CLI to accept it. You can also shorten commands. For example, I just used copy running-config startup-config but I don't have to type the entire thing. This will also work:

SW1#copy run st

After the copy command, there is only one parameter that starts with run, which is running-config. The only parameter that starts with st is startup-config. Once you get more experience with the CLI and become familiar with the different commands, you will automatically use this more often.

Errors and Incomplete Commands

In a perfect world, we would remember everything and make no spelling errors. In real life, this happens all the time. Luckily for us, the CLI has something to help. Let's try the clock command again:

SW1#clock set 14:05:00 8
% Incomplete command.

The switch tells us that the command is incomplete. This is because I didn't add a month or year. When this happens, use the question mark to figure out what the command requires.

What if I make a typing error?

SW1#clock set 14:05:00 8 11
                         ^
% Invalid input detected at '^' marker.

The CLI complains but does show the ^ symbol to tell me where I made an error. When this happens, remove whatever you typed in above the ^ symbol and use the question mark:

SW1#clock set 14:05:00 8 ?
    MONTH Month of the year

This tells me that I should have typed November, not 11.

The Cisco IOS Command-Line Interface (CLI) offers several useful keyboard shortcuts and features to make your configuration tasks easier.

Keyboard Shortcuts

  • Command History : Cisco IOS keeps a history of previously entered commands. You can press the up and down arrow keys to browse through your previous commands.
  • Cursor Movement : With the left and right arrow keys, you can move the cursor one character in either direction. If you want to make some changes to a very long command that you are trying to enter, you can use the CTRL+A or CTRL+E combinations. This will make the cursor jump to the start or end of the line.
  • Command Auto-completion : If you're unsure how to spell a certain command, the TAB button will auto-complete commands for you. For example, try typing
SW1# **show mac ad**

and then hit the TAB button. The CLI will auto-complete it to

SW1# **show mac address-table**

Do Command

If you are in the configuration mode and try a show command, you might face an issue because this is a command for the enable mode, not the configuration mode.

SW1(config)# **show version** 
                 ^
% Invalid input detected at '^' marker.

You could exit the configuration mode but instead, you can add do in front of the show command:

SW1(config)#do show version

Output Modifiers

If you want to get the output of a show command but you don't want to see everything, you can use output modifiers.

SW1# **show version** 
Cisco IOS Software, C3560 Software (C3560-IPSERVICESK9-M), Version 
12.2(55)SE10, RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2015 by Cisco Systems, Inc.
Compiled Wed 11-Feb-15 11:34 by prod_rel_team
Image text-base: 0x01000000, data-base: 0x02F00000

ROM: Bootstrap program is C3560 boot loader
BOOTLDR: C3560 Boot Loader (C3560-HBOOT-M) Version 12.2(44)SE5, RELEASE 
SOFTWARE (fc1)

[output omitted]

At the end of your show command, add the | symbol and then specify the modifier. The two most commonly used modifiers are begin and include.

  • Begin : This will start the output with the word you are looking for. For example, SW1#show running-config | begin interface will skip the first part of the output and starts with the interfaces.
SW1# **show running-config | begin interface** 
interface FastEthernet0/1
 description CONNECTION_TO_DESKTOP
 speed 100
 duplex full
!
interface FastEthernet0/2
!
interface FastEthernet0/3

[output omitted]
  • Include : This will only show the lines that have the specified word in them. For example, SW1#show version | include IOS will only show the line that has "IOS" in it.
SW1# **show version | include IOS** 
Cisco IOS Software, C3560 Software (C3560-IPSERVICESK9-M), Version 
12.2(55)SE10, RELEASE SOFTWARE (fc2)

Conclusion

You've now learned the basics of Cisco IOS and how to connect to the Command-Line Interface (CLI). Here's a summary of what we discussed:

  • Connecting to a Cisco Catalyst switch : You learned how to connect to a Cisco Catalyst switch using a console cable.
  • Using a terminal emulator (Putty): You learned how to use Putty, a terminal emulator, to connect to your switch.
  • Understanding the bootup sequence : You got a glimpse of the bootup sequence of a Cisco switch.
  • Differentiating between modes : You learned the difference between user mode, enable mode (privileged mode), and the configuration mode.
  • Understanding 'show' commands : You learned what 'show' commands are and how they can be used to fetch information from the switch.
  • Examples of configuration commands : You saw some examples of configuration commands that can be used to configure the switch.
  • Deleting the startup configuration : You learned how to delete the startup configuration of the switch.
  • Using CLI features : You learned how to use various CLI features like auto-complete, the question mark, and output modifiers for a more efficient and user-friendly experience.

I hope this lesson has been useful. The best way to solidify your understanding is to boot up a switch and try all of this by yourself. Happy networking! šŸŒ

Kunal Patel | Contact me
description

Kunal Patel

Working as Assistant Manager IT my curiosity led me to learn technologies beyond networking, including cloud computing, Python, APIs, Rust, Dart/Flutter, Linux, and Virtualization.
Mumbai, India