All topic guides
Device Operations

Initial Cisco IOS Device Setup: Lab and Production Baselines

Fast isolated-lab router and switch baselines versus secure SSH production setup, common mistakes, and verification.

How the sources were combined

Curated on-site lab operations guide. Separates intentionally insecure Packet Tracer/GNS3/CML shortcuts from production SSH, local login, and management SVI patterns — complements device-configuration and device-security without duplicating full routing or AAA depth.

Overview

This guide teaches how to quickly initialize Cisco routers and switches in a virtual or isolated lab while clearly separating insecure lab conveniences from proper real-world configurations. Know whether you are configuring a router, a Layer 2 switch, or a multilayer switch before you paste any block.

Lab-only insecure settings

Telnet, shared line passwords, no idle timeout, and sample passwords such as cisco and class are acceptable only in a disposable, isolated practice environment. Never expose that configuration to an untrusted or Internet-connected network.

1. Lab Setup Versus Production Setup

EnvironmentPurposeSecurity expectation
Temporary isolated practicePacket Tracer, GNS3, CML, or a VLAN-isolated lab VLANShortcuts allowed for speed
Physical home labHands-on cabling and console practiceStill isolated — treat like a lab unless you intentionally harden it
Production or Internet-connectedReal users, real data, real riskSSH, strong secrets, timeouts, local/AAA login, banners

Telnet sends credentials and traffic in cleartext. SSH should be used in real environments.

Sample passwords such as cisco and class must never be used in production.

Platform-dependent commands

RSA key generation syntax, VTY line ranges, and SSH algorithm support vary by IOS version and hardware. Use ?, show version, and Cisco documentation for your platform — do not assume Packet Tracer behavior matches every physical device.

2. Correct Common Configuration Mistakes

MistakeCorrection
Using enable password alonePrefer enable secret — it stores an MD5/SHA hash and overrides plain enable password
Treating service password-encryption as strong securityIt is reversible obfuscation, not strong password hashing
Putting transport input under the console linetransport input belongs under VTY lines, not line console 0
Teaching line vty 0 5Use line vty 0 4 or, when supported, line vty 0 15
Using exec-timeout 0 0 everywhereUse unlimited idle time only in isolated labs
Enabling ip routing on every deviceNeeded mainly to enable Layer 3 routing on a multilayer switch
Using ip default-gateway on a routerip default-gateway is for a Layer 2 switch when IP routing is disabled
Using ip default-gateway on a multilayer switch with routingAfter ip routing, use a default route (ip route 0.0.0.0 0.0.0.0 …)
Disabling timestamps in productionTimestamps may clean lab output, but enable them in real environments
Only teaching write memoryBoth write memory and copy running-config startup-config save — the copy syntax is preferred for teaching
Common mistake

Students often paste transport input telnet under the console line or configure line vty 0 5 because a lab screenshot used a nonstandard range. Verify with show running-config | section line vty.

3. Fast Isolated-Lab Router Configuration

Lab only

Telnet, shared passwords, and unlimited idle sessions are intentionally insecure. Never expose this configuration to an untrusted network.

Fast lab router baseline

enable configure terminal hostname R1 no ip domain-lookup enable secret class service password-encryption line console 0 logging synchronous exec-timeout 0 0 password cisco login exit line vty 0 4 logging synchronous exec-timeout 0 0 password cisco login transport input telnet exit end copy running-config startup-config

CommandPurpose
enableEnters privileged EXEC mode
configure terminalEnters global configuration mode
hostname R1Sets the device name shown in prompts and logs
no ip domain-lookupDisables DNS lookups for mistyped commands (lab convenience)
enable secret classSets a hashed enable password (still a weak lab password)
service password-encryptionObfuscates line passwords in show running-config
line console 0 / line vty 0 4Configures console and virtual terminal lines
logging synchronousReprints interrupted CLI input after syslog messages
exec-timeout 0 0Disables idle timeout — lab only
password cisco + loginLine password authentication (insecure; lab only)
transport input telnetAllows Telnet to VTY lines — never in production
exitLeaves line configuration mode
endReturns to privileged EXEC
copy running-config startup-configSaves to NVRAM

You may paste the whole block, including exit and end, to move cleanly between configuration modes.

Copy-and-paste warning

Large blocks should still be pasted in manageable sections because Packet Tracer, serial consoles, and older IOS devices may drop pasted characters.

4. Devices With Additional VTY Lines

Not every device has the same number of VTY lines. Some platforms use 0–4; others support 0–15.

Additional VTY lines (when present)

configure terminal line vty 5 15 logging synchronous exec-timeout 0 0 password cisco login transport input telnet exit end copy running-config startup-config

Verify VTY lines

show running-config | section line vty show line

5. Optional Clean Lab Output

This subsection is optional and lab-only. Do not use it in the production baseline.

Optional — shorter lab timestamps

configure terminal no service timestamps debug datetime msec no service timestamps log datetime msec end

Disabling millisecond timestamps may make disposable lab output shorter, but it removes useful timing information for troubleshooting and syslog correlation.

6. Secure Real-World SSH Baseline

Production best practice

Use local or AAA login, SSH version 2, idle timeouts, strong secrets, and disable unused management services such as HTTP.

Production-oriented SSH baseline

