Unicast Routing Protocols
Unicast Routing Protocols
A routing table can be either static or dynamic. A static table is one with manual
entries. A dynamic table, on the other hand, is one that is updated automatically
when there is a change somewhere in the internet. Today, an internet needs
dynamic routing tables. The tables need to be updated as soon as there is a
change in the internet. For instance, they need to be updated when a router is
down, and they need to be updated whenever a better route has been found.
1. Optimization
An internet can be so large that one routing protocol cannot handle the task of
updating the routing tables of all routers. For this reason, an internet is divided
into autonomous systems. An autonomous system (AS) is a group of networks
and routers under the authority of a single administration. Routing inside an
autonomous system is referred to as intradomain routing. Routing between
autonomous systems is referred to as interdomain routing.
The table for node A shows how we can reach any node from this node. For
example, our least cost to reach node E is 6. The route passes through C.
Initialization
The tables in Figure 3.45 are stable; each node knows how to reach any other
node and the cost. At the beginning, however, this is not the case. Each node
can know only the distance between itself and its immediate neighbors, those
directly connected to it. So for the moment, we assume that each node can send
a message to the immediate neighbors and find the distance between itself and
these neighbors. The distance for any entry that is not a neighbor is marked as
infinite (unreachable).
Sharing
The whole idea of distance vector routing is the sharing of information
between neighbors. Although node A does not know about node E, node C
does. So if node C shares its routing table with A, node A can also know how to
reach node E. On the other hand, node C does not know how to reach node D,
but node A does. If node A shares its routing table with node C, node C also
knows how to reach node D. In other words, nodes A and C, as immediate
neighbors, can improve their routing tables if they help each other.
Updating
When a node receives a two-column table from a neighbor, it needs to update its
routing table. Updating takes three steps:
1. The receiving node needs to add the cost between itself and the sending node
to each value in the second column. The logic is clear. If node C claims that its
distance to a destination is x mi, and the distance between A and C is y mi, then
the distance between A and that destination, via C, is x + y mi.
2. The receiving node needs to add the name of the sending node to each row as
the third column if the receiving node uses information from any row. The
sending node is the next node in the route.
3. The receiving node needs to compare each row of its old table with the
corresponding row of the modified version of the received table.
a) If the next-node entry is different, the receiving node chooses the row with
the smaller cost. If there is a tie, the old one is kept.
b) If the next-node entry is the same, the receiving node chooses the new row.
For example, suppose node C has previously advertised a route to node X with
distance 3.