If you are setting up a network system in your business, it’s important to make sure that you understand the basic components. You need to know how each piece of equipment operates and runs when protecting your network. It’s true to say that components of a computer network are often confused because they look the same. However, while they may have similar structures, each one has a completely different role in your network. Operating together they ensure that your network is protected.
A switch is best described as a high-performance hub that is uniquely intelligent. Data goes back and forth between the switch and during this time, the box records the MAC addresses. These addresses are unique identification numbers for hardware that is network enabled. Each sender and recipient will have different mac addresses. During this process of discovery, the hub then learns which device is linked to which port.
Switches deal with data exchanges within your network but routers are different. They provide a way to exchange data between a variety of different networks. As such, they are set up at gateway points where two networks are connected.
MOre info: router vs switch