Layer 2 and Layer 3 switches
By By Alan Stevens, IT Pro,
Network switches are often described as Layer 2 or Layer 3. But what exactly does that mean and what are the advantages and disadvantages of the technologies involved?
Why layers?
Switches are used to built networks, linking network devices together and forwarding (i.e. switching) data from one port to another based on information gleaned from the packets being transmitted. Information is organised to conform to the OSI (Open Systems Interconnection) seven-layer model, which is adhered to by networking vendors to insure interoperability between their products.
Hence terms like Layer 2, Layer 3 and so on, which you'll hear used mostly in relation to switches but other networking devices, too.
How Layer 2 switches work
Layer 1, also referred to as the Physical Layer, describes the electrical interface and isn't of much interest to switch vendors. Rather it's to Layer 2 (the Data Link layer) that most switches look when deciding how to move packets around a network. It's here, for instance, that a switch can find the Media Access Control or MAC address of both sending and receiving devices.
Layer 2 switches learn MAC addresses automatically, building a table which can be used to selectively forward packets. For example, if a switch receives packets from MAC address X on Port 1 it then knows that packets destined for MAC address X can simply be forwarded out of that port rather than having to try each available port in turn.
Because Layer 2 information is easily retrieved, packets can be forwarded (switched) very quickly, typically, at the wire speed of the network. Layer 2 switching, therefore, has little or no impact on network performance or bandwidth. And because they are relatively dumb devices no setup or management is required, making them cheap and easy to deploy.
What Layer 2 switches can't do is apply any intelligence when forwarding packets. They can't route packets based on IP address or prioritise packets sent by particular applications to, for example, guarantee bandwidth to Voice over IP users.
The information required for that only starts to become available at Layer 3 (the Network Layer).
Layer 3 advantages
Intelligent packet forwarding (routing) based on Layer 3 information is traditionally the function of routers. It's here that IP addresses are found, for example, enabling a router to link different subnets together. Specialised routing protocols also use Layer 3, enabling routers to "learn" routes between networks.
In recent years, however, that same functionality has also been built into network switches. Routers are still used to forward packets across (relatively) slow WAN (Wide Area Network) connections but on local networks, high-performance Layer 3 switches - sometimes referred to as "switch routers" or "routing switches" - have largely replaced them.
Other intelligence commonly found in Layer 3 switches, includes the ability to logically segment a network into two or more Virtual LANs (VLANs) plus enhanced security controls to prevent unauthorised setup changes. Facilities to prioritise different types of traffic are also commonplace, to provide guaranteed Quality of Service (QoS) when, for example, building converged voice and data networks.
Layer 3 issues
Extra processing power is required to retrieve and make use of Layer 3 information. As a result, early switches could cause bottlenecks; nowadays, most Layer 3 switches operate at full wire speed just like their Layer 2 counterparts.
You may also like...
Sponsored Links
advertisement
You may also like...
Latest Switches News
Cisco posts bumper results amidst restructure
The networking giant impresses analysts with solid profit and record revenue.
advertisement
Most popular
- Ubuntu vs. Windows 7 on the business desktop
- York researchers heat storage to speed up data
- BlackBerry Bold 9790 review
- OneNote hits Google?s Android
- O2 trials Olympic-scale remote working
- Will someone rid me of these troublesome Macs?
- Lenovo beats expectations again
- Who to trust after the VeriSign hack?
- Google to promise fairness after Motorola buy
- Report: Google cloud storage coming soon




