wireless internet routing · 2013-06-17 · bellman-ford equation (dynamic programming) define d x...

110
Wireless Internet Routing Wireless Routing in the Beginning 1

Upload: others

Post on 22-May-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Wireless Internet Routing

Wireless Routing in the Beginning

1

Page 2: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Wireless Internet Routing

Today: routing in MANET/ad hoc networks and mesh networks o Deployed as access networks (and sensor network

deployments) or wireless backhaul

o Internet? = Gateway(s) wireless/wired

2

Page 3: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Outline

Review of last time

Wired routing algorithms: why are they not usable in wireless scenarios

In the beginning: (unicast) routing for MANET o Proactive vs on-demand

o DSR, AODV, DSDV

3

Page 4: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Review: Single-Hop Wireless Networks

Cellular networks:

GSM, 3G, 4G (IP based)

Wireless LAN

PAN/BAN (Bluetooth)

Generally infrastructure based (access point or base station),

not much (wireless) routing necessary

4

network infrastructure

PAN: personal area network / BAN: body area network

Page 5: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Review: Mesh Networks with Internet Access

AP

AP AP

AP

AP

Internet

5

Internet

Wireless infrastructure (backbone) o Static backbone

Gateways to the Internet o Eg: Freifunk, Seattle Wireless

Clients connects to AP o Transparent wireless network

o Mobility, roaming

Page 6: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Review: Multi-Hop Wireless Networks

6

No infrastructure: ad-hoc network o MANET: Mobile Ad Hoc Networks

o Sensor networks

o VANET

Origins: packet radio networks (1978, “Advances in packet radio technology”)

Nodes: transmit, receive, forward

Nodes can be mobile

Wireless routing becomes necessary

Page 7: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Review: Wireless Physical Layer and its effect on the upper layers

Unlike a wired connection!

Characteristics o Time-varying channel: propagation, connectivity and available

capacity

o Shared medium: interference, collisions

Consequences for the upper layers: links exhibit o Time-varying behavior: connectivity, rate, delay

o Low reliability: packets are lost (typical 10^-2 PER)

o Smaller bandwidth than wired counterpart (10 to 100 Mbit/s)

o Asymmetric / bidirectional and unidirectional links

7

Page 8: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Review: Time-Varying Environment

8

Connectivity is not a unit-disc

Received power is time-varying

Variable packet loss

Page 9: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Review: What is Routing

Control Plane:

Topology discovery o Neighborhood discovery

Route discovery and maintenance o Fault recovery

Data Plane:

Forwarding

9

Page 10: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Challenges of Wireless Routing

Routing in a wireless network = routing in a network with: o Links: unreliable, asymmetric, time-varying

o Dynamic topology

o Potentially high time variability

10

Page 11: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Routing in Wireless Networks: Disclaimer!

There is not a unique solution! o No one size fits all

Lots of different algorithms and proposals o Different design goals and objectives

o Mesh: maximizes throughput

o Sensor network: maximizes battery life or minimize delay (fire detection)

11

Page 12: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Wired Routing Recipes

Distance vector algorithms (e.g. RIP) o Decentralized information o Router knows physically-connected neighbors, link costs to

neighbors o Iterative process of computation, exchange of info with

neighbors

Link-state algorithms (e.g. OSPF) o Global information

o All routers have complete topology, link cost info

12

Page 13: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

A Distance Vector Routing Algorithm

Decentralized algorithm:

Router knows its neighbors and link costs to neighbors

Iterative computation, exchange of info with neighbors

Bellman-Ford Equation (dynamic programming)

Define dx(y) := cost of least-cost path from x to y

Then

Dx(y) = min {c(x,v) + Dv(y)}

where min is taken over all neighbors v of x Calculate direction and distance to any link in a

network 13

v

Page 14: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Distance Vector Algorithm

Iterative, asynchronous: Each local iteration caused

by: o Local link cost change o DV update message from

neighbor Distributed: Each node notifies

neighbors only when its Distance Vector changes o Neighbors then notify

their neighbors if necessary

o Region not concerned by topology change are not affected

14

wait for (change in local link

cost of msg from neighbor)

recompute estimates

if Distance Vector to any

