Repeaters restore physical signals, hubs copy signals to shared ports, bridges forward frames based on Layer 2 information, and gateways connect different networks or protocol environments. They process different objects, and you cannot judge them only by how many interfaces they have. Modern devices may combine multiple functions, so the name is only a starting point; the specific forwarding mechanism and boundary are the basis for choosing.
First, separate bits, frames, and messages
A bit is the unit of information in physical transmission, a frame is data organized at the link layer, and IP packets and application messages are at higher layers. What information a device can see determines what judgments it can make. A device that only restores electrical signals usually does not know the destination MAC; a device that can forward Ethernet frames does not therefore understand business content. Layering is not for memorizing terms, but for avoiding the expectation that one interface conversion box can complete routing, authentication, and protocol translation.
Repeaters and hubs mainly handle signals
A repeater restores or retransmits signals under the physical format supported by the device, and does not automatically read the destination address for selective forwarding. A traditional Ethernet hub can be understood as a multi-port physical repeater, letting communication on a shared medium affect multiple ports, usually using half-duplex mode. It is not a modern full-duplex switch. In engineering there are other types of repeaters, and one Ethernet working mode cannot be applied to all devices.

Bridges learn addresses, and switches extend this capability
A typical Ethernet bridge learns which port an address is on based on the source MAC of received frames, then decides to forward or filter based on the destination address. A modern Layer 2 switch can be regarded as a multi-port bridge, but with more hardware and management capabilities. Unknown destinations and broadcasts need to be propagated according to relevant rules, which does not mean every message can be sent to only one port. VLANs divide broadcast domains; the independent link of each switch port is also different from the shared collision environment of a traditional hub.
The word gateway must be understood in context
An IP default gateway is usually a routing device responsible for forwarding across network segments; a protocol gateway may convert Modbus TCP to RTU, or convert between different application protocols. The two should not be simply equated. A device with a network port does not necessarily support routing, and having routing capability does not necessarily mean it understands application protocols. A requirements document should clearly state whether cross-segment forwarding, address translation, or business protocol conversion is needed, and confirm the specific interfaces and rules supported.

Use one purchasing question to test understanding
If you only need to extend an existing signal, first look at the matching repeater method; to connect multiple Ethernet terminals, usually look at a switch; to cross IP network segments, look at routing and security policies; to let devices with different protocols exchange data, look at a protocol gateway. A device may also implement several functions in one unit, but each item still needs to be verified. Testing should cover destination address forwarding, broadcast scope, fault recovery, and protocol correctness; you cannot judge equivalence just because the connectors are the same.
Example: if you need networking, should you buy a switch or a gateway?
If two similar Ethernet devices communicate on the same local area network, they can usually be connected through a switch; if a computer needs to read an RS485 meter, merely adding a switch will not automatically turn the meter into an IP device. A matching serial-to-network or protocol conversion solution is needed. If two IP network segments already use the same application protocol, what needs to be handled is routing and security policies, and an application gateway is not necessarily needed. First describe the communication objects and protocols, then determine the device layer, and avoid assuming that a product can translate any protocol just because it has the word gateway written on it.
Translated from the Chinese technical article. Source first published: 2022-12-28. Source last revised: 2026-10-13T20:54:09+08:00. Read the Chinese source


