Differences between Hub, Switch and Router?
|Physical Layer Device||Data Link Layer Device||Network Layer Device|
|Simply repeats signal to all ports||Doesn’t simply repeat, but filters content by MAC or LAN address||Routes data based on IP address|
|Connects devices within a single LAN||Can connect multiple sub-LANs within a single LAN||Connect multiple LANS and WANS together.|
|Collision domain of all hosts connected through Hub remains one. i.e., if signal sent by any two devices can collide.||Switch divides collision domain, butbroadcast domain of connected devices remains same.||It divides both collision and broadcast domains,|
Explanation from : GeeksForGeeks