EE4L Computer & Communication Networks Part IV – Wireless networking Dr Costas Constantinou.

Post on 21-Dec-2015

392 views 176 download

Tags:

transcript

EE4LComputer & Communication

NetworksPart IV – Wireless networking

Dr Costas Constantinou

Wireless Networking

1. Overview2. Wireless MAC layer protocols3. Wireless LANs4. Mobile ad hoc networks

Acknowledgements: Slides adapted from numerous sources. Thanks go (alphabetically) to, Dr

Romit Roy Choudhury, Duke University; Prof Jim Kurose, Univ of Massachusetts; Prof Nitin Vaidia, Univ of Illinois at Urbana-Champaign

1. Overview

• Wireless networks are becoming ubiquitous• The edge of the Internet is fast becoming wireless

– Single hop networks:• Wireless LANs• Cellular

– Multi-hop networks:• Personal area networks• Military

1. Overview

RFID and Sensor Networks

Citywatchers, Wal-MartIntel, Philips, Bosch …

Personal AreaNetworks

Motorola, Intel,Samsung …

Mesh Networks andWireless Backbones

Microsoft, Intel, Cisco …Internet

Future network vision:

1. Overview

wireless hosts• laptop, PDA, IP phone• run applications• may be stationary (non-

mobile) or mobile– wireless does not

always mean mobility

Elements of a wireless network

network infrastructure

1. Overview

Elements of a wireless network

network infrastructure

base station• typically connected to

wired network • relay - responsible for

sending packets between wired network and wireless host(s) in its “area”– e.g., cell towers

802.11 access points

1. Overview

Elements of a wireless network

network infrastructure

wireless link• connects mobiles to

base station• sometimes used as a

backbone link• multiple access protocol

coordinates link access• data transmission rate is

a function of distance (SNIR really)

1. Overview

infrastructure mode• base station connects

mobiles into wired network

• handover/handoff: mobile changes base station

Elements of a wireless network

network infrastructure

1. OverviewAd hoc mode• no base stations• nodes can only

transmit to other nodes within coverage

• nodes organize themselves into a network: route among themselves

1. Overview

Characteristics of selected wireless link standards

Indoor10-30m

Outdoor50-200m

Mid-rangeoutdoor

200m – 4 Km

Long-rangeoutdoor

5Km – 20 Km

.056

.384

1

4

5-11

54

IS-95, CDMA, GSM 2G

UMTS/WCDMA, CDMA2000 3G

802.15

802.11b

802.11a,g

UMTS/WCDMA-HSPDA, CDMA2000-1xEVDO 3G cellularenhanced

802.16 (WiMAX)

802.11a,g point-to-point

200 802.11n

Dat

a ra

te (

Mbp

s)

data

1. Overview

• Wireless networks are unlike other networks• Fundamental difference is that the concept of link as

a mathematical graph edge joining a pair of nodes is not applicable– A node broadcasts its messages, it cannot send them

each to a chosen neighbour– Broadcast domains do not have well-defined boundaries,

are time-varying and are subject to interference, multipath, noise, etc.

– Broadcast domains are (almost always) partially overlapping

– Interference happens at the receiver; interference (and carrier sense) range is longer than communication range

– Nodes may move

1. Overview• Wired vs. wireless media access

– Both are on shared media– Then, what’s really the problem?

• Wired network:– Collision Detection

• Nodes can transmit and receive at the same time• If (Transmitted_Signal ≠ Sensed_Signal) Collision

– Channel Condition is identical at Tx and Rx• Wireless network:

– No collision detection possible• Nodes cannot transmit and receive simultaneously on same channel

– Channel condition varies from node to node and is never identical at Tx and Rx

1. Overview

Hidden terminal problem• A, C can not hear each other• means that A, C unaware of

their interference at B

Spatial signal variation:

• B, A hear each other• B, C hear each other• A, C can not hear each other

interfering at B

AB

CA B C

A’s signalstrength

space

C’s signalstrength

Hidden terminal problem– X is transmitting to Y

– Z cannot sense X

– Z transmits to Y