enable configure terminal hostname R1 no ip domain-lookup enable secret <STRONG-ENABLE-SECRET> username netadmin privilege 15 secret <STRONG-USER-SECRET> ip domain-name lab.example crypto key generate rsa modulus 2048 ip ssh version 2 service password-encryption service timestamps debug datetime msec localtime show-timezone service timestamps log datetime msec localtime show-timezone banner motd # AUTHORIZED ACCESS ONLY

line console 0 logging synchronous exec-timeout 10 0 login local exit line vty 0 4 logging synchronous exec-timeout 10 0 login local transport input ssh exit no ip http server no ip http secure-server end copy running-config startup-config

Key points:

  • The device needs a hostname and domain name before RSA key generation.
  • SSH support depends on the IOS image and platform. Image names containing k9 generally indicate cryptographic functionality — k9 is not "IP KVM."
  • RSA key-size syntax varies on some releases; verify with crypto key generate rsa ?.
  • Some modern platforms support stronger SSH algorithms; older lab hardware may have limitations.
Verify SSH

show ip ssh show ssh show crypto key mypubkey rsa show running-config | section line vty

7. Layer 2 Switch Management Setup

A Layer 2 switch uses a management SVI. The management VLAN must exist, and the SVI may stay down until the VLAN has an active access port or trunk.

Create management VLAN

vlan 99 name MANAGEMENT exit

L2 switch management SVI

enable configure terminal hostname SW1 no ip domain-lookup interface vlan 99 ip address 192.0.2.2 255.255.255.0 no shutdown exit ip default-gateway 192.0.2.1 end copy running-config startup-config

Example to make VLAN 99 active — assign at least one access port or carry the VLAN on a trunk:

Example access port in VLAN 99

interface FastEthernet0/1 switchport mode access switchport access vlan 99 no shutdown

ip default-gateway is used because the switch is not routing IP packets between subnets.

8. Multilayer Switch Setup

After ip routing is enabled, a multilayer switch behaves like a router for inter-VLAN traffic and uses a default route, not ip default-gateway.

Multilayer switch baseline

enable configure terminal ip routing interface vlan 99 ip address 192.0.2.2 255.255.255.0 no shutdown exit ip route 0.0.0.0 0.0.0.0 192.0.2.1 end copy running-config startup-config

9. Quick Telnet Switching Between Lab Devices

Configure host aliases for faster lab navigation:

IP host aliases

configure terminal ip host R1 10.0.0.1 ip host R2 10.0.0.2 ip host R3 10.0.0.3 ip host R4 10.0.0.4 end

Connect and suspend sessions

telnet R1

To suspend a Telnet session: press Ctrl-Shift-6, release, then press x.

Open another session

telnet R2 show sessions

Typing 1, 2, 3, or 4 resumes active sessions by their dynamically assigned session numbers — the numbers are not permanently tied to specific routers.

Close a session

disconnect 1

Use show sessions to inspect open sessions and disconnect or clear line as appropriate to close them.

10. Essential Verification Commands

CommandWhat it shows
show running-configActive configuration in RAM
show startup-configSaved configuration in NVRAM
show ip interface briefInterface IP addresses and status (routers/L3)
show interfaces statusSwitchport status, VLAN, speed, duplex
show interfaces descriptionAdmin descriptions
show versionIOS version, uptime, model, memory
show inventoryModule and serial details (when supported)
show cdp neighborsDirectly connected Cisco devices
show cdp neighbors detailNeighbor IP, platform, capabilities
show usersActive console and VTY sessions
show lineLine numbers, transport, session state
show sessionsSuspended Telnet sessions
show historyRecent EXEC commands

11. Saving and Erasing Configurations

ActionCommand
Save running to startupcopy running-config startup-config
Alternate save syntaxwrite memory
Reset a disposable lab devicewrite erase then reload
Do not erase equipment you do not own

write erase and reload are for your own lab gear only. On some switches, VLAN information may persist in a separate vlan.dat file — erasing startup-config may not remove VLAN definitions.

12. Copy-and-Paste Configuration Tips

  • Include exit commands between sections so mode changes are explicit.
  • Use end before verification or save commands.
  • Paste in smaller blocks on real serial connections.
  • Watch for IOS error markers beginning with %.
  • Confirm every interface name before pasting — Packet Tracer names may not match physical equipment.
  • Run show running-config afterward to confirm the result.
  • Do not paste production secrets into screenshots, public repositories, or shared lab files.

Router setup checklist

  • Hostname and no ip domain-lookup (lab) or domain name (production SSH)
  • enable secret with a strong password in production
  • Console and VTY lines configured with appropriate timeout and login method
  • VTY transport input ssh in production; Telnet lab only
  • Interfaces addressed and no shutdown where needed
  • Default route or static routes configured
  • Configuration saved with copy running-config startup-config

Switch setup checklist

  • Identify Layer 2 vs multilayer switch role
  • Management VLAN and SVI configured
  • ip default-gateway (L2) or ip routing + default route (L3)
  • At least one port or trunk to bring the management VLAN up
  • Access/trunk ports verified with show vlan brief / show interfaces status
  • Configuration saved

Related lessons on this site

Continue in this domain

Device Operations · guide 1 of 2

Sources & further reading

This page is an amalgamated study guide synthesized from the markdown sources above, cross-checked against Cisco's official CCNA exam topics. Verify scope before your exam date.