A switch, on the other hand, is more comparable to a distribution box. It connects various devices within a network, such as computers, printers or smartphones. The switch allows devices to communicate with each other, exchange data, and share resources such as Internet connections. For example, if you watch a video on your laptop and stream it to your smart TV over the network, the switch will transfer the data packets between the devices. Unlike the router, which forwards data between networks, the switch operates within a single network.
Both routers and switches are therefore crucial for the functionality of the Internet. Routers enable the connection between different networks, while switches facilitate the exchange of data within a network. Without them, it would be difficult to efficiently and reliably transmit data over the Internet and interconnect networks.