CMPE 252: Modeling of Computer Networks LECTURE 10: - PowerPoint PPT Presentation

1 / 59
About This Presentation
Title:

CMPE 252: Modeling of Computer Networks LECTURE 10:

Description:

OSPF, IS-IS, new ARPANET routing protocol. Examples using distance information: ... Each router is responsible for reporting the state of outgoing links to the rest ... – PowerPoint PPT presentation

Number of Views:26
Avg rating:3.0/5.0
Slides: 60
Provided by: JJ17
Category:

less

Transcript and Presenter's Notes

Title: CMPE 252: Modeling of Computer Networks LECTURE 10:


1
CMPE 252 Modeling of Computer NetworksLECTURE
10
  • Routing Protocols

2
Correctness of DBF
  • Note that BF converges because H is finite!

Step 1 Initialize source node S with a 0
distance to itself and all other nodes with an
infinite distance. Step 2 Set H 1 Step 3
Label all nodes H hops away from S with the
smallest distance from S to the nodes. Step 4
Stop if all nodes have been covered and no label
can be reduced by increasing H. Else, set H
H1 and repeat Step 3
After partition, the max H from S to E is
infinity! S can keep max number of nodes in the
network (N), and the distance and hop count for
each destination. S can stop when hop count N,
because longest path must be N-1 hops.
3
Ad Hoc Solutions (do not work)
  • Counting to N takes too long! Alternatives
    include
  • Split horizon Tell successor distance to
    destination is infinity.
  • Hold-down timer After distance to destination
    increases, send update stating new distance
    through current successor, wait for a long period
    of time before computing new successor and
    shortest distance and then act as in DBF.
  • Poisoned reverse After distance increase, report
    an infinite distance and then correct the
    distance.
  • Next-hop information Communicate the distance
    and next hop to each destination (used in RIP v2)

4
DBF Correctness
  • Liveness
  • Each node updates its routing table independently
    of others.
  • The only possibility of deadlock occurs in the
    reliable exchange of update messages (the
    equivalent of a point-to-multipoint ARQ)
  • Safety
  • We must show that, in the absence of deadlocks
    and after an arbitrary sequence of topology
    changes, the protocol produces correct routing
    tables and stops sending updates.

5
DBF Correctness
  • Assumptions
  • We focus on the min-hop routing case.
  • Assume that G is connected (max hop count is
    finite) and that no more topology changes occur
    after time t proof is by simple induction on the
    number of hops away from a destination j.
  • Assume that no deadlocks occur in the exchange of
    correct update messages.
  • Proving that DBF Obtains Correct Routing Tables
  • Because of the underlying service, a neighbor of
    j knows that j is a neighbor within a finite
    time, and sets its distance to j equal to 1 by
    some time T0 gt t
  • Assume that DBF is correct for h-1 hops away from
    j.

6
DBF Correctness
  • Proving that DBF Obtains Correct Routing Tables
  • By time T1 gt T0, each router h-1 hops away from j
    must send an update message reliably to each
    neighbor stating that its distance to j is h-1.
  • Consider router x, which is h hops away from j
    this router must know all its neighbors within a
    finite time, and must receive the update from all
    its neighbors at h-1 hops from j by time T1.
  • Whatever the distance to j for node x (at h hops
    from j) is, using the BF equation, node x must
    choose a neighbor h-1 hops from j as its next hop
    to j by some finite time T2 gt T1.
  • Hence, DBF obtains correct routing tables!

7
DBF Correctness
  • Proving that DBF Stops
  • A router updates the distance to a destination
    only after topology changes or update messages
    are received, and no more topology changes occur
    after time t.
  • A router sends an update message only if its
    distance or successor change.
  • After node I h hops away from j sends its update
    stating that its distance to j is h, it does not
    send more updates (this requires that a router
    must continue using the same next hop unless its
    distance changes!)
  • Therefore, DBF stops.

8
Looping in DBF
X
0, j
9
Looping in DBF
10
Looping in DBF
Erroneous paths persist as long as they appear to
be the shortest paths. Similar looping could
occur if the cost of the links to j increased
drastically (e.g., to 20). DBF cannot be used
with link costs that have a large variance!
etc
11
Examples of DBF Use
  • First routing protocol of the ARPANET.
  • Routing protocol of MERIT network.
  • DARPA packet radio network.
  • Routing Information Protocol (RIP)
  • RIPv2
  • Ciscos IGRP (DBF with split horizon, poison
    reverse, hold downs, and a complex link-cost
    metric).

