Routers
An illustration of a router in operation
General
In an heterogeneous environment, such as networks, a need of connection
devices which would inter-connect two different technologies is essential.
In this environment the router is that device.
As it's name implies, the router also serves as a routing switch-board.
Routers connect two or more networks and forward data packets between them.
When data arrives from one of the segments, the router decides, according
to it's routing table, to which segment to forward that data.
Even though each of the routers' connections is to one physical network,
that one network could connect to other networks through the use of other
routers. This way, many networks can interconnect. To understand
how routing occurs in such networks, we'll refer to the following diagram:
In the above configuration, router B's table would say, for instance,
that data going to network 4 should go to router C. Packets going
from network 1 to network 4 would go through router B into network 2 and
so on, till they reache their destination.
We would like to emphesize that routers "know" only about networks,
and not about hosts. In IP networks, routers utilize the fact that
each host's IP address contains two parts: the host's network address,
and the host's number on that network. Routers examine the data destination
address, extract, from it, the target network address, and decide, based
on this network address, where to transfer the data.
A router is actually a special computer which is dedicated to the task
of interconnecting networks. It moves information from its source
to its destination regardless of the middleware.
Note: A router resembles a bridge (they both have conventional processor,
memory and few different I/O interfaces, each for another network it connects),
but while bridging occurs at the link layer, routing occurs at the network
layer (see: protocols). This difference provides
information to the router that the bridge doesn't have access to.
Router responsibilities
Routers have two major responsibilities
-
Optimizing the routing paths.
A router uses a routing algorithm to determine the optimal path to
the destination. These algorithms maintain routing tables which contain
route information such as destination/next hop association. Routing algorithms
has several goals:
-
Optimality - finding the "best" route depending on the metric weightings
used by the specific router (there are several metrics used by routers,
each assigns different weights to routing algorithm's parameters such as
number of hops, delay)
-
Simplicity and low overhead - router algorithms must be as efficient
as possible with minimum utilization overhead. An efficient algorithm
is particularly important when using routing software on a limited resources
computer.
-
Robustness and stability - routers are located at network junction
points, therefore they must be robust with the ability to handle unusual
behavior of hardware and software components.
-
Rapid convergence - routers must agree on the optimal paths over
the net in order to avoid loops. When a network event (computer/router
failure, network segment going down etc..) force changes in the router's
routing tables, each router must perform recalculations based on the update
messages it received from other routers on the net.
-
Flexibility - is the ability to adapt accurately and quickly to
network changes and events. For example when the optimal routes are no
longer accessible or even optimal, due to some change in the network (segments
going down, change in bandwidth, router queue size, network delay, and
other variables), the routing algorithms should quickly adjust to the new
situation and choose the next best route to replace the old ones which
are not accessible any more.
-
Switching - transport of packets over networks.
When computer wants to send a packet over the net, it formats a packet
with the router's physical address and the destination address (protocol
address) of the target host. The router searches it's routing tables
for the destination host. If there is no entry for the destination host
the router usually drops the packet, otherwise (there is an entry for the
destination host) it replaces the physical address with the next hop's
address and retransmits the packet.
The next hop isn't necessarily the ultimate destination host,
it may be another router which performs the same routine again. A packet
may "visit" few routers / hosts on its route, each time it's destination
physical address changes.
Related Topics
See Also