Mobile Computing Unit 5
Mobile Computing Unit 5
UNIT V
Recommended Books:
Source
Destination
• Self-creating
– not rely on a preexisting fixed infrastructure
• Self-organizing
– no predetermined topology
• Self-administering
– no central control
• creating a network “on the fly”
• Infrastructure less
• No fixed routers
• Highly mobile
• Changing topology
UNIT- V MOBILE COMPUTING 7
The characteristics of Ad-hoc Network
• Link instability
• Resource poor
• Limited energy resources
• Limited wireless transmission range
• Broadcast nature of the wireless medium
• Hidden terminal problem
• 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)
UNIT- V MOBILE COMPUTING 8
Advantages / Disadvantages Of Ad-hoc
Network
Advantages:
– Can be created and used “any time, anywhere”
• No preexisting fixed infrastructure is prerequisite
– Intrinsically fault-resilient
• No fixed topology
Disadvantages:
– Energy-constrained nodes
– Bandwidth-constrained, variable-capacity
wireless links
– Dynamic topology
Reactive Protocols
DSR TORA AODV
Hybrid Protocols
ZRP
Hierarchical Protocols
CBRP GSR
Geographical Protocols
LAR GLS
Multicast Protocols
CBM NZR
Geocasting Protocols
Geo LBM
TORACOMPUTING
UNIT- V MOBILE 13
Proactive Protocols
• Proactive: maintain routing information independently of
need for communication
• Update messages send throughout the network
periodically or when network topology changes.
• Low latency, suitable for real-time traffic
• Bandwidth might get wasted due to periodic updates
• Pro-active (Table-driven) (DSDV (Highly Dynamic
Destination-Sequenced Distance Vector routing protocol)
, IARP (Intrazone Routing Protocol/pro-active part of the
ZRP)
• They maintain O(N) state per node, N = #nodes
UNIT- V MOBILE COMPUTING 14
On-Demand or Reactive
Routing
• Reactive: discover route only when you need it
• Saves energy and bandwidth during inactivity
• Can be bursty -> congestion during high activity
• Significant delay might occur as a result of route
discovery
• Good for light loads, collapse in large loads
• Reactive (On-demand) (AODV (Ad hoc On Demand
Distance Vector routing protocol) , DSR (Dynamic
Source Routing protocol) , IERP (Interzone Routing
Protocol/reactive part of the ZRP) , DYMO (DYnamic
Manet On-demand routing protocol) , TORA
(Temporally-Ordered Routing Algorithm routing protocol)
)
UNIT- V MOBILE COMPUTING 15
Hybrid Routing
• Proactive for neighborhood, Reactive for far
away (Zone Routing Protocol, Haas group)
• Proactive for long distance, Reactive for
neighborhood (Safari)
• Attempts to strike balance between the two
• Hybrid (Pro-Active/Reactive) :- e.g. ZRP (Zone
Routing Protocol)
Distance Vector routing protocols are less Link State routing protocols are very much
scalable such as RIP supports 16 hops and IGRP scalable supports infinite hops.
has a maximum of 100 hops.
Distance Vector are classful routing protocols Link State routing protocols are classless which
which means that there is no support of Variable
Length Subnet Mask (VLSM) and Classless Inter means that they support VLSM and CIDR.
Domain Routing (CIDR).
Distance Vector routing protocols uses hop count Cost is the metric of the Link State routing
and composite metric protocols.
Distance Vector routing protocols support Link State routing protocols support contiguous
Discontiguous subnets . subnets.
Contain knowledge about the whole network Contain knowledge about neighborhood
• Disadvantages
The main disadvantage is the large size of the routing message.
• As the entire topology table is broadcasted with each update, a
considerable amount of bandwidth is consumed.
• The latencyof the link state change propagation depends on the
update period, meaning that it has to be carefully chosen.
Z
S E
F
B
C M L
J
A G
H D
K
I N
[S] Z
S E
F
B
C M L
J
A G
H D
K
I N
Z
S [S,E]
E
F
B
C M L
J
A [S,C] G
H D
K
I N
Z
S E
F [S,E,F]
B
C M L
J
A G
H D
[S,C,G] K
I N
Z
S E
F [S,E,F,J]
B
C M L
J
A G
H D
K
I [S,C,G,K] N
Z
S E
[S,E,F,J,M]
F
B
C M L
J
A G
H D
K
I N
Z
S RREP [S,E,F,J,D]
E
F
B
C M L
J
A G
H D
K
I N
DATA [S,E,F,J,D] Z
S E
F
B
C M L
J
A G
H D
K
I N
RREQ
UNIT- V MOBILE COMPUTING 44
Route Maintenance
• Hop-by-hop acknowledgement
– Link-level acknowledgement IEEE 802.11
– Passive acknowledgement (Overhearing)
– DSR specific acknowledgement
• RERR (Route Error packet)
– Informs the source of any broken link.
– Source removes any routes containing broken link from route cache.
• Packet Salvaging
– An intermediate node can use an alternate route from its own cache in case of a
failed link.
• Gratuitous route repair
– A source node receiving an RERR packet piggybacks the RERR in the following
RREQ.
– Helps clean up cashes of other nodes in network.
• Promiscuous listening
– When a node overhears packet checks to see whether it could be routed via
itself to gain a shorter route and sends a gratuitous RREP to source.
– Learn different routes without participating in routing process.
• Packet header size grows with route length due to source routing
• Flood of route requests may potentially reach all nodes in the network
• Care must be taken to avoid collisions between route requests propagated
by neighboring 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
• 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.
• For some proposals for cache invalidation,
– Static timeouts
– Adaptive timeouts based on link stability
• AODV retains the desirable feature of DSR that routes are maintained
only between nodes which need to communicate
• Route Requests (RREQ) are forwarded in a manner similar to DSR
Z
S E
F
B
C M L
J
A G
H D
K
I N
Z
S E
F
B
C M L
J
A G
H D
K
I N
Z
S E
F
B
C M L
J
A G
H D
K
I N
Z
S E
F
B
C M L
J
A G
H D
K
I N
Z
S E
F
B
C M L
J
A G
H D
K
I N
Z
S E
F
B
C M L
J
A G
H D
K
I N
Z
S E
F
B
C M L
J
A G
H D
K
I N
Represents
UNIT- VaMOBILE
link on the forward path
COMPUTING 59
Route Request and Route
Reply
• Route Request (RREQ) includes the last known sequence
number for the destination
Destination
N1
Source
N4 N7
N3 N6
RREQ
UNIT- V MOBILE COMPUTING 61
Path Maintenance
E F
C
B
A
B C
D
A D G
G
E F
UNIT- V MOBILE COMPUTING 67
E F
TORA – Link Reversal
When a node has no downstream links, it reverses
the direction of one or more links
B C B C
A D G A D G
E F E F
B C B C
A D G A D G
E F E F
The heights of the nodes for a given destination to each other determine the direction
of the edges of the directed acyclic graph. The DAG is destination oriented (routed at
the destination) when the quintuples which represent the heights are maintained in
lexicographical order, the destination having the smallest height, traffic always flowing
downstreams. Heights are however not needed for route discovery.
• Also nodes which do not currently need to maintain a route for themselves or for
others won't change a height value. Each node has a Route-required flag for that
purpose, additionally the time since the last UPD (update-) packet was sent is
recorded.
Each node maintains a neighbor table containing the height of the neighbor nodes.
Initially the height of all the nodes is NULL. (This is not zero "0" but NULL "-") so their
quintuple is (-,-,-,-,i). The height of a destination neighbor is (0,0,0,0,dest).
• 1 Generate: The node has lost its last downstream link due to a
failure. The node defines a new "reference level", so it sets oid
(originator id) to its node id and t to the time of the failure. This is
done only if the node has upstream neighbours. If not it sets its
height to NULL.
• 2 Propagate: The node has no more downstream link due to a link
reversal following the receipt of an update packet and the reference
levels (t,oid,r) of its neighbours are not equal. The node then
propagates the references level of its highest neighbour and sets the
offset to a value which is lower (-1) than the offset of all its
neighbours with the maximum level.
• 3 Reflect: The node has lost its downstream links due to a link
reversal following the receipt of an update packet and the reference
heights of the neighbours of the node are equal with the reflection bit
not set. The node then reflects back the refence height by setting
the reflection bit. It's d value is set to 0.
UNIT- V MOBILE COMPUTING 78
Temporally-Ordered Routing Algorithm (TORA) Route Maintenance
• 4 Detect: The node has lost its downstream links due to a link reversal
following the receipt of an update packet and the reference heights of the
neighbours of the node are equal with the reflection bit set. This means that
the node has detected a partition and begins the route erasure procedure.
The height values are set to NULL.
• 5 Generate: The node has lost its last downstream link due to a link
reversal following the receipt of an update packet and the reference haights
of all the neighbours are equal with the reflection bit set and the oid of the
neighbours heights isn't the node's id. The node then sets t to the time of
the link failure and sets oid to its own id. The d value is set to 0. This means
that the link failure required no reaction. The node experienced a link failure
between the time it propagated a higher reference (from someone else) and
the time this level got reflected from a place further away in the network.
Because the node didn't define the new reference level itself this is not
necessarily an indication of a partitioning of the network. So the node simply
defines a new higher reference level with the time of the link failure.
• TORA Disadvantages :
• It relies on synchronized clocks among nodes in the network.
• It also relies on intermediate lower layers for certain
functionality.
• TORA is not energy efficient and does not scale to large
networks.
• exhibits instability behavior similar to "count-to-infinity"
problem in distance vector routing protocols
UNIT- V MOBILE COMPUTING 86
CBRP( Cluster Based Routing
Protocol )
• The idea behind CBRP is to divide the nodes of an Ad-hoc network
into a number of overlapping or disjoint clusters. One node is
elected as cluster head for each cluster. This cluster head maintains
the membership information for the cluster. Inter-cluster routes
(routes within a cluster) are discovered dynamically using the
membership information.
• CBRP is based on source routing, similar to DSR. This means that
intracluster routes (routes between clusters) are found by flooding
the network with Route Requests (RREQ). The difference is that the
cluster structure generally means that the number of nodes
disturbed is much less. Flat routing protocols, i.e. only one level of
hierarchy, might suffer from excessive overhead when scaled up.
• CBRP is like the other protocols fully distributed. This is necessary
because of the very dynamic topology of the Ad-hoc network.
Furthermore, the protocol takes into consideration the existence of
unidirectional links.
Cluster heads can learn about other cluster head that are 11
three hops away by looking at the CAT they receive.
the computed 2 7
strict source route of 5 6
3->11 is: [11,9,4,3] UNIT- V MOBILE COMPUTING 99
Route Error Detection
• Use source routing for actual packet forwarding
• A forwarding node sends a Route Error Message (ERR) to packet
source if the next hop in source route is unreachable
11 (D)
CBRP Disadvantages:
-Integrity no corruption
• Idea:
• Malicious node announces better routes than the
other nodes in order to be inserted in the ad-hoc
network
• How ?
• - Redirection by changing the route sequence
number
• - Redirection with modified hop count
• - Denial Of Service (DOS) attacks
UNIT- V MOBILE COMPUTING 112
Attacks using modification
- Node A will broadcast a message asking the better path to reach the node
D.
- The best path is chosen depending on the metric of the different routes
- If an intruder replies with the shortest path, it inserts itself in the
network UNIT- V MOBILE COMPUTING 113
Attacks using modification
Node A Node B
Intruder
Node C Node D
Node A Node B
Intruder
Node C Node D
Node E
• Idea :
• How ?
• - Spoofing MAC address of other nodes
•
A C
B D E X
A C
•
M
B D E X
M
B D E X
• Idea:
• - Generates traffic to disturb the good operation of an ad-hoc
network
• How ?
• - Falsifying route error messages
• - Corrupting routing state
• - Routing table overflow attack
• - Replay attack
• - Black hole attack
• Replay attack:
B) Managed open
• Can use existing infrastructure certificate servers, access points etc.
• Key issue: various depending on system accessed
• Increasing in usage as mobile devices become more popular
C) Managed hostile
• Classic ad-hoc networks
• Key issue: confidentiality and security
• War/disaster areas UNIT- V MOBILE COMPUTING 128
Solutions to problems in ad-hoc routing
2. Protocol enhancements
• Techniques to enhance security of existing
routing protocols
• Examples:
– Security-Aware ad-hoc Routing, SAR
– Secure Routing Protocol, SRP
– The Selfish Node, TSN
UNIT- V MOBILE COMPUTING 129
SAR
overview
• Symmetric key encryption
• Only use routing paths having required trust level
• Shared symmetric keys for each trust level – use existing
infrastructure for CA and key distribution
• Requires managed open environment
SAR evaluation
• Pros:
Secure as long as CA not compromised
Network infrastructure not exposed (all packets encrypted)
• Cons:
Excessive power consumption (enc/dec)
Misbehaving nodes not prevented
UNIT- V MOBILE COMPUTING 130
SRP
Overview
• Based on a security association (SA) between the
destination and source node (set up during key
exchange)
• Public key encryption
• Routing path sent unencrypted with each packet
• Requires existing CA – managed open environment
SRP evaluation
• Pros:
Secure as far as confidentiality goes
Less processing overhead than SAR (only at endpoints)
• Cons:
Exposes network infrastructure (unenc. routing path)
Susceptible to “Invisible Node” attack
UNIT- V MOBILE COMPUTING 131
TSN
Overview
• Open environment – no pre-requirements but can use existing
infrastructure
• Primary threat: DOS attack
• Concept taken from Darwin‟s theories
• Problem solution: Introduce penalty for misbehaving notes
TSN components
• The monitor – “Neighborhood watch”
– Monitors other nodes network activity
– Sends warnings to the reputation system
• The reputation system – “Gossip”
– Spreads “rumors” about nodes
– Action depends on the reputation of the reporting node
• The path manager
– Responsible for changes in the routing table
• The trust manager
– Keeps list of trustworthy and not trustworthy nodes
Pros:
• Prevents misbehaving nodes from operating
• Can be combined with other techniques
Cons:
• Confidentiality not guaranteed (no encryption)
• Causes extra overhead (processing and network)
3. Secure protocols
• Instead of extending current protocols, create
new protocols with higher security
requirements
• Two examples:
Authenticated Routing for Ad-hoc Networks, ARAN
Secure Position Aided Ad hoc Routing, SPAAR
– Transmission
• Routing path discovery packets (RDP) are encrypted using destination’s
public key at each intermediate node
• Each intermediate node stores the route pair (previous node + destination node)
until route times out (no traffic for a specified period of time)
• Destination node replies to the first RDP received and all RDP:s with a shorter
route path
• Once source node has received a reply to the RDP communication can begin,
all encrypted using receiver’s public key
UNIT- V MOBILE COMPUTING 135
ARAN Evaluation
Pros:
• Secure as long as CA is not compromised
• Confidentiality guaranteed (public key encryption)
• Network structure not exposed (encrypted)
• Resistant to most attacks
Cons:
• Extra memory required (each node stores routing
pairs)
• Moderate processing overhead for encryption