Week 2 · Lab

LAB: Basic Configuration of a Router

This is your first hands-on Cisco IOS lab. You will connect to a router by console, move between the IOS command modes, name the device, secure it with passwords and a login banner, bring up an interface, and save the configuration — using only real IOS commands that you can type exactly as shown.

CCNA 200-301 Domain 5.3 Device Access Control Verified 2026-10-11
Part 1

Objective and requirements

Objective. Take a router with default settings and turn it into a named, password-protected, addressable gateway for a small LAN — then save the configuration so it survives a reboot.

DeviceSetting
R1 GigabitEthernet0/0192.168.10.1 255.255.255.0 — the LAN gateway
PC-1192.168.10.10, mask 255.255.255.0, gateway 192.168.10.1
HostnameR1
Console / VTY passwordcisco (change it in a real deployment)
Enable secretclass (change it in a real deployment)

Requirements

Part 2

Topology and addressing

The console cable is a management link; the Ethernet link is the data link. Keeping them separate is the first thing to get right in the lab.

PC PuTTY console R1 Cisco IOS Switch PC 192.168.10.10/24 console (rollover) 9600 8N1 Gi0/0 192.168.10.1/24 LAN

The PC on the left manages R1 through the console cable — this works even before any IP is configured. R1’s GigabitEthernet0/0 provides the gateway for the LAN (192.168.10.0/24), reached through a switch.

Step 1 — Build the topology

  1. Open Packet Tracer and drag one Router (for example a 1941 or 4321) and two PCs onto the workspace. Add a Switch if you want to follow the topology exactly.
  2. Connect the first PC to the router’s console port using a Console cable (choose “Console” as the cable type).
  3. Connect GigabitEthernet0/0 to the switch with a straight-through cable, and the switch to the second PC. The second PC will use IP 192.168.10.10, mask 255.255.255.0, default gateway 192.168.10.1.
Note. If you have only one PC, connect it directly to GigabitEthernet0/0 with a straight-through cable and give it address 192.168.10.10. The console cable is separate and is only for management.
Part 3

Connect the console and move between modes

Step through the modes and watch the prompt change. The prompt is your map: read it and you always know what the router will accept.

IOS command modes · step through the prompt
1 / 5
Router> enable
Password:
Router#

Step 2 — Connect the console and start PuTTY

  1. In Packet Tracer, click the managing PC and open its Desktop → Terminal (it defaults to the correct console settings). With real gear, plug the rollover cable into the router’s console port and the other end into the PC.
  2. Open PuTTY, choose Serial, and set the line: Speed 9600, Data bits 8, Parity None, Stop bits 1, Flow control None.
  3. Pick the correct COM port (Windows Device Manager shows it) and click Open.
  4. Power on the router. You will see the POST output, the IOS image loading, and finally a prompt. If the screen is blank, press Enter a few times.

Step 3 — IOS command modes

