You are on page 1of 32

Ad Hoc Networks:#

Architectures & Protocols

Dr Ljiljana Simić
iNETS, RWTH Aachen University
SS2016

Important  Note:  
These   course   notes   may   contain   some   copyrighted  
material.   The   copyright   of   this   material   covers   its  
use   in   class   and   for   educa7onal   purposes,   but   you  
are   not   allowed   to   distribute   this   course   material  
freely.   Under   the   code   of   appropriate   use,   please  
refrain   from   uploading   the   provided   source   files   or  
documents  to  any  publicly  accessible  system  outside  
RWTH  Aachen  University  without  prior  permission.  

1
– Medium Access Control (MAC)#
for Ad Hoc Networks [I]
#

Medium Access Control (MAC)

§  wireless  channel  is  a  shared  medium  

§  need  access  control  mechanism  to  avoid  interference  

§  MAC  protocol  design  has  been  an  ac7ve  area  of  research  
for  many  years  
[Chandra  et  al.  “Wireless  medium  access  control  protocols,”  in  IEEE  
Communica0ons  Surveys,  2000.]  

2
MAC: A simple classification

Wireless  
MAC  

Centralized   Distributed  

Guaranteed   Random  
or   access  
controlled  
access  

Ideal MAC Algorithm Features


§  efficient  

§  fair  
§  when  only  one  node  wants  to  send  it  gets  data  rate  R,  
when  N  nodes  want  to  transmit  they  get  R/N  
§  but,  remember  that  also  this  might  be  unfair  or  unacceptable:  fairness  
is  some7mes  a  complicated  issue  to  define/measure  

§  simple  

§  poten7ally  fully  decentralized  


§  no  point  of  failure  
§  but  remember  e.g.  cellular  systems  (GSM)    

3
CSMA: problems in wireless?
[Bharghavan  et  al.,  “MACAW:  a  media  access  protocol  for  wireless  LAN’s,”  in  
Proc.  ACM  SIGCOMM,  1994.]  
 

CSMA: problems in wireless?


[Bharghavan  et  al.,  “MACAW:  a  media  access  protocol  for  wireless  LAN’s,”  in  
Proc.  ACM  SIGCOMM,  1994.]  
 

4
CSMA: problems in wireless?
[Bharghavan  et  al.,  “MACAW:  a  media  access  protocol  for  wireless  LAN’s,”  in  
Proc.  ACM  SIGCOMM,  1994.]  
 

CSMA: problems in wireless?


[Bharghavan  et  al.,  “MACAW:  a  media  access  protocol  for  wireless  LAN’s,”  in  
Proc.  ACM  SIGCOMM,  1994.]  
 

5
CSMA: problems in wireless?
[Bharghavan  et  al.,  “MACAW:  a  media  access  protocol  for  wireless  LAN’s,”  in  
Proc.  ACM  SIGCOMM,  1994.]  
 

CSMA: problems in wireless?


[Bharghavan  et  al.,  “MACAW:  a  media  access  protocol  for  wireless  LAN’s,”  in  
Proc.  ACM  SIGCOMM,  1994.]  
 

carrier  sense  fails  to  prevent  collision  at  RECEIVER!  

6
CSMA: problems in wireless?
[Bharghavan  et  al.,  “MACAW:  a  media  access  protocol  for  wireless  LAN’s,”  in  
Proc.  ACM  SIGCOMM,  1994.]  
 

carrier  sense  fails  to  prevent  collision  at  RECEIVER!  


“hidden terminal problem”

CSMA: problems in wireless?


[Bharghavan  et  al.,  “MACAW:  a  media  access  protocol  for  wireless  LAN’s,”  in  
Proc.  ACM  SIGCOMM,  1994.]  
 

7
CSMA: problems in wireless?
[Bharghavan  et  al.,  “MACAW:  a  media  access  protocol  for  wireless  LAN’s,”  in  
Proc.  ACM  SIGCOMM,  1994.]  
 

CSMA: problems in wireless?


[Bharghavan  et  al.,  “MACAW:  a  media  access  protocol  for  wireless  LAN’s,”  in  
Proc.  ACM  SIGCOMM,  1994.]  
 

carrier  sense  prevents  communica7on  


by  needlessly  “protec7ng  TRANSMITTER”  from  collision!  