– Collision at Y; high collision rate; wastes bandwidth

• Absence of carrier does not always mean it is safe to transmit

Exposed terminal problem– W is transmitting to X

– Y wants to transmit to Z but senses transmission of W and defers

– W does not exploit possible simultaneous transmission to Z; high idle rate; wastes bandwidth

• Presence of carrier does not always mean it is not safe to transmit

X Y Z X Y ZW

1. Overview

2. Wireless MAC

• Assume that you have some basic knowledge of wired MAC such as Aloha, CSMA, CSMA/CD (a.k.a. IEEE802.3)

• Wireless MAC proved to be non-trivial– research by [Karn90] (MACA)– research by [Bhargavan94] (MACAW)– Led to IEEE 802.11 committee

• The standard was ratified in 1999

– The predominant wireless MAC protocol is IEEE802.11 and its variants

2. Wireless MAC

• IEEE802.11 basic operation/handshakeCTS = Clear

To Send

RTS = Request

To Send

D

Y

S

M

K

RTS

CTS

X

2. Wireless MAC

• IEEE802.11 basic operation/handshake

D

Y

S

X

M

Ksilenced

silenced

silenced

silencedData

ACK

2. Wireless MAC

• Two modes– CSMA/CA – A

contention based protocol. In 802.11 this mode is known as Distributed Coordination Function (DCF)

– Priority-based access – A contention free access protocol usable on the infrastructure mode. Known as Point Coordination Function (PCF)

2. Wireless MAC

2. Wireless MAC

• 802.11 Steps– All backlogged nodes choose a random number

• R = rand (0, CW_min)– Each node counts down R

• Continue carrier sensing while counting down• Once carrier busy, freeze countdown

– Whoever reaches ZERO transmits RTS• Neighbours freeze countdown, decode RTS• RTS contains (CTS + DATA + ACK) duration =

T_comm• Neighbours set NAV = T_comm

– Remains silent for NAV time

2. Wireless MAC

• 802.11 Steps (cont.)– Receiver replies with CTS

• Also contains (DATA + ACK) duration.• Neighbours update NAV again

– Tx sends DATA, Rx acknowledges with ACK• After ACK, everyone initiates remaining countdown• Tx chooses new R = rand (0, CW_min)

– If RTS or DATA collides (i.e., no CTS/ACK returns)• Indicates collision• RTS chooses new random no. R1 = rand (0, 2*CW_min)• Note Exponential Backoff Ri = rand (0, 2^i * CW_min)• Once successful transmission, reset to rand(0, CW_min)

2. Wireless MAC

• 802.11 basic flow control– Sender sends RTS with NAV (Network Allocation Vector, i.e.

reservation parameter that determines amount of time the data packet needs the medium) after waiting for DIFS

– Receiver acknowledges via CTS after SIFS (if ready to receive)• CTS reserves channel for sender, notifying possibly hidden stations; • any station hearing CTS should be silent for NAV

– Sender can now send data at once

t

DIFS

data

defer access

otherstations

receiver

senderdata

DIFS

new contention

RTS

CTSSIFS SIFS

NAV (RTS)NAV (CTS)

t

SIFS

DIFS

data

ACK

defer access

otherstations

receiver

senderdata

DIFS

new contention

RTS

CTSSIFS SIFS

NAV (RTS)NAV (CTS)

2. Wireless MAC

• 802.11: RTS/CTS + ACK, the Final Version– 802.11 adds ACK in the signaling to improve reliability

• implication: to avoid conflict with ACK, any station hearing RTS should not send for NAV

• thus a station should not send for NAV if it hears either RTS and CTS

– Note: RTS/CTS is optional in 802.11, and thus may not be always turned on---some network interface cards turn it on only when the length of a frame exceeds a given threshold

2. Wireless MAC

• 802.11: PCF for Polling

tNAV

polledwirelessstations

point coordinator

NAV

PIFSD

USIFS

SIFSD

contentionperiod

contention free periodmediumbusy

D: downstream poll, or data from point coordinatorU: data from polled wireless station

