Which one of the following devices forwards data packets to all connected ports?

A.switch
B.hub
C.bridge
D.router

B.hub