network switch

Contributor(s): John Burke, Dominique Brazziel

A network switch is a hardware device that channels incoming data from multiple input ports to a specific output port that will take it toward its intended destination. It is a small device that transfers data packets between multiple network devices such as computers, routers, servers or other switches.

In a local area network (LAN) using Ethernet, a network switch determines where to send each incoming message frame by looking at the physical device address (also known as the Media Access Control address or MAC address). Switches maintain tables that match each MAC address to the port which the MAC address is received.

A network switch operates on the network layer, called layer 2 of the OSI model.

Network device layers

Network devices can be separated by the layer they operate on, defined by the OSI model. The OSI model conceptualizes networks separating protocols by layers. Control is typically passed from one layer to the next. Some layers include:

  • Layer 1- or the physical layer or below, which can transfer data but cannot manage the traffic coming through it. An example would be Ethernet hubs or cables.
  • Layer 2- or the data link layer, which uses hardware addresses to receive and forward data. A network switch is an example of what type of device is on layer 2.
  • Layer 3- or the network layer, which performs similar functions to a router and also supports multiple kinds of physical networks on different ports. Examples include routers or layer 3 switches.

Other layers include layer 4 (the transport layer), layer 5 (the session layer), layer 6 (the presentation layer) and layer 7 (the application layer).

How a network switch works

Fundamental concepts of a networking switch.

Switches, physical and virtual, comprise the vast majority of network devices in modern data networks. They provide the wired connections to desktop computers, wireless access points, industrial machinery and some internet of things (IoT) devices such as card entry systems. They interconnect the computers that host virtual machines (VMs) in data centers, as well as the dedicated physical servers, and much of the storage infrastructure. They carry vast amounts of traffic in telecommunications provider networks.

A network switch can be deployed in the following ways:

  • Edge, or access switches: These switches manage traffic either coming into or exiting the network. Devices like computers and access points connect to edge switches.
  • Aggregation, or distribution switches: These switches are placed within an optional middle layer. Edge switches connect into these and they can send traffic from switch to switch or send it up to core switches.
  • Core switches: These network switches comprise the backbone of the network, connecting either aggregation or edge switches, connecting user or device edge networks to data center networks and, typically, connecting enterprise LANs to the routers that connect them to the internet.

If a frame is forwarded to a MAC address unknown to the switch infrastructure, it is flooded to all ports in the switching domain. Broadcast and multicast frames are also flooded. This is known as BUM flooding -- broadcast, unknown unicast, and multicast flooding. This capability makes a switch a Layer 2 or data-link layer device in the Open Systems Interconnection (OSI) communications model.

How a network switch works
How a network switch works

Many data centers adopt a leaf/spine architecture, which eliminates the aggregation layer. In this design, servers and storage connect to leaf switches (edge switches) and every leaf switch connects into two or more spine (core) switches. This minimizes the number of hops data has to take getting from source to destination, and, thereby, reduces the time spent in transit, or latency.

Some data centers establish a fabric or mesh network design that makes every device appear to be on a single, large switch. This approach reduces latency to its minimum and is used for highly demanding applications such as high-performance computing (HPC) in financial services or engineering.

Not all networks use switches. For example, a network may be (and often was, in the 1980s and 1990s) organized in a token ring or connected via a bus or a hub or repeater. In these networks, every connected device sees all traffic and reads the traffic addressed to it. A network can also be established by directly connecting computers to one another, without a separate layer of network devices; this approach is mostly of interest in HPC contexts where sub-5-microsecond latencies are desired and can become quite complex to design, wire and manage.

Types of networking switches

There are several types of switches in networking in addition to physical devices:

  • Virtual switches are software-only switches instantiated inside VM hosting environments.
  • routing switch connects LANs; in addition to doing MAC-based Layer 2 switching it can also perform routing functions at OSI Layer 3 (the network layer) directing traffic based on the Internet Protocol (IP) address in each packet.
  • A managed switch which lets a user adjust each port on the switch, allowing monitoring and configuration changes.
  • An unmanaged switch which allows Ethernet devices to pass data automatically utilizing auto-negotiation (which determines parameters such as the data rate). The configuration is fixed and cannot be edited.
  • Smart Switches, also called partially managed switches, which can be configured to allow more control over data transmissions but have more limitations compared to managed switches.

Network switches vs. hubs and routers

Network switches can be similar looking to both hubs and routers; however, they have different functionalities and operate on separate layers. For example, a hub is relatively simple compared to a network switch. The goal of a hub is to connect all the nodes in a network. Because a hub can’t manage data going in and out of it as a network switch can, there are a lot of communication collisions. Hubs are a layer 1 physical device, compared to a network switch which is a layer 2 on the OSI model.

A router is a device which joins networks and routes traffic between them. Routers are a layer 3 device on the OSI model and will deal with IP addresses. IP addresses route packets across the internet. As an example, an individual’s router will connect their local network to their ISPs network.

This was last updated in August 2019

Next Steps

Get an overview of the Brocade VDX 8770 data center-class switch series, equipped for highly virtualized environments.

This product overview focuses on the Cisco Nexus 9500 family of switches, which is designed for enterprises and highly virtualized data centers. Then get more info about the models, features and pricing of the Cisco Nexus 7700 switch series.

Learn about the Dell E-series of data center-class switches.

Learn more about the features of the HP FlexFabric 12500 data center class switch. Then take a look at an overview of the HP FlexFabric 12900 series, a line of data center-class switch fabrics for highly virtualized environments.

Get a breakdown of the Juniper EX9200 data center-class switch features.

After you've reviewed each of the products above, take a look at our comparison of the top data center-class switches.


Continue Reading About network switch

Dig Deeper on Network Infrastructure

Join the conversation


Send me notifications when other members comment.

Please create a username to comment.

What benefits have you seen from the use of virtual switching in your operation?
thank marge
can a switvh be used i full duplex mode?
Network layer is Layer 3 in OSI.  (See ¶ 3 "A network switch operates on the network layer, called layer 2 of the OSI model.")


File Extensions and File Formats

Powered by: