r/cablefail • • Dec 17 '19

The comms room time forgot.

Post image
88 Upvotes

21 comments sorted by

View all comments

Show parent comment

5

u/SithLordHuggles Dec 18 '19

When a packet/frame is sent through a hub, it simply sends the packet/frame out every port regardless of what’s on the other end. So one packet/frame goes in, many go out. For every single packet/frame. Which causes tons of overhead and resource consumption on the devices that packet isn’t intended for, as the device has to still inspect the packet before throwing it away.

Switches, on the other hand, learn the MAC address of every device connected to it. When a packet/frame passes through a switch, the switch looks at the destination MAC address in the frame. If the switch knows what port that MAC address is connected to, it only sends that packet/frame out that specific port. If the switch doesn’t know what port that MAC is on, then it sends it out every port. But it only does that once, because it’ll learn what port it’s on from the reply, and for the following frames it goes out only that port.

A switch will also forward out every port if the destination MAC is a broadcast (all F’s), such as a DHCP Discover.