dest has changed, notify

neighbors

Each node:

Page 15: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

A Link-State Routing Algorithm

Net topology, link costs known to all nodes o Accomplished via “link state broadcast” o All nodes have same info

Computes least cost paths from one node („source”) to all other nodes o Gives routing table for that node

Example:

Dijkstra‟s algorithm o Iterative: after k iterations, know least cost path to k dest.‟s

15

Page 16: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Link State Routing

Each node periodically floods status of its links

Each node re-broadcasts link state information

received from its neighbor

Each node keeps track of link state information received from other nodes

Each node uses above information to determine next hop to each destination

16

Page 18: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Distance Vector and Link State in Wireless Networks

Link state o Fully network topology must be distributed throughout the

network

o Can lead to short terms loop

o OSPF elected router to solve distribution issues

Not practical in wireless: mobility induces lots of topology changes, need to flood information throughout the network

Distance vector o Monitor neighbors and outgoing links

o Periodically broadcast shortest distance table to every neighbors

Not practical in wireless: periodic update wastes bandwidth/power, links/connectivity time-varying, solutions to prevent loops are

not directly applicable

Routing principles ≠ Implementation

18

Page 19: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Distance Vector Example

Symmetric links, link cost = 1

A, B… E are addresses

Local knowledge

19

A B

D E

C

Example borrowed from “Routing in the Internet”, Huitema, 1995

1 2

3 4 5

6

Page 20: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Cold Start

Tx: DV(A): A=0 [1,3]

20

A B

D E

C 1 2

3 4 5

6

From A to Link Cost

A Local 0

From B to Link Cost

B Local 0

Page 21: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Update at B and D

Tx: DV(B): B=0, A=1 [1,2,4]

Tx: DV(D): D=0, A=1 [3,6] 21

A B

D E

C 1 2

3 4 5

6

From A to Link Cost

A Local 0

From B to Link Cost

B Local 0

A 1 1

From D to Link Cost

D Local 0

A 3 1

Page 22: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Message from B Received First

Rx: DV(B): B=0, A=1

Rx: DV(D): D=0, A=1 22

A B

D E

C 1 2

3 4 5

6

From A to Link Cost

A Local 0

B 1 1

D 3 1

From C to Link Cost

C Local 0

B 2 1

A 2 1

From E to Link Cost

E Local 0

B 4 1

A 4 2

Page 23: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

E Receives Message From D

23

A B

D E

C 1 2

3 4 5

6

Rx: DV(D): D=0, A=1

Tx: DV(A): A=0,B=1,D=1 [1,3]

Tx: DV(C): C=0, B=1, A=2 [2,5]

Tx: DV(E): E=0,B=1,A=2,D=1 [4,5,6]

From E to Link Cost

E Local 0

B 4 1

A 4 2

D 6 1

No update of the entry for A

Page 24: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Routing Tables at B,D and E are Updated

24

A B

D E

C 1 2

3 4 5

6

From D to Link Cost

D Local 0

A 3 1

B 3 2

E 6 1

From B to Link Cost

B Local 0

A 1 1

D 1 2

C 2 1

E 4 1

From E to Link Cost

E Local 0

B 4 1

A 4 2

D 6 1

C 5 1

Page 25: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

And New DVs are Sent

25

A B

D E

C 1 2

3 4 5

6

DV(B): B=0,A=1,D=2, C=2, E=1 [1,3,4]

DV(D): D=0, A=1, B=2, E=1 [3,6]

DV(E): E=0,B=1,A=2,D=1,C=1 [4,5,6]

Page 26: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Routing Tables at A,C and D are Updated

26

A B

D E

C 1 2

3 4 5

6

From C to Link Cost

C Local 0

B 2 1

A 2 2

E 5 1

D 5 2 From A to Link Cost

A Local 0

B 1 1

D 3 1

C 1 2

E 1 2

From D to Link Cost

D Local 0

A 3 1

B 3 2

E 6 1

C 6 2 No more update necessary

Page 27: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

From B to Link Cost

B Local 0

A 1 Inf

D 1 Inf

C 2 1

E 4 1

If Link 1 Breaks?

27

A B

D E

C 1 2

3 4 5

6

