Full duplex vs. half duplex

duplex

My main question is why are hubs always half duplex and layer 2 switches can be full duplex?

Because let's say I have a ethernet cable that has pins that can send and receive data at the same time, and I use these cables to connect, let's say four devices, with a central hub in one place, and in another place I do the same thing in another location, but this time with a switch. Now in a scenario where all the devices are constantly sending broadcast messages, it does not matter if they are hubs or switches, they will all be flooded to all the ports. Now, in this case if a switch can be in full duplex, why can,t the hub as well?

Best Answer

With a hub all ports are in a single collision domain meaning that all frames are visible on all ports and their connected devices. In a switch every port is its own collision domain so frames sent on one port cannot collide with frames sent on another port.

Full duplex is negotiated between the end host and the switch port this allows the use of all send and receive channels/wires on the cable and forming the single collision domain (between the switchport and the end host).

The difference between hubs and switches is that a switch builds a mac address table (learns the mac addresses of the connected end systems) and will only broadcast frames when a mac address is not already known in the mac address table.

When a mac address is learned on a port only frames destined for that particular mac address (end host) will continue to be forwarded on that port.

A hub will not build a mac address table and will always forward all frames on all connected ports.