1.5 Routing and Routers

1.5 Routing and Routers

Routers work at layer 3 of the OSI layer. One of the things that differentiates a layer 3 router from a layer 2 switch is that router’s operate not just with LANs but with WANs as well. Routers are used to connect different networks together.

A router is concerned with the movement of packets between connected networks. Routers make decisions about where packets are to be sent by examining each packet’s destination IP Address and then looking at their routing table to find a network match and if a match is made then switching and sending the packet out of the corresponding interface, e.g. an Ethernet interface.

Routers use routing protocols to help build their routing tables. The routing protocol lets the router work out the ‘best’ path to send a packet to its destination. One example of a routing protocol is Routing Information Protocol (RIP). Routers using RIP decide on the best path to take by examining the total number of hops, i.e. the number of different routers that a packet will need to go through to get to its destination. RIP uses hop count as its metric and will always choose the path with the least hops. Other routing protocols take into account other considerations about which route is the ‘best’, such as the speed of the link.

Have a look at the HowStuffWorks website to see an explanation and an animation of routers and routing.

Static and Dynamic Routing

Routers are designed to communicate with each other and to share information about networks. Routers can be configured to work with static and dynamic routes.

A Static route is a route that is manually entered by a network administrator. This is known as non-adaptive routing because the router will always use this static route when sending data, i.e. the data path is predetermined by the administrator. Static routes are useful for network security.

If there is a fault with any of the routes then the system administrator will have to go to the affected routers and make the required changes to get the system working again. The overuse of static routing is not recommended because the main function of a router is to learn and devise new paths for data in the event of system failures.

Most routers are dynamic with the capability of being statically configured

Dynamic routing involves the regular communication of routers with other routers. This allows the routers to learn and adapt to a changing environment. This is the embodiment of packet switching with routers automatically adapting to network changes and even system failures.

Routing and Routing Protocols

Routing Protocols

Routing protocols are used by routers to exchange information about known networks. Routers will initially only know the existence of directly connected networks, e.g. Ethernet and Serial connections. It is with the use of routing protocols that routers communicate with and learn from other routers new entries to add to their routing table.

When all routers have the same knowledge about the complete network the network is said to have converged. Examples of routing protocols are Routing Information Protocol (RIP) and Open Shortest Path First (OSPF).

Routed Protocols

Routed protocols are the actual data that is transferred from router to router, i.e. the actual packet itself. Examples of routed protocols are Internet Protocol (IP) and Internetwork Packet Exchange (IPX).


One of the drawbacks of dynamic routing is the overhead of router processing. Routers are required to constantly send and receive packets and to make sure that packets are routed properly. This can sometimes cause the problem of network congestion where the router has to queue packets before sending them. Other events outside a routers control can also cause unwanted network congestion, e.g. Denial Of Service (DOS) attacks


The availability of a network is an expected percentage of network uptime. This is a measure of network reliability. Ideally a network should have an availability of 100%, however, this is rarely the case. A more realistic and desirable percentage is 99.999%.

Routing Metrics

One of the functions of routing protocols is to calculate the metric of available routes. A metric is a value given to a route with regards to how good it is. One of the most basic metrics if hop count. This is a simple measure of how many routers a packet must pass through to get to its destination, i.e. in a network using RIP, and route that is over 15 hops will be deemed unreachable and the packet will be discarded. Other routing protocols may use a more complex metric consisting of cost, delay, bandwidth and reliability.