You can get technical and say a hub directs traffic, but really it does not. It gets a signal in one port and spits it out all the others, it is a dumb device. But that is all just nitpicking. A router will look at IP addresses and make a forwarding decision.