Routing, introduction to IP addresses

The main role of a Router is to route data traffic. The router knows in which directions different destinations are, and when it receives data traffic it will forward the traffic in the direction of the destination. A router always picks the best route it has knowledge about for the data traffic that it is forwarding.

A normal home router often has a very simple routing task to perform because it doesn’t have many possible routes to choose from. It knows that a single local LAN network exists on the inside of the router, and that every other network thus must exist on the outside through the Internet connection. As long as the destination is not known to exist on the inside, then the home router can safely assume that it should send the traffic to the outside instead, knowing that the traffic will be heading in the right direction.

As long as two computers on the inside of the router are talking to each other, then the router passes the traffic on directly between those computers. If however a computer on the inside tries to browse to a web page on the Internet, then the router will send the traffic to the Internet Service Provider (ISP) through the outside WAN interface. Then the ISP’s more powerful routers will take over responsibility for forwarding the traffic towards its destination.

home-network-overview

In fact that is all the Internet is – thousands of routers that are interconnected with each other. Each ISP has their own routers which find their way towards different destinations. The ISPs agree to connect their routers to each other so that traffic from one ISP’s customers can find its way toward destinations (web servers for example) that are connected to other ISPs’ routers.

So in a very simplified way, the Internet isn’t much more than a lot of interconnected routers which are owned by different Internet Service Providers. Companies that want to run a web server will contact their ISP and ask for an Internet connection so that they can connect their web servers to the ISP’s routers. Home users will also lease an Internet connection from an ISP to connect their home routers and their computers to the Internet.

By understanding a bit more about how your home network is functioning you will also gain some understanding in how Internet as a whole works. It’s basically the same thing, just on a larger scale!

Routing introduced

IP addresses are the type of addresses that computers use to send data traffic between each other. The IP addresses can be compared somewhat to street addresses in real life. Imagine that a person wants to send a letter to a friend. The sender must then know the street address of the receiver and must print it down on an envelope. Then the message is put inside of the envelope.

The sender doesn’t have to know exactly where the receiver’s address is located. It is enough that the sender knows the exact address of the receiver. The sender can drop the envelope off in a post box and thereby send the message. A mailman will pick up the letter and bring it to a main sorting office.
Then the postal service will take over responsibility for transporting the letter closer and closer to the receiver until the letter finally has been delivered to the correct address. So the sender is delegating responsibility for handling the letter to the Postal Service, which through its chain of delivery will transport the letter to its final destination.

In the picture below you can see that different parts of the address on the envelope have different importance depending on where in the mail delivery chain the letter is currently at.

Routing introduced as postal service

At the first sorting office the address on the envelope is investigated to see where the letter is being sent. Then the first sorting office sends the letter towards its destination. If the receiver is far away, or perhaps even in another country, then the letter will first be sent to another central post office closer to the receiver. This could even be repeated multiple times. So the first sorting central might not even know where the exact destination street address is. But all they have to look at is the more general direction that the letter should be sent toward so that the letter ends up in the correct country, region or city.

The closer the letter gets to the final destination the more important all the details of the destination street address becomes. When the letter eventually ends up in a main sorting office in the right city, then that sorting office will have to give the letter to the correct mail delivery office based on the postal code. Finally the letter is handled by a mailman who knows exactly where the final destination is, and he delivers the letter to the receiver.

The mail sorting offices in the example are represented in the world of computer networks by routers. A home router that is sending out traffic to the Internet doesn’t have to know exactly where www.homenethowto.com is located. All it needs to know is that the general direction it needs to send the traffic towards is the outside Internet connection, because that is where all networks except for the inside LAN network are located.

Then the task of sending the traffic towards the destination is delegated to the ISP router that the home router is connected to. The ISP router will also look at the traffic without knowing exactly where the destination is. But it will have more detailed knowledge than the home router and will also have more possible routes to choose from.

In this way computer traffic is sent or routed over the Internet closer and closer to its destination via various ISPs’ routers. The closer to the destination that the traffic gets, the more detailed knowledge of the destination the routers will have. Eventually the traffic will end up at a router that has a direct connection to the destination, which could be a web server or similar. That last router in the chain will then deliver the traffic to the web server.

Previous part:
Introduction to Home Networks

Next part:
IP addresses