In chart 1, there is a layer 2 that switches without setting VLAN. Any
broadcast frame will be transmitted to the other ports except the send port.
For example, a broadcast information is sent out from port 1 then
transmitted to port 2,3and 4.
In chart 2, red and blue indicate two different VLANs in the switch, and port 1
and port 2 belong to red VLAN, port 3 and port 4 belong to blue VLAN. If a
broadcast frame is sent out from port 1, switch will transmit it to port 2, the
other port in the red VLAN and not transmit it to port3 and port 4 in blue
VLAN. By this means, VLAN divide the broadcast domain via
restricting the
range of broadcast frame transition.
Note: chart 2 use red and blue to identify the different VLAN, but in practice,
VLAN uses different VLAN IDs to identify.