12
Termination Detection Using Sequence Numbers
  • Examples using link-state information are the
    traditional link-state routing protocols
  • OSPF, IS-IS, new ARPANET routing protocol.
  • Examples using distance information
  • DSDV (Destination Sequenced Distance Vector
    protocol, ACM SIGCOMM 94).
  • AODV (Ad-hoc On Demand Distance Vector protocol,
    IETF Draft).

13
Termination Detection Using Sequence Numbers
  • Approach
  • An update source is defined
  • Source of update increments sequence number with
    each update it originates.
  • Update is flooded reliably throughout the
    network.
  • A node trusts an update it receives if it has a
    higher sequence number than the nodes local
    copy.
  • Mechanisms needed to account for node faults and
    network partitions.

14
Traditional Link-State Algorithm (LSA)
  • Developed as a result of DBFs looping and
    non-termination problems.
  • Two components
  • Topology map distribution
  • Local shortest path computation
  • Each router runs a local shortest-path algorithm
    (Dijkstras) using the topology stored locally.
  • Flooding is used to replicate the topology map at
    every router.
  • Each router is responsible for reporting the
    state of outgoing links to the rest of the
    network.
  • Two link-state updates per link reach every
    router.

15
Shortest-Path First (SPF) Algorithm
Step 1 Initialize Set SPF root , where
root is router running SPF Distance to root 0
and distance to other node cost of link or
infinity Step 2 Find next node for SPF
set Find a node x not in SPF set such
that distance to/from root
Mindistance to node outside of SPF set Augment
SPF set with x Stop if SPF set contains all
nodes Step 3 Change minimum distance For each
node y outside SPF set do dist. to y Min
dist. to y, dist. to z in SPF cost of (z, y)
Repeat Step 2
16
SPF Example
SPF S
17
SPF Example
SPF S, A
18
SPF Example
SPF S, A, B
3
19
SPF Example
SPF S, A, B, D
Labels do not change as we continue to expand SPF
set
SPF S, A, B, D, C SPF S, A, B, D, C, E
Stop after covering E since all nodes are
covered by SPF set.
  • Note that iteration is on the next node that
    can be covered with the next shortest path hence
    complete topology must be known by router.

20
Flooding of Link States
  • Information Stored at Routers
  • Each router maintains all the nodes and all the
    links in the network in a topology graph.
  • Each link in the graph has a cost, a sequence
    number, and an age.
  • Information Exchanged
  • Each router is responsible for communicating the
    latest state of each adjacent outgoing link.
  • The router sends a link state update (LSU) to
    report changes on an adjacent outgoing link.
  • A sequence number is used to identify the latest
    LSU.
  • An LSU also specified the age of the LSU, and the
    age of an LSU is decremented each time it is
    forwarded and while it is in storage.
  • We assume that LSUs are exchanged reliably
    between any two routers and that a router knows
    who its neighbors are!

21
Link-State Flooding Example
A
C
10
1
2
2
E
2
10
S
2
5
B
D
1
22
Link-State Flooding Example
C
10
A
Each link has a cost in each direction.
2
1
2
E
2
10
S
2
5
D
B
1
23
Link-State Flooding Example
C
10
A
Node S is responsible for reporting changes in
the state of its outgoing links
2
1
2
E
2
10
S
2
7
D
B
1
24
Link-State Flooding Example
LSU l(S,B) 7 SN 1 AGE max
25
Link-State Flooding Example
LSU l(S,B) 7 SN 1 AGE max - 1
LSU l(S,B) 7 SN 1 AGE max - 1
26
Link-State Flooding Example
LSU l(S,B) 7 SN 1 AGE max - 2
LSU l(S,B) 7 SN 1 AGE max - 2
27
Link-State Flooding Example
LSU l(S,B) 7 SN 1 AGE max - 3
28
Flooding of LSUs
  • Rule 1 Deleting old LSUs
  • A router discards an LSU in its topology graph
    when it reaches a maximum age.
  • A router transmits periodically an LSU for each
    of its outgoing links, and assigns a 0 age and
    the highest sequence number to the LSU.
  • The router originating an LSU is the only one
    that can change the sequence number of the LSU.

