You are on page 1of 26

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
which way
do I go?

– Routing for Ad Hoc Networks (II)


#

DSR: route error (RERR)

RERR  [J-­‐D]  
S   E  
F  
B  
C   M   L  
J  
A   G  
H   D  
K  
I   N  

§  J  sends  a  route  error  to  S  along  route  J-­‐F-­‐E-­‐S  when  its  aAempt  to  
forward  the  data  packet  S  (with  route  SEFJD)  on  J-­‐D  fails  
§  nodes  hearing  RERR  update  their  route  cache  to  remove  link  J-­‐D  

2
DSR: Advantages
§  routes  maintained  only  between  nodes  who  need  
to  communicate  (on-­‐demand  reac,ve  rou,ng)  
§  reduces  overhead  of  route  maintenance  

§  route  caching  can  further  reduce  control  overhead  of  


route  discovery    

§  single  route  discovery  may  yield  many  routes  to  the  
des7na7on,  due  to  intermediate  nodes  replying  from  
local  caches  

§  source  rouLng  guarantees  loop-­‐free  routes  

DSR: Disadvantages
§  packet  header  size  grows  with  route  length  due  to  
source  rou7ng  

§  flood  of  route  requests  may  potenLally  reach  all  nodes  
in  the  network  

§  care  must  be  taken  to  avoid  collisions  between  route  
requests  propagated  by  neighbouring  nodes  
§  inser7on  of  random  delays  before  forwarding  RREQ  

§  increased  conten7on  if  too  many  route  replies  come  back  
due  to  nodes  replying  using  their  local  cache  
§  RREP  storm  problem  
§  may  be  eased  by  preven7ng  a  node  from  sending  RREP  if  it  hears  
another  RREP  with  a  shorter  route  

3
DSR: Disadvantages
§  intermediate  node  may  send  RREP  using  a  stale  cached  
route,  thus  polluLng  other  caches  
§  problem  can  be  eased  if  some  mechanism  to  purge  (potenLally)  
invalid  cached  routes  is  incorporated  
§  for  some  proposals  for  cache  invalida7on,  see  
Y.  Hu  and  D.  Johnson,  “Caching  Strategies  in  On-­‐Demand  Rou7ng  Protocols  for  Wireless  Ad  
Hoc  Networks,”  in  Proc.  MobiCom,  2000  
§  sta7c  7meouts  
§  adap7ve  7meouts  based  on  link  stability  

Ad hoc On-demand Distance Vector routing


(AODV)
 

