Configuring Hostname, Passwords, and Banners in GNS3
Objective:
Configure the hostname of network devices.
Set up passwords for different levels of access.
Configure a message banner for security purposes.
Topology:
Two routers are connected by a serial link.
One PC to simulate an end device.

Step-by-Step Configuration:
Step 1: Create the GNS3 Topology
Open GNS3.
Drag and drop two Cisco routers (e.g., Cisco 7200 or 2800 series) onto the workspace.
Create a serial connection between the two routers using the "Add a Link" tool. You can use the Serial0/0 interfaces for both routers.
Add a PC to represent an end device and connect it to one of the router's Ethernet interfaces (e.g., FastEthernet 0/0).
Step 2: Basic Router Configuration
Start both routers by right-clicking and selecting "Start."
Access the routers via the console by right-clicking the router and selecting "Console."
Step 3: Configure Hostname
Enter Global Configuration mode on both routers.
Router> enable
Router# configure terminalSet the hostname for both routers.
On Router1:
Router1(config)# hostname Router1On Router2:
Router2(config)# hostname Router2Verify hostname changes:
Router1# show running-config | include hostname
Router2# show running-config | include hostnameStep 4: Configure Passwords
Configure console password on both routers to secure local access.
On Router1:
Router1(config)# line con 0
Router1(config-line)# password cisco
Router1(config-line)# login
Router1(config-line)# exitOn Router2:
Router2(config)# line con 0
Router2(config-line)# password cisco
Router2(config-line)# login
Router2(config-line)# exitConfigure enable password (privileged mode) on both routers.
On Router1:
Router1(config)# enable password ciscoOn Router2:
Router2(config)# enable password ciscoConfigure enable secret (for encrypted privileged mode password) on both routers.
On Router1:
Router1(config)# enable secret cisco123On Router2:
Router2(config)# enable secret cisco123Configure vty password (for remote access):
On Router1:
Router1(config)# line vty 0 4
Router1(config-line)# password vtypassword
Router1(config-line)# login
Router1(config-line)# exitOn Router2:
Router2(config)# line vty 0 4
Router2(config-line)# password vtypassword
Router2(config-line)# login
Router2(config-line)# exitStep 5: Configure Login Banner
Create a login banner on both routers to display a security warning message.
On Router1:
Router1(config)# banner motd #Unauthorized access is prohibited!#On Router2:
Router2(config)# banner motd #Unauthorized access is prohibited!#Verify banner configuration by checking the startup configuration.
Router1# show running-config | include banner
Router2# show running-config | include bannerStep 6: Save Configuration
Save the configurations to avoid losing them after a reboot.
On Router1:
Router1# copy running-config startup-configOn Router2:
Router2# copy running-config startup-configStep 7: Verify Configuration
Test local console login by exiting to the user mode and then trying to enter privileged mode.
Router1> enable
Password: cisco123
Router1#Test the same on Router2.
Test remote login (via VTY) using a terminal program (e.g., PuTTY or Tera Term).
Router1> telnet [Router2 IP]
Username: (Enter username if configured)
Password: vtypasswordStep 8: Final Verification
Verify hostname:
Router1# show running-config | include hostname
Router2# show running-config | include hostnameVerify password settings:
Router1# show running-config | include password
Router2# show running-config | include passwordVerify banner:
Router1# show running-config | include banner
Router2# show running-config | include bannerKeywords
Hostname Configuration, Router Configuration, Console Password, Enable Password, Enable Secret, VTY Password, Login Banner, Message of the Day (MOTD), Global Configuration Mode, GNS3 Simulation, Cisco Routers, Access Control, Privileged Mode, Security Configuration, Router Authentication, Router Passwords, Line Configuration, Router Setup, Telnet Access, Configuration Save, سیسکو , آموزش سیسکو
Last updated