64
1 Routing for Mobile Ad Hoc Networks

Routing for Mobile Ad Hoc Networks

  • Upload
    frisco

  • View
    57

  • Download
    1

Embed Size (px)

DESCRIPTION

Routing for Mobile Ad Hoc Networks. May need to traverse multiple links to reach a destination. Mobility causes route changes. Why ad hoc networks? Ease of deployment Speed of deployment Decreased dependence on infrastructure. Mobile Ad Hoc Networks. Reactive protocols - PowerPoint PPT Presentation

Citation preview

Page 1: Routing for Mobile Ad Hoc Networks

1

Routing for Mobile Ad Hoc Networks

Page 2: Routing for Mobile Ad Hoc Networks

Mobile Ad Hoc Networks

May need to traverse multiple links to reach a destination.

Mobility causes route changes. Why ad hoc networks?

Ease of deployment Speed of deployment Decreased dependence on infrastructure

Page 3: Routing for Mobile Ad Hoc Networks

Unicast Routing protocols

Reactive protocols Maintain routes only if needed DSR, AODV

Proactive protocols Determine routes independent of traffic

generation. Traditional distance-vector and link-state

routing protocols are proactive. OLSR, DSDV

Hybrid protocols ZRP

Page 4: Routing for Mobile Ad Hoc Networks

Flooding

Many protocols are doing with the help of flooding.

A sender broadcast packets to all its neighbors. Each node receiving a packet forwards it to its neighbors.

Page 5: Routing for Mobile Ad Hoc Networks

Flooding for data delivery

D

E

O

M

J

I

GA

C

F

HK

LN

B

source

destination

In this graph, a link existing between two nodes means that

two nodes are within a transmission range each other.

transmission

range

Page 6: Routing for Mobile Ad Hoc Networks

Flooding for data delivery

D

E

O

M

J

I

GA

C

F

HK

LN

B

Node D receives the

packet from two

neighbors, causing

potential collision.

Node D and F receives the

same packet again. So

packets need to have

sequence numbers.

Page 7: Routing for Mobile Ad Hoc Networks

Flooding for data delivery

D

E

O

M

J

I

GA

C

F

HK

LN

B

Node K receives the

packet from two

neighbors, causing

potential collision.

Page 8: Routing for Mobile Ad Hoc Networks

Flooding: advantages

It is simple. It is efficient, especially in the cases

when nodes transmit data infrequently and topology change happens frequently.

Data delivery is reliable potentially because data is sent over all possible links.

Page 9: Routing for Mobile Ad Hoc Networks

Flooding: disadvantages

It requires high overhead because data should be delivered to too many nodes, most of which do not need to receive them.

It can not guarantee the data delivery because of collision on the way.

Page 10: Routing for Mobile Ad Hoc Networks

Dynamic Source Routing (DSR) Flooding is used for the delivery of

control packets, not data packets. The control packets are flooded to

discover routes. Then data packet is sent over the discovered path.

Page 11: Routing for Mobile Ad Hoc Networks

Route discovery in DSR

D

E

O

M

J

I

GA

C

F

HK

LN

B

{C}

{C}

{C}

{C}

{C}

C initiate the route discovery by flooding Route Request(RREQ).

Each node appends its id to RREQ when it forwards RREQ.

Page 12: Routing for Mobile Ad Hoc Networks

Route discovery in DSR

D

E

O

M

J

I

GA

C

F

HK

LN

B

{C,G}

{C,F}

Page 13: Routing for Mobile Ad Hoc Networks

Route discovery in DSR

D

E

O

M

J

I

GA

C

F

HK

LN

B{C,G,I}

{C,F,H}

Node K receives two RREQs. It

may choose the shorter one

(hops).

Page 14: Routing for Mobile Ad Hoc Networks

Route discovery in DSR

D

E

O

M

J

I

GA

C

F

HK

LN

B

{C,F,H,K}

Page 15: Routing for Mobile Ad Hoc Networks

Route Reply in DSR

When a destination node receives RREQ, it sends a Route Reply(RREP).

RREP is sent by reversing the route appended in the RREQ if the links are bidirectional. If links are unidirectional, the destination

node(D) may need a route discovery. In that case RREP is piggybacked on RREQ from D.

RREP contains the complete path from the sender to the destination.

Page 16: Routing for Mobile Ad Hoc Networks

Route reply in DSR

D

E

O

M

J

I

GA

C

F

HK

LN

B

{C,F,H,K,L}

Page 17: Routing for Mobile Ad Hoc Networks

Data delivery in DSR

D

E

O

M

J

I

GA

C

F

HK

LN

B{C,F,H,K,L}

