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 situation | Switch action | Effect |
|---|---|---|
| Known unicast | Forward to the single learned port | Efficient, private delivery |
| Unknown unicast | Flood to all ports in the VLAN | Frame still reaches the host |
| Broadcast | Flood to all ports in the VLAN | Needed for ARP and DHCP |
| Multicast | Flood, or forward to members with IGMP snooping | Limits video and discovery traffic |
| Same port as source | Filter, do not forward | Prevents needless traffic |
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 type | Key capabilities | Typical use |
|---|---|---|
| Unmanaged switch | Plug-and-play, no configuration | Homes, small offices, desk extensions |
| Smart or web-managed | Basic VLANs, QoS, port settings | Small businesses |
| Managed switch | VLANs, STP, link aggregation, SNMP, ACLs | Enterprise access and distribution |
| Layer 3 switch | Hardware routing between VLANs | Campus distribution and core |
| PoE switch | Supplies power over Ethernet cabling | Access points, cameras, IP phones |
| Data center switch | High-density 25-400 Gbit/s ports, low latency | Leaf-spine server fabrics |
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.
| Device | Forwards based on | Boundary created |
|---|---|---|
| Hub | Nothing, repeats bits to all ports | None, one shared collision domain |
| Bridge | MAC addresses, usually few ports | Collision domains |
| Network switch | MAC addresses in hardware, many ports | Collision domain per port |
| Layer 3 switch | MAC and IP addresses | Broadcast domains between VLANs |
| Router | IP addresses and routing tables | Broadcast domains, WAN edges, NAT |
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.
| Parameter | Typical values | Why it matters |
|---|---|---|
| Port speed | 1, 2.5, 10, 25, 100 Gbit/s | Throughput per connected device |
| Switching capacity | Tens of Gbit/s to tens of Tbit/s | Whether all ports can run at full rate |
| MAC table size | 8,000 to several hundred thousand entries | Number of devices supported |
| Packet buffer | A few MB to several GB | Absorbs bursts without drops |
| Uplink ports | SFP+, SFP28, QSFP | Connection to the next network tier |
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.