8
CSMA: problems in wireless?
[Bharghavan  et  al.,  “MACAW:  a  media  access  protocol  for  wireless  LAN’s,”  in  
Proc.  ACM  SIGCOMM,  1994.]  
 

carrier  sense  prevents  communica7on  


by  needlessly  “protec7ng  TRANSMITTER”  from  collision!  
“exposed terminal problem”

Hidden terminal problem


 
 

§  node  B  can  communicate  with  both  A  and  C  


§  A  and  C  cannot  hear  each  other  

§  when  A  transmits  to  B,  C  cannot  detect  the  transmission  


using  the  carrier  sense  mechanism  
§  if  C  transmits,  collision  will  occur  at  node  B  

A   B   C  

9
Hidden terminal problem
A  is  hidden  from  C  

A   B   C  

C  interferes  with  A’s  transmission,  at  RX  (B)    

Exposed terminal problem


B  senses  “channel  busy”  when  A  transmi\ng  to  D  

D   A   B   C  

10
Exposed terminal problem
B  senses  “channel  busy”  when  A  transmi\ng  to  D  
but  B  (àC)  would  NOT  interfere  with  A’s  transmission  at  RX  (D)    

D   A   B   C  

B  needlesly  blocked  by  A  =  “exposed  terminal”  

Solution for hidden terminal problem:#


Busy Tone
§  [Tobagi,  1975]  
§  [Kleinrock    and  Tobagi,  “Dual  busy  tone  mul7ple  access  (DBTMA):  a  new  
medium  access  control  for  packet  radio  networks,”  in  Proc.  IEEE  ICUPC,  
1998.]  
 

§  receiver  transmits  busy  tone  when  receiving  data  

§  all  nodes  hearing  busy  tone  keep  silent  

§  avoids  interference  from  hidden  terminals  

§  BUT  requires  a  separate  channel  for  busy  tone  

11
Solution for hidden terminal problem:#
MACA (Multiple Access Collision Avoidance)
§  [Karn,  “MACA  –  a  new  channel  access  method  for  packet  radio,”  in  Proc.  ARRL/
CRRL  Amateur  Radio  9th  Computer  Networking  Conference  ,  1990.]  

§  when  node  A  wants  to  send  a  packet  to  node  B,  node  A  first  
sends  a  Request-­‐to-­‐Send  (RTS)  to  B  
§  on  receiving  RTS,  if  it  is  able  to  receive  the  packet,  node  B  
responds  by  sending  Clear-­‐to-­‐Send  (CTS)  to  A  

§  when  a  node  (such  as  C)  overhears  a  CTS,  it  keeps  quiet  for  
the  duraRon  of  the  transfer  
§  transfer  dura7on  is  included  in  both  RTS  and  CTS  

A   B   C  

RTS/CTS

RTS  
D   A   B   C  

12
RTS/CTS

CTS  
D   A   B   C  

RTS/CTS

DATA  
D   A   B   C  

C  overhears  CTS:  stays  quiet  &  does  NOT  interfere  


with  A’s  transmission  at  RX  (B)    

13
Wireless communication reliability

§  wireless  links  are  prone  to  errors  

§  high  packet  loss  rate  detrimental  to  transport-­‐layer  


performance  
 
§  mechanisms  needed  to  reduce  packet  loss  rate  experienced  
by  upper  layers  

Simple solution to improve reliability - ACK

§  when  node  B  receives  a  data  packet  from  node  A,  


it  sends  an  Acknowledgement  (ACK)  
 
§  this  approach  adopted  in  many  protocols  
e.g.  MACAW  [Bharghavan,  1994],  IEEE  802.11  MAC  

§  if  node  A  fails  to  receive  an  ACK,  it  will  retransmit  the  
packet  

A   B   C  

14
IEEE 802.11 wireless MAC
§  distributed  and  centralized  MAC  components  
 

§  Distributed  Coordina7on  Func7on  (DCF)  


§  Point  Coordina7on  Func7on  (PCF)  

§  DCF  suitable  for  mul7-­‐hop  ad  hoc  networking  

§  DCF  is  a  Carrier  Sense  Mul7ple  Access/Collision  Avoidance  


(CSMA/CA)  protocol  

IEEE 802.11 DCF


§  (op7onally)  uses  RTS-­‐CTS  exchange  to  avoid  hidden  terminal  
problem  
§  any  node  overhearing  a  CTS  cannot  transmit  for  the  dura7on  
of  the  transfer  

