Hostname, Password, and Banner Configuration (Cisco IOS)
In this lab, you will learn how to configure essential identification and security features on Cisco routers and switches. These configurations are considered basic but mandatory for any real-world network deployment.
You can use the Tab key after typing a few letters to automatically complete the full command in Cisco IOS.
Cisco IOS allows abbreviated commands as long as they are unique.
Show Commands (Most Used)
show version - sho ver show interfaces - sho int show interfaces status - sho int status show ip route - sho ip route show ip protocols - sho ip prot show running-config - sho run show startup-config - sho start show vlan brief - sho vlan bri show mac address-table - sho mac add show cdp neighbors - sho cdp nei show cdp neighbors detail - sho cdp nei det show lldp neighbors - sho lldp nei show arp - sho arp show clock - sho clock
Configuration Mode Commands
configure terminal - conf t interface fastEthernet0/1 - int fa0/1 interface gigabitEthernet0/1 - int gi0/1 router ospf 1 - rou ospf 1 router rip - rou rip router eigrp 10 - rou eig 10 exit - ex end - end
Interface Configuration
ip address 192.168.1.1 255.255.255.0 - ip add 192.168.1.1 255.255.255.0 no shutdown - no shut shutdown - shut description Link to SW1 - desc Link to SW1 switchport mode access - sw mo acc switchport mode trunk - sw mo tru
VLAN Commands
vlan 10 - vlan 10 name SALES - name SALES show vlan - sho vlan show vlan brief - sho vlan bri
Save & Reload
copy running-config startup-config - copy run start write memory - wr mem reload - rel
Troubleshooting / Testing
ping 192.168.1.1 - ping 192.168.1.1 traceroute 8.8.8.8 - trace 8.8.8.8 show logging - sho log show processes cpu - sho proc cpu
Very Important Note (Exam + Real Devices)
Cisco IOS does not require the full command word — only enough characters to make it unique.
show → sho configure → conf interface → int
But ❗
If the shortcut becomes ambiguous, IOS will reject the command.
1. Hostname Configuration
Explanation
The hostname is the logical name assigned to a Cisco router or switch. It helps administrators easily identify devices, especially in environments with multiple routers and switches.
By default, Cisco devices use generic names such as Router or Switch. Changing the hostname is a basic and essential configuration step.
Cisco Prompt Commands
Switch#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#hostname NetsTuts_SW1 NetsTuts_SW1(config)#end NetsTuts_SW1# %SYS-5-CONFIG_I: Configured from console by console NetsTuts_SW1#wr Building configuration... [OK] NetsTuts_SW1#
2. Enable Password vs Enable Secret
Explanation
Cisco devices use enable password and enable secret to protect access to Privileged EXEC mode.
| Feature | Enable Password | Enable Secret |
|---|---|---|
| Encryption | Weak / Reversible | Strong (MD5 Hash) |
| Security Level | Low | High |
| Recommendation | Not Recommended | Recommended |
Configuring Enable Password (Legacy)
NetsTuts_SW1>en
NetsTuts_SW1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
NetsTuts_SW1(config)#ena pass cisco@123
NetsTuts_SW1(config)#end
NetsTuts_SW1#
%SYS-5-CONFIG_I: Configured from console by console
wr
Building configuration...
[OK]
NetsTuts_SW1#
Verify with "show running-config" command
! hostname NetsTuts_SW1
! enable password cisco@123
Enter the created password (The password you enter will be invisible)
NetsTuts_SW1>en Password:
Remove the password entering "no enable password" command
NetsTuts_SW1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
NetsTuts_SW1(config)#no enable password
NetsTuts_SW1(config)#end
NetsTuts_SW1#
%SYS-5-CONFIG_I: Configured from console by console
wr
Building configuration...
[OK]
NetsTuts_SW1#
NetsTuts_SW1>en NetsTuts_SW1#
Configuring Enable Secret (Recommended)
NetsTuts_SW1>en
NetsTuts_SW1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
NetsTuts_SW1(config)#enable secret cisco@123
NetsTuts_SW1(config)#end
NetsTuts_SW1#
%SYS-5-CONFIG_I: Configured from console by console
wr
Building configuration...
[OK]
NetsTuts_SW1#
Verify with "show running-config" command
hostname NetsTuts_SW1
!
enable secret 5 $1$mERr$6O7HXbIpaOLamSXRNemy0.
3. MOTD (Message of the Day) Banner
Explanation
The MOTD banner displays a warning or informational message before the login prompt appears.
- Displays legal warnings
- Restricts unauthorized access
- Meets security compliance requirements
Configuring MOTD Banner
NetsTuts_SW1#conf t Enter configuration commands, one per line. End with CNTL/Z. NetsTuts_SW1(config)#banner motd # Enter TEXT message. End with the character '#'. ***Unauthorized access is strictly prohibited.*** ***Disconnect immediately if you are not an authorized user.*** # NetsTuts_SW1(config)#exit NetsTuts_SW1# %SYS-5-CONFIG_I: Configured from console by console wr Building configuration... [OK] NetsTuts_SW1#
Note: The # character is used as a delimiter.
Expected behavior during login:
Press RETURN to get started. ***Unauthorized access is strictly prohibited.*** ***Disconnect immediately if you are not an authorized user.*** NetsTuts_SW1>