Lab Objective
In this lab, you will perform the initial configuration of a Cisco Router. Before a router can pass traffic, it must be identifiable and secure. You will learn how to:
- Change the device Hostname.
- Secure the Console Port (physical access).
- Secure the Privileged Exec Mode (remote/admin access).
- Create Local Users for SSH/Telnet access.
- Encrypt all plain-text passwords.
Topology & Requirements
Connect a PC to the Router using a Console Cable (Rollover Cable).
Device Details
- Device: Router R1 (Generic Cisco Router)
- Connection: Console Cable (RS-232 to USB)
Task 1: Enter Global Configuration & Set Hostname
By default, all Cisco routers are named "Router". We must change this to identify the device.
Router>enable Router#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)#hostname R1 R1(config)#
Task 2: Secure the Console Line
This password is required when someone physically plugs into the router.
R1(config)#line console 0 R1(config-line)#password cisco123 R1(config-line)#login R1(config-line)#logging synchronous R1(config-line)#exit
Note: `logging synchronous` prevents system messages from interrupting your typing.
Task 3: Secure Privileged Mode (Enable Secret)
This password protects the "enable" command (admin rights).
R1(config)#enable secret class123
Task 4: Configure Local Usernames
To allow remote logins (SSH/Telnet), the router needs a local database of users. We will create an admin user with full privileges.
R1(config)#username admin privilege 15 secret admin123 R1(config)#username guest secret guestpass
username admin password cisco: Stores the password as Type 7 (Easily crackable) or Plain Text.username admin secret cisco: Stores the password as Type 5 (MD5 Hash) or Type 9 (Scrypt). Always use Secret!
Task 5: Encrypt Plain-Text Passwords
Any password configured with the `password` keyword (like the Console password in Task 2) is visible in plain text. Use this command to encrypt them.
R1(config)#service password-encryption R1(config)#end R1#write memory