§  uses  ACK  to  improve  reliability  

§  any  node  receiving  the  RTS  cannot  transmit  for  the  dura7on  of  
the  transfer  
§  to  prevent  collision  with  ACK  when  it  arrives  at  the  sender  
§  when  B  is  sending  data  to  C,  node  A  will  keep  quiet  

A   B   C  

15
Collision avoidance
§  with  half-­‐duplex  radios,  collision  detec7on  is  not  possible  

§  CSMA/CA:  wireless  MAC  protocols  ojen  use  


collision  avoidance  techniques,  in  conjunc7on  with  a  
(physical  or  virtual)  carrier  sense  mechanism  

§  carrier  sense:  


§  when  a  node  wishes  to  transmit  a  packet,  it  first  waits  un7l  the  
channel  is  idle  

§  collision  avoidance:  


§  nodes  hearing  RTS  or  CTS  stay  silent  for  the  dura7on  of  the  
corresponding  transmission  
§  once  channel  becomes  idle,  the  node  waits  (backs  off)  for  a  
randomly  chosen  dura7on  before  amemp7ng  to  transmit  

IEEE 802.11

RTS  =  Request-­‐to-­‐Send  

RTS  
A   B   C   D   E   F  

(assuming  idealised  circular  range)  

16
IEEE 802.11

RTS  =  Request-­‐to-­‐Send  

RTS  
A   B   C   D   E   F  
NAV  =  10  

NAV  =  remaining  7me  to  keep  quiet  

IEEE 802.11

CTS  =  Clear-­‐to-­‐Send  

CTS  
A   B   C   D   E   F  

17
IEEE 802.11

CTS  =  Clear-­‐to-­‐Send  

CTS  
A   B   C   D   E   F  
NAV  =  8  

IEEE 802.11
§  DATA  packet  follows  CTS  
§  successful  data  recep7on  acknowledged  using  ACK    

DATA  
A   B   C   D   E   F  

18
IEEE 802.11
§  DATA  packet  follows  CTS  
§  successful  data  recep7on  acknowledged  using  ACK    

ACK  
A   B   C   D   E   F  

IEEE 802.11

reserved  area  

DATA  
A   B   C   D   E   F  
ACK  

19
note on RTS/CTS effectiveness

DATA  
A   B   C   D   E   F  

transmission  
range  

note on RTS/CTS effectiveness

DATA  
A   B   C   D   E   F  

transmission  
range  

interference  
range  

20
IEEE 802.11: CSMA/CA
 
§  physical  carrier  sense,  and  
§  virtual  carrier  sense  using  Network  AllocaRon  Vector  (NAV)  
§  NAV  is  updated  based  on  overheard  RTS/CTS/DATA/ACK  
packets,  each  of  which  specify  dura7on  of  a  pending  
transmission  

§  nodes  stay  silent  when  carrier  sensed  (physical/virtual)  

§  backoff  intervals  used  to  reduce  collision  probability  

IEEE 802.11: backoff interval

§  when  transmi\ng  a  packet,  choose  a  backoff  interval    in  


the  range  [0,cw]  
§  cw  is  conten7on  window  

§  count  down  the  backoff  interval  when  medium  is  idle  
§  count-­‐down  is  suspended  if  medium  becomes  busy  

§  when  backoff  interval  reaches  0,  transmit  RTS  

21
IEEE 802.11: DCF example

B1  =  25   B1  =  5  
wait   data  

data   wait  
B2  =  20   B2  =  15   B2  =  10  

§  let  cw  =  31  


§  B1  and  B2  are  backoff  intervals  at  nodes  1  and  2  

Backoff interval
§  7me  spent  coun7ng  down  backoff  intervals  is  a  part  of  
MAC  overhead  

§  choosing  a  large  cw  leads  to  large  backoff  intervals  and  
can  result  in  larger  overhead  

§  choosing  a  small  cw  leads  to  a  larger  number  of  collisions  
(when  two  nodes  count  down  to  0  simultaneously)  

§  since  the  number  of  nodes  amemp7ng  to  transmit  


simultaneously  may  change  with  7me,  some  
mechanism  to  manage  contenRon  is  needed  

§  IEEE  802.11  DCF:  contenRon  window  cw  is  chosen  


dynamically  depending  on  collision  occurrence  

