The Networking Layer
Rudra Dutta
CSC 401

Fall 2011, Section 001
Copyright Rudra Dutta, NCSU, Fall, 2011
2
Positioning
DLC allows communication between connected computers
Cooperation can create connectivity not present in physical
topology
–
networking
Lowest layer aware of end

to

end traffic
Functions:
–
Forwarding
–
Routing
–
Addressing?
We want to understand:
–
Descriptive
Connectionless and connection

oriented, virtual circuits, flow routing
–
Algorithmic
Dijkstra, flooding, DV, LSA, broadcast
Copyright Rudra Dutta, NCSU, Fall, 2011
3
Concepts
Inter

networking
–
Assume physical (“sub”)network knows how to deliver
Addressing
–
Physical network computers already have addresses
–
Do these make sense in broader context?
Consider postal

house, subdivision, ...
–
If not, networking layer addresses must be assigned
Forwarding and Routing
Switching granularity and context
–
Circuits (L1), packets (L3)
–
Hierarchical switching
Forwarding Information Base
Copyright Rudra Dutta, NCSU, Fall, 2011
4
Concepts

Forwarding / Routing
Forwarding
–
The act of forwarding PDUs
Where to forward?
–
Likely to be partially determined by data source/destination
Must be embedded in data
–
Likely to be partially determined by network factors
Must be stored at node
–
Forwarding will combine these two types of information
Routing
–
Path

finding
For any and all traffic, determination of path it takes from source to
destination
–
At a node, must translate into:
Distilling “network factors” above into easy

to

refer information for
forwarding

mapping from data to next

hop
Copyright Rudra Dutta, NCSU, Fall, 2011
5
Concept

Context
Context is needed to switch data
–
Wire

perfect context (no

brains forwarding)
–
At L3, need context to switch
Meta

data
makes it unnecessary to maintain context
–
Each PDU carries context information (destination, source, ...)
–
Allows store

and

forward, therefore utilization, but
–
Now need to undertake significant forwarding effort for each
packet
Context makes it unnecessary to reinvent the wheel
–
First send some “special” traffic packets establishing context
–
Units of traffic following the context establishment forwarded
cheaply, but
–
To ensure that we do not drop data, must end up wasting
bandwidth
–
The overhead of context maintenance is also present
Copyright Rudra Dutta, NCSU, Fall, 2011
6
Concepts

Forwarding Information Base
A “lookup table” for next

hop router
–
Packet arrives with embedded context (full or partial)
–
Context information is extracted and looked up in FIB
–
Packet forwarded to next

hop intermediate node
DLC
PHY
NET
DLC
PHY
DLC
PHY
NET
A
R
D
DLC
PHY
NET
Forwarding
Next

hop
FIB
Context
Copyright Rudra Dutta, NCSU, Fall, 2011
7
Connection

less Forwarding
H1 sends packet 1 to A
A consults FIB
forward to C
C consults FIB
forward to E
E consults FIB
forward to F
F uses LAN to forward to H2
If FIB changes, a following
packet may traverse different
path
A’s FIB
A’s FIB
C’s FIB
E’s FIB
Copyright Rudra Dutta, NCSU, Fall, 2011
8
Connection Oriented Forwarding
A’s FIB
C’s FIB
E’s FIB
H1 sends request to A
A assigns label “1”, forwards
request to C
C assigns label “6”, forwards
request to E
E assigns label “3”, forwards
request to F
F accepts request, replies to
E with label “11”
E notes label, replies to C
with assigned label
C notes label, replies to A
with assigned label
A notes label, replies to H1
with assigned label
H1 sends packets with label
“1” to A on
“virtual circuit”
6
6
3
3
11
Copyright Rudra Dutta, NCSU, Fall, 2011
9
Comparison
Copyright Rudra Dutta, NCSU, Fall, 2011
10
Routing

