A Layer 2 switch is a network device that forwards data to other devices on the same network segment. They do not have routing tables, so they cannot route packets between different subnets.
Layer 2 switches use MAC addresses to forward data between end stations on the same physical LAN and may be configured to support VLANs (Virtual LANs). They can also run trunking protocols such as 802.1Q and ISL to allow several VLANs to share a common physical medium by tagging frames with VLAN identifiers (VIDs).
When you configure a Layer 2 switch with an IP address, you are assigning it an address that allows it to communicate beyond its local subnet. This can be useful if the subnet size is so large that it would take too long for devices on one side of the subnet to communicate with devices on another side of the subnet.
Last modified: November 6, 2022