Register now or log in to join your professional community.
Hub mainly belongs to a L1 layer in Networking ----> it just broadcast the packets through a common single collision domain ( it doesnt know to whom it is transfering)
Switch is a Layer2 device which based on the mac address it will forward the packets to a destination mac (multiple collision domain but single broadcast domain)
Router is a Layer3 device which based on the ip forwards the packets .