Cisco Switch Configuration
Access the Switch
To configure a Cisco switch, you must first access it via a console cable (or through SSH if remote access is already configured).
Connect via Console Cable
Use terminal software like PuTTY or Tera Term.
Set the correct serial port.
Switch> enable
Switch#
Switch# configure terminal
Switch(config)#
Set the Hostname
Switch(config)# hostname Switch1
Configure the VLAN
Switch1(config)# vlan 10
Switch1(config-if)# name test
Switch1(config-if)# no shutdown
Switch1(config-if)# exit
Configure the IP Address
Switch1(config)# interface vlan 10
Switch1(config-if)# ip address 192.168.10.10 255.255.255.0
Switch1(config-if)# no shutdown
Switch1(config-if)# exit
Configure Trunk Ports
Switch1(config)# int gig0/1
Switch1(config-if)# switchport mode trunk
Switch1(config-if)# no shutdown
Switch1(config-if)# exit
Set Passwords
password on console port
#line console 0
# password yourpassword
# login
password on telnet sessions
#line vty 0 15
# password yourpassword
# login
password on enable mode
# enable secret 0 yourpassword
to encrypt all passwords
# service password-encryption
Save Configuration
Once all configurations are done, save the changes.
Switch1# write memory
or
Switch1# copy running-config startup-config