Network switch
A network switch is a device that connects machines on a local network and forwards each packet only to the port it is meant for.
A network switch is a box with many ports, each connected by a cable to a server or to another switch. When a packet arrives, the switch reads its destination and sends it out of the one port that leads there. It learns which machines sit behind which ports by watching the traffic that passes through. Switches carry traffic within a network, while routers carry it between networks.
Switches decide how much bandwidth machines can share and how far apart they are in time. Each port has a fixed speed, and the switch has a limit on the total traffic it can carry. In a datacenter, a switch at the top of each rack connects its servers, and larger switches connect the racks. Traffic between servers in one rack crosses one switch, which is faster than crossing several.
Hosts that run sandboxes also run a virtual switch in software. It connects each sandbox's virtual network interface to the host's physical network card. The virtual switch applies rules that keep a sandbox from reaching other sandboxes or the host. Physical switches then carry the sandboxes' traffic between hosts and out to the internet.