written by: Bruno Kos•edited by: M.S. Smith•updated: 1/11/2010
Ever wanted to know the difference between a router and a hub? Been puzzled by these different types of network hardware? If so then this article will end the confusion. Read this easy to follow discussion on the difference between a router and a hub.
slide 1 of 2
"What is the difference between a router and a hub?" This is one of the most popular question I was asked when I was a network engineer. I still get asked it a lot now, which is what prompted this article.
Like many technical questions, this has a short and a long answer. The short is, intelligence. The level of processing each device does is what makes them different. A hub is a basic port replicator that doesn't do anything clever with the traffic it receives. It simply forwards it on to all connected ports. A router can do so much more than that, which is where the long answer comes in. We could talk about the OSI model, and the fact that a hub is layer 1 and a router is layer 3, but it would bore most of you so we won't.
Networks are made up of domains. A domain is a logical area made up of connections that can all hear each other's traffic. Traffic is made up of data called packets. A data packet contains a destination address, a source address, other routing details and the actual information, or payload.
A hub is a device that connects two or more computers together. Their only function is to physically connect computers and to transmits the traffic it receives on all its connected ports. Depending on the hub, it will have a number of ports which connects to a single computer, so if you have an eight port hub, a maximum of eight computers can connect to it. So if one computer sends traffic, the hub will repeat that traffic on all the other seven ports.
slide 2 of 2
The problems come when more than one computer talks at once. Because hubs transmit all traffic over all ports, when two or more computers are talking at once, the data packets crash into on another. These are called collisions, and slow down network efficiency. This is where the term "Collision Domain" comes from. When a data packet collides, every computer will get to hear about it and pause its own transmissions for a random amount of time, thus slowing down network performance.
Routers are much cleverer than hubs, in fact they could be classed as computers in their own right. They have the power to manipulate network traffic and apply rules to it, as well as divide networks and domains, act as a protector of networks and otherwise manage network traffic. A router knows what devices are connected to it and their IP address. It also knows what other routers are connected to it, if any.
A router breaks up networks by the mere fact that it doesn't just repeat traffic over all its ports, it routes them intelligently via a set of rules called a routing table. It knows where to send the traffic, and what port to use to get it there. So if two computers talk at once, the router will queue the traffic, decide where to send it and send it on its way.
The difference between a router and a hub might be brains or processing power, but as you have seen there is much more to it than that. Check out my article on "What is the Primary Purpose of a Router" to find out more.