29
Flooding of LSUs
  • Rule 2 Propagating LSUs
  • A router that receives a more recent LSU with a
    valid age from a given neighbor propagates it to
    all its other neighbors.
  • A router that receives an outdated LSU from a
    neighbor discards the LSU received and sends its
    more recent LSU to the neighbor (this corrects
    the neighbor).
  • A router that receives a more recent LSU with a
    zero age propagates the LSU to all its other
    neighbors if the link is in its topology graph
    and deletes the link from its topology graph
    else, it ignores the LSU.

30
Flooding of LSUs
  • Rule 3 Handling Topology Changes
  • A router that detects a new neighbor sends its
    topology graph to that neighbor.
  • A router that hears a more recent LSU from a
    neighbor for one of its outgoing links creates a
    new LSU with a higher sequence number and sends
    it to all its neighbors.

31
Flooding of LSUs
  • The distributed computation consists of
    disseminating the latest state of each link to
    every node in the network reliably in the
    presence of topology changes.
  • The local computation (computing shortest paths)
    is simple.

32
Need for Link-State Resets
Assume all nodes have SN 100 for link (S,A).
SN (S,A) 100
SN (S,A) 100
A
C
10
1
2
SN (S,A) 100
2
E
2
10
S
SN (S,A) 100
2
5
B
D
1
SN (S,A) 100
SN (S,A) 100
33
Need for Link-State Resets
E reboots and resets its SN for all its outgoing
links. Now SN (S,A) 1 at S!
SN (S,A) 100
A
C
10
1
2
2
E
2
10
S
2
5
B
D
1
SN (S,A) 100
34
Need for Link-State Resets
(S,A) changes to 10 and S sends an LSU
SN (S,A) 100
A
C
10
1
2
2
E
LSU l(S,A) 10 SN 1 AGE max
2
10
S
2
5
B
D
1
SN (S,A) 100
35
Need for Link-State Resets
A and B cannot trust the LSU from S!
SN (S,A) 100
A
C
10
1
2
2
E
2
10
S
SN (S,A) 1
2
5
B
D
1
SN (S,A) 100
36
Need for Link-State Resets
However, they send a correcting LSU to S with the
higher SN.
SN (S,A) 100
A
C
10
1
2
2
E
2
10
S
2
5
LSUs from A, B l(S,A) 1 SN 100 AGE value
B
D
1
SN (S,A) 100
37
Need for Link-State Resets
S can now send an LSU for (S,A) that all nodes
can trust.
SN (S,A) 100
A
C
10
1
2
2
E
2
LSU l(S,A) 10 SN 101 AGE max
10
S
2
5
B
D
1
SN (S,A) 100
Source of LSUs is reset to higher SN value
38
Need for Link-State Resets
Assume all nodes have SN 100 for link (S,A) and
the max SN is 101.
SN (S,A) 100
SN (S,A) 100
A
C
10
1
2
SN (S,A) 100
2
E
2
10
S
SN (S,A) 100
2
5
B
D
1
SN (S,A) 100
SN (S,A) 100
How can S recycle SNs?
39
Need for Link-State Resets
Simple! Erase higher SNs using the age field.
SN (S,A) 100
SN (S,A) 100
A
C
10
1
2
2
E
2
10
S
SN (S,A) 100
2
5
B
D
1
SN (S,A) 100
SN (S,A) 100
40
Need for Link-State Resets
SN (S,A) 100
SN (S,A) 100
A
C
10
1
2
2
E
LSU l(S,B) 5 SN 101 AGE 0
2
10
S
SN (S,A) 100
2
5
B
D
1
SN (S,A) 100
SN (S,A) 100
41
Need for Link-State Resets
LSU l(S,B) 5 SN 101 AGE 0
SN (S,A) 100
A
C
10
1
2
2
E
2
10
S
SN (S,A) 100
2
5
B
D
LSU l(S,B) 5 SN 101 AGE 0
1
SN (S,A) 100
42
Need for Link-State Resets
LSU l(S,B) 5 SN 101 AGE 0
A
C
10
1
2
2
E
2
10
S
SN (S,A) 100
2
5
B
D
LSU l(S,B) 5 SN 101 AGE 0
1
43
Need for Link-State Resets
Record of a link state is reset at every node
other than the source.
A
C
10
1
2
2
E
2
10
S
2
LSU l(S,B) 5 SN 101 AGE 0
5
B
D
1
All nodes but S have erased their records of
(S,A) and can start accepting LSUs with SN 1 for
link (S,A).
44
Correctness of LSA
  • The fact that LSA works correctly is intuitive.
  • The correctness of LSA is easily shown by
    induction on the number of hops away from the
    origin of an LSU
  • Assume that local shortest-path algorithm is
    correct assume that neighbors exchange LSUs
    reliably without deadlocks assume that topology
    remains static after an arbitrary sequence of
    changes.
  • Argue that each LSU propagates independently of
    others focus on one LSU and show that it
    propagates to the farthest node in the network.
  • Show that nodes that fail and come back up, or
    components that reconnect, eliminate old LSUs by
    means of Rule 3.

