ad hoc networks routing (1/2)

44
Ad Hoc Networks Routing (1/2) Instructor: Carlos Pomalaza- Ráez Fall 2003 University of Oulu, Finland

Upload: makaio

Post on 21-Jan-2016

63 views

Category:

Documents


0 download

DESCRIPTION

Ad Hoc Networks Routing (1/2). Instructor: Carlos Pomalaza-Ráez Fall 2003 University of Oulu, Finland. Mobile Ad Hoc Networks (MANET). - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Ad Hoc Networks Routing (1/2)

1

Ad Hoc Networks Routing

(1/2)

Instructor: Carlos Pomalaza-Ráez

Fall 2003University of Oulu, Finland

Page 2: Ad Hoc Networks Routing (1/2)

2

Mobile Ad Hoc Networks (MANET)

A loose collection of mobile nodes that are capable of communicating with each other without the aid of any established infrastructure or centralized administration

Main Features

Dynamic topology, e.g. nodes can join or leave the network as well as they can change the range of their transmissions

Each node acts as independent router Because of the wireless mode of communication:

Bandwidth-constrained and variable capacity links Limited transmitter range Energy-constrained Limited physical security

MAC and network protocols are of a distributed nature Complex routing protocols with large transmission overheads and

large processing loads on each node

Page 3: Ad Hoc Networks Routing (1/2)

3

Dynamic Topology

Node mobility in Ad Hoc networks has had a great effect in the designing of routing protocols

Node mobility creates a dynamic topology, i.e., changes in the connectivity between the nodes as a direct function of the distance between each other, the characteristics of the area where they are deployed and,, of course, the power of their transmitters

Page 4: Ad Hoc Networks Routing (1/2)

4

Where We Find Ad Hoc Networks

Military operations

Rescue and recovery scenarios

Local Area

Office, building WLANs

Home networks

Robot networks

Sensor networks

Personal Area Networking

Interconnection of wireless devices

Games

Habitat monitoring

Micro climate

Wildlife

Page 5: Ad Hoc Networks Routing (1/2)

5

Routing Protocols

Desired Properties Distributed Consider both uni- and bi-directional links Energy efficient Secure

Performance Metrics

Data throughput, i.e., how well does the network deliver packets from the source to destination

Delay, e.g., end-to-end delay of packet delivery Overhead costs, i.e., average of control packets produced

per node Power consumption, i.e., average power used by each

node

Page 6: Ad Hoc Networks Routing (1/2)

6

Proactive vs. Reactive

Proactive routing maintains routes to every other node in the network

Table driven

Regular routing updates impose large overhead

No latency in route discovery, i.e., data can be sent immediately

Most routing information might never be used

Suitable for high traffic networks

Bellman-Ford type algorithms

Reactive routing maintains routes to only those nodes which are needed

Cost of finding routes is expensive since flooding is involved

Might be delay before transmitting data

Cache information from other nodes’ transmissions

May not be appropriate for real-time applications

Good for low/medium traffic networks

Page 7: Ad Hoc Networks Routing (1/2)

7

Proactive vs. Reactive

S

D

S

D

Route UpdatesRoutes

Data Flow

Timer Based

Proactive

Route REQRoute REP

Data Flow

On Demand

Reactive

Page 8: Ad Hoc Networks Routing (1/2)

8

Mobility (proactive vs. reactive)

S

D

S

D

Must wait for the updates to be transmitted, processed and

new routing tables be built

Timer Based

Proactive

A new route request is sent and a new route is

found

On Demand

Reactive

Page 9: Ad Hoc Networks Routing (1/2)

9

Destination Sequenced Distance Vector DSDV

Traditional distance vector algorithms are based on the classical Bellman-Ford (DBF) algorithm. This algorithm has the drawback that routing loops can occur. To eliminate or minimize the formation of loops the nodes are required to often coordinate and communicate among themselves. The problem is composed if there are frequent topological changes. The Routing Information Protocol (RIP) is based on this type of algorithm. The application of RIP to Ad Hoc networks is limited since it was not designed for such environment. The objective of DSDV protocols is to preserve the simplicity of RIP and avoid the looping problem in a mobile wireless environment. Main features of DSDV are:

Routing tables have entries for every network destination and the number of hops to each

Each route table entry is tagged with a sequence number originated by the destination

Nodes periodically communicate their routing table to their neighbors and when there is a significant new information available

Routing information is normally transmitting using a broadcasting or multicasting mode

Page 10: Ad Hoc Networks Routing (1/2)

10

DSDVRoute Tables Entry StructureDestination’s address

Number of hops required to reach the destination

Sequence number of the information received regarding that destination, as originally stamped by the destination

Within the headers of the packet, the transmitter route tables usually carry the node hardware address, the network address, and the route transmission sequence number. Receiving a transmission from a neighbor doesn’t indicate immediately the existence of a bi-directional link with that neighbor. A node does not allow routing through a neighbor until that neighbors shows that it also has the node as a neighbor. This means that DSDV algorithms use only bi-directional links.

An important parameter value is the time between broadcasting routing information packets. However when any new and substantial route information is received by a mobile node, the updated route information is transmitted as soon as possible.

Page 11: Ad Hoc Networks Routing (1/2)

11

DSDV-Topological Changes Broken links are a normal occurrence in Ad Hoc networks. They are detected

by the MAC layer or inferred if no transmissions are received from a neighbor for some time

A broken link is given a metric of ∞ and an updated sequence number

A broken link translates into a substantial route change and thus this new routing information is immediately broadcasted to all neighbors

To propagate new routing information, particularly the one generated by broken links, and to avoid large transmission overheads two types of routing packets are used:

Full dump – carries all the available information

Incremental – carries only information changed after the last dump

When a node receives a new routing packet the information is compared to the one already available at the node

Routes with a more recent sequence number are always used

Newly computed routes are scheduled for immediate advertisement

Page 12: Ad Hoc Networks Routing (1/2)

12

DSDV Operation - Example

A H

G

F

E

D

C

B

Destination Next Hop Metric Sequence No Install Time

A B 2 S406_A T001_D

B B 1 S128_B T001_D

C B 2 S564_C T001_D

D D 0 S710_D T001_D

E F 2 S392_E T002_D

F F 1 S076_F T001_D

G F 2 S128_G T002_D

H F 3 S050_H T002_D

Metric = Number of hops to reach destinationSequence Number = The freshness of received route, used to avoid routing loopsInstall Time = Indicates when a received route was installed, used for damping route fluctuations

D’s Routing Table

D’s Advertised Routing Table

Destination Metric Sequence No

A 2 S406_A

B 1 S128_B

C 2 S564_C

E 2 S392_E

F 1 S076_F

G 2 S128_G

H 3 S050_H

Page 13: Ad Hoc Networks Routing (1/2)

13

DSDV Operation – Example (A moves)

A

H

G

F

E

D

C

B

A

When A moves and it is detected as routing neighbor by G and H it causes these nodes to advertise their updated routing information (incremental update)

Upon reception of this update F updates its own routing tables and broadcast the new information

D receives this update and carries out an update of its routing table

Page 14: Ad Hoc Networks Routing (1/2)

14

DSDV Operation – Example (A moves)

D’s Updated Routing Table

Destination Next Hop Metric Sequence No Install Time

A F 3 S516_A T810_D

B B 1 S238_B T001_D

C B 2 S674_C T001_D

D D 0 S820_D T001_D

E F 2 S502_E T002_D

F F 1 S186_F T001_D

G F 2 S238_G T002_D

H F 3 S160_H T002_D

D’s Updated Advertised Routing Table

Destination Metric Sequence No

A 3 S516_A

B 1 S238_B

C 2 S674_C

E 2 S502_E

F 1 S186_F

G 2 S238_G

H 3 S160_H

Page 15: Ad Hoc Networks Routing (1/2)

15

Reactive Protocols