Update at A and B: inf for all routes through link 1

Tx: DV(A) … [3]

Tx: DV(B) … [4,2]

Low convergence time

From A to Link Cost

A Local 0

B 1 Inf

D 3 1

C 1 Inf

E 1 Inf

Page 28: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Distance Vector Issues: Temporary Loop

Cost(5)=10

Link 2 breaks

28

D E

C 1 2

3 4 5 (Cost 10)

6

From X to C Link Cost

A 1 2

B 2 1

C Local 0

D 3 3

E 4 2

A B

Page 29: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Distance Vector Issues: Temporary Loop

29

D E

C 1 2

3 4 5 (Cost 10)

6

A B

From X to C Link Cost

A 1 2

B 2 Inf

C Local 0

D 3 3

E 4 2

B notices failure A sends DV refresh before B:

DV(A) A=0,B=1,C=2,D=1,E=2 B sends DV update

DV(B) A=1,B=0,C=3,D=2,E=1 Temp. loop A-B to C

From X to C Link Cost

A 1 4

B 1 3

C Local 0

D 3 3

E 4 4

Page 30: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Split Horizon and Poisonous Reverse

30

A B

D E

C 1 2

3 4 5

6

Split horizon: if A to X through B, then B should not try to reach X through A o A does not announce route to X to B

With poisonous reverse: A announces route but set cost to Inf

Does not prevent all loops

Page 31: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Summary: Problems of conventional routing algorithms in wireless networks

(RIP, OSPF) are not designed for dynamic topologies

Links are asymmetric, many links available

Topology is dynamic

Periodic information (route,topology) update or dump broadcast o Bandwidth

o Power

31

Page 32: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Early Design of Wireless Routing Protocols: Some Assumptions

Fully symmetric environment: all nodes/stations have identical capabilities and responsibilities

Nodes don‟t sleep

Energy consumption is not an issue

ID or IP address assignment has been performed

Unicast

32

Page 33: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Route Discovery and Maintenance (control plane): Proactive vs Reactive

Proactive protocols o Determine routes independent of traffic pattern

o Traditional link-state and distance-vector routing protocols are proactive

Reactive protocols (on demand) o Maintain routes only if needed

Hybrid protocols

33

Page 34: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Reactive vs Proactive: Trade-Off

Latency of route discovery o Proactive protocols may have lower latency since routes are

maintained at all times o Reactive protocols may have higher latency because a route

from X to Y will be found only when X attempts to send to Y

Overhead of route discovery/maintenance o Reactive protocols may have lower overhead since routes are

determined only if needed o Proactive protocols can (but not necessarily) result in higher

overhead due to continuous route updating

Which approach achieves a better trade-off depends on the traffic and mobility patterns

34

Page 35: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Taxonomy of Routing Protocols for Wireless Networks

Response time, bandwidth

Energy

(Mobile) ad hoc networks mesh networks Sensor networks

Proactive protocols

Reactive protocols

Destination-Sequenced Distance-Vector (DSDV)

Optimized Link- State Routing (OLSR)

Ad Hoc On-Demand Distance-Vector (AODV)

Dynamic Source Routing (DSR)

Geography- based routing

Cluster-based (or hierarchical) routing

35

Page 36: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Flooding

The wireless channel is a broadcast medium after all

36

Page 37: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Flooding for Data Delivery

Sender S broadcasts data packet P to all its neighbors

Each node receiving P forwards P to its neighbors

Sequence numbers: to avoid the possibility of forwarding the same packet more than once

Packet P reaches destination D provided that D is reachable from sender S

Node D does not forward the packet

37

Page 38: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Flooding for Data Delivery

38

B

A

S E

F

H

J

D

C

G

I K

Represents that connected nodes are within each other‟s transmission range

Z

Y

Represents a node that has received packet P

M

N

L

Page 39: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Flooding for Data Delivery

39

B

A

S E

F

H

J

D

C

G

I K

Represents transmission of packet P

Represents a node that receives packet P for the first time

Z

Y Broadcast transmission

M

N

L

Page 40: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Flooding for Data Delivery

40

B

A

S E

F

H

J

D

C

G

I K

Node H receives packet P from two neighbors: potential for collision