45
Distance Flooding
  • Basic approach consists of adding sequence
    numbers to DBF.
  • Starting with 0, source increments sequence
    number for itself in each update it originates.
  • Nodes propagate distance to source of sequence
    number using the Bellman-Ford equation, with the
    constraint imposed by the sequence number
  • A distance to a destination reported by a
    neighbor is valid only if the sequence number is
    larger than the sequence number locally stored
    for the destination.

46
Distance Flooding
  • Information maintained at each router
  • Distance Table Distance to each destination
    reported by each neighbor
  • Link-Cost Table Cost of link to each adjacent
    node
  • Routing Table Distance and successor (next hop)
    to each destination, and latest sequence number
    accepted for the destination.
  • Information exchanged among routers
  • Vector of one or more entries, each entry stating
    the distance to a destination and its sequence
    number.
  • Services assumed
  • Update messages are exchanged reliably, a node
    knows who its neighbors are

47
Distance Flooding Example
0
48
Distance Flooding Example
D0, SN 1
0
49
Distance Flooding Example
1
D1, SN 1
0
D5, SN 1
5
50
Distance Flooding Example
7
1
D7, SN 1
0
D6, SN 1
D3, SN 1
3
6
51
Distance Flooding Example
5
1
D5, SN 1
8
D8, SN 1
0
D4, SN 1
3
4
52
Distance Flooding Example
5
1
6
D6, SN 1
0
3
4
53
Distance Flooding
  • How should faults be handled?
  • In much the same way as with link-state flooding
    algorithms
  • Sources transmit updates periodically.
  • Nodes delete stale information when it reaches a
    maximum age.
  • Updates carry an age field that is decremented on
    each hop and while in memory.
  • A node accepts a finite distance to a destination
    only if the sequence number for it is valid
    (larger than the previous sequence number).

54
Handling Faults in Distance Flooding
5
1
6
D6, SN 1
0
3
4
55
Handling Faults in Distance Flooding
5
1
Safe approach Force source to flood distance
again!
A
C
10
1
2
2
E
2
10
S
6
Doo, SN 2
0
5
B
D
1
3
4
56
Handling Faults in Distance Flooding
1
A
C
10
Doo, SN2
1
2
2
E
2
10
S
0
5
B
D
Doo, SN2
1
3
57
Handling Faults in Distance Flooding
A
C
10
Doo, SN 2
SN 2
1
2
2
E
2
10
S
SN 2
0
5
B
D
SN 2
1
Doo, SN 2
58
Handling Faults in Distance Flooding
A
C
10
SN 2
SN 2
1
2
2
E
2
10
S
D0, SN 3
SN 2
0
0
5
B
D
SN 2
SN 2
1
Once S receives at least one update with SN 2,
it floods the network again
59
Limitation of Approaches based on Sequence
Numbering
  • Approaches based solely on sequence numbers incur
    substantial communication and processing
    overhead (to flood link states or distances).
  • Distance flooding is much more expensive than
    link-state flooding it provides instantaneous
    loop freedom.
Write a Comment
User Comments (0)
About PowerShow.com