2. Wireless MAC

• How to integrate PCF and DCF?– Basic Solution: Using Inter Frame Spacing to Prioritize Access

• Different inter frame spacing (IFS): if the required IFS of a type of message is short, the type of message has higher priority

– SIFS (Short Inter Frame Spacing)» highest priority, for ACK, CTS, polling response

– PIFS (Point Coordination Function Spacing)» medium priority, for time-bounded service using PCF

– DIFS (Distributed Coordination Function Spacing)» lowest priority, for asynchronous data service

random direct access if medium is free DIFS

t

medium busy SIFS

PIFS

DIFS DIFS

next framecontention

Access point access if medium is free DIFS

2. Wireless MAC

• RTS/CTS: Does it solve hidden terminal problem?– Assuming carrier sensing zone = communication zone

C

F

A B

E

D

CTS

RTS

E does not receive CTS successfully Can later initiate transmission to D.Hidden terminal problem remains.

E does not receive CTS successfully Can later initiate transmission to D.Hidden terminal problem remains.

2. Wireless MAC

• HT: How about increasing carrier sense range?– E will defer on sensing carrier no collision !!!

CB DData

A

E

CTS

RTSF

2. Wireless MAC

• HT: But what if barriers/obstructions exist?– E doesn’t hear C Carrier sensing does not help

CB DData

A

EF

CTS

RTS

2. Wireless MAC

• ET: B should be able to transmit to A– RTS prevents this

CA B

E

D

CTSRTS

2. Wireless MAC

• ET: B should be able to transmit to A– Carrier sensing makes the situation worse

CA B

E

D

CTSRTS

2. Wireless MAC

• 802.11 does not solve HT/ET completely– Only alleviates the problem through RTS/CTS and

recommends larger CS zone

• Large CS zone aggravates exposed terminals – Spatial reuse reduces A tradeoff– RTS/CTS packets also consume bandwidth– Moreover, backing off mechanism is also wasteful

• 802.11 is still being optimized• Thus, wireless MAC research still alive

3. Wireless LANs

• Wireless LAN architecture– wireless host

communicates with base station

• base station = access point (AP)

– Basic Service Set (BSS) (aka “cell”) in infrastructure mode contains:

• wireless hosts• access point (AP): base

station• ad hoc mode: hosts only

BSS 1

BSS 2

Internet

hub, switchor router

AP

AP

• 802.11b: 2.4GHz-2.485GHz spectrum divided into 11 channels at different frequencies– AP admin chooses frequency for AP– interference possible: channel can be same as that chosen

by neighbouring AP!• host: must associate with an AP

– scans channels, listening for beacon frames containing AP’s name (service set identifier – SSID) and MAC address

– selects AP to associate with– may perform authentication– will typically run DHCP to get IP address in AP’s subnet

3. Wireless LANs

• 802.11 frame: addressing

framecontrol

durationaddress

1address

2address

4address

3payload CRC

2 2 6 6 6 2 6 0 - 2312 4

seqcontrol

Address 2: MAC addressof wireless host or AP transmitting this frame

Address 1: MAC addressof wireless host or AP to receive this frame

Address 3: MAC addressof router interface to which AP is attached

Address 4: used only in ad hoc mode

3. Wireless LANs

Internetrouter

AP

H1 R1

AP MAC addr H1 MAC addr R1 MAC addr

address 1 address 2 address 3 802.11 frame

R1 MAC addr AP MAC addr

dest. address source address

802.3 frame

3. Wireless LANs

• 802.11 frame: addressing

framecontrol

durationaddress

1address

2address

4address

3payload CRC

2 2 6 6 6 2 6 0 - 2312 4

seqcontrol

TypeFromAP

SubtypeToAP

More frag

WEPMoredata

Powermgt

Retry RsvdProtocolversion

2 2 4 1 1 1 1 1 11 1

duration of reserved transmission time (RTS/CTS)

frame seq #(for reliable ARQ)

frame type(RTS, CTS, ACK, data)

3. Wireless LANs

• 802.11 frame: more

3. Wireless LANs

