Getting Started · Free starter lab

Your first Cisco lab: the CLI basics

A free, ungraded lab to get you comfortable on the Cisco IOS command line. You'll boot one router, move through its command modes, configure an interface from scratch, and ping a PC — the genuine basics every other lab assumes you already know. No account needed, nothing to submit.

Get the lab

One file to import into Cisco Modeling Labs — a router (R1) wired to a PC (PC1). PC1 is already set up; you'll configure R1. Then follow the steps below in R1's console.

Free · ungraded · no sign-in — this one's just to learn on.

Topology: router R1 (Ethernet0/0, 192.168.1.1) connected to host PC1 (192.168.1.10) on the 192.168.1.0/24 network.R1PC1Et0/0192.168.1.1192.168.1.10
Walk-through

Ten steps from blank router to a working ping

Type each command yourself in R1's console — that's the whole point. Every step shows what you should see back.

  1. Import and start the lab

    Download first-cisco-lab.yaml below and import it into CML (Dashboard → Import), then press Start. When the nodes are running, click R1 and open its console — the text terminal that connects you straight to the device. New to CML itself? The getting-started guide covers installing and running it.

    You should land at a prompt that looks like Router>. If you see a message asking “Would you like to enter the initial configuration dialog?”, type no and press Enter.

  2. Meet the command line (user EXEC mode)

    That Router> prompt is user EXEC mode — a safe, look-but-don't-touch view. Four habits to build right now:

    • Help: type ? on its own to list what you can do, or show ? to see everything show can do.
    • Tab completion: type pin then press Tab — IOS finishes it to ping.
    • Abbreviation: you can shorten any command to the fewest unique letters. sh ip int br is the same as show ip interface brief.
    • Command history: press the up-arrow to bring back your last command instead of retyping it.

    Nothing you do in user EXEC can change the device — explore freely.

  3. Enter privileged EXEC mode

    Type enable. The prompt changes from > to # — you're now in privileged EXEC mode, with full access to view everything and make changes. (This lab has no enable password set, so it just works — on production gear you'd normally set one.)

    The router hasn't been renamed yet, so the prompt still reads Router#. Have a look around before you change anything:

    Router# show ip interface brief
    Router# show version
    Router# show running-config

    What you should see from show ip interface brief — the Ethernet interfaces are all down, because we haven't configured them yet:

    Interface              IP-Address      OK? Method Status                Protocol
    Ethernet0/0            unassigned      YES unset  administratively down down
    Ethernet0/1            unassigned      YES unset  administratively down down
    Ethernet0/2            unassigned      YES unset  administratively down down
    Ethernet0/3            unassigned      YES unset  administratively down down
    Loopback0              unassigned      YES unset  up                    up

    You'll see four Ethernet ports and a Loopback0 (a virtual interface — ignore it for now).show version tells you the IOS version and uptime; show running-config is the device's live configuration. We only need Ethernet0/0 for this lab.

  4. Enter global configuration mode

    To actually change the router, enter global configuration mode with configure terminal (or just conf t). The prompt gains (config):

    Router# configure terminal
    Enter configuration commands, one per line.  End with CNTL/Z.
    Router(config)#

    Everything you type here changes the running configuration immediately.

  5. Set the hostname

    Give the router a name. Watch the prompt change the instant you press Enter — your first taste of IOS giving you immediate feedback:

    Router(config)# hostname R1
    R1(config)#
  6. Configure the interface and bring it up

    Now give Ethernet0/0 an address and turn it on. Typing interface Ethernet0/0 drops you into interface configuration mode ((config-if)#):

    R1(config)# interface Ethernet0/0
    R1(config-if)# description Link to PC1
    R1(config-if)# ip address 192.168.1.1 255.255.255.0
    R1(config-if)# no shutdown

    What you should see — a moment after no shutdown, the interface comes up and IOS tells you so:

    %LINK-3-UPDOWN: Interface Ethernet0/0, changed state to up
    %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0, changed state to up

    The description line just labels the port for humans and is optional. By default an interface is administratively downno shutdown is what enables it. The subnet mask is written in dotted-decimal (255.255.255.0), which is a /24.

  7. Back out and verify

    Return to privileged EXEC with end (or press Ctrl+Z), then check your work:

    R1(config-if)# end
    R1# show ip interface brief

    What you should see — Ethernet0/0 is now up/up with your address:

    Interface              IP-Address      OK? Method Status                Protocol
    Ethernet0/0            192.168.1.1     YES manual up                    up
    Ethernet0/1            unassigned      YES unset  administratively down down
    Ethernet0/2            unassigned      YES unset  administratively down down
    Ethernet0/3            unassigned      YES unset  administratively down down
    Loopback0              unassigned      YES unset  up                    up

    The two right-hand columns both need to read up: the first is the physical/line status, the second is the protocol. Both up means the interface is fully working.

  8. Ping PC1 — the payoff

    PC1 is already set to 192.168.1.10 with its gateway at 192.168.1.1 (the address you just gave R1), so you can prove the link works:

    R1# ping 192.168.1.10

    What you should see:

    Type escape sequence to abort.
    Sending 5, 100-byte ICMP Echos to 192.168.1.10, timeout is 2 seconds:
    .!!!!
    Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/2 ms

    Each ! is a reply; a . is a timeout. The very first packet often shows a . while the router resolves PC1's MAC address with ARP — run the ping again and you'll get a clean !!!!! (100 percent). That's your first working link.

  9. Save your work

    Everything you configured lives in the running-config (in RAM, active now). If the router reloaded, it would boot from the startup-config (in NVRAM) instead — and lose your work. Save the running config to startup:

    R1# copy running-config startup-config
    Destination filename [startup-config]?

    Press Enter to accept the destination.

    Building configuration...
    [OK]

    write memory (or wr) does the same thing — it's the older shorthand you'll still see everywhere.

  10. Find your way around the modes

    Almost everything in IOS is about knowing which mode you're in. Here's the whole map you just used:

    Router>User EXEC — read-only. enter with: log in
    Router#Privileged EXEC — full view + save/reload. enter with: enable
    (config)#Global config — change the device. enter with: configure terminal
    (config-if)#Interface config — change one interface. enter with: interface Ethernet0/0

    To move back out:

    • exit — steps back one level (interface → global → privileged).
    • end or Ctrl+Z — jumps straight back to privileged EXEC from any config mode.
    • disable — drops from privileged EXEC back to user EXEC.
When it doesn't work

Common IOS messages, decoded

Everyone hits these on day one. They're IOS helping you, not scolding you.

% Ambiguous command: "co"

You typed too few letters and IOS can't tell which command you mean (co could be configure, copy, and more). Type a few more letters.

% Incomplete command.

The command is valid but needs more after it — ip address on its own, for instance, still needs an address and mask. Add ? at the end to see what IOS expects next.

% Invalid input detected at '^' marker.

There's a typo, or you're in the wrong mode. The ^ points right at the character IOS didn't like. Check your spelling and your prompt.

Nothing happens when I type a config command

Configuration commands only work in a config mode. From the > or # prompt you must first enter enable, then configure terminal, before you can change settings.

Ready for the real thing?

Now that the CLI feels familiar, try a full graded lab — build it in CML, submit your config, and get pass/fail on every requirement. The free sample runs the whole loop end to end.

Cisco, Cisco IOS, and Cisco Modeling Labs are trademarks of Cisco Systems, Inc. Goldfish Networks is not affiliated with or endorsed by Cisco; we publish independent practice labs that import into CML.