Z

Y

M

N

L

Page 41: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Flooding for Data Delivery

41

B

A

S E

F

H

J

D

C

G

I K

Node C receives packet P from G and H, but does not forward it again, because node C has already forwarded packet P once

Z

Y

M

N

L

Page 42: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Flooding for Data Delivery

42

B

A

S E

F

H

J

D

C

G

I K

Z

Y

M

Nodes J and K both broadcast packet P to node D Since nodes J and K are hidden from each other, their transmissions may collide => Packet P may not be delivered to node D at all, despite the use of flooding

N

L

Page 43: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Flooding for Data Delivery

43

B

A

S E

F

H

J

D

C

G

I K

Z

Y

Node D does not forward packet P, because node D is the intended destination of packet P

M

N

L

Page 44: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Flooding for Data Delivery

44

B

A

S E

F

H

J

D

C

G

I K

Flooding completed Nodes unreachable from S do not receive packet P (e.g., node Z) Nodes for which all paths from S go through the destination D also do not receive packet P (example: node N)

Z

Y

M

N

L

Page 45: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Flooding for Data Delivery

45

B

A

S E

F

H

J

D

C

G

I K

Flooding may deliver packets to too many nodes (in the worst case, all nodes reachable from sender may receive the packet)

Z

Y

M

N

L

Page 46: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Flooding for Data Delivery: Advantages

Simplicity

May be more efficient than other protocols when rate of information transmission is low enough that the overhead of explicit route discovery/maintenance incurred by other protocols is relatively higher o This scenario may occur, for instance, when nodes transmit small

data packets relatively infrequently, and many topology changes occur between consecutive packet transmissions

Potentially higher reliability of data delivery o Because packets may be delivered to the destination on multiple

paths o (we will talk about it later)

46

Page 47: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Flooding for Data Delivery: Disadvantages

Potentially, very high overhead

o Data packets may be delivered to too many nodes who do not need to receive them

Potentially lower reliability of data delivery

o Flooding uses broadcasting -- hard to implement reliable broadcast delivery without significantly increasing overhead

o Broadcasting in IEEE 802.11 MAC is unreliable o In our example, nodes J and K may transmit to node D

simultaneously, resulting in loss of the packet o In this case, destination would not receive the packet

at all

47

Page 48: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Flooding of Control Packets

Many protocols perform (potentially limited) flooding of control packets, instead of data packets

The control packets are used to discover routes

Discovered routes are subsequently used to send data packet(s)

Overhead of control packet flooding is amortized over data packets transmitted between consecutive control packet floods

48

Page 49: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Summary: Flooding

Flooding is used in many protocols, such as Dynamic Source Routing (DSR)

Problems associated with flooding o Collisions

o Redundancy

Collisions may be reduced by “jittering” (waiting for a random interval before propagating the flood)

Redundancy may be reduced by selectively re-broadcasting packets from only a subset of the nodes

49

Page 50: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

DSR: Dynamic Source Routing

RFC 4728: http://tools.ietf.org/html/rfc4728

David B. Johnson. Routing in Ad Hoc Networks of Mobile Hosts. Proceedings of the Workshop on Mobile Computing Systems and Applications, pp. 158-163, IEEE Computer Society, Santa Cruz, CA, December 1994

Reactive protocol o Source routing for data delivery

o Route discovery / route maintenance

50

Page 51: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Dynamic Source Routing

When node S wants to send a packet to node D, but does not know a route to D, node S initiates a route discovery

Source node S floods Route Request (RREQ)

Each node appends own identifier when forwarding RREQ

51

Page 52: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Route Discovery in DSR

52

B

A

S E

F

H

J

D

C

G

I K

Z

Y

Represents a node that has received RREQ for D from S

M

N

L

Page 53: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Route Discovery in DSR

53

B

A

S E

F

H

J

D

C

G

I K

Represents transmission of RREQ

Z

Y Broadcast transmission

M

N

L

[S]

[X,Y] Represents list of identifiers appended to RREQ

Page 54: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Route Discovery in DSR

54

B

A

S E

F

H

J

D

C

G

I K

• Node H receives packet RREQ from two neighbors: potential for collision

Z