• Mobility within the same subnet– H1 remains in same IP

subnet: IP address can remain same

– switch: which AP is associated with H1?

• self-learning: switch will see frame from H1 and “remember” which switch port can be used to reach H1

hub or switch

AP 2

AP 1

H1 BBS 2

BBS 1

router

4. MANETs

• Mobile ad hoc Network (MANET)– Formed by wireless hosts which may be

mobile– Without (necessarily) using a pre-existing

infrastructure– Routes between nodes may potentially

contain multiple hops

4. MANETs

• May need to traverse multiple links to reach a destination

4. MANETs

• Mobility causes route changes

4. MANETs• Why ad hoc Networks ?

– Ease of deployment– Speed of deployment– Decreased dependence on infrastructure

• Applications– Personal area networking

• cell phone, laptop, ear phone, wrist watch– Military environments

• soldiers, tanks, planes– Civilian environments

• taxi cab network• meeting rooms• sports stadiums• boats, small aircraft

– Emergency operations• search-and-rescue• policing and fire fighting

4. MANETs• Many variants

– Fully Symmetric Environment• all nodes have identical capabilities and responsibilities

– Asymmetric Capabilities• transmission ranges and radios may differ • battery life at different nodes may differ• processing capacity may be different at different nodes• speed of movement

– Asymmetric Responsibilities• only some nodes may route packets • some nodes may act as leaders of nearby nodes (e.g., cluster head)

– Traffic characteristics may differ in different ad hoc networks• bit rate• timeliness constraints• reliability requirements• unicast / multicast / geocast• host-based addressing / content-based addressing / capability-based addressing

4. MANETs• Many variants (cont.)

– May co-exist (and co-operate) with an infrastructure-based network

– Mobility patterns may be different• people sitting at an airport lounge• taxis• kids playing• military movements• personal area network

– Mobility characteristics• speed• predictability

– direction of movement– pattern of movement

• uniformity (or lack thereof) of mobility characteristics among different nodes

4. MANETs

• MANET challenges– Must address all of these issues

• Limited wireless transmission range• Broadcast nature of the wireless medium• Packet losses due to transmission errors• Mobility-induced route changes• Mobility-induced packet losses• Battery constraints• Potentially frequent network partitions• Ease of snooping on wireless transmissions (security

hazard)– No protocol solution fits all MANET scenarios– Protocol performance metrics do not scale well with

increasing mobility and/or number of nodes

4. MANETs• Unicast routing in MANETs

– What’s special about MANET routing?• Host mobility

– link failure/repair due to mobility may have different characteristics than those due to other causes

• Rate of link failure/repair may be high when nodes move fast• New performance criteria may be used

– route stability despite mobility– energy consumption

• Unicast MANET routing protocol classes– Proactive protocols

• Determine routes independent of traffic pattern• Traditional link-state and distance-vector routing protocols are proactive

– Reactive protocols• Maintain routes only if needed

– Hybrid protocols

4. MANETs

• Routing protocol trade-offs– Delay in route discovery

• Proactive protocols may have lower delay since routes are maintained at all times

• Reactive protocols may have higher delay because a route from X to Y will be found only when X attempts to transmit to Y

– Overhead of route discovery/maintenance• Reactive protocols have lower overhead since routes are

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

overhead due to continuous route updating

– Which approach achieves a better trade-off depends on traffic & mobility patterns

4. MANETs

• We shall examine briefly1. Flooding2. Dynamic Source Routing (DSR) protocol3. Ad hoc On-Demand Distance Vector (AODV) routing

protocol4.1 Flooding for Data Delivery

– Sender S broadcasts data packet P to all its neighbours– Each node receiving P forwards P to its neighbours– Sequence numbers used 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

4.1 Flooding

B

A

S E

F

H

J

D

C

G

IK

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

Z

Y

Represents a node that has received packet P

M

N

L

4.1 Flooding

B

A

S E

F

H

J

D

C

G

IK

Represents transmission of packet P

Represents a node that receives packet P forthe first time

Z

YBroadcast transmission

M

N

L

4.1 Flooding

