hubs only share a direct connection between computers for sharing files and information, routers connect networks to networks, where IP's may be different, or the connection may be different, or where you need to connect a WAN to a LAN such as the internet to your LAN.