Routers


 

 

 

 

 

What is a router

A router is a device for interconnecting network segments, at its simplest level, it has two of 10 or 100 Mb Ethernet ports, and can interconnect two network segments. It lives in a desk top box.

At the other end of the scale, a Cisco 12416 router can provide up to 120 fast ethernet ports or 60 ATM ports, occupies a full equipment rack, and consumes nearly 5 kilowatts of power.

Limiting this website to the simplest type of routers, then basically routers read and respond to layer 3 addresses, which in most cases means IP addresses.

The router does packet filtering - if a packet arrives at a port 1 with an IP address which matches the network address of the sub-net conected to port 1, then the router blocks the packet, and does not transmit it.

However if the IP address in the incoming packet arriving at port 1 is for the sub-net connected to port 2, then ( on the assumption that the router has been set up to do this ) the router forwards the packet to port 2, and hence onto sub-net 2.

This basic operation is the same packet filtering that is done by bridges, however it is generally held that bridges operate on MAC addresses, not on IP addresses.

Additionally, by loading the relevant information into the router, the router can be set up to forward packets for other sub-nets as well, as long as the router knows that to get to a remote sub-net, the data packet is forwarded through one of the local sub-nets attached to one of its ports.

The information required to do this is stored inside the router in a database known as the routing tables.

 

Routing tables

Routing tables are basically a list of known network IP addresses, their corresponding sub-net masks, and the address of the next part of the route.

It is worth noting that it is not only routers that can have routing tables, host computers can have them as well. Windows 95 supports routing tables, and the use of the " route print " command at the command line print reveals -

On a Unix based host, the " netstat -nr " command is typically used to display the routing table, but it depends on the flavour of Unix in use.

But back to routers.

A typical simplified routing table inside a 2 port router will look like

Destination address Sub-net mask Next hop address
134.36.60.0 255.255.255.0 134.36.168.1
134.36.80.0 255.255.252.0 134.36.40.1
134.36.34.0 255.255.255.0 134.36.40.1
134.36.88.0 255.255.255.0 134.36.168.1
134.36.72.0 255.255.255.0 134.36.40.1

The router uses the routing table to look and see what router port an incoming data packet should be forwarded to.

Note that since this is the routing table for a 2 port router, there are only two possible next hop addresses.

A 3 port router would have 3 possible next hop addresses, etc.

Some routing tables, eg, those on Unix hosts, don`t show the IP address of the next hop, they show instead a port number. The port numbers are linked to IP addresses in additional entries higher up the routing table.

There are two basic types of routing tables, and they are created by different means - they are static routing tables, and dynamic routing tables.

 

Static routing tables

Static routing tables are created manually by a system manager.

For Unix based devices, this could be done by the use of the " route " command at the command prompt, eg,

# route -n add 134.36.66.0 134.36.22.1 1

is a possible instruction.

On a router, the management interface would be used.

Static routing tables are really only suitable for use on small network systems, where there are only a few routers.

On a small network, there are only a few paths for the system manager to worry about, and it is not very difficult to keep the routing tables updated, whenever the network configuration changes.

However as the network gets bigger, it becomes increasingly difficult to make the correct changes to all the routing tables within the system - there is an increasing likelihood that wrong data will be entered into one or more routing tables, with the result that either some sub-nets will not be able to access some parts of the network, or, worse, loops will be created.

 

Dynamic routing tables

The answer to this is to use dynamic routing tables - in these, the devices with routing tables communicate with each other, and advise each other about any changes within the network configuration. Each device updates its own routing tables from this information.

There is of course several downsides to this, the first is that every device with routing tables has to be able to understand the data which is being sent out - this requires a standard protocol.

Unfortunately, early routing protocols tended to be manufacturer specific, which caused problems with compatibility.

The second downside is that to actually perform the task required of it requires that the protocol is very complex - which makes it even harder to ensure compatibility.

Another downside is that however it works, the use of a router protocol requires the transmission of a lot of information, across the whole network. So there is a considerable traffic overhead caused by the routing protocol.

Dynamic routing protocols can have various types of general properties, eg,

  • Distance vector protocol or Link state protocol - this is a description of the type of information which each router sends out

  • Exterior protocol or Interior protocol - this describes whether the protocol is suitable for sending information between separate network systems, or whether the protocol is suitable for use on only one internal network system

  • Open standard or manufacturer specific - if a protocol is manufacturer specific, equipment from other manufacturers will not understand it

Some of the protocols which have been created are as follows :-

RIP common in Unix environment
does not recognise classless IP addressing
distance vector protocol
internal protocol
open standard
RIP-2 an updated version of RIP
recognises classless IP addressing
distance vector protocol
internal protocol
open standard
OSPF link state protocol
interior protocol
open standard
EIGRP distance vector protocol
interior protocol
Cisco specific protocol
EGP exterior protocol
open standard
sits direcly above IP
originally used in connection with the internet, not used now because of its very high data traffic overhead
BGP exterior protocol
open standard
sits above TCP/IP
supports classless IP addressing
now the defacto standard for internet routers

 


© 2001 Ron Turner


Return to the index page