B

A

S E

F

H

J

D

C

G

IK

Node H receives packet P from two neighbours:Potential for collision

Z

Y

M

N

L

4.1 Flooding

B

A

S E

F

H

J

D

C

G

IK

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

4.1 Flooding

B

A

S E

F

H

J

D

C

G

IK

Z

Y

M

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

N

L

4.1 Flooding

B

A

S E

F

H

J

D

C

G

IK

Z

Y

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

M

N

L

4.1 Flooding

B

A

S E

F

H

J

D

C

G

IK

Flooding completedNodes 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

4.1 Flooding

B

A

S E

F

H

J

D

C

G

IK

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

4.1 Flooding

• Advantages of flooding as a data delivery mechanism– 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

• 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• Because packets may be delivered to the destination on

multiple paths

4.1 Flooding

• Disadvantages of flooding as a data delivery mechanism– Potentially very high overhead

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

– Potentially lower reliability of data delivery• Flooding uses broadcasting – hard to implement

reliable broadcast delivery without significantly increasing overhead

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

simultaneously, resulting in loss of the packet – in this case, destination would not receive the packet at all

4.1 Flooding

• 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

B

D

C

A

4.2 Broadcast Storm

• Broadcast Storm Problem [Ni99]– When node A broadcasts a route query, nodes B and C both

receive it– B and C both forward to their neighbours– B and C transmit at about the same time since they are reacting

to receipt of the same message from A– This results in a high probability of collisions

4.2 Broadcast Storm

• Redundancy: A given node may receive the same route request from too many nodes, when one copy would have sufficed

• Node D may receive from both nodes B and C

B

D

C

A

4.2 Broadcast Storm

• Possible solutions– Probabilistic scheme: On receiving a route request

for the first time, a node will re-broadcast (forward) the request with probability p

– Also, re-broadcasts by different nodes should be staggered by using a collision avoidance technique (wait a random delay when channel is idle)

• this will reduce the probability that nodes B and C forward a packet simultaneously in the previous example

B

D

C

A

F

E

4.2 Broadcast Storm

• Possible solutions (cont.)– Counter-Based Scheme: If node E hears more than k

neighbours broadcasting a given RREQ, before it can forward it, then node E will not forward the request

– Intuition: k neighbours together have probably already forwarded the request to all of E’s neighbours

E

Z<d

4.2 Broadcast Storm

• Possible solutions (cont.)– Distance-Based Scheme: If node E hears RREQ

broadcasted by some node Z within physical distance d, then E will not re-broadcast the request

– Intuition: Z and E are too close, so transmission areas covered by Z and E are not very different

• if E re-broadcasts the request, not many nodes who have not already heard the request from Z will hear the request

4.2 Broadcast Storm

• Summary of Broadcast Storm Problem– Flooding is used in many protocols, such as Dynamic

Source Routing (DSR, next)– Problems associated with flooding

• Collisions• 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

4.2 DSR

• Dynamic Source Routing (DSR) [Johnson96]– 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

4.3 DSR

B

A

S E

F

H

J

D

C

G

IK

Z

Y

Represents a node that has received RREQ for D from S

M

N

L

Route Discovery

4.3 DSR

B

A

S E

F

H

J

D

C

G

IK

Represents transmission of RREQ

Z

YBroadcast transmission

M

N

L

[S]

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

Route Discovery

4.3 DSR

B

A

S E

F

H

J

D

C

G

IK

Node H receives packet RREQ from two neighbours:potential for collision

Z

Y

M

N

L

[S,E]

[S,C]

Route Discovery

4.3 DSR

B

A

S E

F

H

J

D

C

G

IK

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

Z

Y

M

N

L

[S,C,G]

[S,E,F]

Route Discovery

4.3 DSR

B

A

S E

F

H

J

D

C

G

IK

Z

Y

M

Nodes J and K both broadcast RREQ to node DSince nodes J and K are hidden from each other, theirtransmissions may collide

N

L

[S,C,G,K]

[S,E,F,J]

Route Discovery

4.3 DSR

B

A

