Hey Network Ninjas! When you’re rocking with Cisco routers or switches, you’re grooving to the beat of Cisco IOS—the Internetwork Operating System. This guide is your backstage pass to mastering the Command Line Interface (CLI), from basic configurations to advanced troubleshooting tricks
Flavors of Cisco IOS
Traditional Cisco IOS:
- This is the original operating system used on Cisco routers and switches for decades.
- It features a well-known set of commands familiar to network engineers.
Cisco IOS XE:
- An evolution of the traditional Cisco IOS, offering more stability.
- Built on the Linux operating system, it prevents the entire system from crashing due to a single runaway process.
- Commands from traditional Cisco IOS work seamlessly in Cisco IOS XE.
Cisco NX-OS:
- Found primarily in data center environments on Cisco Nexus switches.
- Features a unique set of commands tailored for data center operations.
Cisco IOS XR:
- Designed for large enterprise and service provider routers.
- Offers a distinct command set different from traditional Cisco IOS and IOS XE.
Exploring Cisco IOS Features
Privilege Levels
- Supports only five basic commands, allowing minimal interaction.
- Typically used for very limited access.
- This is the default mode upon logging in.
- Provides access to a limited set of read-only commands, sufficient for basic troubleshooting and diagnostics.
- Provides full access to all commands, including both read-only and read-write commands.
- This level is used for complete configuration and management.
- When opened the console of the router the prompt displays a greater-than sign (>).
- Use the command show privilege to confirm the current privilege level.
- Limited commands are available, primarily for viewing configurations without making changes.
- Example commands:
show
,exit
, and context-sensitive help (?).
- Enter this mode using the
enable
command, followed by the password. - The prompt changes to a pound sign (#).
- Full command access is available for complete configuration and management.
- Example command: show privilege confirms the current level as 15.
Customizing Privilege Levels
- Enter privileged mode with enable 15 and provide the password.
- Enter global configuration mode with configure terminal or conf t.
- Use the command enable secret level 2 [password] (e.g., enable secret level 2 Cisco).
trace route
Command to Level 2:- Use the command privilege exec level 2 traceroute.
- In level 1, % Invalid input detected at '^' marker.
- In level 2, after entering enable 2 and providing the password, trace route is available. [Here no IP is configured so its showing (% Unrecognized host or address.)]
Command Line Interface (CLI):
Moving Between Configuration Modes
1. Global Configuration Mode:
- Enter with configure terminal or shortcut conf t.
- Commands affect the entire system ((config) prompt).
2. Interface Configuration Mode:
- Navigate using interface gig 0/0 from global config.
- Configure specific interface settings ((config-if) prompt).
Exiting Configuration Modes
- Back to Global Configuration: Use exit.
- Exit Entirely: Use
end
to return to privilege exec mode.
- Access with router ospf 1 for OSPF settings.
- Commands specific to OSPF configuration ((config-router) prompt).
Exploring Device Configuration and Status
View Running Configuration:
View IP Interfaces:
Differences between "down" and "administratively down" states on Cisco routers or switches:
Down State: Indicates a physical or data link layer issue where the interface is physically disconnected or not operational due to hardware failure or cable disconnection. Usually requires troubleshooting of physical connections, cables, or hardware components to resolve.
Administratively Down State: Indicates that the interface has been intentionally disabled by an administrator using the
shutdown
command in interface configuration mode. Typically used for planned maintenance, security reasons, or to prevent traffic on unused interfaces.
Detailed Interface Information:
Basic Interface Statistics:
View CDP Neighbors:
Detailed CDP Neighbor Information:
Show Switch Stack Information:
Show Installed Modules:
Reference Table of Cisco IOS Commands
Command | Description | Privilege Level |
---|---|---|
show running-config | View the current running configuration | Privileged (15) |
show startup-config | View the saved startup configuration | Privileged (15) |
show IP interface brief | Summary of IP interfaces and their statuses | User (1) |
show interfaces | Detailed information about all interfaces | User (1) |
show interfaces [identifier] | Detailed information about a specific interface | User (1) |
show interfaces stats | Basic statistics for all interfaces | User (1) |
show CDP neighbors | List of directly connected Cisco devices | User (1) |
show CDP neighbors detail | Detailed information on CDP neighbors | User (1) |
show IP route | Display the IP routing table | User (1) |
show version | Show the Cisco IOS version and system information | User (1) |
show MAC address-table | Display the MAC address table of the switch | User (1) |
show switch | Display information about the switch stack | User (1) |
show inventory | Show installed hardware modules and details | User (1) |
configure terminal (conf t ) | Enter global configuration mode | Privileged (15) |
interface [type number] | Enter interface configuration mode | Privileged (15) |
exit | Exit to the previous mode | All |
end | Exit configuration mode and return to privilege mode | All |
Conclusion:
Y'all have now saddled up and taken a ride through the wild frontier of Cisco IOS commands! From setting up your routers and switches to mastering privilege levels and diving into interface configurations, you’ve got the lasso on all the key tools you need. Remember, whether you’re taming a routing table or corralling a MAC address table, these commands are your trusty steeds. So, keep this guide handy, and you’ll be wrangling networks like a true Cisco cowboy. Happy trails, and may your packets always find their way home until then Happy Hacking!