
A repeater is the predecessor of a regular hub, which is actually a multi-port repeater. Hubs generally have Ethernet (RJ45) interfaces with different numbers of configurations such as 4, 8, 16, 24, 32, etc. Through these interfaces, hubs can achieve signal “relay” for the corresponding number of computers. Due to its intermediate position in the network, a hub is also known as hub. The working principle of a hub is simple. Assuming a 4-port hub is connected to 4 hosts, the hub is located at the center of the network and forwards signals through the hub. The 4 hosts can communicate with each other. The specific process is as follows: if host 1 wants to send a message to host 4, when the network card of host 1 sends the information to the hub through twisted pair, the hub cannot directly send the information to host 4. It will broadcast the message and send it to all ports. After receiving the broadcast message, the hosts on all ports will check the message. If they find that the message is intended for themselves, they will receive it, otherwise they will ignore it. Hubs simply assume the role of the physical layer-message carriers.

Switches work at the data link layer, also know as switch hubs. By regenerating and processing the message before forwarding it to the designated port, the switch has automatic addressing and switching capabilities. The switch directional sends each frame of message from the source port to the destination port based on the destination address of the transmitted message frame, avoiding collision conflicts with other ports.

Routers work at the network layer. Simply put, routers send data from one subnet to another, enabling cross network communication between hosts. In theory, relying on MAC addresses and broadcast technology, data packets send by a network card on a host in Shanghai can be found by a network card on a host in Berlin. However, if hosts all over the world do the same, and each data packet send by a host is synchronously broadcast to other hosts around the world, and then compared and judged one by one, this obviously very inefficient and unrealistic. Therefore, broadcasting is limited to the local area network where the sender is located, and if two computers are not in the same subnet (local area network), the broadcast cannot reach them.
Post time: Mar-31-2025