Layer 3 switches originate from the OSI model (Open System Interconnect model), a reference model that explains network communication. This model has 7 layers, whereby layer 3 switches are located on layer 3, the network layer.
In addition to the capabilities of layer 2 switches (switching), layer 3 switches also have routing capabilities. They are responsible for routing, the assignment of data packets by IP addresses. They can also connect several LANs and VLANs with each other. However, not all layer 3 switches can connect to the Internet (WAN) via a router. A major difference to layer 2 switches is the communication of network-compatible devices. This is not only possible within a network, but also outside of it.
Advantages are, for example, improved security protocols, the use of logical addressing, the connection of different subnets or the subdivision of a single LAN into two or more virtual LANs (VLANs). The disadvantages, on the other hand, are higher costs, additional processing memory and computing power required, and configuration and administration. Layer 3 switches are versatile network devices that are used in complex network infrastructures. They control data traffic and facilitate communication between different sub-networks.