Network Routing - PowerPoint PPT Presentation

1 / 54
About This Presentation
Title:

Network Routing

Description:

When the link between C and D fails, C will set its distance to D as ... if A is using B as next hop to D and A discovers that the link AB is broken ... – PowerPoint PPT presentation

Number of Views:34
Avg rating:3.0/5.0
Slides: 55
Provided by: yangrich
Category:
Tags: link | network | news | odd | routing

less

Transcript and Presenter's Notes

Title: Network Routing


1
Network Routing
  • Y. Richard Yang
  • 2/19/2009

DSDV revised on 2/23/2009
2
Admin
  • Each group please talk to me and the TA by Friday
    next week about potential project

3
Recap Network Layer Services
  • Transport packets from source to dest
  • Network layer protocol in every host, router
  • Major components
  • Control plane
  • addressing scheme is crucial for usability,
    mobility
  • compute routing from sources to destinations
  • Data plane forwarding
  • move packets from input interface to appropriate
    output interface(s)

4
Recap Key Problems
  • Location management
  • Routing with lossy and dynamic wireless
  • Broadcast wireless channels

5
Outline
  • Admin and recap
  • Routing with lossy and dynamic links

6
Routing Overview
  • The problem of routing is to find a good path for
    each source destination pair
  • A typical measure for a good path is that it is
    the shortest path according to some metric

7
Link Metric
  • One possibility is to assign each link a metric
    of 1 (hop-count based routing)
  • problems
  • maximizes the distance traveled by each hop
  • low signal strength -gt high loss ratio
  • uses a higher TxPower -gt interference
  • different links have different qualities

8
Performance of Shortest Hop Count
9
Example Metric ETX
  • ETX The predicted number of data transmissions
    required to successfully transmit a packet over a
    link
  • the ETX of a path is the sum of the ETX values of
    the links over that path
  • Examples
  • ETX of a 3-hop route with perfect links is 3
  • ETX of a 1-hop route with 50 loss is 2

A High-Throughput Path Metric for Multi-Hop
Wireless Routing by D. De Couto, D. Aguayo, J.
Bicket, R. Morris. Mibicom 2003.
http//meraki.com/about/
10
Acquiring ETX
  • Measured by broadcasting dedicated link probe
    packets with an average period t (jittered by
    0.1t)
  • Delivery ratio
  • count(t-w,t) is the of probes received during
    window w
  • w/t is the of probes that should have been
    received

11
ETX Example
12
ETX Advantage
  • Tends to minimize spectrum use, which can
    maximize overall system capacity (reduce power
    too)
  • each node spends less time retransmitting data
  • ETX has problems and is not the only link
    metric.
  • We will revisit link metrics next class.

13
Outline
  • Admin and recap
  • Routing
  • overview
  • computing shortest path routing

14
Link-State Routing Algorithms
  • Separation of topology distribution from route
    computation
  • Used in OSPF, the dominant intradomain routing
    protocol used in the Internet
  • Net topology, link costs are distributed to all
    nodes
  • Link state distribution accomplished via link
    state broadcast
  • Each node (locally) computes its paths to all
    destinations

15
Link State Broadcast
represents a node that has received update
represents link
16
Link State Broadcast
S
E
F
B
C
M
L
J
A
G
H
D
K
I
N
17
Link State Broadcast
S
E
F
B
C
M
L
J
A
G
H
D
K
I
N
To avoid forwarding the same update multiple
times, each update has a sequence number. If an
arrived update does not have a higher seq,
discard! - The packet received by E from C is
discarded - The packet received by C from E is
discarded as well - Node H receives packet from
two neighbors, and will discard one of them
18
Summary of Link State Routing
  • Separation of topology distribution from route
    computation
  • Whenever a link metric changes, the node
    broadcasts new value
  • Q What is the scope of updates when a link
    changes status?
  • Q Does link state routing work well in a network
    with dynamic link status?

19
Distance Vector Routing Algorithm
  • Based on the Bellman-Ford algorithm
  • at node X, the distance (or any additive link
    quality metric) to Y is updated by
  • where dX(Y) is the current distance at node X
    from X to Y, N(X) is the set of the neighbors of
    X, and d(X, Z) is the distance of the direct link
    from X to Z
  • Implemented in the RIP routing protocol and some
    wireless mesh networks

