Académique Documents
Professionnel Documents
Culture Documents
Emma Fitzgerald
2015
Routing and Forwarding
1. Set the distance for the source node to 0 and for all other
nodes to . Set the predecessor of all nodes to null.
2. Iterate through each edge (u, v). If the distance from u to v,
plus the edge weight, is less than the current distance to v, we
have discovered a shorter path to v. Set the distance to v to
this new value and the predecessor of v to u.
3. Repeat step 2 N 1 times, where N is the number of nodes
in the graph. (N 1 is the maximum length of a non-cyclic
path.)
4. For each edge (u, v) in the graph, if the distance to u plus the
edge weight is less than the distance to v, the graph contains
a negative-weight cycle. Terminate.
5. Otherwise, we have found the shortest paths to each node
from the source.
Lund University Slide 6 of 12
Routing
Both distance vector and link state routing are only used
within a single autonomous system (typically a network run by
a single provider).
These protocols do not scale well to large networks such as
the internet.
Between autonomous systems, we use a variant of distance
vector routing called path vector routing. Each autonomous
system has a speaker node.
Only speaker nodes communicate across the AS boundary,
and exchange information about which destinations they can
reach and the paths to them.