Routers and Switches and Hubs, Oh My! An Introduction to Network Devices and Their Functions
Overview
Getting into networking can be a bit overwhelming. Even with your previous experience using computers and other electronic devices, you might discover many devices that you never knew existed. This article starts from the beginning and discusses some of the most common networking device types and their functions within the network.
Hubs
At the simplest side of the equipment scale is the hub. This is a very simple device that connects together multiple local area network (LAN) devices. The only function of the hub is repeating the electrical signals received on one port, relaying those signals to all other connected ports. It does nothing else. Hubs are extinct for the most part in modern networks because, while they are inexpensive, they aren't much cheaper than a simple switch, which provides other functionality. Hubs work at Open Systems Interconnection (OSI) Layer 1.
Bridges/Switches/Multilayer Switches
The next device up the chain is the Ethernet bridge. A bridge is used to connect multiple LAN segments together, forming multiple collision domains. A collision happens on an Ethernet network when multiple devices attempt to "speak" at the same time. By separating two or more LAN segments into multiple collision domains, the bridge reduces the number of collisions that could potentially occur on a LAN segment (fewer LAN speakers on the same segment), which improves network performance.
The next evolution was the network switch. In its simplest form, a switch is a multiport bridge with some additional functionality. The switch almost completely ended the risk of collisions on hub-centered networks.
There are a few categories of switches, distinguished by function:
- Unmanaged (Layer 2) switch
- Managed (Layer 2) switch
- Managed Layer 3 switch (multilayer switch)
Unmanaged Layer 2 Switches
A modern unmanaged switch provides the functionality of a multiport bridge; each of the switch ports is on its own collision domain. Like bridges, the switch has built-in support for the Spanning Tree Protocol (STP), which provides loop prevention when multiple switches (bridges) are connected, introducing the potential for switching loops. A switch also keeps an internal database of the known MAC addresses connected to each port. This information is used to reduce the amount of Ethernet frame flooding that occurs when a device location is unknown (as with hubs).
Managed Layer 2 Switches
A modern managed switch provides all the functionality of an unmanaged switch; in addition, it can control and configure the behavior of the device. This typically introduces the ability to support virtual LANs (VLANs), which is why almost all organizations deploy managed switches versus their cheaper alternatives.
Managed Layer 3 Switches (Multilayer Switches)
The final type of switch is a Layer 3 or multilayer switch (MLS). This type of device provides a mix of functionality between that of a managed Layer 2 switch and a router. (The next section describes routers.) The amount of router function overlap is highly dependent on the switch model. At the highest level, a multilayer switch provides better performance for LAN routing than almost any standard router on the market, because these switches are designed to offload a lot of this functionality to hardware.
Routers
At its most basic, a router performs its functions almost solely at OSI Layer 3. This is because (on modern networks), the router is used to connect Internet Protocol (IP) networks. Since IP is a protocol that runs at OSI Layer 3 and can operate on multiple Layer 1 and 2 technologies (including Ethernet), a router is typically used to connect geographically dispersed parts of a network that use technologies other than Ethernet to connect them; for example, leased line, Frame Relay, or Multiprotocol Label Switching (MPLS) connected devices/offices. Routers also provide the ability to separate IP broadcast domains. This feature is important, as some protocols use broadcast heavily to communicate with hosts.
On most modern networks, multilayer switches are preferred over routers in LAN situations, and routers are used to connect together devices that don't connect using Ethernet.
Modern routers support a number of features that are not limited to OSI Layer 3, including support for network address translation (NAT), firewalling services, access control lists (ACLs), packet inspection, and many others.
Firewalls (VPN Concentrators)
The principal function of a firewall is to protect some portion of a network. A number of different techniques are used; which ones are supported depends greatly on the specific firewall vendor and model. Techniques include access control lists, stateful packet inspection (SPI), and others.
A newer breed of firewall, referred to as next-generation firewalls (NGFWs), are currently being marketed. These firewalls include all the functionality of a traditional firewall (ACL, SPI) and add support for built-in intrusion prevention, deep packet inspection, and virtual private networks (VPNs), as well as a much higher level of application awareness.
Host Intrusion Detection/Prevention Systems (HIDS/HIPS)
As indicated by the name, a Host Intrusion Detection/Prevention System (HIDS/HIPS) is used to protect a single host from an intrusion attempt. An IDS differs from an IPS in that an IDS only detects that someone is attacking; it doesn't mitigate the attack, whereas an IPS can actively mitigate the attack as it happens.
Modern versions of these types of software are focused mostly on intrusion prevention, because most modern-day attacks come with little or no warning and require an accelerated response.
Network Intrusion Detection/Prevention Systems (NIDS/NIPS)
A Network Intrusion Detection/Prevention System (NIDS/NIPS) is different from a HIDS/HIPS system in that it detects or prevents attacks from happening against a group of devices. Similar to their host-based alternatives, NIDS detect attacks as they're happening and report the activity, and NIPS detect and actively take steps to prevent the attack from continuing. This defense can include everything from the dynamic creation of ACLs to shutting down offending ports.
Access Points
An access point (AP) is used in wireless Ethernet networks in place of an Ethernet switch. Typical APs also provide bridging functionality between wired Ethernet and wireless Ethernet hosts.
There are three categories of access points: consumer APs, enterprise autonomous APs, and enterprise lightweight APs.
Most technology people are at least a little familiar with consumer APs, from having such devices in their own homes. These little APs (often called "wireless routers") are used to connect together the wired and wireless clients of a home or small business network. They typically also provide a wide area network (WAN) port for connection to an Internet service provider (ISP). This WAN port is simply another Ethernet port that is separated in the device's configuration to perform routing between a local network and a remote network (typically the Internet). It's also typically used as a zone separator for the built-in firewall.
Enterprise APs consist of two further categories: autonomous and lightweight. An autonomous AP acts as a bridge between the wireless clients on a network and the wired network. Such APs are typically limited to the performance of this main function. These devices may be managed remotely, but the services delivered are all handled within the AP itself.
A lightweight AP also bridges together wireless and wired networks, but it's controlled by a remote controller. This controller performs a number of functions that are built into autonomous APs; the lightweight AP is essentially a brainless device without the wireless controller that controls its actions and configuration. The controller can also perform other functions such as load balancing between APs, interference detection and mitigation, and security functionality.
Content Filters
Content filters are used on some networks to control the type of data that is allowed to pass through the network; one widely known content filter is commonly called "the Great Firewall of China." These devices scan for and remove content that is not wanted. Some common options that are typically seen are limits on types of pornography and violence. This functionality is typically built into modern firewalls and some router platforms.
Load Balancers/Application Delivery Controllers
One term commonly seen in older documentation is the concept of a load balancer, as a separate piece of equipment that solely performed this function. While this was true in the past, modern load balancers use the term application delivery controller (ADC), and they're not limited to performing load-balancing functionality. Their functionality has extended to perform a number of different activities, including the following:
- Local and global load balancing
- Network and device health monitoring
- TCP multiplexing
- Support for common network routing protocols
- Application acceleration
- Denial-of-service protection
- Web application firewall
- Support for virtualization and multi-tenancy
Packet Shapers/Policers
A packet shaper or policer controls the flow of information into or out of a specific device. The shaping or policing functionality is typically built into routers (and some switches) to deal with times when network demand outpaces the ability of a device or its port. In situations of no congestion, the shaping and/or policing functionality is not used. When there is congestion, these features will control how the excessive traffic is handled.
Traffic shapers attempt to "shape" the traffic by utilizing congestion functionality built into the used protocols. For example, IP, Frame Relay, and MPLS support marking packets with a varying level of priority bits; this marking affects how the traffic is treated when it's being forwarded through the network. Traffic that is marked as low priority will be dropped first in situations of high congestion.
Traffic policers act a bit more abruptly than shapers; typically policers drop any traffic that exceeds a configured threshold. As long as traffic continues to be transmitted above that threshold, it will be dropped. When the rate decreases, the policer stops dropping traffic.
The exact method used to shape or police traffic depends on the specific feature used and on which vendor's equipment is configured.
Summary
Obviously, a number of different devices are used in a modern network, and the devices covered in this article are just a few of the most commonly discussed network devices. I hope that this article is useful as a reference to help you determine the differences between these devices and how they can be fitted together to provide all of the functionality used on a modern network.