Common IOS Commands — The Daily Toolkit

15 min In Progress

Learning Objectives

  • Recognize the handful of commands you'll run constantly
  • Know what each one is actually telling you
  • Build a simulated CLI command dispatcher

The Commands You'll Live In

show ip interface brief is the one you'll run a hundred times a day -- quick status of every interface. Add to that: show running-config (active settings), show version (IOS + hardware info), ping / traceroute (connectivity tests), show cdp neighbors (what's directly connected), and copy running-config startup-config (SAVE your work -- this is the one beginners forget and lose everything on reboot).

This is real Cisco IOS syntax -- not Python. You'd type this in a terminal/console session, not 'Run' it here.
enable
configure terminal
show running-config
show ip interface brief
show version
copy running-config startup-config
ping 8.8.8.8
traceroute 8.8.8.8
show cdp neighbors

Practice — Simulated CLI

Here's the same idea as a tiny Python dispatcher: a dictionary of canned command outputs, like a simulated device session.

CANNED_OUTPUT = {
    "show version": "Cisco IOS Software, Version 15.2(7)E3",
    "show ip interface brief": "Gig0/0  up    Gig0/1  down",
}

def run_command(cmd):
    return CANNED_OUTPUT.get(cmd, f"% Invalid input detected: {cmd}")

print(run_command("show version"))
print(run_command("show ip interface brief"))
print(run_command("reload"))

📝 Exercise: Build a Mini CLI Session

Build a class mini_cli_session with a CANNED_OUTPUT lookup table (at least 4 commands) and a run(command) method. Add a history list that records every command run, and a show_history() method that prints them in order.

code.py
Output

            
← Back to Chapter