Y

M

N

L

[S,E]

[S,C]

Page 55: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Route Discovery in DSR

Node C receives RREQ from G and H, but does not forward it again, because node C has already forwarded RREQ once

55

B

A

S E

F

H

J

D

C

G

I K

Z

Y

M

N

L

[S,C,G]

[S,E,F]

Page 56: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Route Discovery in DSR

56

B

A

S E

F

H

J

D

C

G

I K

Z

Y

M

Nodes J and K both broadcast RREQ to node D Since nodes J and K are hidden from each other, their transmissions may collide

N

L

[S,C,G,K]

[S,E,F,J]

Page 57: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Route Discovery in DSR

Node D does not forward RREQ, because node D is the intended target of the route discovery

57

B

A

S E

F

H

J

D

C

G

I K

Z

Y

M

N

L

[S,E,F,J,M]

Page 58: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Route Discovery in DSR

Destination D on receiving the first RREQ, sends a Route Reply (RREP)

RREP is sent on a route obtained by reversing the route appended to received RREQ

RREP includes the route from S to D on which RREQ was received by node D

58

Page 59: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Route Reply in DSR

59

B

A

S E

F

H

J

D

C

G

I K

Z

Y

M

N

L

RREP [S,E,F,J,D]

Represents RREP control message

Page 60: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Route Reply in DSR

Route Reply can be sent by reversing the route in Route Request (RREQ) only if links are guaranteed to be bi-directional o To ensure this, RREQ should be forwarded only if it received on

a link that is known to be bi-directional

If unidirectional (asymmetric) links are allowed, then RREP may need a route discovery for S from node D o Unless node D already knows a route to node S o If a route discovery is initiated by D for a route to S, then the

Route Reply is piggybacked on the Route Request from D.

If IEEE 802.11 MAC is used to send data, then links have to be bi-directional (since Ack is used) o Hidden hypothesis here?

60

Page 61: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Dynamic Source Routing (DSR)

Node S on receiving RREP, caches the route included in the RREP

When node S sends a data packet to D, the entire route is included in the packet header o Hence the name source routing

Intermediate nodes use the source route included in a packet to determine to whom a packet should be forwarded

61

Page 62: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Data Delivery in DSR

62

B

A

S E

F

H

J

D

C

G

I K

Z

Y

M

N

L

DATA [S,E,F,J,D]

Packet header size grows with route length

Page 63: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

When to Perform a Route Discovery

When node S wants to send data to node D, but does not know a valid route node D o Is there any optimization possible?

63

Page 64: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

DSR Optimization: Route Caching

Each node caches a new route it learns by any means

When node S finds route [S,E,F,J,D] to node D, node S also learns route [S,E,F] to node F

When node K receives Route Request [S,C,G] destined for node, node K learns route [K,G,C,S] to node S

When node F forwards Route Reply RREP [S,E,F,J,D], node F learns route [F,J,D] to node D

When node E forwards Data [S,E,F,J,D] it learns route [E,F,J,D] to node D

A node may also learn a route when it overhears Data packets

64

Page 65: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Use of Route Caching

When node S learns that a route to node D is broken, it uses another route from its local cache, if such a route to D exists in its cache. Otherwise, node S initiates route discovery by sending a route request

Node X on receiving a Route Request for some node D can send a Route Reply if node X knows a route to node D

Use of route cache o Can speed up route discovery

o Can reduce propagation of route requests

65

Page 66: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Use of Route Caching

66

B

A

S E

F

H

J

D

C

G

I K

[P,Q,R] Represents cached route at a node (DSR maintains the cached routes in a tree format)

M

N

L

[S,E,F,J,D] [E,F,J,D]

[C,S]

[G,C,S]

[F,J,D],[F,E,S]

[J,F,E,S]

Z

Page 67: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Use of Route Caching: Can Speed up Route Discovery

67

B

A

S E

F

H

J

D

C

G

I K

Z

M

N

L

[S,E,F,J,D] [E,F,J,D]

[C,S]

[G,C,S]

[F,J,D],[F,E,S]

[J,F,E,S]

RREQ

When node Z sends a route request for node C, node K sends back a route reply [Z,K,G,C] to node Z using a locally cached route

