Lab 1: Basic Switch Configuration
Your first hands-on lab: take a factory-fresh Cisco switch and give it a hostname, secured access, a login banner and a management IP — the baseline config every real device gets on day one. Difficulty: Beginner · Time: ~20 min.
Lab objectives
- Set a hostname and secure privileged EXEC mode
- Password-protect console and VTY lines
- Configure a login banner and a management IP (SVI)
- Save the configuration
Topology & addressing
Devices: 1× 2960 switch, 1× PC (console cable to the switch). In Packet Tracer, connect the PC's RS-232 to the switch console port and open Terminal.
Step-by-step configuration
enableconfigure terminal | Enter global configuration |
hostname SW1 | Name the switch |
enable secret class | Encrypted privileged-mode password |
line console 0password ciscologinexit | Protect console access |
line vty 0 4password ciscologinexit | Protect remote (Telnet) lines |
banner motd #Authorized access only# | Legal warning banner |
interface vlan 1ip address 192.168.1.2 255.255.255.0no shutdown | Management IP on VLAN 1 |
endcopy running-config startup-config | Save to NVRAM |
Verification
show running-config — confirm hostname, passwords and banner. show ip interface brief — VLAN 1 should be up with your IP. Set the PC's IP to 192.168.1.10/24 and ping 192.168.1.2 — replies confirm the management IP works.
Done? Try the next lab on the labs hub, or test your knowledge on the free CCNA practice test. Get Packet Tracer free via the career hub.
Frequently asked questions
Why use enable secret instead of enable password?
enable secret stores the password as an encrypted hash; enable password is stored in plain text. Always use enable secret.
Why does the switch need an IP address at all?
A switch works without one, but the management IP (on an SVI) lets you reach it remotely for administration.
Where is the configuration saved?
copy running-config startup-config writes it to NVRAM so it survives a reboot — otherwise changes are lost on power cycle.
Related articles
Want hands-on training?
Learn this on real Cisco lab devices with placement support at Attila Technologies, Ahmedabad.