Basic switch configuration
Connection before configuration
Basis of switch configuration commands
User mode hostname#
Privileged mode hostname (config) #
Global configuration mode hostname (config-if) #
Switch password settings:
Switch > enable; enter privileged mode
Switch#config terminal; enter global configuration mode
Switch (config) # hostname csico; sets the hostname of the switch
Switch (config) # enable secret csico1; set privileged secret password
Switch (config) # enable password csico8; set privileged non-secret password
Switch (config) # line console 0; enter the console
Switch (config-line) # line vty 0 4; enter the virtual terminal
Switch (config-line) # login; virtual terminal allows login
Switch (config-line) # password csico6; set virtual terminal login password csico6
Switch#exit; return command
Including VLAN creation, deletion, port attribute settings, configuring trunk port, adding a port to vlan, configuring VTP:
Switch#vlan database; enter the VLAN settings
Switch (vlan) # vlan 2; build VLAN 2
Switch (vlan) # vlan3 name vlan3; build VLAN 3 and name it vlan3
Switch (vlan) # no vlan 2; delete vlan 2
Switch (config) # int f0ram 1; enter port 1
Switch (config) # speed? View subcommands of the speed command
Switch (config) # speed 100sets the port rate to 100mb/s (10/auto)
Switch (config) # duplex? View subcommands of duplex
Switch (config) # duplex full sets the port to full duplex (auto/half)
Switch (config) # description TO_PC1 this is the port described as TO_PC1
Switch (config-if) # switchport access vlan 2; the current port joins vlan 2
Switch (config-if) # switchport mode trunk; set to trunk mode (access mode)
Switch (config-if) # switchport trunk allowed vlan 1 vlan 2; set the allowed vlan
Switch (config-if) # switchport trunk encap dot1q; set up vlan relay
Switch (config) # vtp domain vtpserver; set the vtp domain name to the same
Switch (config) # vtp password; set the vtp password
Switch (config) # vtp server; set vtp server mode
Switch (config) # vtp client; set vtp client mode