[K,G,C,S] RREP

Page 68: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Use of Route Caching: Can Reduce Propagation of Route Requests

68

B

A

S E

F

H

J

D

C

G

I K

Z

Y

M

N

L

[S,E,F,J,D] [E,F,J,D]

[C,S]

[G,C,S]

[F,J,D],[F,E,S]

[J,F,E,S]

RREQ

Assume that there is no link between D and Z. Route Reply (RREP) from node K limits flooding of RREQ. In general, the reduction may be less dramatic.

[K,G,C,S] RREP

Page 69: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Route Caching: Beware!

Stale caches can adversely affect performance

With passage of time and host mobility, cached routes may become invalid

A sender host may try several stale routes (obtained from local cache, or replied from cache by other nodes), before finding a good route

69

Page 70: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Route Maintenance

If node is moving: can reinitiate route discovery

If a link breaks: Route Error packets

70

Page 71: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Route Error (RERR)

71

B

A

S E

F

H

J

D

C

G

I K

Z

Y

M

N

L

RERR [J-D]

J sends a route error to S along route J-F-E-S when its attempt to forward the data packet S (with route SEFJD) on J-D fails Nodes hearing RERR update their route cache to remove link J-D

Page 72: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Dynamic Source Routing: Advantages

Routes maintained only between nodes who need to communicate o Reduces overhead of route maintenance

Route caching can further reduce route discovery overhead

A single route discovery may yield many routes to the destination, due to intermediate nodes replying from local caches

72

Page 73: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Dynamic Source Routing: Disadvantages Packet header size grows with route length due to source

routing

Flood of route requests may potentially reach all nodes in the network

Care must be taken to avoid collisions between route requests propagated by neighboring nodes o Insertion of random delays before forwarding RREQ

Increased contention if too many route replies come back

due to nodes replying using their local cache o Route Reply Storm problem o Reply storm may be eased by preventing a node from sending

RREP if it hears another RREP with a shorter route

73

Page 74: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Dynamic Source Routing: Disadvantages

Delay for route establishment

Route maintenance is not a local process An intermediate node may send Route Reply using a

stale cached route, thus polluting other caches o This problem can be eased if some mechanism to purge

(potentially) invalid cached routes is incorporated. o For some proposals for cache invalidation, see

[Hu00Mobicom]: static timeouts / adaptive timeouts based on link stability

74

Page 75: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Ad Hoc On-Demand Distance Vector Routing (AODV)

RFC 3561: http://tools.ietf.org/html/rfc3561

Charles E. Perkins and Elizabeth M. Royer. "Ad hoc On-Demand Distance Vector Routing." Proceedings of the 2nd IEEE Workshop on Mobile Computing Systems and Applications, 1999

Reactive protocol o Distance vector

o Destination sequence number

75

Page 76: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Why AODV?

DSR includes source routes in packet headers

Resulting large headers can sometimes degrade performance o particularly when data contents of a packet are small

AODV attempts to improve on DSR by maintaining routing tables at the nodes, so that data packets do not have to contain routes

AODV retains the desirable feature of DSR that routes are maintained only between nodes which need to communicate

76

Page 77: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

AODV Overview

Route Requests (RREQ) are forwarded in a manner similar to DSR

When a node re-broadcasts a Route Request, it sets up a reverse path pointing towards the source o AODV assumes symmetric (bi-directional) links

When the intended destination receives a Route

Request, it replies by sending a Route Reply

Route Reply travels along the reverse path set-up when Route Request is forwarded

77

Page 78: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

AODV overview

Path discovery

Reverse path setup

Forward path setup

78

Page 79: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Route Requests in AODV

79

B

A

S E

F

H

J

D

C

G

I K

Z

Y

Represents a node that has received RREQ for D from S

M

N

L

Page 80: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Route Requests in AODV

80

B

A

S E

F

H

J

D

C

G

I K

Represents transmission of RREQ

Z

Y Broadcast transmission

M

N

L

Page 81: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Route Requests in AODV

81

B

A

S E

F

H

J

D

C

G

I K

Represents links on Reverse Path

Z

Y

M

N

L

Page 82: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Reverse Path Setup in AODV

