nat-based internet connectivity for multi-homed on-demand ad hoc networks
DESCRIPTION
NAT-Based Internet Connectivity for Multi-Homed On-Demand Ad Hoc Networks. Paal Engelstad and Geir Egeland University of Oslo (UniK) / Telenor R&D, 1331 Fornebu, Norway Presented by: Paal Engelstad http://www.unik.no/~paalee/PhD.htm. Motivation. - PowerPoint PPT PresentationTRANSCRIPT
NAT-Based Internet Connectivity for Multi-Homed On-Demand Ad Hoc Networks
Paal Engelstad and Geir EgelandUniversity of Oslo (UniK) / Telenor R&D, 1331 Fornebu, Norway
Presented by: Paal Engelstad
http://www.unik.no/~paalee/PhD.htm
2
Motivation
Ad hoc networks need to access the fixed Internet– Some nodes connected to external IP-networks may operate as gateways for
other MANET nodes
Previously proposed solutions:– A gateway implementing Mobile IPv4 Foreign Agent (MIP-FA)
• Internet draft by Belding-Royer et al.
• MSc. Thesis on ”MIPMANET” by Alriksson and Jönsson, KTH, August 1999
– A gateway implementing a Network Address Translator (NAT)• Uppsala University’s implementaton of AODV
NAT-based solutions have yet been poorly documented in published material
3
Assume you know AODV...
Short re-cap: A Source Node discovers route to destination on demand
– It floods an RREQ to find a route to a destination– The RREQ forms a return route on each node
The Destination node responds:– It unicasts an RREP along the reverse route– The RREP forms a forward route
Every node maintains its own destination sequence number– Incremented before the flooding– Ensures loop freedom
An intermediate node may reply to RREP on behalf of Destination node if it has a valid route to the destination
With multiple RREPs, the routing protocol prefers– RREPs with higher destination sequence numbers– Fewest hops between source and destination
4
Background (1): MIP-FA
Overview– A gateway with FA-support (MIP-
FA) which understands AODV – A MANET node with MIPv4
support– The MANET registers the
MIP-FA Gateway with its Home Agent
Drawbacks:– High complexity– MIP and AODV makes
unsynchronized modifications to routing table
– MIP requires global IPv4 addresses
Internet
Home AgentExternal Host
Foreign Agent
MANETSource Node
5
Background (2): NAT
Overview
Drawbacks– The well-known drawbacks with the
use of NATs
– Dynamic change of gateways must be solved by MIPv4
Advantages– Less complex, easy to implement and
deploy
– Does not rely on MIPv4 deployment and fixed IPv4 address
Internet
External Host
Network Address Translator
MANETSource Node
1
2 3
4
6
Route Discovery with Proxy RREP
Source Node (SN) broadcasts a RREQ to establish route to External Host (XH)
Gateway impersonates XH, by sending a RREP on behalf of XH.
– Uses XHs IP address as Source IP Address in RREP
– This is a “Proxy RREP” SN forwards packets to XH using the
route established by the Proxy RREP. The gateway forwards the packet to
XH
How about the destination sequence number in a ”Proxy RREP”?
Internet
External Host
Gateway
MANETSource Node
RREQ: Route RequestRREP: Route ReplyXH: External HostNAT: Network Address Translation
RREQ: Route RequestRREP: Route ReplyXH: External HostNAT: Network Address Translation
7
Destination Seqence numbers in Proxy RREP MIP-FA Gateway (Belding-Royer et.al.):
– Source Node normally sets RREQ with• Unknown Seqence Number bit = 1• Destination Sequence Number = 0
– Gateway copies this into the ”Proxy RREP” (i.e. a zero destination sequence number)
AODV-UU NAT-solution: – Use Gateway’s own destination sequence number (a hack)
– Require different IP address spaces• To distinguish internal from external nodes• Not acceptible or at least very limiting
We proposed a better NAT-solution with ”Proxy RREP”: – Implementing the MIP-FA policy (above)
– Ensure that an Internal node never uses a zero destination sequence number
– Hence, a real RREP from an internal MANET node always have preference over a Proxy RREP (i.e. no problem if gateway always send Proxy RREP...)
8
Proxy RREPs and Multi Homing
The Source Node (SN) broadcasts a RREQ to establish route to the external Host (XH)
Both gateways send a Proxy RREP on behalf of the XH
The Source Node forwards packets to XH using the route established by one of the Proxy RREPs.
The “winning” gateway forwards the packet to the XH
Internet
External Host
NAT
MANETSource Node
RREQ: Route RequestRREP: Route ReplyXH: External HostNAT: Network Address Translation
RREQ: Route RequestRREP: Route ReplyXH: External HostNAT: Network Address Translation
NAT
9
Race Conditions - a route needs to be re-discovered The Source Node (SN) broadcasts a RREQ
to establish route to the external Host (XH)
Both gateways send a Proxy RREP on behalf of the XH, GW1 wins
SN sends packets for XH via GW1.
After link break or route timeout, SN broadcasts a new RREQ to re-establish the route to XH
Both gateways send a Proxy RREP on behalf of XH, but this time GW2 “wins”
SN sends subsequent packets for XH via GW2, connection fails
Internet
External Host
GW2(NAT)
MANETSource Node
RREQ: Route RequestRREP: Route ReplyXH: External HostGW: Gateway
RREQ: Route RequestRREP: Route ReplyXH: External HostGW: Gateway
GW1(NAT)
?
10
Demonstrating Race Conditions due to route re-discovery
Testbed experiment (i.e. lab implementation)– Fewer nodes, more static– Active Route Timeout (3 sec of AODV) triggers route re-discovery
Simulations– Many nodes, more mobility, etc...– Network dynamics (such as mobility) triggers route re-discovery
I will only go through the simulations if time permits...
11
Test bed experiment (1) AODV-implementation by Uppsala
University– IEEE 802.11– Linux– MAC-layer filtering
Packet Transmission Interval– 1 sec:
• OK
– 4 sec: (e.g. interactive traffic, Telnet, etc...)• Race conditions
Best performance: 11% probability of (Telnet-) session breakage due to race condition
Increased random max ”processing time” (Tmax):
=> prob. -> 50%
Internet
External Host
GW2(NAT)
MANET
Source Node
GW1(NAT)
Intermediate Node
12
Test bed experiment (2)
0 %
50 %
100 %
0 1 2 3 4 5
Tmax (ms)
From GW1
From GW2
Sha
re o
f RR
EP
s re
ceiv
ed
11
Tmax [ms]
13
Simulation setup
Glomosim, with AODV module
IEEE 802.11, Two-Ray channel model
Traffic pattern: Constant Bit Rate (CBR), 1024 byte packets
50 nodes– Radio Range 50m, 200mx200m square
– Radio Range 10m, 40mx40m square
14
Simulation #1 Testing Race Conditions due to Route Timeout:
– Static scenario, and varying Packet Transmission Interval (PTI):– Race Conditons have a dramatic impact on performance when PTI
exceeds Active Route Timeout of AODV (of 3 sec.).
Variable Packet Transmission Interval (with fixed route timeout, fixed terrain size and no mobility)
0 %
25 %
50 %
500 1000 1500 2000 2500 3000 3500 4000 4500 5000
Packet Transmission Interval (ms)
Ses
sio
n b
reak
ages
/Dat
a P
acke
t
Range 10
Range 50
15
Simulation #2 Network configurations/ topologies that leads to
bad performance?– When gateways are an equal number of hops away from SN– (i.e. on right hand side of figure...)
Distribution of different network configurations (with fixed terrain size and no mobility)
0 %
5 %
10 %
15 %
20 %
25 %
30 %
35 %
40 %
45 %
50 %
0 % 20 % 40 % 60 % 80 %
Session Breaks/Packet for different Network Configurations
Sh
are
of
Ne
two
rk C
on
fig
ura
tio
ns
Range 10m
Range 50m
16
Simulation #3 Testing effects of terrain size (i.e. of node density or of
”strength” of connectivity):– Fully connected network: Probability of 50%
• Attributed to the ”ideal” model of Glomosim
– Problem decreases as terrain size increases, because probability that gateways are an equal number of hops away, decreases.
Variable Terrain Size(with fixed route timeout, 2Kbps CBR and no mobility)
0 %
10 %
20 %
30 %
40 %
50 %
60 %
5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80
Size of Sides of Terrain Square (m)
Se
ss
ion
bre
ak
ag
es
/Da
ta P
ac
ke
t
Range 10
Range 50
(50) (400)(100) (350)(150) (200) (250) (300)
17
Simulation #4 Testing Race Conditions due to link breaks, by adding mobility:
– Random Way Point (with zero rest-time and variable max velocity)– PTI = 1 sec, i.e. safely below the Active Route Timeout of AODV– See that problem increases rapidly to unacceptably high levels, even for relatively low
levels of mobility Other non-deterministic effects (radio-fading, packet collisions, etc.)
occuring in a MANET, and is not easily caught by a simulation model– This effecs will also accellerate the problems of Race Conditions
Variable Mobility(with fixed route timeout, CBR 8 Kbps - i.e.1pkt/sec - and fixed terrain size)
0 %
5 %
10 %
15 %
20 %
25 %
30 %
35 %
40 %
45 %
50 %
0 1 2 3 4 5 6 7 8
Max Random Speed (m/sec)
Ses
sio
n b
reak
ages
/Pac
ket
Range 10
Range 50
(5) (40)(35)(30)(10)(0) (20)(15) (25)
18
Summary of results - I
Our work shows that race conditions due to Proxy RREPs can be damaging in on-demand ad hoc networks
– For smaller networks (testbed)– And for larger networks (simulations)
Race Conditions represents a non-negligible problem, especially for
– Interactive applications where the packet transmission interval easily exceeds the Active Route Timeout of AODV (testbed and simulations)
– Networks with certain level of dynamics and/or mobility (simulation)
19
Summary of results - II
In the paper we propose mechanisms to remove the race conditions with “Proxy RREPs”:
– By making SNs aware of gateways– Breakdown: When 2 SNs communicate with same XH over different gateways
Although results are targeted at NAT-based gateways, they also have relevance to MIP-FA based solution
– We proposed a way to avoid race conditions with Proxy RREPs– However, the problem remains due to ingress filtering
Conclusion: Using proxy RREPs is NOT the way to go!– At least not for NAT-based gateways
20
Proposed working solution
SN discovers that XH is not present locally after unsuccessful route establishment on MANET
SN sets a “Gateway bit” in RREQ for XH Gateways responds with a RREP
establishing route to the GW (i.e. no race conditions will occur)
RREP contains extensions with – XH’s destination IP address
– The functionality/capabilities of the gateway
SN tunnels traffic to selected GW– GW decapsulates and forwards to XH
GW tunnels return traffic from XH to SN
– This is necessary due to specifics in the AODV specification
Internet
External Host
GW2(NAT)
MANET
Source Node
GW1(NAT)
Intermediate Nodesrc=SNdst=XH
Inner IP-header
Outer IP-header
IP-payloadsrc=SNdst=GW1
src=SNdst=XH
Inner IP-header
IP-payload
RREQ: Route RequestRREP: Route ReplyXH: External HostSN: Source Node
RREQ: Route RequestRREP: Route ReplyXH: External HostSN: Source Node
Questions?