VLAN configuration in Switch
First let us create two VLANs named account and student with VLAN ID 2 and 3 respectively.
Switch>enable
Switch#vlan database
Switch(vlan)#vlan 2 name account
Switch(vlan)#vlan 3 name student
OR
Switch>enable
Switch#configure terminal
Switch(config)#configure terminal
Switch(config-vlan)#vlan 2
Switch(config-vlan)#name student
Switch(config-vlan)#exit
Switch(config)#vlan 3
Switch(config-vlan)#name account
Now, let us move Fa0/1 from default or native VLAN1 to VLAN2 and Fa0/2 from VLAN1 to VLAN3.
Switch#configure terminal
Switch(config)#interface Fa0/1
Switch(config-if)#switchport access VLAN 2
Switch(config-if)#interface Fa0/2
Switch(config-if)#switchport access VLAN 3
Now, PC0 is in VLAN 2 and PC1 is in VLAN 3. A ping from PC0 to PC1 will fail.
Inter-VLAN routing needs to be configured before PC0 can PING to PC1.