L14-Routing Principles,Link State Routing
L14-Routing Principles,Link State Routing
Computer Networks
2
Routing: “Best” Path
• Routing: Determine “best” paths (routes),
from sending hosts to each receiving host,
through network of routers
• path: sequence of routers that packets Forwarding
will traverse as they flow from a given
initial source host to a given final
destination host
• “best”: least “cost”, “fastest”, “least
congested”
3
Routing: Graph Abstraction
Static routing:
• Routes change very slowly over time.
• Often as a result of human intervention (for example, a human
manually editing a router’s forwarding table)
Dynamic routing :
• Routes change as the network traffic loads or topology change
• A dynamic routing algorithm can be run either periodically or in
direct response to topology or link cost changes
• Dynamic algorithms are more responsive to network changes
6
Routing: Algorithm Classification
8
Link State Routing
• The network topology and all link costs are known, that is,
available as input to the LS algorithm
• Each node can then run the LS algorithm and compute the same
set of least-cost paths as every other node
9
Link State Routing- Dijkstra’s Algorithm
• After the kth iteration of the algorithm, the least-cost paths are
known to k destination nodes
10
Example 1
5 7
Note: 4
Ties (i.e., two distances being
the same) can exist. Those 3 8
u w y z
are broken arbitrarily. 2
3
7 4
11
v
Link State Routing- Dijkstra’s Algorithm
12
Example 2
13
Example 2
14
15