Difference between Hub vs Switch

                              HUB                        SWITCH
A hub is a networking device that allows multiple devices to connect to a single network..A switch is a networking device that connects various devices on a single network.
Hub is a physical layer device, which means it operates at OSI model layer 1.A switch is a data link layer device, which means it operates at OSI model layer 2.
Hub is a passive Device (Without Software)A switch is a networking and active device (with software).
Hub uses broadcast-type transmission.The switch uses unicast, multicast as well as broadcast-type transmission.
Half-duplex communication is supported by a Hub, which means that only one device can send or receive data at a time.Full-duplex mode is supported by the switch, which means both devices can send and receive data at the same time.
Hub has 4/12 ports.A switch can have 24 to 48 ports.
There is only one collision domain in Hub.Each port in Switch has its collision domain.
A network hub cannot learn or store a MAC address.Switches use content-accessible memory CAM tables.
Hub does not provide packet filtering.A switch provides packet filtering.
Hub is not an intelligent device as it sends the message to all ports.A switch is an intelligent device as it sends the message only to the desired destination.
For data transmission, the hub uses electrical signals or bits.For data transmission, a switch uses frames and packets.
Hub speed is up to 10 MbpsSwitch speed is up to 10/100 Mbps, 1 Gbps.