Fundamentals
Different concerns
–
Correctness and optimality
–
Robustness, stability, …
–
More complicated “policy” concerns
–
Optimality
–
who decides?
Once design goals have been decided,
–
Algorithm must be designed to attain them
–
Some fundamental approaches to routing exist
Routing may be fixed, or fixed alternate
May be adaptive, or dynamic
–
Adapting to what? How is information shared?
Copyright Rudra Dutta, NCSU, Fall, 2011
11
Space of Routing Choices
Static vs. dynamic or adaptive
For a node, next

hop determined by
–
Destination only
–
Source and destination
–
Particular flow of traffic
–
Other characteristics
May be bifurcated (split) or non

bifurcated
Next

hop may be unique or multiple
–
Deterministically or randomly picked
Copyright Rudra Dutta, NCSU, Fall, 2011
12
Flooding
Simple
–
forward to everybody else
Generates unbounded copies
Hop count can be introduced to bound
Can be more intelligent if packets can be
recognized
Selective flooding
–
shortlist of links
Highly robust
Serves as benchmark
Useful as a “phase” in other strategies
Copyright Rudra Dutta, NCSU, Fall, 2011
13
“Optimality Criterion”
•
Nice characteristic, works for “distance” or “cost”
related routing goals
•
Based on “sink tree” argument
•
Goals that can be expressed additively
•
“Sub

path of optimal path must be optimal”
Copyright Rudra Dutta, NCSU, Fall, 2011
14
Finding Shortest Paths
An example where a graph

theoretic abstraction is
useful
–
Abstract networking into vertices and arcs
–
Weighted arcs
–
least cost approach
Dijkstra’s algorithm
–
Finds least cost path to all vertices from one
–
Based on moving vertices from a set with “tentative” distances
to a set with “fixed” distances
–
Desirable computational properties
–
Other algorithms exist
Useful for additive measures of path cost
–
“Shortest” is better understood as “least additive cost”
Copyright Rudra Dutta, NCSU, Fall, 2011
15
Dijkstra’s Algorithm
Finding shortest distances (and
corresponding paths) from ONE source to
ALL destinations
–
Easily adapted to vice

versa
First, mark source node with
tentative
distance zero
Mark all other nodes
tentatively
with
distance “infinity” (not reachable)
Do iteratively (until all nodes marked):
–
Pick the node with the least
tentative
distance,
and mark it as
final
distance
–
call it node X
–
Pick all outgoing links from this node, for each:
Update the
tentative
distance of the neighbor
IF
:
(Final distance of X + link cost) < Tentative distance
of neighbor
If updated, remember X as previous node of
neighbor
A
5
7
3
2
1
8
1
5
2
5
B
E
C
F
D
G
5
7
3
2
1
8
1
5
2
0
7
3
5
5
A
B
E
C
F
D
G
At the end, previous nodes can be read off to find complete paths
0
Copyright Rudra Dutta, NCSU, Fall, 2011
16
Dijkstra’s Algorithm
A
5
7
3
2
1
8
1
5
2
5
7
3
2
1
8
1
5
2
5
7
3
2
1
8
1
5
2
5
7
3
2
1
8
1
5
2
0
0
0
7
3
5
7
3
4
6
3
4
4
4
5
5
5
5
B
E
C
F
D
G
A
B
E
C
F
D
G
A
B
E
C
F
D
G
A
B
E
C
F
D
G
0
Copyright Rudra Dutta, NCSU, Fall, 2011
17
Shortest Disjoint Path Pair
Objective: find a pair of paths between a source
a destination that are:
–
Edge

disjoint, or Vertex

disjoint
–
Sum of their lengths is minimum
Observations:
–
Vertex

disjointness implies edge

disjointedness
–
For graph of vertices with degrees 3 or less:
Edge

disjointedness implies Vertex

disjointedness
Length of vertex

disjoint pair ≥ length of edge

disjoint pair
Copyright Rudra Dutta, NCSU, Fall, 2011
18
Simple Two

step Approach Fails
Obvious approach

