What is the difference between an Ethernet switch and a hub?

Comparison image showing a hub repeating traffic to every attached device and a switch forwarding Ethernet frames according to MAC addresses

What is the difference between an Ethernet switch and a hub?

A hub and a switch do not simply represent two generations of the same box. A hub behaves like a physical-layer repeater, while a switch reads Ethernet frame headers, learns MAC addresses and forwards known unicast traffic toward the appropriate port.[1]

That architectural difference is why modern office and industrial networks use switches rather than hubs. Devices on a hub share the same medium and bandwidth, while a switch can treat each port as an independent point-to-point Ethernet link. That is much better suited to PLC, HMI and SCADA networks.

One correction to the usual simplified diagram: a switch does not send every frame to exactly one port. Known unicast can go only to the learned destination port, but broadcast, some multicast and unknown unicast traffic may be flooded to several ports within the relevant VLAN.

How does a hub work?

A hub behaves as a Layer‑1 repeater. It repeats an incoming Ethernet signal onto the other ports and does not learn MAC addresses or inspect the frame header to make forwarding decisions.[2]

If eight devices are attached to an eight-port hub, traffic from one endpoint is physically visible on the other ports as well. Non-target devices simply discard frames that are not addressed to them.

How does a switch work?

A switch learns the source MAC address of incoming frames and associates that address with the ingress port in its MAC/CAM table. If the destination MAC is already known, the switch can forward a known-unicast frame only toward the learned destination port.[3]

If a PLC is learned on port 2 and an HMI on port 7 sends a unicast frame to it, unrelated ports do not need to receive that traffic.

What happens when the destination MAC is unknown?

At startup the MAC table may be empty. When the destination is unknown, the frame is treated as unknown unicast and can be flooded to eligible ports in the same VLAN except the source port.

Once the destination replies, the switch learns its source MAC and later forwarding becomes selective. A hub never develops this knowledge.

Does a switch also flood broadcast traffic?

Yes. Broadcast frames are intended for every device in the same broadcast domain. ARP requests are a common example, so a switch does not make broadcast traffic disappear.

VLANs are often used in larger networks to split one physical switching fabric into smaller logical broadcast domains.

What is the collision-domain difference?

A classic hub creates one shared collision domain. Devices contend for the same half-duplex medium and collision/backoff behavior can occur. Cisco also notes that hub-connected devices share the common bandwidth.[4]

Modern switch ports are point-to-point links and normally full duplex. In full-duplex Ethernet there are no collisions and CSMA/CD is not required.[5]

Why is bandwidth shared on a hub?

With a 100 Mbit/s hub, all connected endpoints share that common capacity. Cisco gives the example of six devices on a 100 Mbit/s hub sharing the same 100 Mbit/s bandwidth.[6]

A switch can provide an independent negotiated link on each port. Multiple endpoint pairs can communicate simultaneously as long as the switching fabric and uplinks have enough capacity. That is especially important in Gigabit Ethernet networks.

Why does full duplex matter?

IEEE 802.3 defines both shared-medium half-duplex CSMA/CD operation and full-duplex Ethernet.[7] The collision model associated with old hubs should not be applied blindly to modern switched links.

Today, point-to-point full-duplex links dominate normal switched Ethernet.

Unmanaged versus managed switches

An unmanaged switch normally provides basic MAC learning and forwarding with little or no configuration. A managed switch can add VLANs, QoS, STP/RSTP, SNMP, port mirroring, IGMP snooping, link aggregation, security controls and vendor-specific redundancy functions.

A small local machine may work perfectly with an unmanaged switch, while a larger SCADA or multicast-heavy automation network may benefit from a managed industrial switch.

What makes an industrial switch industrial?

It is not a different Ethernet protocol. The term usually describes field-oriented hardware: wider temperature range, DIN-rail mounting, redundant 24 VDC power inputs, alarm relays, stronger EMC/vibration ratings, fiber/SFP options and fast redundancy features.

Choose it by the real project requirements: link speed, fiber uplink, PoE, VLANs, multicast and environmental conditions.

Does a switch make the network secure automatically?

No. Selective known-unicast forwarding reduces casual visibility compared with a hub, but VLAN errors, unauthorized access, ARP spoofing, MAC-table attacks and compromised management credentials are still separate risks.