[Perkins  and  Royer,  “Ad  hoc  on-­‐demand  distance  vector  rou7ng,”  in  Proc.  IEEE  Wmcsa,  ‘99.]  
[hAp://www.ie\.org/rfc/rfc3561.txt]  or  [hAp://tools.ie\.org/pdf/rfc3561.pdf]  
 
 

§  DSR  includes  source  routes  in  packet  headers  


§  resul7ng  large  headers  can  some7mes  degrade  performance  
§  par7cularly  when  data  contents  of  a  packet  are  small  

§  AODV  aAempts  to  improve  on  DSR  by  maintaining  rouLng  tables  
at  the  nodes,  so  that  data  packets  do  not  have  to  contain  routes  

§  AODV  retains  the  desirable  reac7ve  feature  of  DSR  


i.e.  routes  maintained  only  between  nodes  which  need  to  communicate  

4
AODV
§  Route  Requests  (RREQ)  forwarded  in  a  manner  similar  to  DSR  

§  when  a  node  re-­‐broadcasts  a  RREQ,  it  sets  up  a  


REVERSE  PATH  (rouLng  table  entry)  poinLng  
towards  the  source  
§  AODV  assumes  symmetric  (bi-­‐direc7onal)  links  

§  when  the  intended  des7na7on  receives  a  RREQ,  it  replies  by  
sending  a  Route  Reply  (RREP)  

§  RREP  travels  along  reverse  path  set  up  by  RREQ  forwarding  

AODV: route requests


Y  

Z  
S   E  
F  
B  
C   M   L  
J  
A   G  
H   D  
K  
I   N  

represents  a  node  that  has  received  RREQ  for  D  from  S  

5
AODV: route requests
Y  
Broadcast  transmission  
[hop_count=0]  
Z  
S   E  
F  
B  
C   M   L  
J  
A   G  
H   D  
K  
I   N  

represents  transmission  of  RREQ  

AODV: reverse path set-up


Y  

[hop_count=1]   Z  
S   E  
F  
B  
C   M   L  
J  
A   G  
H   D  
K  
I   N  

represents  links  on  Reverse  Path  


§  nodes  B,  C,  E  forward  RREQ  received  from  C  &  increment  RREQ  hop_count  

6
AODV: reverse path set-up
Y  

Z  
S   [hop_count=2]  
E  
F  
B  
C   M   L  
J  
A   G  
H   D  
K  
I   N  

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

AODV: reverse path set-up


Y  

Z  
S   E  
[hop_count=3]  
F  
B  
C   M   L  
J  
A   G  
H   D  
K  
I   N  

7
AODV: reverse path set-up
Y  

Z  
S   E   [hop_count=4]  
F    
B  
C   M   L  
J  
A   G  
H   D  
K  
I   N  

§  node  D  does  not  forward  RREQ,  because  it  is  


itself  the  intended  target  of  the  route  discovery  

AODV: route reply


Y  

[hop_count=4]  [hop_count=3]  
Z  
    [hop_count=2]  
S   E  
  [hop_count=1]  
F  
B    
C   M   L  
J  
[hop_count=0]  
A   G  
 
H   D  
K  
I   N  

represents  links  on  path  taken  by  RREP  

8
AODV: forward path set-up
Y  

Z  
S   E  
F  
B  
C   M   L  
J  
A   G  
H   D  
K  
I   N  

§  forward  links  (ROUTING  TABLE  ENTRIES  USED  TO  FORWARD  DATA)  
are  set  up  when  RREP  travels  along  reverse  path    
represents  links  on  the  forward  path  

AODV: data delivery


Y  
DATA  
Z  
S   E  
F  
B  
C   M   L  
J  
A   G  
H   D  
K  
I   N  

§  rouLng  table  entries  used  to  forward  data  packet  


§  route  is  not  included  in  packet  header  

9
AODV: route reply
§  intermediate  node  (not  the  des7na7on)  may  also  send  a  
Route  Reply  (RREP)  provided  that  it  knows  a  more  recent  
path  than  one  previously  known  to  sender  S  

§  to  determine  whether  the  path  known  to  an  intermediate  


node  is  more  recent,  desLnaLon  sequence  numbers  used  

§  likelihood  that  an  intermediate  node  will  send  a  RREP  when  
using  AODV  not  as  high  as  in  DSR  
§  new  RREQ  by  node  S  for  a  desLnaLon  is  assigned  
last  valid  desLnaLon  sequence  number  
§  intermediate  node  which  knows  a  route,  but  with  a  
smaller  sequence  number  (i.e.  older),  cannot  send  RREP  

AODV: RREQ & DestSeqNum


Y  
Broadcast  transmission  
[hop_count=0]  
DestSeqNum=3   Z  
S   E  
F  
B  
C   M   L  
J  
A   G  
H   D  
K  
I   N  

represents  transmission  of  RREQ  


assume  last  valid  DestSeqNum  for  D  at  S  is  3  

10
AODV: RREQ & DestSeqNum
Y  
[hop_count=1]  
DestSeqNum=3   Z  
 
S   E  
F  
B  
C   M   L  
J  
A   G  
H   D  
K  
I   N  

represents  links  on  Reverse  Path  

AODV: RREQ & DestSeqNum


Y  

[hop_count=2]   Z  
S   DestSeqNum=3  
E  
 
F  
B  
C   M   L  
J  
A   G  
H   D  
K  
I   N  

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

11
AODV: RREQ & DestSeqNum
Y  

Z  
S   E   [hop_count=3]  
DestSeqNum=3  
F  
B    
C   M   L  
J  
A   G  
H   D  
K  
I   N  

AODV: RREQ & DestSeqNum


Y  

Z  
S   E   [hop_count=4]  
DestSeqNum=3  
F  
B    
C   M   L  
J  
A   G  
H   D  
K  
I   N  

§  node  D  does  not  forward  RREQ,  because  it  is  


itself  the  intended  target  of  the  route  discovery  

12
AODV: RREQ & DestSeqNum
Y  

Z  
S   E  
F  
B  
C   M   L  
J  
A   G  
H   D  
K  
I   N  
[hop_count=4]  
DestSeqNum=3  
 
represents  links  on  path  taken  by  RREP  

AODV: RREQ & DestSeqNum


Y  

Z  
S   E  
F  
B  
C   M   L  
J  
A   G  
H   D  
K  
I   N  
[hop_count=4]  
DestSeqNum=3  
 
§  all  intermediate  nodes  receiving  RREP  update  their  route  tables  with  
latest  des7na7on  sequence  number  &  also  update  rou7ng  informa7on  
if  it  leads  to  a  shorter  path  

13
AODV: RREP & DestSeqNum
RREQ,   @F  stored  rouLng  table  entry  for  D:  
DestSeqNum=3   next  hop  J,  hop_count=2,  DestSeqNum=2  
(<DestSeqNum  in  RREQ  from  S)  
S   E   èF  fw’s  RREQ  only  
F  
B  
C   M   L  
J  
A   G   D’s  own  
H   D   current  
K   SeqNum=5  
I   @G  stored  rouLng  table  entry  for  D:  
next  hop  K,  hop_count=2,  DestSeqNum=4  
(>DestSeqNum  in  RREQ  from  S)  
 èG  sends  back  RREP  

§  what  about  intermediate  nodes:  


forward  RREQ  or  send  back  RREP?  

AODV: RREP & DestSeqNum


RREQ,   @F  stored  rouLng  table  entry  for  D:  
DestSeqNum=3   next  hop  J,  hop_count=2,  DestSeqNum=2  
(<DestSeqNum  in  RREQ  from  S)  
S   E   èF  fw’s  RREQ  only  
F  
B  
C   M   L  
J  
A   G   RREQ  from  S  fw’d  by  J,  
sends  back  RREP  to  S  via  J,  
H   D   with  DestSeqNum=5  
K  
I   @G  stored  rouLng  table  entry  for  D:  
next  hop  K,  hop_count=2,  DestSeqNum=4  
(>DestSeqNum  in  RREQ  from  S)  
 èG  sends  back  RREP  

§  mulLple  RREP  packets  reach  source  (from  G  &  D)  


§  RREP  from  node  D  freshest,  source  node  S  adopts  this  route  
{hext  hop  E,  cost  4}    with  DestSeqNum=5  
§  all  intermediate  nodes  receiving  a  RREP  (here,  node  C    &  nodes  J,  F,  E)  
update  their  route  tables  with  latest  des7na7on  sequence  number  

14
AODV: RREP & DestSeqNum
RREQ,   @F  stored  rouLng  table  entry  for  D:  
DestSeqNum=3   next  hop  J,  hop_count=2,  DestSeqNum=2  
(<DestSeqNum  in  RREQ  from  S)  
S   E   èF  fw’s  RREQ  only  
F  
B  
C   M   L  
J  
A   G   RREQ  from  S  fw’d  by  J,  
sends  back  RREP  to  S  via  J,  
H   D   with  DestSeqNum=5  
K  
I   @G  stored  rouLng  table  entry  for  D:  
next  hop  K,  hop_count=2,  DestSeqNum=4  
(>DestSeqNum  in  RREQ  from  S)  
 èG  sends  back  RREP  

§  mulLple  RREP  packets  reach  source  (from  G  &  D)  


§  RREP  from  node  D  freshest,  source  node  S  adopts  this  route  
{hext  hop  E,  cost  4}    with  DestSeqNum=5  
§  all  intermediate  nodes  receiving  a  RREP  (here,  node  C    &  nodes  J,  F,  E)  
update  their  route  tables  with  latest  des7na7on  sequence  number  

AODV: timeouts

§  rou7ng  table  entry  maintaining  a  reverse  path  is  purged  


amer  a  Lmeout  interval  
§  should  be  long  enough  to  allow  RREP  to  come  back  

§  rou7ng  table  entry  maintaining  a  forward  path  is  purged  


if  not  used  for  a  ac6ve_route_6meout  interval  
§  if  no  data  being  sent  using  a  par7cular  rou7ng  table  
entry,    that  entry  will  be  deleted  from  the  rou7ng  table  
(even  if  the  route  may  actually  s7ll  be  valid)  

15
AODV: link failure reporting

§  neighbour  of  node  X  is  considered  acLve  for  a  rouLng  table  
entry  if  within  ac6ve_route_6meout  interval  the  neighbour  
sent  a  packet  which  was  forwarded  using  that  entry  

§  when  the  next  hop  link  in  a  rouLng  table  entry  breaks,  all  
acLve  neighbours  are  informed  

§  link  failures  are  propagated  by  means  of  Route  Error  
messages,  which  also  update  desLnaLon  sequence  numbers  

AODV: route error (RERR)


§  when  node  X  unable  to  forward  packet  P  (from  S  to  D)  on  
link  (X,Y),  it  generates  RERR  message  

§  node  X  increments  the  desLnaLon  sequence  number  for  D  


cached  at  node  X  
§  incremented  sequence  number  N  is  included  in  the  
RERR  

§  when  node  S  receives  the  RERR,  it  iniLates  a  new  route  
discovery  for  D  using  des7na7on  sequence  number  N  

§  when  node  D  receives  the  route  request  with  des7na7on  


sequence  number  N,  it  sets  its  sequence  number  to  N  
(unless  it  is  already  larger  than  N)  

16
AODV: link failure detection
§  neighbouring  nodes  periodically  exchange  hello  messages  

§  absence  of  hello  message  used  as  indica7on  of  link  failure  

§  alterna7vely,  failure  to  receive  several  MAC-­‐level  ACKs  may  be  
used  as  indica7on  of  link  failure  

AODV: why sequence numbers?


§  to  avoid  using  old/broken  routes:  to  determine  which  route  is  newer  
§  to  prevent  formaLon  of  loops:  
A   B   C   D  

  E  
§  C  detects  broken  link,  increments  des7na7on  sequence  number  for  D,  
invalidates  known  route  to  D,  and  propagates  RERR  
§  assume  RERR  sent  by  C  is  lost  (A  doesn’t  know  about  failure  of  link  C-­‐D)  
§  now  C  performs  a  route  discovery  for  D  
§  node  A  receives  the  RREQ  (say,  via  path  C-­‐E-­‐A)  
§  without  sequence  numbers,  node  A  would  reply  since  it  knows  a  route  to  D  
via  node  B  &  this  would  result  in  a  loop  (e.g.  C-­‐E-­‐A-­‐B-­‐C  )  
§  BUT  A  will  not  reply  to  the  RREQ  (&  C  will  not  use  the  route  loop),  because  
the  DestSeqNum  for  route  to  D  stored  at  A  is  lower  than  that  in  C’s  RREQ  

17
AODV: Maintining DestSeqNum & Routing Table Entries

•  RFC  3561  (AODV  RouLng)  


hqps://www.ies.org/rfc/rfc3561.txt  
Sec7on  6.1  Maintaining  Sequence  Numbers  
Sec7on  6.2.  Route  Table  Entries  and  Precursor  Lists  

AODV optimization:#
expanding ring search

§  RREQ  are  ini7ally  sent  with  small  TTL  (7me  to  live)  field,  
to  limit  their  propaga7on  
§  DSR  also  includes  a  similar  op7miza7on  

§  if  no  RREP  received,  then  try  larger  TTL  

18
AODV: summary

§  routes  not  included  in  packet  headers  (cf.  DSR)  

§  nodes  maintain  rou7ng  tables,  but  containing  entries  only  for  
routes  that  are  in  ac7ve  use  (cf.  DSDV)  

§  sequence  numbers  used  to  ensure  fresh,  loop-­‐free  routes  

§  at  most  one  next-­‐hop  per  des7na7on  maintained  at  each  node  
§  DSR  may  maintain  several  routes  for  a  single  des7na7on  

§  unused  routes  expire  even  if  topology  does  not  change  

AODV: Advantages

§  routes  established  on-­‐demand  (reac7ve)  

§  does  not  use  source  rou7ng,  but  maintains  rou7ng  tables  at  
each  node  à  lower  packet  header  O/H    

§  des7na7on  sequence  numbers  used  to  find  the  latest  route  
to  des7na7on  

19
AODV: Disadvantages

§  mul7ple  RREP  in  response  to  single  RREQ  can  lead  to  heavy  
control  O/H  
 

§  periodic  beaconing  (“hello”)  leads  to  unnecessary  bandwidth  


consump7on  

Flooding of control packets

20
Flooding of control packets

§  how  to  reduce  the  scope  of  the  route  request  flood  ?  
§  LAR  
§  query  localiza7on  
 
§  how  to  reduce  redundant  broadcasts  ?  
§  broadcast  storm  problem  

Location-Aided Routing (LAR)


[Ko  and  Vaidya,  “Loca7on-­‐aided  rou7ng  (LAR)  in  mobile  ad  hoc  networks,”  
Wireless  Networks,  2000.]  

§  exploits  locaLon  info  to  limit  scope  of  route  request  flood  
§  loca7on  informa7on  may  be  obtained  using  GPS  

§  Expected  Zone  =  region  expected  to  contain  the  current  


loca7on  of  the  des7na7on  
§  determined  based  on  poten7ally  old  loca7on  informa7on,  
and  knowledge  of  the  des7na7on’s  speed  

§  route  requests  limited  to  a  Request  Zone  that  contains  the  
Expected  Zone  and  loca7on  of  the  sender  node  
 

21
LAR: Expected Zone
X  =  last  known  loca7on  of  node  D,  at  7me  t0  
 

Y  =  loca7on  of  node  D  at  current  7me  t1,  unknown  to  node  S  
 

r  =  (t1  -­‐  t0)  *  esLmate  of  D’s  speed  

r   X  

Y  

Expected  Zone  

LAR: Request Zone


Network  Space  

Request  Zone  

r   X  

B   Y  
A  

S   Expected  Zone  

22
LAR
§  only  nodes  within  Request  Zone  forward  route  requests  
§  e.g.  node  A  does  not  forward  RREQ,  but  node  B  does  
 

§  Request  Zone  explicitly  specified  in  the  RREQ  


 

§  each  node  must    know  its  physical  locaLon  to  determine  
whether  it  is  within  the  request  zone  
 

§  if  route  discovery  using  a  given  request  zone  fails  to  find  a  
route,  sender  iniLates  another  route  discovery  (aper  a  
7meout)  using  a  larger  request  zone  
§  larger  request  zone  may  be  the  en7re  network  
 

§  rest  of  route  discovery  protocol  similar  to  DSR  

LAR variations: Adaptive Request Zone


§  each  node  may  modify  the  request  zone  included  in  the  
forwarded  request  

§  modified  request  zone  may  be  determined  using  more  


recent/accurate  informaLon,  and  may  be  smaller  than  
the  original  request  zone  

B  
Request  Zone  adapted  by  B  
S  
Request  Zone  defined  by  sender  S  

23
LAR variations: Implicit Request Zone
§  in  the  previous  scheme,  a  route  request  explicitly  specified  a  
request  zone  

§  alternaLve  approach:  node  X  forwards  a  route  request  


received  from  Y,  if  node  X  is  deemed  to  be  closer  to  the  
expected  zone  as  compared  to  Y  

§  mo7va7on  is  to  aAempt  to  bring  the  route  request  physically  
closer  to  the  des7na7on  node  aper  each  forwarding  

LAR
§  basic  proposal  assumes  that,  iniLally,  loca7on  informa7on  for  
node  X  becomes  known  to  Y  only  during  a  route  discovery  
§  this  loca7on  informa7on  is  used  for  a  future  route  
discovery  
§  each  route  discovery  yields  more  updated  informa7on  
which  is  used  for  the  next  discovery  
 

VariaLons  
 

§  locaLon  informaLon  can  be  piggybacked  on  any  message  


from  Y  to  X  
§  Y  may  also  proacLvely  distribute  its  locaLon  informaLon  
(similar  to  other  protocols  discussed  later  e.g.  DREAM,  GLS)  

24
LAR: Advantages

§  reduces  scope  of  route  request  flood  


 
§  reduces  overhead  of  route  discovery  

LAR: Disadvantages

§  nodes  need  to  know  their  physical  locaLons  

§  does  not  take  into  account  possible  existence  of  


obstrucLons  for  radio  transmissions  

25
26

You might also like