20
Distance Table Example
Below is just one step! The algorithm repeats for
ever!
distance tables from neighbors
computation
Es distance, forwarding table
distance table E sends to its neighbors
E
d () A B C D
A 0 7 ? ? 1 d(E,A)
B 7 0 1 ? 8 d(E,B)
A 1 8 ? ?
D ? ? 2 0 2 d(E,D)
B 15 8 9 ?
A 1 B 8 C 4 D 2 E 0
D ? ? 4 2
1, A 8, B 4, D 2, D
destinations
21
Distance Vector in the Presence of Topology
Dynamics
  • Good news propagate fast

Link AB is up
22
Distance Vector in the Presence of Topology
Dynamics
  • Bad news propagate slowly the count-to-infinity
    problem

Link AB is downor cost increasessubstantially
23
The Reverse-Poison (Split-horizon) Hack
If the path to a dest is through neighbor h,
report ? to neighbor h for dest.
Es distance, forwarding table
distance tables from neighbors
computation
distance table E sends to its neighbors
E
d () A B C D
A 0 7 ? ? 1 d(E,A)
B 7 0 1 ? 8 d(E,B)
D ? ? 2 0 2 d(E,D)
A 1 8 ? ?
B 15 8 9 ?
D ? ? 4 2
1, A 8, B 4, D 2, D
destinations
distance
through neighbor
24
An Example Where Split-Horizon Fails
  • When the link between C and D fails, C will set
    its distance to D as ?
  • However, unfortunate timing can cause problem
  • A receives a new update (?) from C, then a
    previous update from B (when B thought C was
    good) arrives then A will use B to go to D
  • A sends the good news to C
  • C sends the good news to B

25
Destination-sequenced distance vector protocol
(DSDV)
  • There are optimizations but we present the base
    protocol
  • Only handle the case when link is broken
  • Lets assume the destination node is D
  • Basic idea
  • DSDV tags each route with a sequence number
  • Each destination node D periodically advertises
    monotonically increasing even sequence numbers
  • When a node realizes that the link that it uses
    to reach destination D is broken, the node
    increases the sequence number for D to be one
    greater than the previous one (odd number).

26
DSDV Details
  • Periodical and triggered updates
  • periodically D increases its seq SD by 2 and
    broadcasts with (SD, 0)
  • if A is using B as next hop to D and A discovers
    that the link AB is broken
  • A increases its sequence number SA by 1 (odd)
  • sets dA to ?, and
  • sends (SA, dA) to all neighbors

27
DSDV Details
  • Update after receiving a message
  • Assume B sends to A the information (SB, dB),
    where SB is the sequence number at B for
    destination D and dB is the distance from B to D
    when A receives (SB, dB)
  • if SB gt SA, then // higher seq, always
    update
  • SA SB
  • if (dB ?) dA ? else dA dB d(A,B)
  • else if SA SB, then // conditional update
  • if dA gt dB d(A,B) dA dB d(A,B) and
    uses B as next hop

28
DSDV
H
F
E
A
G
C
D
B
29
Claim DSDV Does Not Form Loop
  • Proof technique proof by induction and
    contradiction
  • assume initially no loop (no one has next hop so
    no loop)
  • derive contradiction by assuming that we have a
    loop when we add a new link, e.g., when A decides
    to use B as next hop

update
30
Protocol Analysis by Invariants
  • This is a very effective method in understanding
    distributed asynchronous protocols
  • Invariants are defined over the states of the
    distributed nodes
  • Consider any node A
  • What is the state of node A?
  • (SA, dA)

31
Consider a Single Node A
  • What properties do you observe about the state of
    node A, i.e. (SA, dA)?
  • SA is non-decreasing
  • dA is non-increasing for the same sequence
    number

32
Invariants
  • For any node
  • sequence number is non-decreasing
  • for the same sequence number,distance is
    non-increasing
  • For a pair of nodes, if A (according to local
    state) considers B as next hop to destination D
  • SB gt SA (B updates seq after sends update)
  • SB SA
  • implies dB lt dA if link cost is not zero

