Basic configurations for a Cisco Switch with the purpose of each command-Step by Step - Sample Guide
Here’s the information about each command followed by the commands themselves in a basic Cisco switch configuration:
1. Enable privileged EXEC mode: Allows access to configuration commands that are not available in user EXEC mode.
enable
2. Enter global configuration mode: Allows you to make changes to the switch’s global configuration.
configure terminal
3. Set hostname: Assigns a name to the switch for identification.
hostname Switch1
4. Enable secret: Sets a password for accessing privileged EXEC mode.
enable secret MyEnablePassword
5. Configure VLAN interface: Assigns an IP address and subnet mask to a VLAN interface.
interface vlan1
ip address 192.168.1.10 255.255.255.0
no shutdown
6. Console line configuration: Configures settings for console access.
line console 0
password ConsolePass123
login
7. VTY line configuration: Configures settings for remote access via virtual terminal lines.
line vty 0 15
password VTYPass456
login
8. Message-of-the-day banner: Sets a message displayed to users before login.
banner motd "Unauthorized access is prohibited."
9. Service password-encryption: Encrypts passwords in the configuration.
service password-encryption
10. Clock timezone: Sets the timezone offset for the switch.
clock timezone -05:00 EST
11. Domain name and RSA key generation: Configures the domain name and generates an RSA key pair.
ip domain-name example.com
crypto key generate rsa modulus 2048
12. Configure access ports: Sets access mode and assigns a VLAN to a range of FastEthernet ports.
interface range FastEthernet0/1 - 24
switchport mode access
Best Regards ,
Ahmed Azba from I.T PLUS SOLUTIONS
switchport access vlan 1
spanning-tree portfast
13. Configure trunk ports: Sets trunk mode and specifies allowed VLANs for a range of GigabitEthernet ports.
interface range GigabitEthernet0/1 - 2
switchport mode trunk
switchport trunk allowed vlan 1,10,20
14. Set default gateway: Specifies the default gateway IP address for the switch.
ip default-gateway 192.168.1.1
15. Login banner: Sets a banner message displayed during login.
banner login "Authorized personnel only."
16. Exit global configuration mode.
end
17. Save configuration changes: Writes the changes to the startup configuration.
write memory