VLANs logically segment LANs into broadcast domains by using switches to assign ports and their attached devices to VLAN groups based on their MAC address, IP subnet, or switch port. This allows devices that are physically located on different floors or buildings to belong to the same logical LAN segment while preventing Layer 2 broadcasts from crossing VLAN boundaries. VLAN trunk links between switches allow multiple VLANs to be transmitted over the same physical link.