A Made IT project



According to the OSI-model the router doesn't exist, but is called a gateway. Since the meaning of a gateway in everyday speach is different, we will use the term router to address a device that corresponds to the following features:
A router connects networks, thus working on the network layer of the OSI-model (Layer 3). It is protocol depended and the network address on one interface is different from that on another interface.

The most common application for routers is to connect LANs through WAN-links.

WAN-link Router
These routers can act in two different ways:
  1. Routers connect to eachother by using the WAN-link as a separate network. This means that to the router the WAN-link is an entire different network. This way you need at least three ranges of network addresses. One range for LAN1, one for LAN2 and one for the WAN-link.
  2. The other option is that the routers use a propriatery protocol over the WAN-link. The most common form is to use PPP. In this last example we say that the two routers and the WAN-link form one router. And both routers are called half-routers.

Routers are used to connect LANs or coupled LANs. Their means is to provide a controlled way for the delivery of packets over WAN-links and to separate LANs and/or protocols. Since a router functions on layer 3 of the OSI model, it depends on routable protocols (not all protocols are routable). The protocols need to have a way of having network numbers on which a router can base its descision to route a packet.

Another advantage of routers is that different paths can be provided to one target and the most efficient (read fastest) path can be choosen to deliver a message. To do this, routers needs to know what the network around them look like.

Through this path selection method a router can provide redundant paths to one location. This way a link-failure will not stop the connectivity. A router will make sure the damaged link is not used anymore and a different path is chosen to send the packets.

How a router works
Since routers are working on layer 3 of the OSI model they are capable of analyzing a packet up til the network address-envelope. Let's assume that a packet looks like this:

This is just a very simple example and no real life packet.

The router strips the MAC-address and reads the destination-address. It then examens this address and decides if it is on a network on one of its local ports. If so it attaches the MAC-address of the station to the packet and sends it to the port where the station is on.
If it is not a station on one of its local attached networks it will look at the network part of the destination-address. And chooses the port to send it out on. The packet will be send to another router and the MAC-address of that router will be attached to the packet. The next router does the same and eventually the packet will reach its destination.

In basic this is what routers do. In everyday life routers need to know what port should be used for which network and what the alternative routes are to reach that network and which stations are on which port and so on. To know all this routers need to have a way to communicate to eachother. And since there are a lot of different vendors, there need to be a standard to do this so every router can be connected to any other router.

To make a first distinction: you can split routers into two different kinds. One type uses routing tables and one type does not. To look at the non-routing-table routers first: You have three different types:

Flooding Routers
The received packet will be send to every port, so the packet will always reach its destination in the shortest possible way. All later incoming packets will be trashed by the end-station.
Random Routers
The incoming packet is transmitted to a port. Just at random and you hope the packet will arrive sometime.
Hot Potatoe
The incoming packet will be send to the port with the shortest queue. This means the router needs less buffers, but again it is not certain the packet will ever arrive.

All these techniques are old, and are rarely seen anymore. Most modern routers use routing-tables to make sure the packets will arrive save and as fast as possible. These routing-table routers are there in two flavours and most of the time the two techniques are comined:

  1. Static routers
  2. Dynamic routers
Static routers have their routes keyed in by a system administrator, this can be a lot of work if the network is large.
Dynamic routers gather their routing information from other routers, but they need a way to gather their information from other routers. So you need a standard, since there are a lot of different router vendors and you want every router to talk to every other router. But since the techniques evolve so do standards, so for routers to keep their information synchronized there are different standards, which use one of two different techniques: distance vector or link state.

protocolDistance VectorLink State
DECnetDECnet phase IVDECnet phase V
AppleTalk DDPRTMP 

There are a lot more protocols but these are the most important ones. click on their names to learn more about them.

Distance Vector
Distance Vector is also known as Bellman-Ford. The routers using this technique send their complete routing table to their neighbour routers. This can be an enormous amount network traffic.

Link State
Also known as Shortes Path First sends only updates to the neighbour routers. This generates less traffic, but it uses more computation power on the router.