Entire nodes on the path are included in the packet header.

That is why it is called source routing.

Page 18: Routing for Mobile Ad Hoc Networks

Data delivery in DSR

Promiscuous listening Data delivery is unicast. So packets have next

hop’s IP address and MAC address. When next hop node’s MAC layer receives a

frame, it compares destination MAC address with its MAC address. Since they do not match, MAC layer discards the frame.

To avoid it, MAC layers use the promiscuous listening. In this case, MAC layer delivers frames to its network layer regardless of matching destination address with its MAC address.

Page 19: Routing for Mobile Ad Hoc Networks

DSR optimization: routing cache Each node overhears route

information when RREQ, RREP, and data packets are exchanged

They cache all routes they learned. The cached routes can speed up the

route discovery, and reduce the propagation of route request.

Page 20: Routing for Mobile Ad Hoc Networks

What each node learns?

D

E

O

M

J

I

GA

C

F

HK

LN

B

{C,F,H,K,L}{C,G}

{C,G.I}{C,F,H,K,L}

{C,F,H,K,L}

{C,F,H,K,L}

{C,F,H,K,L}

{C,G,I,J}

{C,G.I,M}

{C,G.I,M,O}

{C,A}

{C,B}

{C,D}

{C,D,E}

Page 21: Routing for Mobile Ad Hoc Networks

Use of Route Caching

D

E

O

M

J

I

GA

C

F

HK

LN

B

{C,F,H,K,L}{C,G}

{C,G.I}{C,F,H,K,L}

{C,F,H,K,L}

{C,F,H,K,L}

{C,F,H,K,L}

{C,G,I,J}

{C,G.I,M}

{C,G.I,M,O}

{C,A}

{C,B}

{C,D}

{C,D,E}

If N wants to send packet to F, N sends RREQ to L.

Now L knows the route to F, and sends RREP to N without

any further flooding of RREQ.

Page 22: Routing for Mobile Ad Hoc Networks

Route Error

D

E

O

M

J

I

GA

C

F

HK

LN

B

{C,G}

{C,G.I}

{C,F,H,K}

{C,F,H,K,L}

{C,G,I,J}

{C,G.I,M}

{C,G.I,M,O}

{C,A}

{C,B}

{C,D}

{C,D,E}

If K detects link failure to L, it sends a route error(RERR) to C

along the path K-H-F-C.

The nodes which receive RERR, they delete the link K-L.

{C,F,H,K}

{C,F,H,K}

{C,F,H,K}

Page 23: Routing for Mobile Ad Hoc Networks

Problem of Routing Cache use The danger is hiding in the use of

routing cache like any other cache. When nodes moves, cached routes

may be invalid. Stale cache can affect adverse performance.

Page 24: Routing for Mobile Ad Hoc Networks

DSR: advantage

Is there any edge over flooding data packets? It’s like virtual-circuit vs. datagram. If there is a flow of packets, DSR can

offset the overhead of flooding for route discovery.

Route caching can further reduce the route discovery overhead.

Page 25: Routing for Mobile Ad Hoc Networks

DSR: disadvantage

Packet header size grows as route hops increase.

The problems of flooding still exist. Route Request packets may collide. Too many route replies come back due

to nodes using route cache. An intermediate nodes send route

replies using stale cache route information, thus polluting other caches.

Page 26: Routing for Mobile Ad Hoc Networks

How to reduce the broadcast domain?

Probabilistic scheme Counter-based scheme Distance-based scheme

Page 27: Routing for Mobile Ad Hoc Networks

Probabilistic broadcast

On receiving a packet, a node rebroadcast the packet with probabilistic p.

Page 28: Routing for Mobile Ad Hoc Networks

Counter-based broadcast

If a node hears more than k neighbors broadcast a packet, then the node will not forward the packet.

Rationale: If k neighbors broadcast the packet, then all its neighbors are highly likely to hear the packet.

Page 29: Routing for Mobile Ad Hoc Networks

Distance-based broadcast

If a node A hear a packet sent by a node Z which is located within physical distance d, then A does not broadcast the packet.

Rationale: Since A and Z are very close, all A’s neighbors can hear the packet once Z broadcast the packet.

A

B

<d

Page 30: Routing for Mobile Ad Hoc Networks

How to reduce the scope of route request flooding?

Simple fact: “The more information we have, the

better we can do.” LAR (Location-Aided Routing) Query Localization GEDIR (Geographic Distance Routing)

Page 31: Routing for Mobile Ad Hoc Networks

Location-Aided Routing (LAR) It exploits the physical location

information (maybe by GPS) to limit the flooding scope.

Expected Zone is determined as a region where the destination is probably located at this moment. X: last known location of node D at t0

