Firstly We Have To Take 2 Switch And 4 Pc’s And Draw This Type Of Sennerio
Now We Have To Go In Switch And Do Configuration
Configuration On Switch 1
Switch(config)#vlan 10
Switch(config-vlan)#name ccna
Switch(config-vlan)#exit
Switch(config)#vlan 20
Switch(config-vlan)#name hacking
Switch(config-vlan)#exit
Switch(config)#int f0/1
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 10
Switch(config-if)#exit
Switch(config)#int f0/2
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 10
Switch(config-if)#exit
Switch(config)#int f0/3
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 20
Switch(config-if)#exit
Switch(config)#int f0/4
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 20
Switch(config-if)#exit
Switch(config)#int f0/5
Switch(config-if)#switchport trunk allowed vlan all
Switch(config-if)#switchport mode trunk
Switch(config-if)#exit
Switch(config)#exit
Switch(config-if)#exit
Switch#
Configuration On Switch 2
Switch(config)#vlan 10
Switch(config-vlan)#name ccna
Switch(config-vlan)#exit
Switch(config)#vlan 20
Switch(config-vlan)#name hacking
Switch(config-vlan)#exit
Switch(config)#int f0/2
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 10
Switch(config-if)#exit
Switch(config)#int f0/3
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 10
Switch(config-if)#exit
Switch(config)#int f0/4
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 20
Switch(config-if)#exit
Switch(config)#int f0/5
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 20
Switch(config-if)#exit
Switch(config)#int f0/1
Switch(config-if)#switchport trunk allowed vlan all
Switch(config-if)#switchport mode trunk
Switch(config-if)#exit
Switch(config)#exit
Switch(config-if)#exit
Switch#