What is the difference between hub, router and a switch?
Hub — Layer 1 network device — sends packets to all ports. Switch — Layer 2 network device — sends packets to each machine based on the MAC address. Router — Layer 3 network device — sends packets to each machine based on the MAC address and IP. Gateway — Layer 4~7 network device or server — sends packets to each machine based on the MAC address, or protocol also can translate other protocols. The further up you go on the layers the slower it becomes because of all the “thinking” the device must due and the opposite as you go down.