With VLANs I can connect two computers which are:
- in the same subnet
- in different subnets
And I can make two networks plugged into one switch (S1), so: having on the left side of S1 the network 192.168.1.0/24 VLAN 11 and on the right side 192.168.2.0/ 24 VLAN 22. That would also work without VLANs, because all ports don't have to be in the same LAN. (There can be multiple networks hanging on one switch)
This all due to the oparation of the switch at layer 2. So, he doesn't care which subnet the fame is in, because the switch only cares about the VLAN-ID/MAC-Adress.
Is my assumption right? Please correct me if I got something wrong.