Features such as 802.1X, port security, ACLs, VLANs and secure management must be configured deliberately. See Ethernet network security for the wider security model.

Is a switch the same as a router?

A basic Layer‑2 switch forwards frames by MAC address inside the same Ethernet/VLAN domain. A router forwards IP packets between different networks or subnets. Multilayer switches can provide both functions, but the concepts remain different.

Communication between 192.168.1.0/24 and 192.168.20.0/24 requires Layer‑3 routing, not only Layer‑2 switching.

Why is port mirroring useful?

A hub historically made traffic observation easy because frames were repeated to all ports. A switch normally hides known-unicast traffic from unrelated access ports.

Managed switches can provide port mirroring / SPAN, copying selected port or VLAN traffic to an analyzer port for Wireshark. That is very useful when debugging intermittent PLC–HMI or SCADA communication.

What does a PoE switch add?

A PoE switch adds electrical power delivery to selected Ethernet ports. The switching logic—MAC learning and frame forwarding—remains the same basic concept; PoE adds a power-delivery function.

So PoE does not mean that the switch is inherently faster.

Is an EtherCAT junction just an Ethernet switch?

No. EtherCAT uses Ethernet physical technology but implements a different field communication model with on-the-fly processing through SubDevices. An EtherCAT junction is not a normal MAC-learning Ethernet switch.

Do not insert an ordinary Ethernet switch arbitrarily into a pure EtherCAT field path. See EtherCAT topology and EtherCAT vs traditional Ethernet.[8]

Which switch fits an automation network?

A three-device local PLC/HMI network and a plant backbone with many cameras, controllers and uplinks do not have the same requirements. Port count, speed, fiber, PoE budget, VLANs, multicast, redundancy, temperature range and diagnostics all matter.

A small unmanaged Gigabit switch may be enough for a simple machine. Managed industrial switching becomes more attractive when remote diagnostics, segmentation or redundancy are required. The advantages and disadvantages of Ethernet guide provides the wider context.

What can a switch tell you during troubleshooting?

A managed switch may expose port link state, negotiated speed/duplex, CRC/FCS errors, dropped frames, multicast counters and utilization. Some models also provide cable diagnostics.

If the physical counters look clean, move up to IP/VLAN and the application protocol. On EtherCAT, state, WKC and port diagnostics are more relevant than ordinary switch statistics.

Hub versus switch at a glance

FeatureHubSwitch
LayerLayer 1 / repeaterUsually Layer 2; some also provide Layer 3
MAC learningNoYes
Known unicastRepeated to other portsForwarded toward the learned destination port
BroadcastRepeated to other portsFlooded to eligible ports in the VLAN
Collision domainSharedSeparate per port; no collisions in full duplex
BandwidthSharedIndependent link per port, subject to fabric/uplink limits
DuplexHalf duplexNormally full duplex today
ManagementNoneManaged models add VLAN, QoS, SNMP, mirroring etc.
Typical use todayLegacy / rareCore component of modern Ethernet LANs

Related OtomasyonAVM guides

• What is Ethernet?
• How does Ethernet work?
• Ethernet frame structure
• MAC address
• Ethernet data transmission
• Protocols over Ethernet
• Ethernet network security
• Gigabit Ethernet
• Power over Ethernet (PoE)
• What is EtherCAT?
• EtherCAT topology
• Industrial communication

Technical references

[1] Cisco — Ethernet switch, hub and MAC-based forwarding differences. What is an Ethernet Switch?

[2] Cisco — Hub as a Layer‑1 repeater and the move toward switched LANs. LAN Switching Environments

[3] Cisco — switches learn MAC addresses and use them in forwarding decisions. Ethernet Switch

[4] Cisco — shared bandwidth and collision-domain behavior on hubs. LAN Switching

[5] Cisco — no collisions and no CSMA/CD requirement in full-duplex Ethernet. Troubleshooting Ethernet

[6] Cisco — hub-connected devices share the common bandwidth. Hub and Switch

[7] IEEE — IEEE 802.3 defines shared-medium half-duplex and full-duplex Ethernet. IEEE 802.3-2022

[8] EtherCAT Technology Group — EtherCAT topology differs from ordinary switched Ethernet. EtherCAT Technology