What is the difference between a switch and a hub? http://www.whatis.com didn’t provide that much information. In fact it almost sounds like a hub is the same thing as a switch. Can a hub and a switch be used interchangeably? I read that the max distance between uplinked hubs is 5 meters where as the max distance between switches is 100 meters. If this is true and a hub and a switch are relatively the same thing and they are both about the same in cost then why do we need both of them?
A switch supplies full bandwidth on each line, while a hub does not. A 100M switch with 5 ports supplies 100M bandwidth to each port. A 100M hub with five ports supplies 20M bandwidth to each (assuming they are all in full use at once).
Hubs and switches are not the same things. When a hub receives data, the data is rebroadcast out of every port on the hub. In contrast, a switch “learns” which network devices are on which ports over time, or, if the switch is advanced enough, a user may tell the switch which devices are on which ports through the switch’s user interface. Then, when the switch receives data, it will retransmit that data only to the correct port, the port on which the destination computer or device resides. Thus, for larger networks, a switch cuts down on unnecessary network traffic. For small networks, there is little performance gain since network traffic is minimal in the first place.
The maximum cable distances permissible depend on the type of cabling used. For standard unshielded twisted pair cabling (UTP CAT5), the maximum cable length for a segment of cable is 100 meters.
Switches are generally more expensive than hubs. Of course, there are expensive hubs and cheap switches, but all other things being equal, the switch will cost more due to the presence of more complex internal circuitry and logic.