1. Configure the addresses of each PC
2. Create VLAN and assign ports
Step one: Create vlan10 and name it.
Switch(config)#vlan 10
Switch(config-vlan)#name test10
Switch(config-vlan)#exit
Step 2: Create vlan20 and name it.
Switch(config)#vlan 20
Switch(config-vlan)#name test20
Switch(config-vlan)#exit
Step 3: Assign the port to vlan10
Switch(config)#int range f0/1-10
Switch(config-if-range)#switch mode access
Switch(config-if-range)#switch access vlan 10
Switch(config-if-range)#exit
Step 4: Assign the port to vlan20
Switch(config)#int range f0/11-20
Switch(config-if-range)#switch mode access
Switch(config-if-range)#switch access vlan 20
Switch(config-if-range)#exit
Step 5: Check the vlan configuration.
Step 6: Configure the cascade port in trunk mode
Switch(config)#int f0/24
Switch(config-if)#switchport mode trunk
Switch(config-if)#end
Step 7: Do the same configuration on the second switch.
3. Test
Click "PC0" in Packer tracer, click "run" under the "Desktop" tab in the pop-up window, enter ping 192.168.1.13 and ping 192.168.1.21, the test results are as shown in the figure below, where PC0 and PC5 In the same VLAN, they can be pinged; PC0 and PC2 are not in the same VLAN, so they cannot be pinged.