Every packet carries the routing sequence

Intermediate nodes may learn routes on “heard” traffic (RREQ, RREP, DATA)

No periodic sending of routing packets

May piggyback route requests on route replies

Must use link layer feedback to find broken links

Uses “traditional” routing tables

Hello messages sent periodically to identify neighbors

Sequence numbers guarantees freshness

Route requests are sent in reverse direction, i.e. only uses bi-directional links

May use link layer feedback to find broken links

Dynamic Source Routing (DSR)

Ad-Hoc On Demand Distance Vector (AODV)

Page 16: Ad Hoc Networks Routing (1/2)

16

DSR – Overview To send a packet the sender constructs a source route in the packet’s

header

The source route has the address of every host through which the packet should be forwarded to reach its destination

Each host in the ad hoc network maintains a route cache in which it stores source routes it has learned

Each entry in the route cache has an expiration period, after which it will be deleted

If the sender doesn’t have a route to a destination it then attempts to find out by using a routing discovery process

While waiting for the routing discovery to complete the sender continues sending and receiving packets with other hosts

Each host uses a route maintenance procedure to monitor the correct operation of a route

D. B. Johnson and D. A. Maltz, “Dynamic Source Routing in Ad-Hoc Wireless Networks,” In Mobile Computing, edited by T. Imielinski and H. Korth, Chapter 5, pages 153-181, Kluwer Academic Publishers, 1996.

Page 17: Ad Hoc Networks Routing (1/2)

17

DSR – Route Discovery

A B

G

D

E

H

node discards packets having been seen

s

D

C

F

Source broadcasts a route packet with the address of the source and destination

A neighbor that receives the request looks up its route cache to look for a route to destination. If not found it appends its address into the packet and re-broadcasts it

A-BH

AH

A

H

A H

A-DH

A-C

H

Page 18: Ad Hoc Networks Routing (1/2)

18

DSR – Route Discovery

A B

G

D

E

H

s

C

F

A-B

-GH

A-B-E H

D

A-B-E

-FH

node discards packets having been seen

Page 19: Ad Hoc Networks Routing (1/2)

19

DSR – Route Discovery

A B

G

D

E

H

s

C

F

reply packet follows the reverse path of the route request packet recorded in broadcast packet

A-B-G-H

DA-B-G-H

A-B

-G-H

Page 20: Ad Hoc Networks Routing (1/2)

20

Route Discovery: at source A

A need to send to G

Lookup Cache for route A to G

Route found

?

Start Route Discovery Protocol

Route Discovery finished

Packet in

buffer? Send packet to next-hop

done

Buffer packet

no

Write route in packet header

yes

yes

no

Continue normal

processingwait

Page 21: Ad Hoc Networks Routing (1/2)

21

Route Discovery: At an intermediate node

Accept route request packet

<src-id> in recently

seen requests

list?

Discard route

request

yes

no

Host address

already in partial route?

Discard route

request

yes

Store <src-id> in list

Broadcast packet

Send route reply packet

done

my-Addr

=target?

noAppendmy-Addr to partial route

no

yes

Page 22: Ad Hoc Networks Routing (1/2)

22

DSR – Route Maintenance Usually the data link layer has a mechanism to detect a link failure

When a link failure is detected the host sends a route error packet to the original sender of the packet

The route error packet has the address of the host who detected the failure and the host to which it was attempting to transmit the packet

When a route error packet is received by a host, the hop in error is removed from the host’s route cache, and all routes which contain this hop are truncated at that point

To return the route error packet the host uses a route in its route cache to the sender of the original packet. It the host does not have a route it can reverse the route information carried in the packet that could not be forwarded because of the link error. The later assumes that only bidirectional links are being used for routing

Another option to return route error packets is to perform a route discovery process to find a route to the original sender and use that route

Page 23: Ad Hoc Networks Routing (1/2)

23

DSR - Optimizations

Several optimizations are possible to reduce the amount of overhead traffic

Route Cache

