30 May 2011

Switchs, hubs, and routers-whats the difference?

I've noticed a lot of people mistake or misuse the terminology between switches, hubs and routers. I believe the reason for this is because quite often, a small office/home office (SOHO) router will contain a switch or a hub as well.

Lets start off with hubs. Hubs are a device that allow you to connect multiple hosts on the same network segment/subnet. Hubs are a fairly dumb device. Dumb in that they do not keep track of what traffic is coming or going from each host. Their solution is to simply broadcast all incoming packets. Broadcast on a small network being sending the packet of i.e. sending this traffic to every host. Hubs also do no do any load balancing, they split available bandwidth amongst all ports/all connected hosts. So if you have a regular DSL line and sharing it with 16 people, you can expect the connection to work like molasses on a cold day. That said, they do make switching hubs. Later in this article I will describe switches.

A switch is somewhat like hub, in that it allows the interconnection of many hosts on a single network segment or subnet. A switch varies because unlike a hub, it keeps a table of what host is sending and receiving what traffic. For example, instead of sending the packets on all ports to, it will send them "host 16" connected to port 16 on This causes the switch to be faster then a hub, more secure then hub (because its not broadcasting) and save internal bandwidth. (again because its not broadcasting. It also preserves outbound bandwidth by seeing what computers are transmitting and giving them bandwidth allocation, which results is better bandwidth management.

Now the fun stuff...routers. Routers, in the pure sense, are devices that read the header of the packet for its destination address and using routing tables and other routers, forwards this packet to other routers until finally it arrives at the destination network/host or the packet outlives its time to live or is dropped as unroutable. Nearly everyone has a router, as they are found at the gateways between networks, the most common and familiar one being the gateway between your Internet Service Provider and your internal Local Area Network. (even if that internal network consists of one host/computer its still considered at network and requires routing for its interconnection)

Typical SOHO routers that are embedded with DSL modems will contain in them a Dynamic host control protocol server, and facilities for Network Address translation. (I'll cover these concepts in another post) Routers tend to use a protocol like ICMP to communicate with each other, advertise their routes. (which address space they can route a packet to and how they do it) and other things that I'll cover in a post dedicated to routing. Aside from your SOHO routers, there is a polar opposite, the core router which runs on fiber optic backbone and handles 100's of megabits per second. Cisco and Juniper are well know manufactures of these types of routers. I'll close by saying, if it was not for routers, all the way from SOHO routers to core routers, the internet would simply fail. As historic note, the first router was called an "interface message processor" was as large as fridge, based on the Honeywell 516 computer and came out in 1969. It was *the* device that enabled ARPANET to work, and thus gave birth to the internet and packet switched networks in general

No comments:

Post a Comment