S E

F

H

J

D

C

G

IK

Z

Y

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

M

N

L

[S,E,F,J,M]

Route Discovery

4.3 DSR

• 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

4.3 DSR

B

A

S E

F

H

J

D

C

G

IK

Z

Y

M

N

L

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

Represents RREP control message

Route Reply

4.3 DSR

• Route Reply can be sent by reversing the route in Route Request (RREQ) only if links are guaranteed to be bi-directional– 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 – Unless node D already knows a route to node S– 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)

4.3 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– hence the name source routing

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

4.3 DSR

B

A

S E

F

H

J

D

C

G

IK

Z

Y

M

N

L

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

Packet header size grows with route length

Data Delivery

4.3 DSR• 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

• 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

4.3 DSR

• 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 • can speed up route discovery

• can reduce propagation of route requests

4.3 DSR

B

A

S E

F

H

J

D

C

G

IK

[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

Use of Route Caching

4.3 DSR

B

A

S E

F

H

J

D

C

G

IK

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 requestfor node C, node K sends back a routereply [Z,K,G,C] to node Z using a locallycached route

[K,G,C,S]RREP

Use of Route CachingCan Speed up Route Discovery

4.3 DSR

B

A

S E

F

H

J

D

C

G

IK

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

Use of Route Caching

Can Reduce Propagation of Route Requests

4.3 DSR

B

A

S E

F

H

J

D

C

G

IK

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 failsNodes hearing RERR update their route cache to remove link J-D

Route Error (RERR)

4.3 DSR

• Disadvantages of Route Caching:– 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

– Adverse impact on TCP

4.3 DSR

• Advantages of Dynamic Source Routing:– Routes maintained only between nodes who need to

communicate• 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

4.3 DSR

• Disadvantages of Dynamic Source Routing:– Packet header size grows with route length

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

– Care must be taken to avoid collisions between route requests propagated by neighbouring nodes

• Insertion of random delays before forwarding RREQ

– Increased contention if too many route replies come back due to nodes replying using their local cache

• Route Reply Storm problem

• Reply storm may be eased by preventing a node from sending RREP if it hears another RREP with a shorter route

4.3 DSR

• Disadvantages of Dynamic Source Routing (cont.):– An intermediate node may send Route Reply using a

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

purge (potentially) invalid cached routes is incorporated.

– Cache invalidation can be caused by:• Static timeouts• Adaptive timeouts based on link stability

4.4 AODV

• Ad Hoc On-Demand Distance Vector Routing (AODV) [Perkins99]– DSR includes source routes in packet headers– Resulting large headers can sometimes degrade performance

• 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

4.4 AODV

• 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– 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

4.4 AODV

B

A

S E

F

H

J

D

C

G

IK

Z

Y

Represents a node that has received RREQ for D from S

M

N

L

Route Request

4.4 AODV

B

A

S E

F

H

J

D

C

G

IK

Represents transmission of RREQ

Z

YBroadcast transmission

M

N

L

Route Request

4.4 AODV

B

A

S E

F

H

J

D

C

G

IK

Represents links on Reverse Path

Z

Y

M

N

L

Route Request

4.4 AODV

B

A

S E

F

H

J

D

C

G

IK

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

Z

Y

M

N

L

Reverse Path Setup

4.4 AODV

B

A

S E

F

H

J

D

C

G

IK

Z

Y

M

N

L

Reverse Path Setup

4.4 AODV

B

A

S E

F

H

J

D

C

G

IK

Z

Y

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

M

N

L

Reverse Path Setup

4.4 AODV

B

A

S E

F

H

J

D

C

G

IK

Z

Y

Represents links on path taken by RREP

M

N

L

Route Reply

4.4 AODV

• 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

• 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

4.4 AODV

B

A

S E

F

H

J

D

C

G

IK

Z

Y

M

N

L

Forward links are setup when RREP travels alongthe reverse pathRepresents a link on the forward path

Forward Path Setup

4.4 AODV

B

A

S E

F

H

J

D

C

G

IK

Z

Y

M

N

L

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

DATAData Delivery

4.4 AODV

• Timeouts– A routing table entry maintaining a reverse path is

purged after a timeout interval• Timeout should be long enough to allow RREP to come back

– A routing table entry maintaining a forward path is purged if not used for a active_route_timeout interval

• If no is data 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)

