thank you bailey for clarifying that. one wonders then what purpose do VLANS serve? VLANs are therefore an aggregation of some of the physical ports of a switch into a subset. Subsets on different switches can be merged(tagged) into the same VLAN. But so What?
if i have many devices on a large switched network, then each device is identified by the switch using its MAC address. A direct connection between any two devices can thus easily be made. What benefit does it do any device to say it belongs to a 'special club' (VLAN) since the switch has to look at the MAC address anyway?
At it's most basic, think of VLANs as simply a method of making multiple virtual separate switches.
This might not seem useful to you as a basic user but it can come in useful in larger networks.
E.g. Consider an office with 20 network points and 2 groups of 10 users with separate network connections.
You could get 2 x 16 port switches, delegating 1 for each group of users.
i.e. Switch A connects to Group 1 and their router. Ditto for Switch B & Group 2.
Alternatively, you could get a 24 port VLAN switch and connect them all. Set VLAN A for ports connected to group 1 & their router and VLAN B for group 2 & their router.
The magic here is that if a user relocates, you simply go into the UI and change the ports VLANs instead of manually switching the cables. Also, if the number of users change in each group, you can reallocate the port resources dynamically.
e.g. 16 users in Group 1 & 4 in Group 2, you can still maintain the separation by changing the VLANs. If you had chosen to buy 2 x 16 port dumb switches, then you're out of luck here.
Next thing VLANs can do is to do what we call a port trunk - a single port that is a member of multiple VLANs.
So say you have a 3 storey building that was wired up a long time ago. You have only 1 cable going from the 1st storey to the 2nd, and 1 cable from the 2nd to the third.
Now, if each level requires it's own separate network, you can use VLAN trunks by having a VLAN switch on each level. Each level is assigned a single unique VLAN ID.
For the ports connected to the cables between levels, you simply make them members of all 3 VLANs. And for the ports on each switch serving each level, you make them untagged (aka access) ports for the VLAN in that level.
In this manner, you are able to connect the router for level 3 to the correct VLAN switch port on level 1 and still serve the clients there.