Network components (Selection)

Repeater
A repeater just repeats the signals it receives. They can be wired (with 2 ports) or wireless. Therfore it has to operates just on the first OSI layer.

Hub
A hub works like a repeater with multiple ports. Every input gets forwarded to all other output ports. This leads to a stupid traffic spamming. It operates on the first OSI layer.

Switch
A switch is hub with a transmit logic. Therfore it maps ports with MAC addresses. This happens by analysing the source MAC of the packets. It also operates on the second OSI layer.

Router
A router works like a switch between different networks. A very common usecase is the usage between LAN and WAN. It operates up to the third OSI layer.

Gateway
A gateway works like a router, but between networks with different protocols. Usecases are for example Ethernet-CAN (Cars) and ZigBee-WiFi (Smart Home).