Y: unknown location of node D at t1

Y = |X – (t1-t0) * estimate of D’s speed|

Page 32: Routing for Mobile Ad Hoc Networks

Route Request flooding is limited to Request Zone which encompasses the Expected Zone and the location of the sender.

S

C

BD

A

X

Y

Expected Zone

Request Zone

Page 33: Routing for Mobile Ad Hoc Networks

Only nodes in the request zone forward the route requests. Request zone is explicitly specified in the route requests. Each node has physical location so that it can know

whether it is located in the request zone. If route discovery fails, the sender initiates another route

discovery using a larger request zone. Rest of the protocol is similar to DSR.

S

C

BD

A

X

Y

Expected Zone

Request Zone

Page 34: Routing for Mobile Ad Hoc Networks

Query Localization

It limits route requests without knowing physical location.

Route requests are propagated along the path that are close to the previously known path.

How can we define “closeness”? Rationale: There is a locality of the position. Request route is forwarded to the nodes whose

accumulated path in the route request contains only at most k new nodes that were not absent in the old route.

Page 35: Routing for Mobile Ad Hoc Networks

D

E

O

M

J

I

GA

C

F

HK

LN

B

Original route: {A, C, D, E}

Page 36: Routing for Mobile Ad Hoc Networks

E

O

M

J

I

GA

C

F

HK

LN

B

Original route: {A, C, D}

Now D moved.

D

Nodes J, K, M do not forward route request

because the path has more than 2 new nodes.{A, C, G, I, J}

Page 37: Routing for Mobile Ad Hoc Networks

Geographic Distance Routing(GEDIR) Each node knows its own location. (maybe by GPS) The sender knows the location of the destination node. Each node forwards a packet to its neighbor closest to

the destination. But the problem arises when an obstruction exists.

D

I

GA

C

F

H

B

Page 38: Routing for Mobile Ad Hoc Networks

Ad-Hoc On-Demand Distance Vector Routing (AODV) Packets do not need to carry the route

in its header unlike DSR. AODV is similar to DSR in that route

requests propagated and route replay is traversed back to the source on the path.

But, unlike DSR, intermediate nodes set up routing tables to determine the next hop to reach the destination.

Page 39: Routing for Mobile Ad Hoc Networks

Route discovery in AODV

D

E

O

M

J

I

GA

C

F

HK

LN

B

Reverse path

Source propagates route requests.

On receiving route requests, nodes record reverse paths.

Page 40: Routing for Mobile Ad Hoc Networks

Route discovery in AODV

D

E

O

M

J

I

GA

C

F

HK

LN

B

Page 41: Routing for Mobile Ad Hoc Networks

Route discovery in AODV

D

E

O

M

J

I

GA

C

F

HK

LN

B

Page 42: Routing for Mobile Ad Hoc Networks

Route discovery in AODV

D

E

O

M

J

I

GA

C

F

HK

LN

B

Page 43: Routing for Mobile Ad Hoc Networks

Route reply in AODV

D

E

O

M

J

I

GA

C

F

HK

LN

B

Dest Next hop

L L

K’s routing table

The destination node sends route reply back to the source.

On receiving route reply, intermediate nodes set up routing table

to reach the destination.

Dest Seq #

10

Page 44: Routing for Mobile Ad Hoc Networks

Route reply in AODV

D

E

O

M

J

I

GA

C

F

HK

LN

B

H’s routing table

Dest Next hop

L K

Dest Seq #

10

Page 45: Routing for Mobile Ad Hoc Networks

Route reply in AODV

D

O

M

J

I

GA

C

F

HK

LN

B

F’s routing table

Dest Next hop

L H

Dest Seq #

10

Page 46: Routing for Mobile Ad Hoc Networks

Route reply in AODV

O

M

J

I

GA

C

F

HK

LN

B

C’s routing table

Dest Next hop

L F

Dest Seq #

10

Page 47: Routing for Mobile Ad Hoc Networks

Destination Sequence Number A routing entry for each destination

has a destination sequence number. When routes are changed or broken,

the destination sequence number is used to determine which route is newer.

It is also used to prevent forming loops.

Page 48: Routing for Mobile Ad Hoc Networks

Route Error

A routing table entry is removed unless it is used during a timeout interval.

Node H is unable to forward a packet on link (H,K), it generates a RERR packet.

Node H increments the destination sequence number for L cached in its routing table.

The incremented sequence number is included in the RERR.

When node C receives the RERR, it initiates a new route discovery for L using larger destination sequence number than the current number(N).

When node L receives the route request with N, L sets its sequence number to N unless its current number is larger than N.

