Modern networks are indispensable to any organization. They facilitate the delivery of business applications, multimedia messages, and crucial data to users globally. All networks inherently rely on the network switch, an essential element that connects devices for resource sharing within a local area network (LAN).
A network switch is a hardware tool operating at the Data Link layer—Layer 2—of the Open Systems Interconnection (OSI) model. This device accepts packets delivered by devices joined to its physical ports and directs them towards their intended recipients. Interestingly, switches can also function at the Network Layer (Layer 3), which is where routing takes place.
Switches are a standard component in networks built on various platforms, including Ethernet, Fibre Channel, Asynchronous Transfer Mode (ATM), and InfiniBand. However, most of today’s switches operate on Ethernet.
Upon connection of a device to a switch, it registers the media access control (MAC) address of the device—a code incorporated into the device’s network-interface card (NIC). The NIC then attaches to an Ethernet cable linking to the switch. This unique MAC address allows the switch to identify which device is sending outgoing packets and exactly where to direct the incoming packets.
The MAC address is unique to each physical device and remains constant, but the network layer (Layer 3) IP address can be dynamically assigned to a device and alter over time. The MAC address is likened to the VIN number on a car, while the IP address is akin to the license plate.
As a packet enters the switch, the switch scrutinizes its header, matches the destination address or addresses, and forwards the packet through the relevant ports leading to the target devices.
To minimize the probability of collisions between network traffic flowing to and from a switch and an attached device simultaneously, most switches provide full-duplex functionality. This functionality allows packets from and to a device to utilize the entire bandwidth of the switch connection. This concept is similar to two individuals conversing on smartphones rather than on a walkie-talkie.
Even though switches function at Layer 2, they can operate effectively at Layer 3, which is necessary for supporting virtual LANs (VLANs). VLANs are logical network segments that can extend subnets. For traffic to move from one subnet to another, it must pass between switches, and this transfer is enabled by routing capabilities integrated into the switches.
A hub serves as a connecting point for multiple devices, enabling the sharing of resources. The range of devices connected through a hub is referred to as a LAN segment.
Contrasting it with a switch, a hub broadcasts packets sent from one device to all connected devices. On the other hand, a switch directs packets to the specific port connected to the destination device.
Switches are generally used to connect LAN segments, therefore hubs are connected to them. Switches effectively filter traffic destined for devices within the same LAN segment. This functionality allows switches to utilize their processing resources and network bandwidth more efficiently.
Switches are often mistaken for routers. Although routers also facilitate the forwarding and routing of network traffic, they perform these functions with a unique purpose and location.
Routers operate at Layer 3 — the network layer — and are utilized to connect networks to other networks.
One simple method to distinguish between routers and switches is by considering LANs and WANs. Devices connect on a local scale through switches, while routers connect networks to other networks. This is the typical path a packet may take to reach the Internet: device > hub > switch > router > Internet.
Notably, there are instances where a router’s hardware contains built-in switching functionality, thereby performing the functions of a switch as well.
Consider your home wireless router as an example. It routes to a broadband connection via its WAN port, but typically also features additional Ethernet ports for attaching an Ethernet cable to a computer, television, printer, or even a gaming console. While other devices on the network such as other laptops and phones connect through the Wi-Fi router, it also provides switching functions through the LAN. Therefore, the router essentially also acts as a switch. You can even connect an additional switch to the router to provide both Internet and LAN access for more devices.
When people talk about an internet switch, they’re most likely referring to a router. Although both routers and switches can route and forward network traffic, they function on different types of networks. Switches are designed to operate on Local Area Networks (LAN) while routers work with Wide Area Networks (WAN). It should be noted that router hardware can integrate switching functionality, and routers can carry out switching functions. The primary role of a router is to transmit packets over the internet.
The size of switches can vary depending upon the number of devices that need to be connected within a specific area, as well as the required network speed or bandwidth. In settings like a small office or a home office, a switch with either four or eight ports is usually sufficient. However, in larger deployments, you might see switches with up to 128 ports. Small switches are designed to fit on a desktop, but for placement in a wiring closet or a data center or server farm, they also come in rack-mountable forms. Sizes of rack-mountable switches can range from 1U to 4U, with larger models also available.
Switches also offer differing network speeds, starting from Fast Ethernet (10/100 Mbps), to Gigabit Ethernet (10/100/1000 Mbps), 10 Gigabit (10/100/1000/10000 Mbps), and even 40/100 Gbps speeds. The choice of speed is dependent on the throughput required for the tasks being supported.
Switches also vary in terms of their capabilities. There are four main types.
Unmanaged switches are fundamentally simple, providing a static configuration. Their functionality is typically plug-and-play, hence offering little to no modifications for the user. Such switches may come with preset configurations for features like quality of service, but these cannot be customized. The advantage of unmanaged switches resides in their affordability, however, their limited functions make them unfit for the majority of enterprise applications.
Managed switches, on the other hand, provide an array of functionalities and features tailored for IT professionals and are commonly encountered in business or enterprise environments. These switches come equipped with command-line interfaces (CLI) for configuration purposes. They are designed to support agents for the simple network management protocol (SNMP) that supply data, which can be useful in diagnosing network issues.
Further, they are equipped to support virtual LANs, quality of service settings and IP routing. Security is also enhanced, safeguarding all traffic classifications they manage. However, due to their superior features, managed switches are considerably more expensive than unmanaged switches.
Smart or intelligent switches are categorized as managed switches that provide additional features than that of an unmanaged switch, but less than a fully managed switch. While they exceed unmanaged switches in complexity, they are less costly than a fully managed switch. Typically, they do not support telnet access and have web GUIs in lieu of CLIs. Other features like VLANs, may not be as diverse as those offered by fully managed switches. Therefore, due to their lower price point, they could be a suitable choice for smaller companies with limited financial means or lesser feature requirements.
A KVM switch, commonly found in data centers and other spaces filled with servers, allows users to control a multitude of computers from a single console by providing a Keyboard, Video (monitor), and Mouse connection. With the addition of a KVM extender, this switch can also provide both local and remote access to the servers, hence facilitating centralized server maintenance and management.
The features and functionalities of a network switch can be different depending on the manufacturer and any accompanying software. However, in general, a switch enables professionals to:
In today’s high-tech enterprises, switches continue to be crucial. Their capabilities enhance wireless connectivity and support Internet of Things devices and innovative buildings, promoting more sustainable operations. Furthermore, the increasing usage of Industrial Internet of Things devices necessitates the use of switching technologies to connect various sensors and machinery back to the corporate network.
Modern switches are most probably equipped with Power over Ethernet (PoE) technology, capable of delivering up to 100W of power to support network-connected devices. This capability allows businesses to install devices in locations without the necessity for separate power outlets. These devices could include security cameras, outdoor lighting, wireless access points, VoIP phones, and a plethora of sensors (encompassing temperature, humidity, moisture, etc.) Data collected and transmitted from these IoT devices can be gathered by a switch and subsequently used in machine learning algorithms and artificial intelligence to foster smarter environments.
Switches are frequently utilized in extensive networks to offload analytics traffic. This arrangement can prove crucial for security specialists, as the switch can be stationed in advance of a WAN router, prior to traffic entering the LAN. This setup aids in intrusion detection, performance analytics, and firewalling. Oftentimes, port mirroring can generate an exact copy of the data funneled through the switch before being dispatched to an intrusion detection system or packet sniffer.
In large data centers and cloud settings, switches are still in service, combined with recent advancements such as digital twin innovations, consolidation of network cables, and SD-WAN environments.
On a basic level, network switches serve to expeditiously and efficiently transport packets from one device to another, irrespective of whether the devices are stationed across the corridor or on opposite sides of the globe. While several devices contribute to this delivery along the way, the switch remains an indispensable element of the network architecture.
Keith Shaw is a freelance digital journalist who has written about the IT world for more than 20 years.