22
Binary Exponential Backoff in DCF

§  when  a  node  fails  to  receive  CTS  in  response  to  its  RTS,  it  
increases  the  conten7on  window  
§  cw  is  doubled  (up  to  an  upper  bound)  

§  when  a  node  successfully  completes  a  data  transfer,  it  


restores  cw  to  cwmin  

§  cw  follows  a  sawtooth  curve  

MILD Algorithm in MACAW


[Bharghavan  et  al.,  “MACAW:  a  media  access  protocol  for  wireless  LAN’s,”  in  
Proc.  ACM  SIGCOMM,  1994.]  
 

§  MILD:  mul7plica7ve  increase,  linear  decrease  

§  when  a  node  successfully  completes  a  transfer,  


reduces  cw  by  1  
§  in  802.11  cw  is  restored  to  cwmin  
 à  cw  reduces  much  faster  than  it  increases  
§  MACAW:  cw  reduces  slower  than  it  increases  
   à  exponen7al  increase,  linear  decrease  

§  MACAW  can  avoid  wild  oscilla7ons  of  cw  when  a  


large  number  of  nodes  contend  for  the  channel  

23
Alternative contention resolution
mechanism
§  HIPERLAN  standard  (“failed”  European  counterpart  to  IEEE  802.11)  
§  elimina7on  yield  non-­‐preemp7ve  mul7ple  access  (EY-­‐NPMA)  

§  eliminaRon  phase  


§  node  transmits  a  burst  for  a  random  number  of  slots  
(geometrically  distributed)  
§  if  medium  idle  at  the  end  of  the  burst,  go  to  yield  phase,  
else  give  up  un7l  next  round  

§  yield  phase  


§  stay  silent  for  a  random  number  of  slots  
(geometrically  distributed)  
§  if  medium  s7ll  silent,  transmit  

Receive-initiated mechanism
§  [Talucci,  Gerla  and  Frama,  “MACA-­‐BI  (MACA  By  Invita7on)-­‐a  receiver  oriented  
access  protocol  for  wireless  mul7hop  networks,”  in  Proc.  IEEE  PIMRC  1997]  
§  [Garcia,  Tzamaloukas,  “Reversing  the  collision-­‐avoidance  handshake  in  
wireless  networks,”  in  Proc.  MobiCom,  1999]  

§  in  most  protocols,  sender  ini7ates  a  transfer  


§  alterna7vely,  a  receiver  may  send  a  Ready-­‐To-­‐Receive  (RTR)  
message  to  sender,  reques7ng  it  to  begin  packet  transfer  
 

§  sender  node  on  receiving  the  RTR  transmits  data  


§  how  does  a  receiver  determine  when  to  poll  a  sender  with  
RTR?  à  based  on  history  &predic7on  of  traffic  from  sender  

24
Another MACAW proposal: RRTS
§  when  node  A  sends  an  RTS  to  B,  while  node  C  is  receiving  
from  D:  node  B  cannot  reply  with  a  CTS,  since  B  knows  
that  D  is  sending  to  C  

§  when  transfer  from  C  to  D  is  complete,  node  B  can  send  a  
Request-­‐for-­‐RTS  (RRTS)  to  node  A  
§  node  A  may  then  immediately  send  RTS  to  node  B  

A   B   C   D  
RTS   DATA  

Another MACAW proposal: RRTS

§  but  does  not  work  in  the  scenario  below:  


§  node  B  may  not  receive  the  RTS  from  A  at  all,  
due  to  interference  with  transmission  from  C  

A   B   C   D  
RTS   DATA  

25
Fairness

§  many  defini7ons  of  fairness  plausible  

§  simplest  defini7on:  


“all  nodes  should  receive  equal  bandwidth”  

A   B  
two  flows  

C   D  

Fairness
§  assume  that  ini7ally,  A  and  B  both  choose  a  backoff  interval  
in  range  [0,31],  but  their  RTSs  collide  

§  nodes  A  and  B  then  choose  from  range  [0,63]  


§  node  A  chooses  4  slots  and  B  chooses  60  slots  
§  ajer  A  transmits  a  packet,  it  next  chooses  from  range  [0,31]  
§  possible  that  A  may  transmit  several  packets  before  B  
transmits  its  first  packet  

A   B  
two  flows  

C   D  

26
Fairness Issue

