When I am setting up a new switch, there are a few things that I ensure that I keep in mind. This way, I lessen the stress of configuring the switch. The switch comes with a default hostname that you are often encouraged to change for easy identification over telnet and the Web VLAN Interface. Also,
Switch>enable
Switch#configure terminal
Switch(config)#sdm prefer lanbase-routing
Switch(config)#service password-encryption
Switch(config)#line console 0
Switch(config)#logging synchronous
If required for your network, now is the time to create a single or multiple VLAN on the switch.
Switch(config)#vlan 10
Switch(config-vlan)#name “10.0.10.1 /24”
Switch(config-vlan)#exit
Switch(config)#vlan 20
Switch(config-vlan)#name “10.0.20.1 /24”
Switch(config-vlan)#exit
Switch(config)#vlan 30
Switch(config-vlan)#name “10.0.30.1 /24”
Switch(config-vlan)#exit
Switch(config)#vlan 40
Switch(config-vlan)#name “10.0.40.1 /24”
Switch(config-vlan)#exit
Switch(config)#interface range gi1/0/1-12
Switch(config-if-range)#switchport mode access
Switch(config-if-range)#switchport access vlan 10
Switch(config-if-range)#no shutdown
Switch(config-if-range)#exit
Switch(config)#interface range gi1/0/13-24
Switch(config-if-range)#switchport mode access
Switch(config-if-range)#switchport access vlan 20
Switch(config-if-range)#no shutdown
Switch(config-if-range)#exit
Switch(config)#interface range gi1/0/25-36
Switch(config-if-range)#switchport mode access
Switch(config-if-range)#switchport access vlan 30
Switch(config-if-range)#no shutdown
Switch(config-if-range)#exit
Switch(config)#interface range gi1/0/37-48
Switch(config-if-range)#switchport mode access
Switch(config-if-range)#switchport access vlan 40
Switch(config-if-range)#no shutdown
Switch(config-if-range)#exit