4.4 AODV

• Link failure reporting– A neighbour of node X is considered active for a

routing table entry if the neighbour 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 neighbours are informed

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

4.4 AODV

• Route error handling– 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

• Destination sequence number– 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

4.4 AODV

• Link failure detection– Hello messages: Neighbouring nodes periodically

exchange short hello message packets to indicate active neighbour presence

– 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

4.4 AODV

• Why use sequence numbers in AODV– To avoid using old/broken routes

• To determine which route is newer

– To prevent formation of loops

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

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

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

A B C D

E

4.4 AODV

• Why use sequence numbers in AODV

– Loop C-E-A-B-C

A B C D

E

4.4 AODV

• AODV algorithm optimisation: Expanding Ring Search– Route Requests are initially sent with small Time-to-

Live (TTL) field, to limit their propagation• DSR also includes a similar optimisation

– If no Route Reply is received, then larger TTL tried

4.4 AODV

• Summary of 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• DSR may maintain several routes for a single destination

– Unused routes expire even if topology does not change

5. Open Problems

• Wireless MAC– Power control increases spatial reuse– Rate control based on channel quality– Exploit channel diversity– Exploit spatial diversity using directional antennas– Controlling unwanted interactions between complementary techniques

• Wireless networks– Concept of link between two nodes does not capture physics of

broadcast radio transmission – need new mathematical abstraction/formalism

– Wireless peer-to-peer network maximum throughput scales badly with increasing network node numbers [Gupta00]

– Network coding [Ahlswede00] is a promising idea for overcoming this fundamental limitation, but is riddled with practical difficulties

– Finding “economical” alternatives to flooding for initial location discovery, perhaps by summarising/clustering node locations

6. Web Sites

1. http://standards.ieee.org/2. http://www.ieee802.org/11/3. http://www.ietf.org4. http://www.sigmobile.org/5. Also use the IEEE Xplore (http://ieeexplore.ieee.org/), ACM

Digital Library (http://portal.acm.org/dl.cfm), and CiteSeer (http://citeseer.ist.psu.edu/cs) web pages for downloading papers

7. References• Wireless MAC

1. Karn, P. 1990. MACA – A new channel access method for packet radio. ARRL/CRRL Amateur Radio 9th Computer Networking Conference, 134-140.

2. Bhargavan, V., Demers, A., Shenker S. and Zhang L. 1994. MACAW: A Media Access Protocol for Wireless LAN’s. Proceedings of ACM SIGCOMM ’94.

3. IEEE Std 802.11Part 11: Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specifications, IEEE, 1999.

• MANET1. Ni, S.-Y., Tseng, Y.-C., Chen, Y.-S. and Sheu, J.-P. 1999. The broadcast storm

problem in a mobile ad hoc network. Proc. 5th ACM/IEEE MOBICOM’99, 151-162.2. Johnson, D.B. and Maltz, D.A. 1996. Dynamic source routing in ad hoc wireless

networks. Mobile Computing, lmielinski, T. and Korth, H. (Eds.), Kluwer, 153-81.3. Perkins, C.E. and Royer, E.M. 1999. Ad-hoc On-Demand Distance Vector Routing.

Proc. 2nd IEEE Wksp. Mobile Comp. Sys. and Apps., 90-100.4. Haas, Z.J. and Pearlman, M.R. 1998. The performance of a new routing protocol

for the reconfigurable wireless networks. Proc. IEEE ICC’98, 156-160.• Wireless networks theory

1. Gupta, P. and Kumar, P.R. 2000. The capacity of wireless networks. IEEE Trans. Inform. Theory, 46, 388-404.

2. Ahlswede, R., Cai, N., Li, S. R. and Yeung, R. 2000. Network information flow. IEEE Trans. Inform. Theory, 46, 1204-1216.