Network switch

On this page 7

A network switch is a device that connects multiple devices in a local area network and forwards Ethernet frames only to the port where the destination is located, based on a table of learned MAC addresses. In networking it is the basic building block of Ethernet LANs: every wired desktop, server, access point and printer in a modern office normally plugs into a switch port.

A switch replaced the older hub, which repeated every signal to all ports. By creating a separate collision domain on each port and running links in full duplex, a switch lets many conversations proceed at the same time at full link speed.

How a network switch forwards frames

A switch works at Layer 2 of the OSI model. When a frame arrives, the switch records the source MAC address and the ingress port in its MAC address table, also called the CAM table, and then looks up the destination MAC address to decide where the frame should go.

Destination situationSwitch actionEffect
Known unicastForward to the single learned portEfficient, private delivery
Unknown unicastFlood to all ports in the VLANFrame still reaches the host
BroadcastFlood to all ports in the VLANNeeded for ARP and DHCP
MulticastFlood, or forward to members with IGMP snoopingLimits video and discovery traffic
Same port as sourceFilter, do not forwardPrevents needless traffic
Forwarding decisions of a Layer 2 switch

Learned entries expire after an aging time, commonly 300 seconds, so the table follows devices that move. Switches forward in hardware using ASICs, either store-and-forward, which checks the frame checksum first, or cut-through, which starts sending after reading the destination address for lower latency.

Types of network switches

Switches differ in management features, forwarding layer and physical form. The choice depends on whether the network needs segmentation, monitoring and routing, or only simple connectivity.

Switch typeKey capabilitiesTypical use
Unmanaged switchPlug-and-play, no configurationHomes, small offices, desk extensions
Smart or web-managedBasic VLANs, QoS, port settingsSmall businesses
Managed switchVLANs, STP, link aggregation, SNMP, ACLsEnterprise access and distribution
Layer 3 switchHardware routing between VLANsCampus distribution and core
PoE switchSupplies power over Ethernet cablingAccess points, cameras, IP phones
Data center switchHigh-density 25-400 Gbit/s ports, low latencyLeaf-spine server fabrics
Common switch categories

Power over Ethernet follows IEEE 802.3af, 802.3at and 802.3bt, delivering roughly 15 W, 30 W and up to about 90 W at the source port. The total PoE budget of the switch is often smaller than the sum of its ports, which must be checked during planning.

Switch compared with hub, router and bridge

A switch is often confused with neighboring devices. The clearest distinction is the information each device uses to forward traffic and the boundary it creates.

DeviceForwards based onBoundary created
HubNothing, repeats bits to all portsNone, one shared collision domain
BridgeMAC addresses, usually few portsCollision domains
Network switchMAC addresses in hardware, many portsCollision domain per port
Layer 3 switchMAC and IP addressesBroadcast domains between VLANs
RouterIP addresses and routing tablesBroadcast domains, WAN edges, NAT
Network switch and related devices

A plain switch does not separate broadcast domains. To limit broadcast traffic and isolate groups, administrators configure VLANs on managed switches and route between them with a Layer 3 switch or router.

Key parameters when choosing a switch

Port count and speed are the visible specifications, but switching capacity and buffers decide how the switch behaves under load. A non-blocking switch has a backplane capacity at least equal to the sum of all port speeds in both directions.

ParameterTypical valuesWhy it matters
Port speed1, 2.5, 10, 25, 100 Gbit/sThroughput per connected device
Switching capacityTens of Gbit/s to tens of Tbit/sWhether all ports can run at full rate
MAC table size8,000 to several hundred thousand entriesNumber of devices supported
Packet bufferA few MB to several GBAbsorbs bursts without drops
Uplink portsSFP+, SFP28, QSFPConnection to the next network tier
Important switch specifications

Common switching problems

  • Switching loops from redundant cables cause broadcast storms within seconds; enable Spanning Tree Protocol or a modern variant such as RSTP.
  • Duplex mismatches produce late collisions and low throughput; leave both ends on autonegotiation.
  • MAC flooding attacks fill the table and force flooding; use port security limits.
  • Unmanaged switches added by users can create loops or bypass VLAN policy; disable unused ports and use BPDU guard.

In simple terms

A network switch is like a mail sorter in an office building. Every device has its own mailbox address, and the switch remembers which door each address sits behind.

When a message arrives, the switch delivers it only to the right door instead of shouting it through every hallway. This keeps traffic tidy, lets many people talk at once and is why almost every wired network is built around switches.

A practical example

A design studio with 40 employees replaces a chain of small unmanaged switches with two 48-port managed PoE switches connected by a two-link aggregate. The administrator creates separate VLANs for staff computers, guest Wi-Fi, IP phones and security cameras, and a Layer 3 switch routes between them with access control lists.

Access points and cameras now draw power directly from the switch ports, removing a dozen power adapters. Spanning Tree blocks a loop created when someone connects two wall sockets with a spare cable, and the network keeps running. The studio gains visibility into every port through monitoring, and large render files move between workstations at full gigabit speed without slowing calls.