When trying to understand and select the right switch for your needs, you will need to know which layer it will operate on and what functionality is available for that layer.
There are seven layers in the open system interconnection (OSI) model of networking framework.
These layers are:
- Data Link
However, switches generally only operate on layers one, two, three, four and seven. There are also multi-layer switches, or layer 4-7 switches, that operate on multiple layers.
On layer one, network devices transfer data but do not manage the traffic. Layer one, as the physical layer, has two main functions. To encode and signal the data, then to transmit or receive the data. Over Switches used at this layer typically serve the same function of a hub or a network tap.
A layer-1 switch receives the data and sends it up the network stack to layers two or three where the data is further analyzed. However, situations where latency is crucial, a layer-1 switch configured for circuit switching (switching decisions made in advance so data flows freely) could help maintain wire speed.
Layer-1 Switch Features:
- Clock and Data Recovery (CDR) that regenerates the signal and removes noise
- Transmits data at wire speed
- Easy to deploy
Layer two is the data link layer. Devices on this layer are typically multiport and use Ethernet MAC addresses to process and forward data. Switches on this layer are used as network bridges that can connect devices.
In general LAN applications, switches can be used for end user access that concentrate bandwidth and routed networks. Layer-2 switches can also be used for storage area networks.
Layer-2 Switch Features:
- Error checks and transports data frame by frame
- Learns MAC addresses automatically
- Forwards packets at wire speed
- Minimal impact on network performance or bandwidth
- Easy to deploy
On layer three, the network layer, switches can perform the functions of a router. However, unlike routers, network switches can only support a single type of network, such as Ethernet.
Layer-3 switches support IP routing between configured VLANs. Some switches at this layer support routing protocols to exchange route information between networks.
Layer-3 Switch Features:
- Intelligent packet forwarding
- Network segmentation into two or more Virtual LANs (VLANs)
- Enhanced security controls
- Can provide Quality of Service (QoS) when dealing with traffic spikes
Layer four, the transport layer, switch capabilities include network address translation, load distribution based on TCP sessions or Quality of Service (QoS) capabilities.
When discussing layer-4 switches, also called multi-layer switches or layer 4-7 switches, keep in mind that the actual meaning of the term is vendor-dependent, so you’ll want to have a clear idea of the capabilities you’re looking for.
Layer-4 Switch Features:
- Prioritize data traffic by application
- QoS can be defined for participants on protocols
- Monitors the status of sessions individually from start to end
- Determines which server the user query should be sent to depending on server loads
- Can identify offline servers and direct traffic accordingly
On layer seven, switches may load balance by recognizing application level transactions based on URLs or another technique specific to the installation and configuration.
A layer-7 switch can pass traffic and make forwarding and routing decisions quickly but uses information from the application layer.
Layer-7 Switch Features:
- Uses the information within the cookie header to forward HTTP or Layer 7 application requests
- Uses information in the URL text string to direct application or HTTP requests to server or destination
- Uses an HTTP header to persist connections between clients and servers
Other common switch features:
- Enable and disable ports
- Link bandwidth and duplex settings
- MAC filtering and access control features
- Spanning Tree Protocol
- Shortest Path Bridging
- Can be configured via a Web based GUI or Simple Network Management Protocol (SNMP)
- SNMP monitoring
- Port mirroring for monitoring traffic and troubleshooting
- Port aggregation to achieve higher data transfer rates and reliability
- VLAN configuration and port assignments
- Network Access Control features
Choosing the right switch depends on what you need it to do and what layer of the OSI model it will operate on. As you go up the layers, the level of complexity and logic built into the switch increases.
Depending on the size of your network, you may only need switches at layers 2 and 3. Layer 1 switches are not typically used on business applications and are best avoided for serious networking use. Layer 4 and 7 switches offer advanced features that enable fine tuning of network traffic and more opportunities to optimize your infrastructure.
At the end of the day, each network is unique and the number of switches and the layers you deploy them on will depend on the needs of your users. Hopefully the information in this post will help you make the best decision for your network.