find one, then other
–
May not find shortest pair
–
May not find pair at all even when one exists
–
Trap topology
A
B
D
Z
E
C
1
1
1
1
1
2
2
Copyright Rudra Dutta, NCSU, Fall, 2011
19
Disjoint Paths Algorithms
Simple approach (two

step) fails with trap
topologies
Remedy

“remember” first path found by link
reversal
–
Replace each link by backward directed arc (“can
undo this link choice”)
–
Mark arc with cost negative of link cost (“undo
refund”)
Must be able to find shortest paths in presence
of negative

cost arcs
Remedy

modify Dijkstra’s algorithm
Copyright Rudra Dutta, NCSU, Fall, 2011
20
Dijkstra’s Algorithm
Given:
–
Undirected graph G with vertices V,
–
Source node
A
,
–
Destination node
Z
–
Edge costs
l
(
ij
)
Use:
–
N
(
i
)
= set of neighbors of
i
,
–
d
(
i
)
= distance from
A
to
i
,
–
S = set of nodes to which shortest distance has NOT
been found,
–
P
(
i
)
= predecessor of
i
in path from
A
Copyright Rudra Dutta, NCSU, Fall, 2011
21
Dijkstra’s Algorithm
1.
Initialize
d
(A)
= 0;
d
(
i
)
=
l
(
A
i
) for all
i
in
N(A)
,
∞
for all other
i
S = all vertices except
A
P
(
i
)
=
A
for all
i
in S
2.
Select new vertex to label permanently
Choose
j
from S such that
d
(
j
)
= min
d
(
i
)
, for
i
in S
Remove
j
from S
If
j = Z
, then stop; otherwise go to Step 3
3.
Update distances
For all
i
in
N
(
j
)
such that
i
is also in S
If
d
(
j
)
+ l
(
ij
)
< d
(
i
)
, update
d
(
i
)
to
d
(
j
)
+ l
(
ij
)
and set
P
(
i
)
to
j
Back to Step 2
l
(
ij
) cost of edge
ij
N
(
i
) = neighbors of
i
d
(
i
) = distance A to
i
S = nodes
not
found
P
(
i
) = predecessor of
i
Copyright Rudra Dutta, NCSU, Fall, 2011
22
Dijkstra’s

Example
l
(
ij
) cost of edge
ij
N
(
i
) = neighbors of
i
d
(
i
) = distance A to
i
S = nodes
not
found
P
(
i
) = predecessor of
i
1.
Initialize
d
(A
)
= 0;
d
(
i
)
=
l
(
A
i
) for all
i
in
N(A)
,
∞
for all other
i
S = all vertices except
A
P
(
i
)
=
A
for all
i
in S
2.
Select new vertex to label
permanently
Choose
j
from S such
that
d
(
j
)
= min
d
(
i
)
, for
i
in
S
Remove
j
from S
If
j
= Z
, then stop;
otherwise go to Step 3
3.
Update distances
For all
i
in
N
(
j
)
such that
i
is also in S
If
d
(
j
)
+
l
(
ij
)
<
d
(
i
)
,
update
d
(
i
)
to
d
(
j
)
+
l
(
ij
)
and set
P
(
i
)
to
j
Back to Step 2
Copyright Rudra Dutta, NCSU, Fall, 2011
23
Negative Cost Arcs
Many reasonable cost metrics are positive

only
However, sometimes negatives costs can turn
up
–
Sometimes introduced by specific desired
transformations of graphs
Graph may have cycles
–
Cycles with negative total costs exist
Concept of shortest path?
–
If negative cost arcs, but not cycles?
Specific family of such graphs generated by
useful diverse routing algorithms
Dijkstra’s algorithm fails with negative arc costs
Copyright Rudra Dutta, NCSU, Fall, 2011
24
Failure of Dijkstra

