Layer 3 switches compared to routers
Any student of computer networking has surely heard it repeated a thousand times: switches work at Layer 2 of the OSI model and interpret MAC addresses, while routers work at Layer 3 and interpret IP addresses. In other words, a switch looks at the MAC address of the destination host and sends the frame only to that recipient (thus conserving bandwidth). A router directs network traffic in a similar manner, but references the target IP address instead of its MAC address (on a side note, those devices marketed as “routers” for home users generally provide more functionality than mere packet routing, such as IP address assignment (DHCP) and firewall filtering). Broadly speaking, switches connect hosts from the same network together while a router can connect whole networks together. To say this in IT Speak: switches connect hosts to form local area networks (LANs) while routers connect multiple LANs into wide area networks (WANs).
In addition to traffic forwarding based on MAC address, switches also detect packet collisions and can simultaneously manage multiple data streams destined to multiple ports. Routers, for their part, can perform network address translation (NAT) and basic packet filtering based on access control lists (ACLs).
With conventional switches and routers performing markedly different functions at layer 2 and layer 3 respectively, just what is meant by the term “layer 3 switch”? Isn’t this contradictory?
Routers and L3 switches – similarities
Here is how layer 3 (L3) switches actually function in computer networks. An L3 switch is both a switch and a router. How? Because it’s a router with multiple Ethernet ports and therefore has a switching function. It switches packets by inspecting both their IP addresses and their MAC addresses. L3 switches are thus able to segregate ports into separate virtual LANs (VLANs) and perform the routing between them.
L3 switches can also be configured to support routing protocols such as RIP, OSPF, and EIGRP.
Given that L3 switches perform functions associated with both Layer 2 and Layer 3, it is technically inaccurate to label them “Layer 3″ switches. A more appropriate (but less common) name is “multilayer switch”. These devices were previously called brouters.
Routers and L3 switches – differences
Wikipedia claims that “The major difference between the packet switching operation of a router and that of a Layer 3 switch is the physical implementation. In general purpose routers, packet switching takes place using software that runs on a microprocessor, whereas a Layer 3 switch performs this using dedicated application-specific integrated circuit (ASIC) hardware”.
Another noteworthy difference is that L3 switches will not offer the same WAN-type ports (serial, T1, T3, etc.) that a standard router will.
Image source: Cisco
If you want to see if an L3 switch would be right for your home or business, you can pick one up from Amazon.
If you found the content of this article helpful and want to expand your knowledge further, please consider buying a relevant book or two using the links below. Thanks!