Page 49: Routing for Mobile Ad Hoc Networks

Loop might happen

Assume that link C-D is broken and A does not know about the link failure because RERR sent by C is lost.

Now C initiates a route discovery for D. A receives the RREQ.

Node A replies since A knows a route to D via B. Finally C has a new route for D (C-E-A-B-C), but it

forms a loop.

D

E

CBA

RREQRREQ

RREPRREP

Page 50: Routing for Mobile Ad Hoc Networks

Destination Sequence Number prevents loop Assume that the current destination sequence

number for D is 10. C sends RREQ with incremented number (20). When A receives the RREQ, it compares the

numbers. Because new number is larger than its current number, A ignore RREQ.

D

E

CBA

RREQ(20)RREQ(20)

10 10 10 10

20>10

Ignore RREQ

Page 51: Routing for Mobile Ad Hoc Networks

Proactive protocols

Optimized Link State Routing (OLSR) Destination-Sequenced Distance

Vector (DSDV)

Page 52: Routing for Mobile Ad Hoc Networks

Optimized Link State Routing(OLSR) It uses the standard link state routing protocol to

determine the next hop to reach each destination. But the difference from the standard LSR is to

flood the link state information through fewer nodes. In this way the overhead of flooding link state information is reduced.

Only the multipoint relay nodes forward the link state information.

Every 2-hop neighbor of a node X is a 1-hop neighbor of the multipoint relays of X.

Each node transmits beacon packets periodically to its neighbor nodes so that all nodes can know their 2-hop neighbors and they can choose their multipoint relays.

Page 53: Routing for Mobile Ad Hoc Networks

Flooding for data delivery

D

E

O

M

J

I

GA

C

F

HK

LN

B

Multipoint relays of C

Only multipoint relays forward the link state information.

Page 54: Routing for Mobile Ad Hoc Networks

Flooding for data delivery

D

E

O

M

J

I

GA

C

F

HK

LN

B

Multipoint relays of I and H

Page 55: Routing for Mobile Ad Hoc Networks

Destination-Sequenced Distance Vector (DSDV) Each neighboring nodes exchange its routing

table like the standard distance vector routing protocol.

The routing table has an entry of the destination sequence number for each destination.

Each node as a destination creates its sequence number and increments the number each time it sends new routing information.

The sequence number is used to avoid making loops.

Page 56: Routing for Mobile Ad Hoc Networks

DSDV Example

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

S(X) is the destination sequence number for Z stored at X, and S(Y) is the destination sequence number for Z stored at Y’s routing table.

Now S(Y) is sent to X.

X Y Z

S(X) S(Y)

Page 57: Routing for Mobile Ad Hoc Networks

Then node X does If S(X) > S(Y), then X ignores the routing

information received from Y. If S(X) = S(Y) and cost of going through

Y is smaller than current cost, then X sets Y as the next hop to Z.

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

Page 58: Routing for Mobile Ad Hoc Networks

Hybrid protocols

Zone Routing Protocol (ZRP) Hybrid Wireless Mesh Protocol

(HWMP)

Page 59: Routing for Mobile Ad Hoc Networks

Zone Routing Protocol (ZRP)

It combines the proactive protocol and reactive protocol into one single protocol.

It defines the “routing zone.” All nodes within hop distance d from a

node X are said to be in the routing zone of the node X.

All nodes at exactly hop distance d are said to be peripheral nodes of node X’s routing zone.

Page 60: Routing for Mobile Ad Hoc Networks

Intra-zone routing Each node determines routes to reach the

nodes within a routing zone proactively. The link state or distance vector algorithms

can be used. Inter-zone routing

Use the route discovery protocol like DSR to determine a route to a node outside of the routing zone when there is data to be sent.

Unlike DSR, the route requests are propagated via peripheral nodes.

Page 61: Routing for Mobile Ad Hoc Networks

Routing Zone of nodes C and H

D

E

OM

J

I

G

A

C

F

HK

LN

B

source

destination

Peripheral nodes

Assuming d=2

Page 62: Routing for Mobile Ad Hoc Networks

Route Request in ZRP

D

E

OM

J

I

G

A

C

F

HK

LN

B

source

destination

The route requests reach the peripheral node H.

H knows the route to L, so the route request needs not be

Forwarded anymore.

Assuming d=2

Page 63: Routing for Mobile Ad Hoc Networks

Route Reply in ZRP

D

E

OM

J

I

G

A

C

F

HK

LN

B

source

destination

Assuming d=2

Page 64: Routing for Mobile Ad Hoc Networks

Data delivery in ZRP

D

E

OM

J

I

G

A

C

F

HK

LN

B

source

destination

Assuming d=2