§  unfairness  occurs  when  one  node  has  backed  off  much  
more  than  some  other  node  

A   B  
two  flows  

C   D  

Fairness: some MAC solutions


§  MACAW:  per-­‐flow  (per  receiver)  cw  
§  DFS:    backoff  intervals  based  on  (PACKET_SIZE/WEIGHT)  
§  Balanced  MAC:  link  access  probability  based  on  connec7vity  
§  EsRmaRon-­‐based  MAC:  cw  based  on  bandwidth  es7mates  
§  PFCR:  link  access  probability  based  on  success/failure  of  
transmi\ng  a  packet  

A   B  
two  flows  

C   D  

27
MACAW solution for fairness
§  when  a  node  transmits  a  packet,  it  appends  the  cw  value  
§  all  nodes  hearing  that  cw  value  use  it  for  their  future  
transmission  aaempts  

§  cw  is  an  indicaRon  of  the  level  of  congesRon  in  the  
vicinity  of  a  specific  receiver  node  
àMACAW  proposes  maintaining  cw  independently  
       for  each  receiver  (i.e.  per  flow  not  per  node)  

§  using  per-­‐receiver  cw  is  par7cularly  useful  in  mulR-­‐hop  


environments,  since  conges7on  level  at  different  
receivers  can  be  very  different  

Weighted fair queueing


[Keshav,  “Engineering  Approach  to  Computer  Networking”  (book),  1997]  
 

§  assign  a  weight  to  each  node  

§  bandwidth  used  by  each  node  should  be  


proporRonal  to  the  weight  assigned  to  the  node  

28
Distributed Fair Scheduling (DFS)
[Vaidya,  Bahl  and  Gupta,  “Distributed  Fair  Scheduling  in  a  wireless  LAN,”  in  Proc.  
MobiCom,  2000]  
 
§  fully  distributed  algorithm  for  achieving  weighted  fair  queueing  

§  chooses  backoff  intervals  proporRonal  to  


(PACKET_SIZE/WEIGHT)  
 
§  DFS  amempts  to  mimic  the  centralized  Self-­‐Clocked  Fair  
Queueing  algorithm  [Golestani,1994]  
 
§  works  well  on  a  LAN  

DFS

B1  =  15   B1  =  10   B1  =  5  
wait   wait  
collision  !  
data   data  
B2  =  5   B2  =  5   B2  =  5  

§  assume  equal  packet  size  


§  weight  of  node  1  =  1  
§  weight  of  node  2  =  3  
§  B1  =  15    (DFS  actually  picks  a  random  value  with  mean  15)  
§  B2  =  5        (DFS  picks  a  value  with  mean  5)  

29
DFS: impact of collisions

§  ajer  collision  resolu7on,  either  node  1  or  node  2  may  


transmit  a  packet  

§  the  two  alterna7ves  may  have  different  fairness  proper7es  


(since  collision  resoluRon  can  result  in  priority  inversion)  

DFS

B1  =  10   B1  =  10   B1  =  5  
wait   wait   wait   data  

data   data   data  


B2  =  5   B2  =  5   B2  =  5  

collision  resoluRon  

30
DFS
§  DFS  uses  randomiza7on  to  reduce  collisions  
§  alleviates  nega7ve  impact  of  synchronizaRon  

§  DFS  also  uses  a  shiged  conten7on  window  for  choosing  ini7al  
backoff  interval  
§  reduces  priority  inversion  (which  leads  to  short-­‐term  
unfairness)  

802.11  
0   31  
DFS  
0   31   61  

DFS
§  due  to  large  cw,  DFS  can  poten7ally  yield  lower  
throughput  than  IEEE  802.11  
§  trade-­‐off  between  fairness  and  throughput  

§  in  mul7-­‐hop  network,  proper7es  of  DFS  s7ll  need  to  be  
characterized  
§  fairness  in  mul7-­‐hop  case  affected  by  hidden  terminals  
§  may  need  use  of  a  copying  technique,  analogous  to  
window  copying  in  MACAW,  to  share  some  protocol  
state  informa0on  

31
Fairness in multi-hop networks

§  several  defini7ons  of  fairness:  


[Ozugur,  1998]  
[Vaidya,  1999]  
[Luo,  2000]  
[Nandagopal,2000]  

§  hidden  terminals  make  it  difficult  to  achieve  a  desired  


no7on  of  fairness  

32

You might also like