Network Intradomain Routing
Network Intradomain Routing
Srinivas Narayana
1
Network
Application HTTPS FTP HTTP SMTP DNS
IP
Network
Data plane
outcome. 0100
0110
3
2
plane
0111 2
1001 1
1101
1
to output port
values in arriving
Figure 4.2 ♦ Routing algorithms determine values in forward tables
packet
tables. header,
In this example, a routing algorithm runs in each and every router and both
i.e, destination IPareaddress
forwarding and routing functions contained within a router. As we’ll see in Sec-
tions 5.3 and 5.4, the routing algorithm function in one router communicates with
Goal of Routing Algorithms
• Determine good paths from source to destination
• G = (N, E)
• N = {u, v, w, x, y, z}
• E = { (u,v), (u,x), (v,x), (v,w), (x,w), (x,y), (w,y), (w,z), (y,z) }
The graph abstraction
• Cost of an edge: c(x, y) 5
• Examples: c(u, v) = 2, c(u, w) = 5 v 3
w
2 5
• Cost of a path = summation of edge costs u 2 1 z
• c(path x à w à y à z) = 3 + 1 + 2 = 6 1
3
x 2
y
1
• Outcome of routing: each node should determine the least cost
path to every other node
• Q1: What algorithm should each node run to compute the least
cost path to every node?
• Q2: What information should nodes exchange with each other to
enable this computation?
The rest of this lecture
Routing
protocols
Srinivas Narayana
12
Review: Routing & Link State Algorithms
• Distributed routing protocols
5
3
• Goal of routing algorithms: find least cost path v w 5
2
in a graph abstraction of the network u 2 1 z
3
1 2
x y
• Link state algorithm: Each router has full 1
visibility of the graph, i.e., the “states” of all
links Routing protocols
17
Visualization
min cost in N \ N’
W should
N’ move to N’.
nodes whose least N \ N’
cost paths from u are c(w Nodes with estimated
w , v) least path costs, not
definitively known )
D ( w definitively known
v
5
3
v w 5
2
u 2 1 z
3
1 2
x y
1
Constructing the forwarding table
• To find the router port to use for a given destination (router), find
the predecessor of the node iteratively until reaching an
immediate neighbor of the source u
• The port connecting u to this neighbor is the output port for this
destination
Constructing the forwarding table
5
Srinivas Narayana
24
Review: Routing & Dist Vector Algorithms
• Distributed routing protocols
5
3
v w 5
• Goal of routing algorithms: find least cost 2
u 2 1 z
path in a graph abstraction of the network 3
1 2
x y
1
• DV proto: Each router maintains a vector of
distances to all other routers; not the graph. Routing protocols
from
y ∞∞ ∞ y 2 0 1
from
y 2 0 1
z ∞∞ ∞ z 7 1 0 z 3 1 0
node y table cost to cost to cost to
x y z x y z x y z y
2 1
x ∞ ∞ ∞ x 0 2 7 x 0 2 3
x z
from
y 2 0 1 y 2 0 1
from
from
y 2 0 1 7
z ∞∞ ∞ z 7 1 0 z 3 1 0
node z table cost to cost to cost to
x y z x y z x y z
x ∞∞ ∞ x 0 2 7 x 0 2 3
from
from
y 2 0 1 y 2 0 1
from
y ∞∞ ∞
z 7 1 0 z 3 1 0 z 3 1 0
time
Good news with distance vector protocols
• Suppose the link cost reduces or a new better 1
path becomes available in a network. y
4 1
• The immediate neighbors of the change detect x z
2
the better path immediately
• Since their DV changed, these nodes notify their
neighbors immediately.
• And those neighbors notify still more neighbors
• … until the entire network knows to use the better path
• Good news travels fast through the network
• This is despite messages only being exchanged
among neighbors
Bad news with distance vector protocols
• If router goes down, could be a while before network realizes it.
A B C D E
5 4 5 4 After 3 exchanges
5 6 5 6 After 4 exchanges