Tuesday, August 23, 2011

Routers and The Technology that Make Them Work

Morning Blogoverse!  For my first technical blog post, I'll be writing about Routers.  The website HowStuffWorks has a wonderful group called TechStuff.  This blog post is structured around their podcast titled "What is a router".  They also have great blog posts on their website as well about routers.  So please check those out for more information.



Internet traffic just like automotive traffic has rules.  These rules are called Protocols.  The Open Systems Interconnection protocol stack details out these rules as layers.  I'll mainly be discussing what goes on the 3rd layer of this 7 layered standard, most commonly known as the Network Layer.  For a more detailed description of OSI layers, please see this PDF on the standard, specifically page 47 for the network layer.

Routers are very multi-functional network-layer devices.  They control all communication between you and the Internet.  They scan all the traffic going through them and apply certain rules and regulations to that traffic.  Sometimes even denying or destroying traffic that tries to get through.  Routers are everywhere that a user connects to the Internet creating a global network of routers.

The traffic that flows through a router comes and goes in what is called a Packet.  A packet is also part of the standards dictated by the OSI model.  Packets include directions on its destination and how it fits with other packets to make a whole data file.  Routers then use this information to determine the fastest route the packet should take to its destination, which might not be the shortest route.  To do this, routers calculate the number of routers a packets goes through for a certain data exchange, called hops.  Certain protocols and packets limit the number of hops a packet can take, and the router must take this into account when determining its route.



Routers are in constant communication with each other using a different protocol called the Routing Information Protocol (to read more, please see the RFC posted here).   They do this to monitor and notify others when certain routers are overloaded or if there is a faster path a different way and assists them in balancing the load across the whole Internet.

Routers have a hardware and a software component and can be seen as a very specialized computer on the network.  Routers can also act as a switch.  To read more about switches, please see this post by HowStuffWorks called "How LAN Switches Work".  Switching allows multiple computers to talk to each other as well as the Internet.  Each device that is connected to the Internet must have an identification code called an IP (Internet Protocol) address that a router can send data packets to.  This must be a unique address or else traffic might be sent to the wrong location.  If every networked device had it's own IP address though we would run out very quickly with the advent of mobile devices and networked sensors such as security cameras.

To get around this, a router can do a few things:
  • First, it can limit who can connect to the Internet through it by restricting connections by a device's MAC address, a Media Access Control address, which can be found in the OSI model as well and is unique to each piece of hardware.
  • Secondly, it can act as a postmaster by assigning a non-unique, dynamic IP address to its connected devices and then by routing incoming and outgoing data packets using a smaller number of static, unique IP addresses when communicating with the Internet.  This process is called Network Address Translation.  It has its pros and cons and can slow down the transaction time if done improperly.  To read more about NAT, please see this great article.
There are some additional concerns to consider when looking at routers.

  • Whether you are using a wired connection or a wireless connection can make a big different in your experience.  Wired connections tend to be more reliable than wireless.  Also with wireless connections, you run into a higher probability of interference from other devices and also router/access point compatibility.  Wireless traffic uses the 802.11 protocol which has many channels such as a, b, g, and n, and if your access point does not use the same type of 802.11 channel it might not be able to connect.  You can read more about the 802.11 standard on the IEEE website.
  • Data packet delays might not be an issue with your router but may be an issue with your Internet Service Provider (ISP).  ISPs can put data caps on your usage based on their service level agreement with you to maintain a stable network for the rest of their customers.
  • People can try to hack into and attack routers just like they do with computers.  One of the most common examples of such an attack is called a Denial of Service attack.  This is where someone floods your router with so much traffic, legitimate or junk, that your router can't keep up so that everyone connected behind your router can no longer communicate with the Internet.  Another flavor of this type of attack is called a DDoS, a distributed denial of service attack, where a DoS is being performed by botnets so that they can not be easily distinguished.  Here is a great paper describing botnets and their usages.
  • Firewalls can also be applied on a router to assist in intrusion detection and handling and can assist in encrypting your data packets for additional security.


I hope this blog post has been informative.  If you find anything incorrect or would like clarification on anything, please post a comment, and I'll get right on it.  Thanks!




No comments:

Post a Comment