During the process of route discovery and maintenance a host receives, directly or indirectly, information about routes to other hosts thus minimizing the need to search for that information in the future. For example in the following ad hoc network let’s assume that node A performs a route discovery to E

A B C D E

A-B-C-D-E

Route Request

Route Reply

Since hosts B, C, and D are on the route to E, host A also learns the routes to B, C, and D. Likewise these “intermediate hosts” learn about routes to each other by looking into the content of the route reply packet

Page 24: Ad Hoc Networks Routing (1/2)

24

DSR - OptimizationsPiggybacking on Route Discoveries

To minimize the delay in delivering a data packet when there is no route to the destination and a route discovery process is needed one can piggyback the data on the route request packets

Learning by “listening”

If the host operate in promiscuous receiving mode, i.e. they receive and process every transmission in their range, then they can obtain substantial information about routing, e.g., in the following network,

A

B

CD

ERoute Error

Nodes B, C, and D, listen a process the route error packet from E to A. Since the route error packet identifies precisely the hop where the failure was detected hosts B, C, and D can update their route cache with this information

Page 25: Ad Hoc Networks Routing (1/2)

25

DSR - Summary On-demand, potentially zero control message overhead if topology

does not change often

Packet delays/jitters associated with on-demand routing

It can work with unidirectional links as well as bidirectional links

Route caching used to minimize route discovery overhead

Promiscuous mode operations can translate in excessive use of power

Not easily scalable to large networks since the protocol design assumed a small network diameter

The need to place the entire route in the route replies and data packets translates in large on the air packet overhead

Allows for the possibility to keep multiple routes to a destination in the route cache

CPU and memory use demands on each host are high since the routes have to be continuously maintained and updated

Page 26: Ad Hoc Networks Routing (1/2)

26

Ad-Hoc On Demand Distance Vector (AODV)

Overview Based on the Destination-Sequenced Distance-Vector (DSDV) algorithm

On-demand route acquisition

Nodes maintain route cache and uses destination sequence number for each route entry

Does nothing when connection between end points is still valid

Route Discovery Mechanism is initiated, by broadcasting a Route Request Packet (RREQ), when a route to new destination is needed

The neighbors forward the request to their neighbors until either the destination or an intermediate node with a “fresh enough” route to the destination is located

Route Reply packets are transmitted upstream the path taken by the Route Request packet to inform the original sender (an intermediate nodes) of the route finding

Route Error Packets (RERR) are used to erase broken links

C. E. Perkins, E. M. Royer, “Ad-Hoc on Demand Distance Vector Routing,” Proc. IEEE WMCSA ’99, Feb. 1999, pp. 90-100.

Page 27: Ad Hoc Networks Routing (1/2)

27

AODV – Path Finding

A B

G

D

E

H

node discards packets that have been seen

S

D

C

F

Source broadcastsa route request packet

neighbors re-broadcast the packet until it reaches the intended destination

reply packet follows the reverse path of the route request packet recorded in broadcast packet

RREQ

RREP

node discards packets that have been seen

Page 28: Ad Hoc Networks Routing (1/2)

28

AODV - Path Maintenance

Periodic hello messages can be used to ensure symmetric links and to detect link failures

Hello messages include a list of nodes that the host has heard of

Once a next hop becomes unavailable the host upstream of the link failure propagates an unsolicited RREP with a hop count of ∞ to all active upstream neighbors

Upon receiving notification of a broken link a source node can restart the discovery process if they still need a route to destination

Page 29: Ad Hoc Networks Routing (1/2)

29

Temporally Order Routing Algorithm (TORA†)

Overview It is distributed

Provides loop-free routes and multiple routes

Source-initiated

Creates routes to destination only when desired

Minimizes reaction to topological changes, localizing reaction to a very small nodes near the change

Fast recovery upon route failures

Detects a network partition when there is one and erases all invalid routes within a finite time

Three basic functions:

Route creation

Route maintenance

Route erasure