Example
l
(
ij
) cost of edge
ij
N
(
i
) = neighbors of
i
d
(
i
) = distance A to
i
S = nodes
not
found
P
(
i
) = predecessor of
i
1.
Initialize
d
(A
)
= 0;
d
(
i
)
=
l
(
A
i
) for all
i
in
N(A)
,
∞
for all other
i
S = all vertices except
A
P
(
i
)
=
A
for all
i
in S
2.
Select new vertex to label
permanently
Choose
j
from S such
that
d
(
j
)
= min
d
(
i
)
, for
i
in
S
Remove
j
from S
If
j
= Z
, then stop;
otherwise go to Step 3
3.
Update distances
For all
i
in
N
(
j
)
such that
i
is also in S
If
d
(
j
)
+
l
(
ij
)
<
d
(
i
)
,
update
d
(
i
)
to
d
(
j
)
+
l
(
ij
)
and set
P
(
i
)
to
j
Back to Step 2
Copyright Rudra Dutta, NCSU, Fall, 2011
25
Dijkstra’s Algorithm

Modified
1.
Initialize
d
(A)
= 0;
d
(
i
)
=
l
(
A
i
) for all
i
in
N(A)
,
∞
for all other
i
S = all vertices except
A
P
(
i
)
=
A
for all
i
in S
2.
Select new vertex to label permanently
Choose
j
from S such that
d
(
j
)
= min
d
(
i
)
, for
i
in S
Remove
j
from S
If
j = Z
, then stop; otherwise go to Step 3
3.
Update distances
For all
i
in
N
(
j
)
such that
i
is also in S
If
d
(
j
)
+ l
(
ij
)
< d
(
i
)
, update
d
(
i
)
to
d
(
j
)
+ l
(
ij
)
and set
P
(
i
)
to
j
Back to Step 2

Also add
i
back to S
S =
ϕ
l
(
ij
) cost of edge
ij
N
(
i
) = neighbors of
i
d
(
i
) = distance A to
i
S = nodes
not
found
P
(
i
) = predecessor of
i
Copyright Rudra Dutta, NCSU, Fall, 2011
26
Modified Dijkstra

Example
l
(
ij
) cost of edge
ij
N
(
i
) = neighbors of
i
d
(
i
) = distance A to
i
S = nodes
not
found
P
(
i
) = predecessor of
i
1.
Initialize
d
(A
)
= 0;
d
(
i
)
=
l
(
A
i
) for all
i
in
N(A)
,
∞
for all other
i
S = all vertices except
A
P
(
i
)
=
A
for all
i
in S
2.
Select new vertex to label
permanently
Choose
j
from S such
that
d
(
j
)
= min
d
(
i
)
, for
i
in
S
Remove
j
from S
If
S =
ϕ
, then stop;
otherwise go to Step 3
3.
Update distances
For all
i
in
N
(
j
)
such that
i
is also in S
If
d
(
j
)
+
l
(
ij
)
<
d
(
i
)
,
update
d
(
i
)
to
d
(
j
)
+
l
(
ij
)
and set
P
(
i
)
to
j
Also add
i
back to S
Back to Step 2
Copyright Rudra Dutta, NCSU, Fall, 2011
27
Bhandari’s Algorithm
1.
Find the shortest path from A to Z with the modified
Dijkstra algorithm
2.
Replace each edge of the shortest path by a single arc
directed towards the source vertex
3.
Make the length of each of the above arcs negative
4.
Find the shortest path from A to Z in the modified graph
with the modified Dijkstra algorithm
5.
Transform to the original graph, and erase any
interlacing edges of the two paths found
6.
Group the remaining edges to obtain the shortest pair
of edge

disjoint paths
Copyright Rudra Dutta, NCSU, Fall, 2011
28
Bhandari’s Algorithm

Example
Copyright Rudra Dutta, NCSU, Fall, 2011
29
Distance Vector (DV) “Routing”
Asynchronous, iterative distributed computation
–
exchange of routing information: (destination, min_distance)
–
exchange info with neighbors only
–
computation step: based on Bellman