Cisco IOS has two exec modes. The user EXEC mode (prompt ends in >) offers only basic monitoring. The privileged EXEC mode (prompt ends in #) unlocks all the powerful commands, including configure. You enter privileged mode with the enable command.

Exam tip. Read the prompt to know your mode. > = user EXEC, # = privileged EXEC, (config)# = global configuration, (config-if)# = interface configuration. Most configuration is rejected in user EXEC mode.
Part 4

Name the device, add a banner, secure the passwords

What does this command do? · select one

Step 4 — Name the device (hostname)

Enter global configuration mode with configure terminal and set a meaningful name. The name appears in every prompt and in log messages.

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

Step 5 — Add a login banner (banner motd)

A message-of-the-day (motd) banner warns anyone who connects. It is a legal and security control: a clear warning supports prosecution of unauthorised access.

R1(config)# banner motd #
Enter TEXT message. End with the character '#'.
Unauthorized access is prohibited. Authorized personnel only.
#
R1(config)#

The character after motd (here #) is a delimiter you choose; IOS prints your text until it sees that same character again.

Step 6 — Password security

An unsecured router is the vulnerability from Lesson 9 — the default-password problem made real. Secure three things: privileged EXEC access, the console line, and the virtual terminal (VTY) lines used for Telnet/SSH.

! 1. Protect privileged EXEC mode with a hashed secret
R1(config)# enable secret class

! 2. Protect the console line
R1(config)# line console 0
R1(config-line)# password cisco
R1(config-line)# login
R1(config-line)# exit

! 3. Protect the five VTY (remote) lines 0 through 4
R1(config)# line vty 0 4
R1(config-line)# password cisco
R1(config-line)# login
R1(config-line)# exit

! 4. Encrypt the clear-text passwords stored in the configuration
R1(config)# service password-encryption
R1(config)#
Exam tip — enable secret beats enable password. enable secret stores a one-way hash (not reversible), while the older enable password is stored in clear text or a weak, reversible type-7 form. If both are configured, the secret wins. Always use enable secret. Note that service password-encryption only obscures the plain-text passwords (it does not affect the secret, which is already hashed).
Part 5

Configure the interface and verify

Now make R1 a real gateway. Configure GigabitEthernet0/0, add a description, assign the address, and bring it up. Interfaces are administratively down by default, so no shutdown is essential.

R1# configure terminal
R1(config)# interface gigabitethernet0/0
R1(config-if)# description Link to LAN
R1(config-if)# ip address 192.168.10.1 255.255.255.0
R1(config-if)# no shutdown
! %LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up
! %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up
R1(config-if)# end
R1#

Step 7 — Use the show commands

Leave configuration mode and inspect the device. These five commands are the ones you will use most often.

R1(config)# end
R1# show running-config   ! active config in RAM
R1# show startup-config   ! saved config in NVRAM
R1# show version          ! IOS version, uptime, interfaces
R1# show interfaces       ! detailed per-interface statistics
R1# show ip interface brief ! one-line IP + status summary

Representative show version output (versions vary by device and image):

R1# show version
Cisco IOS Software, C1900 Software (C1900-UNIVERSALK9-M), Version 15.4(3)M2, RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2015 by Cisco Systems, Inc.
Compiled Sun 29-Mar-15 15:40 by prod_rel_team

ROM: System Bootstrap, Version 15.0(1r)M15, RELEASE SOFTWARE (fc1)

R1 uptime is 4 minutes
System returned to ROM by power-on
System image file is "flash0:c1900-universalk9-mz.SPA.154-3.M2.bin"

cisco CISCO1941/K9 (revision 1.0) with 491520K/32768K bytes of memory.
Processor board ID FTX152400KS
2 Gigabit Ethernet interfaces
1 terminal line
32K bytes of non-volatile configuration memory.
255K bytes of ATA System CompactFlash (Read/Write)

Configuration register is 0x2102

Step 8 — Verify the interface and ping the host

Check the interface is up/up and that the LAN host replies.

R1# show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
GigabitEthernet0/0     192.168.10.1    YES manual up                    up
GigabitEthernet0/1     unassigned      YES unset  administratively down down
Vlan1                  unassigned      YES unset  administratively down down

Read the two status columns carefully: Status (Layer 1, the physical link) and Protocol (Layer 2, the line protocol). A healthy interface shows up up. administratively down means no shutdown has not been applied.

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

Five exclamation marks (!!!!!) mean five successful echoes — the host is reachable. You can also ping from the PC: it should reach the gateway 192.168.10.1.

Spot the mistake · which config is wrong, and why?

      

Part 6

Save the configuration, and troubleshoot

The running-config lives in RAM and is lost on reload. Copy it to startup-config in NVRAM to make it permanent. (This is the same as write memory.)

R1# copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
R1#

Step 9 — Confirm the saved configuration

R1# show startup-config
Using 1180 out of 32768 bytes
!
version 15.4
service password-encryption
!
hostname R1
!
enable secret 5 $1$mERr$9cTjUIEqNGurQiFU.ZeCi1
!
interface GigabitEthernet0/0
 description Link to LAN
 ip address 192.168.10.1 255.255.255.0
 duplex auto
 speed auto
!
line con 0
 password 7 0822455D0A16
 login
line vty 0 4
 password 7 0822455D0A16
 login
!
end

Notice the enable secret shows a hash (type 5), while the console/VTY passwords now show the weak type-7 obfuscation added by service password-encryption. This is exactly why enable secret — not enable password — is required.

Troubleshooting

The ping fails (dots ..... or timeouts). Work through the layers:

Debugging order. Always go bottom-up: is the link up (up/up)? is the IP/mask correct? is the cable the right type? then test with ping. Most “broken” lab interfaces are simply still shut down.
Part 7 · Your turn

Review

Check what you have learned with these review questions.

Review · 6 questions

Sources

Sources & references

  1. Cisco. CCNA (200-301) Exam Topics, Domain 5.3 (device access control) and 3.4 (configure and verify IPv4 addressing and interfaces). cisco.com.
  2. Cisco. Basic Router Configuration and Cisco IOS Configuration Fundamentals Command Reference. Cisco Documentation. cisco.com.
  3. Cisco Networking Academy. Packet Tracer (simulator download). netacad.com/courses/packet-tracer.

Target exams: CCNA 200-301 v1.1 · CyberOps Associate 200-201. Last content verification: 2026-10-11.