(†) V. D. Park and M. S. Corson, “A Highly Adaptive Distributed Routing Algorithm for Mobile Wireless Networks,” Proceedings of IEEE INFOCOM '97, Kobe, Japan (April 1997).

Page 30: Ad Hoc Networks Routing (1/2)

30

TORA – Route Creation

During the route creation nodes use a “height” metric to build a directed acyclic graph (DAG) rooted at the destination. Links have a direction (upstream or downstream) based on the relative height metric of neighboring nodes, e.g.,

Source

Destination

Heightmetric

Page 31: Ad Hoc Networks Routing (1/2)

31

TORA – Height Metric

ions.communicat way twoallows i.e., nal,bidirectio be toassumed is

,),(link each and (ID), identifier unique a have toassumed is nodeEach

links. ofset theis and nodes ofset theis wherenetwork, therepresents ),(

EjiVi

EVEVG

The height metric associated with each node is an ordered quintuple is Hi = (i, oidi, ri, δi, i) where: i is the logical time of a link failure, defines a new reference level• oidi is the unique ID of the node that defined the reference level• ri denotes two unique sub-levels of a reference level• δi is used to order the nodes with respect to a common reference level• i is the unique ID of the node itself

Each node i (other than the destination) maintains its height Hi. Initially the height is set to NULL, Hi = [-, -, -, -, i]. The height of the destination is always ZERO, HdID = [0, 0, 0, 0, dID]. At each node there is a height array with an entry NHi,j for each neighbor i, є V. Initially the height of each

neighbor is set to NULL, if a neighbor is a destination its corresponding entry in the height array is set to ZERO.

Page 32: Ad Hoc Networks Routing (1/2)

32

TORA – Route Creation (example)

A

B

G

D

C F

E

H

[—, —, —, —,B]

C initiatesQRY

[—, —, —, —,A][—, —, —, —,E]

[0, 0, 0, 0,F]

[—, —, —, —,G]

[—, —, —, —,C]

[—, —, —, —,H]

[—, —, —, —,D]

QR

Y

QRY

QRY

QRY

QRY

A and G propagate QRY

QRY

QRY

QR

Y

B and D propagate QRY

Page 33: Ad Hoc Networks Routing (1/2)

33

TORA – Route Creation (example)

A

B

G

D

C F

E

H

[—, —, —, —,B]

[—, —, —, —,A][—, —, —, —,E]

[0, 0, 0, 0,F]

[—, —, —, —,G]

[—, —, —, —,C]

[0, 0, 0, 1,H]

[—, —, —, —,D]

UPD

H generates UPD

UPD

Page 34: Ad Hoc Networks Routing (1/2)

34

TORA – Route Creation (example)

A

B

G

D

C F

E

H

[—, —, —, —,B]

[—, —, —, —,A][0, 0, 0, 1,E]

[0, 0, 0, 0,F]

[0, 0, 0, 2,G]

[—, —, —, —,C]

[0, 0, 0, 1,H]

[0, 0, 0, 2,D]

UPD

UPD

UPD

D and G propagate UPD, E generates UPD

UPD

Page 35: Ad Hoc Networks Routing (1/2)

35

TORA – Route Creation (example)

A

B

G

D

C F

E

H

[0, 0, 0, 2,B]

[0, 0, 0, 3,A][0, 0, 0, 1,E]

[0, 0, 0, 0,F]

[0, 0, 0, 2,G]

[0, 0, 0, 3,C]

[0, 0, 0, 1,H]

[0, 0, 0, 2,D]

UPD

UPD

UPD

A, B, and C propagate UPD

Page 36: Ad Hoc Networks Routing (1/2)

36

TORA – Route Creation (example)

A

B

G

D

C F

E

H

[0, 0, 0, 2,B]

[0, 0, 0, 3,A][0, 0, 0, 1,E]

[0, 0, 0, 0,F]

[0, 0, 0, 2,G]

[0, 0, 0, 3,C]

[0, 0, 0, 1,H]

[0, 0, 0, 2,D]

Route creation process complete

Page 37: Ad Hoc Networks Routing (1/2)

37

TORA – Route Creation (visualization)

Source

Destination

C

A

H

B

F

E

D

G

[0, 0, 0, 3,A]

[0, 0, 0, 0,F]

[0, 0, 0, 3,C]

[0, 0, 0, 2,D]

[0, 0, 0, 2,G]

[0, 0, 0, 2,B]

[0, 0, 0, 1,E]

[0, 0, 0, 1,H]

Page 38: Ad Hoc Networks Routing (1/2)

38

TORA – Maintaining RoutesLink failure with no reaction

Source

Destination

C

A

H

B

F

E

D

G

[0, 0, 0, 3,A]

[0, 0, 0, 0,F]

[0, 0, 0, 3,C]

[0, 0, 0, 2,D]

[0, 0, 0, 2,G]

[0, 0, 0, 2,B]

[0, 0, 0, 1,E]

[0, 0, 0, 1,H]

Link (B,E) fails

No reaction is needed since all nodes still have downstream links

Page 39: Ad Hoc Networks Routing (1/2)

39

TORA – Re-establishing RoutesAfter link failure of last downstream link

Source

Destination

C

A

H

B

F

E

D

G

[0, 0, 0, 0,F]

[0, 0, 0, 3,C]

[0, 0, 0, 2,D]

[0, 0, 0, 2,G]

[0, 0, 0, 2,B]

[0, 0, 0, 1,E]

[0, 0, 0, 1,H]

Link (D,H) fails

[0, 0, 0, 3,A]

Page 40: Ad Hoc Networks Routing (1/2)

40

TORA – Re-establishing RoutesAfter link failure of last downstream link

Source

Destination

C

A

H

B

F

EG

[0, 0, 0, 0,F]

[0, 0, 0, 3,C]

[1, D, 0, 2,D]

[0, 0, 0, 2,G]

[0, 0, 0, 2,B]

[0, 0, 0, 1,E]

[0, 0, 0, 1,H]

DD defines a new reference leveland broadcasts an UPD

[0, 0, 0, 3,A]

Page 41: Ad Hoc Networks Routing (1/2)

41

TORA – Re-establishing RoutesAfter link failure of last downstream link

Source

Destination

C

A

H

F

EG

[0, 0, 0, 3,A]

[0, 0, 0, 0,F]

[0, 0, 0, 3,C]

[1, D, 0, 2,D]

[0, 0, 0, 2,G]

[1, D, 0, -1,B]

[0, 0, 0, 1,E]

[0, 0, 0, 1,H]

D BB updates its heightand broadcasts an UPD to propagates the reference level

Page 42: Ad Hoc Networks Routing (1/2)

42

TORA – Re-establishing RoutesAfter link failure of last downstream link

Source

Destination

C

H

F

EG

[1, D, 0, -2,A]

[0, 0, 0, 0,F]

[0, 0, 0, 3,C]

[1, D, 0, 2,D]

[0, 0, 0, 2,G]

[1, D, 0, -1,B]

[0, 0, 0, 1,E]

[0, 0, 0, 1,H]

D BA

A updates its heightand broadcasts an UPD to propagates the reference level

Page 43: Ad Hoc Networks Routing (1/2)

43

TORA – Route Re-establishment

A

B

G

D

C F

E

H

[1, D, 0, -1,B]

[1, D, 0, -2,A][0, 0, 0, 1,E]

[0, 0, 0, 0,F]

[0, 0, 0, 2,G]

[0, 0, 0, 3,C]

[0, 0, 0, 1,H]

[1, D, 0, 0,D]

Failure reaction completed

Page 44: Ad Hoc Networks Routing (1/2)

44

TORA - Summary Designed for operation in mobile wireless networks

Well suited for networks with large dense populations of nodes

Ability to detect network partitions and erase all invalid routes within a finite time

Quickly creates and maintains routes for destination for which routing is desired

Minimizes the number of nodes reacting to topological changes

Needs a synchronization mechanism to achieve a temporal order of events