Ford method
Find for
each destination
–
cost of least cost path
–
next node (neighbor) on least cost path (not complete path)
Routers do not store or compute the network topology; they
only store distance / next hop information
Used by many protocols: RIP, BGP, ISO IDRP, Novel IPX
Advertise distances to route prefixes (networks, subnets, hosts), not
routers
Copyright Rudra Dutta, NCSU, Fall, 2011
30
Bellman's Equation
7
3
I can get you to
54.0.0.0 for $10
Hey,
I
can get
you there for $8!
For any node
A
,
–
Edge costs
l
(
ij
) =
–
Cost of link from
i
to
j
, if exists
–
∞, otherwise
Beyond neighborhood, trust
neighbors’ claims
D(
i
,
j
) = min
k
{
l
(
ik
) + D(
k
,
j
)}
D(
i
,
i
) = 0
A
forms vector of
D(A,
j
)
, distributes to neighbors
So does every other node
Nodes collectively and iteratively learn about better and better
paths
A
D(A,54.0.0.0 =
min (3+10, 7+8)
Copyright Rudra Dutta, NCSU, Fall, 2011
31
Distance

Vector Algorithm (Each Router)
Start with a distance vector consisting of the value
–
"0" for itself
–
"infinity" for every other destination
Link cost to neighbors is available, through direct
measurement, or administrator configuration
Transmit its distance vector to each of its neighbors
–
when the link to the neighbor first comes up
–
whenever the information changes
triggered updates
–
periodically (even if there are no changes)
Saves the
most recent distance vector
from each
neighbor
Calculates its own distance vector using Bellman's
equation
Iterate
DV Example
Copyright Rudra Dutta, NCSU, Fall, 2011
32
D
E
C
A
B
1
2
1
5
1
2
8
D(
i
,
j
) = min
k
{
l
(
ik
) + D(
k
,
j
)}
A
B
C
D
E
A’s DV





B’s DV

0



C’s DV





D’s DV





E’s DV





A
B
C
D
E
A’s DV





B’s DV





C’s DV


0


D’s DV





E’s DV





A
B
C
D
E
A’s DV





B’s DV





C’s DV





D’s DV





E’s DV




0
A
B
C
D
E
A’s DV





B’s DV





C’s DV





D’s DV



0

E’s DV





A
B
C
D
E
A’s DV
0




B’s DV





C’s DV





D’s DV





E’s DV





A
B
C
D
E
A’s DV

(=
\



B’s DV

0



C’s DV

(=
\



D’s DV

(=
\



E’s DV





A
B
C
D
E
A’s DV


(=
\


B’s DV


(=
\


C’s DV


0


D’s DV





E’s DV


(=
\


A
B
C
D
E
A’s DV




(=
\
B’s DV





C’s DV




(=
\
D’s DV




(=
\
E’s DV




0
A
B
C
D
E
A’s DV





B’s DV



(=
\

C’s DV





D’s DV



0

E’s DV



(=
\

A
B
C
D
E
A’s DV
0




B’s DV
(=
\




C’s DV
(=
\




D’s DV





E’s DV
(=
\




DV Example
Copyright Rudra Dutta, NCSU, Fall, 2011
33
D
E
C
A
B
1
2
1
5
1
2
8
D(
i
,
j
) = min
k
{
l
(
ik
) + D(
k
,
j
)}
A
B
C
D
E
A’s DV





B’s DV

0



C’s DV





D’s DV





E’s DV





A
B
C
D
E
A’s DV





B’s DV





C’s DV


0


D’s DV





E’s DV





A
B
C
D
E
A’s DV





B’s DV





C’s DV





D’s DV





E’s DV




0
A
B
C
D
E
A’s DV





B’s DV





C’s DV





D’s DV



0

E’s DV





A
B
C
D
E
A’s DV
0




B’s DV





C’s DV





D’s DV





E’s DV





A
B
C
D
E
A’s DV
0




B’s DV
1
0
1
8

C’s DV


0


D’s DV



0

E’s DV





A
B
C
D
E
A’s DV
0




B’s DV

0



C’s DV
2
1
0

1
D’s DV





E’s DV




0
A
B
C
D
E
A’s DV
0




B’s DV





C’s DV


0


D’s DV



0

E’s DV
5

1
2
0
A
B
C
D
E
A’s DV





B’s DV

0



C’s DV





D’s DV

8

0
2
E’s DV




0
A
B
C
D
E
A’s DV
0
1
2

5
B’s DV

0



C’s DV


0


D’s DV





E’s DV




0
A
B
C
D
E
A’s DV
0
1
2

5
B’s DV





C’s DV
2
1
0

1
D’s DV

8

0
2
E’s DV
5

1
2
0
DV Example
Copyright Rudra Dutta, NCSU, Fall, 2011
34
D
E
C
A
B
1
2
1
5
1
2
8
D(
i
,
j
) = min
k
{
l
(
ik
) + D(
k
,
j
)}
A
B
C
D
E
A’s DV
0
1
2

5
B’s DV
1
0
1
8

C’s DV
2
1
0

1
D’s DV

8

0
2
E’s DV





A
B
C
D
E
A’s DV
0
1
2

5
B’s DV
1
0
1
8

C’s DV
2
1
0

1
D’s DV





E’s DV
5

1
2
0
A
B
C
D
E
A’s DV





B’s DV
1
0
1
8

C’s DV





D’s DV

8

0
2
E’s DV
5

1
2
0
A
B
C
D
E
A’s DV
0
1
2

5
B’s DV
1
0
1
8

C’s DV
2
1
0

1
D’s DV





E’s DV
5

1
2
0
A
B
C
D
E
A’s DV
0
1
2

5
B’s DV
1
0
1
8
2
C’s DV
2
1
0

1
D’s DV

8

0
2
E’s DV





A
B
C
D
E
A’s DV
0
1
2

5
B’s DV
1
0
1
8

C’s DV
2
1
0
3
1
D’s DV





E’s DV
5

1
2
0
A
B
C
D
E
A’s DV
0
1
2

5
B’s DV





C’s DV
2
1
0

1
D’s DV

8

0
2
E’s DV
3
2
1
2
0
A
B
C
D
E
A’s DV





B’s DV
1
0
1
8

C’s DV





D’s DV
7
8
3
0
2
E’s DV
5

1
2
0
A
B
C
D
E
A’s DV
0
1
2
7
3
B’s DV
1
0
1
8

C’s DV
2
1
0

1
D’s DV





E’s DV
5

1
2
0
DV Example
Copyright Rudra Dutta, NCSU, Fall, 2011
35
D
E
C
A
B
1
2
1
5
1
2
8
D(
i
,
j
) = min
k
{
l
(
ik
) + D(
k
,
j
)}
A
B
C
D
E
A’s DV
0
1
2
7
3
B’s DV
1
0
1
8
2
C’s DV
2
1
0
3
1
D’s DV
7
8
3
0
2
E’s DV





A
B
C
D
E
A’s DV
0
1
2
7
3
B’s DV
1
0
1
8
2
C’s DV
2
1
0
3
1
D’s DV





E’s DV
3
2
1
2
0
A
B
C
D
E
A’s DV
0
1
2
7
3
B’s DV





C’s DV
2
1
0
3
1
D’s DV
7
8
3
0
2
E’s DV
3
2
1
2
0
A
B
C
D
E
A’s DV





B’s DV
1
0
1
8
2
C’s DV





D’s DV
7
8
3
0
2
E’s DV
3
2
1
2
0
A
B
C
D
E
A’s DV
0
1
2
7
3
B’s DV
1
0
1
8
2
C’s DV
2
1
0
3
1
D’s DV





E’s DV
3
2
1
2
0
A
B
C
D
E
A’s DV
0
1
2
7
3
B’s DV
1
0
1
4
2
C’s DV
2
1
0
3
1
D’s DV
7
8
3
0
2
E’s DV





A
B
C
D
E
A’s DV
0
1
2
7
3
B’s DV
1
0
1
8
2
C’s DV
2
1
0
3
1
D’s DV





E’s DV
3
2
1
2
0
A
B
C
D
E
A’s DV
0
1
2
7
3
B’s DV





C’s DV
2
1
0
3
1
D’s DV
7
8
3
0
2
E’s DV
3
2
1
2
0
A
B
C
D
E
A’s DV





B’s DV
1
0
1
8
2
C’s DV





D’s DV
5
4
3
0
2
E’s DV
3
2
1
2
0
A
B
C
D
E
A’s DV
0
1
2
5
3
B’s DV
1
0
1
8
2
C’s DV
2
1
0
3
1
D’s DV





E’s DV
3
2
1
2
0
Copyright Rudra Dutta, NCSU, Fall, 2011
36
DV Routing (cont'd)
Events causing recalculation of the distance
vector
–
receive from a neighbor a distance vector containing
new info
–
when link goes down
discard / disregard distance
vector from the neighbor on the other end of that link
how determine link / neighbor is down?
how long does it take to determine this?
Copyright Rudra Dutta, NCSU, Fall, 2011
37
Properties and Problems
DV algorithm eventually will converge on
shortest paths
–
as long as state of the links / routers remains stable
–
no requirement for updates to be synchronized
During convergence, non

shortest paths and
loops may develop
–
"good news travels fast, bad news travels slowly"
–
count

to

infinity problem
Copyright Rudra Dutta, NCSU, Fall, 2011
38
The Count

to

Infinity Problem
“Good news”
–
availability of a link /
router
“Bad news”
–
failure of a
link / router
Copyright Rudra Dutta, NCSU, Fall, 2011
39
How to Find Arc Costs?
Must know arc costs to neighbors
–
Depending on cost metric, may be possible to measure
Beyond that, may trust neighbors’ claims
Local, do not have full picture of network
Cannot run Dijkstra or equivalent
–
Or may attempt to exchange local information
Full model of network can be built
Either way, routing information must be exchanged
–
Bootstrapping problem

solved by flooding
The exchange mechanism is a distributed algorithm,
and often becomes known as a “routing method”
–
Actually, a “dynamic routing protocol”
–
More correctly, a “dynamic routing enablement protocol”
Copyright Rudra Dutta, NCSU, Fall, 2011
40
Link State Protocols
Each router distributes information it has to every other
router
Information is in the form of
LSA
’s
–
(myID, neighborID, link cost)
Distribution is by controlled flooding
–
Distribute along each link but receiving one
Now, each router has complete information
OSPF is a prevalent example
–
SPF with LSA to find arc costs
Copyright Rudra Dutta, NCSU, Fall, 2011
41
LSA Routing Algorithm
Each router does the following
1.
“Meets the (immediately adjacent) neighbors” and
learns their IDs
2.
Builds an LSA containing IDs and distance to each of
its neighbors
3.
Transmits the LSA to
all
other routers
–
How? Most complex and critical piece of link

state routing
algorithm
4.
Stores the most recent LSA from
every other router
in
the network
–
Not just from its immediate neighbors!
5.
Creates a “map” of the network topology from LSAs
6.
Computes routes (to store in forwarding table) from its
local map of the topology
Copyright Rudra Dutta, NCSU, Fall, 2011
42
Generating LSAs
A router generates LSAs
periodically
background
refresh rate
A router also generates LSAs when its local
environment changes
–
it has a new neighbor (router comes online)
–
a link goes down (indicated by absence of "Hello" packets)
–
the cost of a link to an existing neighbor has changed
Limiting the overhead (network bandwidth) consumed
by routing messages, particularly LSAs
–
set a minimum interval between successive updates
Copyright Rudra Dutta, NCSU, Fall, 2011
43
Forwarding LSAs
Flooding
except
to transmitting neighbor
–
Infinite number of packets
–
Hop

limited would still result in exponential number of
packets
LSA flooding can use information in LSA
–
Each router stores the most recent copy of LSAs
from all routers
easy to recognize duplicate LSAs
–
Each router floods an LSA only once
an LSA will travel over each link of the network exactly once
generally,
O
(
n
) packets propagated
Actually, could be more (simultaneity)
Copyright Rudra Dutta, NCSU, Fall, 2011
44
LSA Forwarding
Router A below transmits its LSA across the network shown below,
using LSA Flooding. In one flooding “step” an LSA can be
transmitted to any and all adjacent neighbors. Over what links is
the LSA flooded in step #1? In step #2? Continue answering this
question until the final step, whatever that is.
Issue of simultaneity becomes clear when doing this example
.
A
B
D
E
F
C
Copyright Rudra Dutta, NCSU, Fall, 2011
45
Why DV / LSA ?
Loop

freeness in LSA
–
But not impossible to attain in DV
“Local” character of DV
–
Less overhead, storage
–
But does not scale well
Luckily, advantages are in different zones
Small scale and simplicity
–
DV
Large scale and optimality
–
LSA
Copyright Rudra Dutta, NCSU, Fall, 2011
46
Hierarchical Routing
Divide and conquer
Group destinations into logical localities
Break routing into two phases
–
Between groups
Groups may not be directly connected
–
Inside a group
For both phases, use some other strategy
Can be generalized into more levels
Application in Ad Hoc routing
Copyright Rudra Dutta, NCSU, Fall, 2011
47
Broadcast Routing
Destination is “all hosts”, not a single one
–
Special case of multicasting
Flooding is obvious choice for distributing to
networks
–
But assumes each networks has “broadcast”
semantics
–
Otherwise need to unicast to each host, impractical
Multidestination routing
–
Replicate only when necessary
Spanning tree of routers
–
Flood on spanning tree routers
Copyright Rudra Dutta, NCSU, Fall, 2011
48
Spanning Tree
Tree

a connected graph with no cycles
Spanning tree

a subgraph of original graph
that is a tree and included every node
–
Must have exactly N

1 links
–
Efficient broadcast
Copyright Rudra Dutta, NCSU, Fall, 2011
49
Broadcast
–
Reverse Path Forwarding
An attempt to obtain the benefits of a spanning tree
with no extra information or overhead
With tree, when a broadcast packet arrives
–
It is from either from the “parent”
Must be forwarded to all “children”
Like flooding
–
all interfaces except the one packet came in over
–
Or from a “child”
Must be discarded, to avoid duplication
But how to establish parent

child relation without
overhead of forming spanning tree?
–
Use sink tree for the source
–
“If this packet originates at A, comes to me through X”
Forward if X is my next

hop router to A (to all neighbors except X)
Otherwise discard
Copyright Rudra Dutta, NCSU, Fall, 2011
50
Multi

level Forwarding
Special case of Generalized Protocol Layering
“Links” of one network are really “paths” of a
different one
–
“Virtual” or “logical” links
–
Can occur on multiple levels
–
Virtual links may be instantiated by physical layer
Optical networks: “lightpaths”
Wireless networks: recent approaches using OFDM
–
Or may be instantiated as “virtual” circuits
Different networking layers at different levels
may have differing routing strategies/goals
–
May be “obviously sub

optimal” when viewed globally
Copyright Rudra Dutta, NCSU, Fall, 2011
51
Summary
Network layer allows separate physical
networks to cooperate
Context may or may not be utilized to minimize
forwarding effort
Dual concerns of forwarding and routing
Various fundamental approaches to routing
–
Real strategies can be designed from combination of
these approaches
Enter the password to open this PDF file:
File name:

File size:

Title:

Author:

Subject:

Keywords:

Creation Date:

Modification Date:

Creator:

PDF Producer:

PDF Version:

Page Count:

Preparing document for printing…
0%
Comments 0
Log in to post a comment