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.
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.
Import and start the lab
Download
first-cisco-lab.yamlbelow 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?”, typenoand press Enter.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, orshow ?to see everythingshowcan do. - Tab completion: type
pinthen press Tab — IOS finishes it toping. - Abbreviation: you can shorten any command to the fewest unique letters.
sh ip int bris the same asshow 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.
- Help: type
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-configWhat 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 upYou'll see four Ethernet ports and a Loopback0 (a virtual interface — ignore it for now).
show versiontells you the IOS version and uptime;show running-configis the device's live configuration. We only need Ethernet0/0 for this lab.Enter global configuration mode
To actually change the router, enter global configuration mode with
configure terminal(or justconf 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.
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)#Configure the interface and bring it up
Now give Ethernet0/0 an address and turn it on. Typing
interface Ethernet0/0drops 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 shutdownWhat 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 upThe
descriptionline just labels the port for humans and is optional. By default an interface is administratively down —no shutdownis what enables it. The subnet mask is written in dotted-decimal (255.255.255.0), which is a/24.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 briefWhat you should see — Ethernet0/0 is now
up/upwith 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 upThe 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.Ping PC1 — the payoff
PC1 is already set to
192.168.1.10with its gateway at192.168.1.1(the address you just gave R1), so you can prove the link works:R1# ping 192.168.1.10What 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 msEach
!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.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(orwr) does the same thing — it's the older shorthand you'll still see everywhere.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 inRouter#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/0To move back out:
exit— steps back one level (interface → global → privileged).endor Ctrl+Z — jumps straight back to privileged EXEC from any config mode.disable— drops from privileged EXEC back to user EXEC.
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 commandConfiguration 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.