5.2 Common CLI Commands for Switches
Basics
You can configure and modify your switches through Command Line Interface (CLI) commands. You may already be familiar with CLI Commands in Windows, Linux, or other operating systems or by working through some of this material. They are the text-based commands that allow you to execute commands in an operating system. Knowing CLI Commands is necessary for giving you full control over configuring and monitoring a switch.
Terms to Know
You should know the following terms:
- Command Line Interface (CLI) commands
- Enable
- EXEC Mode (Privileged)
- EXEC Mode (User)
- Layer 2 versus Layer 3 switches
Information
Cisco is one of the largest makers of switches, routers, and other networking and telecommunications software and hardware. Many other platforms base their commands on Cisco’s CLI commands, so learning CLI commands for the Cisco IOS (Internet Operating Software) is a good place to get started in terms of configuring switches, as you can apply that knowledge to many switches manufactured by other companies.
Many switches often come with default settings that allow them to operate as Layer 2 switches as soon as you power them on and connect them to the network. If you want the switch to operate at Layer 3, or if the switch doesn’t find configuration files when they boot up, or the files have been corrupted, they will go through a setup process. You can complete basic configuration of a switch by following the question prompts in setup mode, or you can use the enable CLI Command at any time to initiate setup.
When first connecting to a Cisco switch you will be in EXEC Mode (User) which has limited capabilities. You will have limited access to monitor the device and cannot configure the switch. Using the CLI Command enable along with a username and password (or sometimes just a password), you can move into EXEC Mode (Privileged) which will give you access to monitoring and diagnostic capabilities of the switch along with configuration and maintenance capabilities.
There is basically a dictionary full of CLI Commands that you can use to configure and maintain a switch. You’ll learn many CLI Commands over time, but in the meantime there are guides and lists you can find online and through the Command Line Interface. Typing and entering a ? will provide a list of CLI Commands available for the mode you are using as well provide help on using correct syntax. Using the correct syntax is critical when using CLI commands.
Additional Resources
Here are additional resources you may find useful:
- Cisco basic router commands and tasks
- Using the Command Line Interface from Cisco
- Cisco Commands Cheat Sheet from PC & Network Downloads
- 5 Cisco IOS Commands Every Network Admin Should Know from pluralsight
- Five Basic Commands for Cisco Switches You need to Know by PivIT Global
- Cisco Switch Configuration basic commands from GeeksforGeeks
Task/Self-Assessment
Complete the following task or self-assessment:
- If possible, run the basic configuration of a switch following the question prompts in setup mode.
Preferably, you will be able to also use the enable CLI Command to configure a switch, exploring possible CLI commands in both EXEC Mode (User) and EXEC Mode (Privileged), using commands found in some of the resources.