Node C receives RREQ from G and H, but does not forward it again, because node C has already forwarded RREQ once

82

B

A

S E

F

H

J

D

C

G

I K

Z

Y

M

N

L

Page 83: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Reverse Path Setup in AODV

83

B

A

S E

F

H

J

D

C

G

I K

Z

Y

M

N

L

Page 84: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Reverse Path Setup in AODV

Node D does not forward RREQ, because node is the intended target of the RREQ

84

B

A

S E

F

H

J

D

C

G

I K

Z

Y

M

N

L

Page 85: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Route Reply in AODV

85

B

A

S E

F

H

J

D

C

G

I K

Z

Y

Represents links on path taken by RREP

M

N

L

Page 86: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Route Reply in AODV

An intermediate node (not the destination) may also send a Route Reply (RREP) provided that it knows a more recent path than the one previously known to sender S

To determine whether the path known to an intermediate node is more recent, destination sequence numbers are used

The likelihood that an intermediate node will send a Route Reply when using AODV not as high as DSR o A new Route Request by node S for a destination is assigned a

higher destination sequence number. An intermediate node which knows a route, but with a smaller sequence number, cannot send Route Reply

86

Page 87: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Forward Path Setup in AODV

87

B

A

S E

F

H

J

D

C

G

I K

Z

Y

M

N

L

Forward links are setup when RREP travels along the reverse path Represents a link on the forward path

Page 88: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Data Delivery in AODV

88

B

A

S E

F

H

J

D

C

G

I K

Z

Y

M

N

L

Routing table entries used to forward data packet. Route is not included in packet header.

DATA

Page 89: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Timeouts

A routing table entry maintaining a reverse path is

purged after a timeout interval o Timeout should be long enough to allow RREP to come back o Used to remove unused reverse path

A routing table entry maintaining a forward path is

purged if not used for a active_route_timeout interval o If no data is being sent using a particular routing table entry,

that entry will be deleted from the routing table (even if the route may actually still be valid)

89

Page 90: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Link Failure Reporting

A neighbor of node X is considered active for a

routing table entry if the neighbor sent a packet within active_route_timeout interval which was forwarded using that entry

When the next hop link in a routing table entry breaks, all active neighbors are informed

Link failures are propagated by means of Route Error messages, which also update destination sequence numbers

90

Page 91: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Route Error When node X is unable to forward packet P (from node S

to node D) on link (X,Y), it generates a RERR message

Node X increments the destination sequence number for D cached at node X

The incremented sequence number N is included in the RERR

When node S receives the RERR, it initiates a new route discovery for D using destination sequence number at least as large as N

When node D receives the route request with destination sequence number N, node D will set its sequence number to N, unless it is already larger than N

91

Page 92: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Why Sequence Numbers in AODV

To avoid using old/broken routes o To determine which route is newer

To prevent formation of loops

o Assume that A does not know about failure of link C-D because RERR sent by C is lost

o Now C performs a route discovery for D. Node A receives the RREQ (say, via path C-E-A)

o Node A will reply since A knows a route to D via node B o Results in a loop (for instance, C-E-A-B-C )

92

A B C D

E

Page 93: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

AODV Sequence Number Rule

If RREQ sequence number > sequence number in table, intermediate node does not answer RREQ

If RREP sequence number < sequence number at source node, the RREP is ignored

Destination always update its sequence number to the largest received

93

Page 94: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

AODV Uses “Route Request” Sequence Number

E unable to forward packet P (from E to D) on link 6, generates a RERR message

E increments the destination sequence number for D cached at E

Incremented sequence number N included in RERR

E initiates RREQ for D, uses destination sequence number › N

D receives RREQ with destination sequence number N, D set its sequence number to N, unless it is already larger than N 94

B C

1 2

4 5 E

Page 95: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

With Previous Example

E sends to D, link 6 breaks

E sends RREP(D,Inf), lost on link 4

E sends RREQ(D,N+2)

B does not send RREP since N+2 > N

95

B

E

C 1 2

4 5

6

Page 96: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Link Failure Detection

Hello messages: Neighboring nodes periodically exchange hello message

Absence of hello message is used as an indication of link failure

