This procedure defines the initial configuration of a Cisco switch for lab use. It ensures secure access, prevents unnecessary interruptions, and sets a baseline identity for the device.
Connect to the switch via the console cable and open a terminal emulator (e.g., PuTTY, Tera Term).
Switch> enable
Switch# configure terminal
Prevents delays when mistyped commands are entere
Switch(config)# no ip domain-lookup
Define a unique device name.
Switch(config)# hostname LAB-SW1
Require login with local credentials.
Enable logging synchronization to prevent command interruptions.
Set exec-timeout to 0 0 (no timeout for lab use).
LAB-SW1(config)# line console 0
LAB-SW1(config-line)# login local
LAB-SW1(config-line)# logging synchronous
LAB-SW1(config-line)# exec-timeout 0 0
LAB-SW1(config-line)# exit
Set a username and password for console login.
LAB-SW1(config)# username admin privilege 15 secret MyLabPass123
Set a secure password for privileged EXEC mode.
LAB-SW1(config)# enable secret StrongEnablePass456
LAB-SW1# write memory
LAB-SW1# copy running-config startup-config
Your lab switch is now secured with a hostname, console login, and enable password.
Disconnect and reconnect to console.
Confirm username + password required for login.
Test entering enable mode with the secret password.
Verify hostname is correct.
Test that mistyped commands don’t trigger DNS lookups.
LAB-SW1> show running-config | include hostname
LAB-SW1> show running-config | section line con 0
LAB-SW1> show running-config | include username
LAB-SW1> show running-config | include enable secret