33
Loop Freedom of DSDV
update
  • Proof by contradiction
  • Consider a critical moment
  • A considers B as next hop and forms a loop
  • If any link in the loop (X considers Y as next
    hop) satisfies SY gt SX
  • by transition along the loop SB gt SB
  • If all nodes along the loop have the same
    sequence number
  • by transition along the loop dB gt dB

X
Y
34
Discussion of DSDV
  • Q what is the scope of updates when a link
    changes status?

35
Link Reversal Algorithms
36
Motivation
  • Link reversal algorithms
  • maintain a mesh
  • (hopefully) local adaptation

37
Links and DAG
A
F
B
Links are bi-directional But algorithm
imposes logical directions on them
C
E
G
Maintain a directed acyclic graph (DAG) for
each destination, with the destination being the
only sink This DAG is for destination node D
D
38
Link Reversal Algorithm Illustration of Idea
A
F
B
C
E
G
Link (G,D) broke
D
Any node, other than the destination, that has no
outgoing links reverses some incoming
links. Node G has no outgoing links
39
Link Reversal Algorithm Illustration
A
F
B
C
E
G
Represents a link that was reversed recently
D
Now nodes E and F have no outgoing links, the
process continues.
40
Link Reversal Algorithm Illustration
A
F
B
C
E
G
Represents a link that was reversed recently
D
Now nodes B and G have no outgoing links
41
Link Reversal Algorithm Illustration
A
F
B
C
E
G
Represents a link that was reversed recently
D
Now nodes A and F have no outgoing links
42
Link Reversal Algorithm Illustration
A
F
B
C
E
G
Represents a link that was reversed recently
D
Now all nodes (other than destination D) have an
outgoing link
43
Link Reversal Algorithm Illustration
A
F
B
C
E
G
D
DAG has been restored with only the destination
as a sink
44
Link Reversal
  • Remaining questions
  • how to implement it?
  • will reversal stop?
  • Next we will look into the issues using partial
    reversal (not full reversal, as the preceding
    example)

45
Link Direction Through Heights
  • A node i contains a triple (?i, ?i, i)
  • ?i an integer (the major integer)
  • ?i another integer (the minor integer)
  • i node index (to impose a total order)
  • The triple of a node is called the height of the
    node
  • Suppose there is a link from node i to node j,
    the direction is determined by their heights
  • i -gt j if (?i, ?i, i) gt (?j, ?j, j)
  • For destination D, the height is (0, 0, D)

46
Illustration of Heights
47
Partial Reversal Algorithm
  • If the height of node i is lower than all of its
    neighbors, i.e., (?i, ?i, i) lt (?j, ?j, j) for
    all j in Ni,
  • Increases ?i to
  • where Ni is the neighbors of i.
  • Set ?i to
  • if there exists a neighbor j with the same ?
    value after i has increased its ? otherwise ?i
    not changed

48
Illustration
min ? of allneighbors withnew ?
min ? of all neighbors
49
Example
(0,4,1)
(0,3,2)
(0,2,3)
(0,5,4)
(0,1,6)
(0,2,5)
Destination (0,0,0)
50
Example Link from 6 to 0 is down
(0,4,1)
(0,3,2)
(0,2,3)
(0,5,4)
(0,1,6)
(0,2,5)
Destination (0,0,0)
51
Example After Node 6 Reverses
(0,4,1)
(0,3,2)
(0,2,3)
(0,5,4)
(1,1,6)
(0,2,5)
1 min0,01
Destination (0,0,0)
52
Example After Nodes 3 and 5 Reverse
1 min0,11 0 min1-1
(0,4,1)
(0,3,2)
(1,0,3)
(0,5,4)
(1,1,6)
(1,0,5)
Destination (0,0,0)
53
Example After Nodes 2 Reverses
(0,4,1)
(1,-1,2)
(1,0,3)
(0,5,4)
(1,1,6)
(1,0,5)
Destination (0,0,0)
54
Example After Nodes 1 Reverses
(1,-2,1)
(1,-1,2)
(1,0,3)
(0,5,4)
(1,1,6)
(1,0,5)
Destination (0,0,0)
Write a Comment
User Comments (0)
About PowerShow.com