Alternatively, failure to receive several MAC-level acknowledgement may be used as an indication of link failure

96

Page 97: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Optimization: Expanding Ring Search

Route Requests are initially sent with small Time-to-Live (TTL) field, to limit their propagation o DSR also includes a similar optimization

If no Route Reply is received, then larger TTL tried

97

Page 98: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Summary: AODV

Routes need not be included in packet headers

Nodes maintain routing tables containing entries only for

routes that are in active use

At most one next-hop per destination maintained at each node o Multi-path extensions can be designed o DSR may maintain several routes for a single destination

Unused routes expire even if topology does not change

98

Page 99: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Fixing Distance Vector in Wireless Networks: DSDV

DSDV: destination sequence distance vector

Adapting distance vector algorithms for wireless network

Solves routing loop problem

Perkins, Charles E. and Bhagwat, Pravin . Highly Dynamic Destination-Sequenced Distance-Vector Routing (DSDV) for Mobile Computers, Sigcomm 1994

99

Page 100: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

DSDV Overview

Routing information distribution o Full dumps infrequently

o Incremental updates (smaller) more frequently

100

Page 101: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

DSDV Overview

Each node maintains a routing table which stores o Next hop towards each destination

o A cost metric for the path to each destination

o A destination sequence number that is created by the destination itself

o Sequence numbers used to avoid formation of loops

Each node periodically forwards the routing table to its neighbors o Each node increments and appends its sequence number when

sending its local routing table

o This sequence number will be attached to route entries created for this node

101

Page 102: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

DSDV: Sequence Number

Assume that node X receives routing information from Y about a route to node Z

Let S(X) and S(Y) denote the destination sequence number for node Z as stored at node X, and as sent by node Y with its routing table to node X, respectively

102

X Y Z

Page 103: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

DSDV: Sequence Number and Routing Update

Node X takes the following steps:

1. If S(X) > S(Y), then X ignores the routing information received from Y

2. If S(X) = S(Y), and cost of going through Y is smaller than the route known to X, then X sets Y as the next hop to Z

3. If S(X) < S(Y), then X sets Y as the next hop to Z, and S(X) is updated to equal S(Y)

103

X Y Z

Page 104: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

DSDV Use Destination Sequence Numbers to Avoid Loops

(destination) sequence number for each node o Each node increments and appends its sequence number when

sending its local routing table

o This sequence number attached to route entries created for this node

104

B

E

C 1 2

4 5

6

Page 105: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

DSDV Use Destination Sequence Numbers to Avoid Loops

105

B

E

C 1 2

4 5

6

From B to Link Cost Seq

A 4 3 50

B Local 0 60

C 2 1 70

D 4 2 80

E 4 1 90

From C to Link Cost Seq

A 5 3 50

B 2 1 60

C Local 0 70

D 5 2 80

E 5 1 90

From E to Link Cost Seq

A 6 2 50

B 4 1 60

C 5 1 70

D 6 1 80

E Local 0 90

Page 106: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

With Previous Example

DV(E) … D=Inf(80) [4,5] , tx error on 5

DV(C) E=Inf(90),… [5], DV(C) E=1(90),D=2(80) [2] o Identical sequence number, but longer route: rule 2, update

rejected

106

B

E

C 1 2

4 5

6

From B to Link Cost Seq

A 4 3 50

B Local 0 60

C 2 1 70

D 4 2 80

E 4 1 90

Page 107: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

Summary

All protocols discussed so far perform some form of flooding o DSR, AODV

o DSDV

Use hop count metric

Connection to the Internet is not addressed o Gateway selection problem

107

Page 108: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

DSR

On-demand algorithm

Source routing

RREQ, RREP, RERR

Caching

Many optimizations

108

Page 109: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

AODV

On-demand algorithm

Distance vector: routing table at nodes

RREQ, RREP o Path discovery, reverse path setup, forward path setup

Sequence number

109

Page 110: Wireless Internet Routing · 2013-06-17 · Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then D x (y) = min {c(x,v) + D v (y)}

DSDV

DSDV: Destination Sequence Distance Vector

Distance vector adapted to wireless

Sequence number against loops

Full dump infrequently, incremental updates more frequently

110