Download as pdf or txt
Download as pdf or txt
You are on page 1of 72

CS364 – Mobile Computing

Module-III
Syllabus
Wireless LAN Standards

 IEEE 802 Protocol Architecture,


 IEEE 802.11 System Architecture, Protocol Architecture &
Services, MAC Layer & Management,

 Cellular Networks: Channel allocation, multiple access, location


management, Handoffs (Already Covered in II nd module)

 Adhoc network Routing - Classification of Routing Algorithms,


Algorithms such as DSR, AODV, DSDV, Mobile Agents,
Service Discovery
Ad Hoc Networks
Mobile Ad hoc NETworks (MANETs)
 Mobile Ad hoc NETworks (MANETs) are wireless networks which
are characterized by dynamic topologies and no fixed
infrastructure
 Each node in a MANET is a computer that may be required to act
as both a host and a router
 It is an autonomous collection of mobile users that communicate
over relatively bandwidth constrained wireless links
 Since the nodes are mobile, the network topology may change
rapidly and unpredictably over time
 The network is decentralized, where all network activity including
discovering the topology and delivering messages must be executed
by the nodes themselves
 Routing functionality will be incorporated into mobile nodes
4
A Mobile Ad Hoc Network
(MANET)

MS2
MS2

MS4
MS3 Asymmetric link
MS5

Symmetric link MS7


MS1 MS6

5
Direct Transmission versus
Multi-hop

A B

A C D E B

Energy Consumption
Time delay

6
MANET- Characteristics
 Dynamic network topology
 Bandwidth constraints and variable link capacity
 Energy constrained nodes
 Multi-hop communications
 Limited security
 Autonomous terminal
 Distributed operation
 Light-weight terminals

7
Applications
 Defense applications - On-the-fly communication set up for
soldiers on the ground, fighter planes in the air, etc.

 Crisis-management applications - Natural disasters, where the


entire communication infrastructure is in disarray

 Tele-medicine - Paramedic assisting a victim at a remote location


can access medical records, can get video conference assistance
from a surgeon for an emergency intervention

 Tele-Geoprocessing applications - Combines geographical


information system, GPS and high capacity MS, Queries
dependent of location information of the users, and environmental
monitoring using sensors
8
 Sensor networks – to monitor environmental conditions over a large
area

 Local level – Ad hoc networks can autonomously link an instant and


temporary multimedia network using notebook computers or palmtop
computers to spread and share information among participants at e.g.
conference or classroom

 Personal Area Network (PAN) – pervasive computing i.e. to provide


flexible connectivity between personal electronic devices or home
appliances

 Vehicular Ad hoc Networks – intelligent transportation i.e. to enable


real time vehicle monitoring and adaptive traffic control

 Civilian environments – taxi cab network, meeting rooms, sports


stadiums, boats, small aircraft 9
ROUTING PROTOCOLS
 Routing is the act of moving information across the network from a
source to a destination
 It is also referred as the process of choosing a path over which the
packets are sent
 The routing process usually directs forwarding on the basis of
routing tables which maintain a record of the routes to various
network destinations
 Two activities are involved in this concept:
 Determining optimal routing paths

 Transferring the packets through an internetwork

10
 Routing in Mobile Ad hoc networks is an important issue as these
networks do not have fixed infrastructure and routing requires
distributed and cooperative actions from all nodes in the network

 MANET’s provide point to point routing similar to Internet routing

 Due to rapid topology changes because of node mobility making the


traditional internet routing protocols inappropriate

 Another major difference in the routing is the network address. In


internet routing, the network address (IP address) is hierarchical
containing a network ID and a computer ID on that network

 MANET’s the network address is simply an ID of the node in the


network and is not hierarchical 11
CLASSIFICATION OF ROUTING PROTOCOLS

 Ad hoc routing protocols can be classified into THREE main


categories based on their attitudes towards the maintenance of
routing table
 Table-Driven/ Proactive Routing Protocols

 On-Demand/ Reactive Routing Protocols

 Hybrid

12
Proactive: when a packet needs to be forwarded, the route is
already known
Reactive: Determine a route only when there is data to send
Routing Protocols
• Proactive protocols

– Traditional distributed shortest-path protocols


– Maintain routes between every host pair at all
times
– Based on periodic updates; High routing overhead
– Example: DSDV (destination sequenced distance
vector)

• Reactive protocols

– Determine route if and when needed


– Source initiates route discovery Example: DSR
(dynamic source routing)
• Hybrid protocols
– Adaptive; Combination of proactive and
reactive
– Example : ZRP (zone routing protocol)
Destination-Sequenced Distance-Vector (DSDV)
• DSDV protocol is a table-driven routing protocol
based on the improved version of classical Bellman-
Ford routing algorithm

• Here a node holds a routing table containing all the


possible destinations within the network and the
number of hops to each destination

• DSDV is also based on distance vector routing and


thus uses bidirectional links

• A limitation of DSDV is that it provides only one


route for a source/destination pair
Routing Tables
• Each table entry has a sequence number that is
incremented every time a node sends an updated
message

• Routing tables are periodically updated when the


topology of the network changes and are
propagated throughout the network to keep
consistent information throughout the network

• Each DSDV node maintains two routing tables:


– one for forwarding packets
– one for advertising incremental routing packets
• The routing information sent periodically by a node
contains
– a new sequence number
– destination address
– number of hops to the destination node
– sequence number of the destination

• When the topology of a network changes, a


detecting node sends an update packet to its
neighbouring nodes

• On receipt of an update packet from a neighboring


node, a node extracts the information from the
packet and updates its routing table as follow
DSDV Packet Process Algorithm
1. If the new address has a higher sequence number, the node chooses
the route with the higher sequence number and discards the old
sequence number
2. If the incoming sequence number is identical to the one belonging
to the existing route, a route with the least cost is chosen.
3. All the metrics chosen from the new routing information are
incremented.
4. This process continues until all the nodes are updated. If there are
duplicate updated packets, the node considers keeping the one with
the least-cost metric and discards the rest.
• In case of a broken link, a cost of metric with a new sequence
number (incremented) is assigned to it to ensure that the sequence
number of that metric is always greater than or equal to the
sequence number of that node.
• Figure shows a routing table for node 2, whose neighbours are nodes
1, 3, 4, and 8
• The dashed lines indicate no communications between any
corresponding pair of nodes
• Therefore, node 2 has no information about node 8
• The packet overhead of the DSDV protocol increases
the total number of nodes in the ad-hoc network

• This fact makes DSDV suitable for small networks

• In large adhoc networks, the mobility rate and


therefore the overhead increase, making the network
unstable to the point that updated packets might not
reach nodes on time
• Advantages

– loop-free at all times


– low memory requirements
– quick convergence via triggered updates

• Disadvantages

– large routing overhead,


– usage of only bidirectional links
– suffers from count to infinity problem.
Reactive Routing Protocols
Dynamic Source Routing (DSR)
• Dynamic Source Routing belongs to on-demand routing
protocols

• Source Routing is a technique in which the sender of a


packet determines the complete sequence of nodes through
which to forward the packet

• DSR is composed of two main mechanisms:


– Route Discovery
– Route Maintenance

Reference:
https://www.youtube.com/watch?v=GSEvRI6Bptg
• When a source node wants to transmit a IP packet to a destination
host, the source checks its route cache in order to determine if it
already knows a source route to the destination that it has learned

• If an unexpired route to the destination is found in its route cache,


then it sends the packet through this route by placing in the
packet's header the source route: addresses of each node through
which the packet is forwarded until reaching the destination

• Otherwise, if no such a route exists, then a route discovery is


processed by broadcasting a route request packet (RREQ) to its
neighbors

• Each intermediate node checks whether it knows a route to the


destination node
• If no such route exists, the intermediate node places in
the route record of the packet its own address and
forwards the packet to its neighbors

• This process takes end when either the destination node


or an intermediate node which knows an unexpired route
to the destination by checking its route cache is reached
• 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

Reference:
https://www.youtube.com/watch?v=GSEvRI6Bptg
RREQ packet

• A RREQ packet carries the following information:

1. Address of the original initiator of the route


discovery (source node)
2. Address of the target of the route discovery
(destination node)
3. Request ID, unique and set by the initiator
4. Route record, record by accumulating each hop
in the sequence hops
• When a RREQ packet is received by any node of the network, the
following steps are processed by this node:

– First of all, in order to avoid duplication of route requests, the


pair initiator_address/request_ID is checked within the list of
recently seen pairs in order to determine if this request was
recently seen. Then, if true, the RREQ packet is discarded

– Then, in order to avoid loops in routes, the intermediate node


checks whether its own address is already listed in the route
record of the RREQ packet. If so, the packet is discarded as
well
– Then, if the host's address matches the destination address or
if this host knows an unexpired route to the destination host (in
its route cache), then a RREP is generated. The route to target is
established with the sequence of hops

– Otherwise, it appends its own address to the route record in the


RREQ packet and re-broadcasts it

This process allows the RREQ packet to propagate the route


request through the ad hoc network until either the target or a
node that knows a route to the target in its route cache

This process prevents the loops and duplication of the request


RREP packets
• A RREP packet is generated when a route record defining the route
between the initiator and the target is entirely established

• In order to return the route reply packet to the initiator of the route
discovery, a route to the initiator is needed

• As explained in the previous subsection, bidirectional links are


supported and since the entirely route is known, the node has
reverse the route in the route record to return the route reply

• A route reply packet contains a copy of the route record or a copy of


the route record concatenated with route to target in the case of an
intermediate node initiates the route reply
Route maintenance mechanism

• Each node transmitting the packet is responsible for confirming that


data can flow over the link from that node to the next hop

• While a route is in use, the route maintenance procedure monitors


the operation of the route and informs the sender of any routing
errors: it is performed through the use of route error packets and
acknowledgements

• It determines if the next hop of the route is still working and uses
this information to correct its route cache
Route Discovery in DSR
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


Route Discovery in DSR
Y
Broadcast transmission

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

Represents transmission of RREQ

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


Route Discovery in DSR
Y

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

• Node H receives packet RREQ from two neighbors:


potential for collision
Route Discovery in DSR
Y

Z
S E
F [S,E,F]
B
C M L
J
A G
H D
[S,C,G] 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
Route Discovery in DSR
Y

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

• Nodes J and K both broadcast RREQ to node D


• Since nodes J and K are hidden from each other, their
transmissions may collide
Route Discovery in DSR
Y

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

• Node D does not forward RREQ, because node D


is the intended target of the route discovery
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
Route Reply in DSR
Y

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

Represents RREP control message


Dynamic Source Routing (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
Data Delivery in DSR
Y

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

Packet header size grows with route length


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
• Problem: Stale caches may increase overheads
Dynamic Source Routing: Advantages

• 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
Dynamic Source Routing: Disadvantages
• Packet header size grows with route length due to source routing

• Flood of route requests may potentially reach all nodes in the


network

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

• Stale caches will lead to increased overhead


Ad Hoc On-Demand Distance Vector Routing
(AODV)
• 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
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 (RREP)

• Route Reply travels along the reverse path set-up when


Route Request is forwarded
Route Requests in AODV
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


Route Requests in AODV
Y
Broadcast transmission

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

Represents transmission of RREQ


Reverse Path Setup in AODV
Y

Z
S 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
Reverse Path Setup in AODV

Z
S E
F
B
C M L
J
A G
H D
K
I N
Reverse Path Setup in AODV
Y

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

• Node D does not forward RREQ, because node D


is the intended target of the RREQ
Route Requests in AODV
Y

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

Represents links on Reverse Path


Forward Path Setup in AODV
Y

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

Forward links are setup when RREP travels along


the reverse path

Represents a link on the forward path


Route Request and Route Reply
• Route Request (RREQ) includes the last known sequence
number for the destination

• An intermediate node may also send a Route Reply (RREP)


provided that it knows a more recent path than the one
previously known to sender

• Intermediate nodes that forward the RREP, also record the


next hop to destination

• A routing table entry maintaining a reverse path is purged


after a timeout interval
• A routing table entry maintaining a forward path is purged if
not used for a active_route_timeout interval
Link Failure
• A neighbor of node X is considered active for a routing table
entry if the neighbor sent a packet within
active_route_timeout interval which was forwarded using
that entry

• Neighboring nodes periodically exchange hello message

• When the next hop link in a routing table entry breaks, all
active neighbors are informed

• Link failures are propagated by means of Route Error (RERR)


messages, which also update destination sequence numbers
Route Error
• 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

• 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
AODV: Summary
• 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

• Sequence numbers are used to avoid old/broken routes

• Sequence numbers prevent formation of routing loops

• Unused routes expire even if topology does not change


Mobile Agents For Mobile Computing
 A mobile agent is an executing program that can migrate, at
times of its own choosing, from machine to machine in a
heterogeneous network

 On each machine, the mobile agent interacts with stationary


service agents and other resources to accomplish its task

 Mobile Agents are an effective paradigm for distributed


applications, and are particularly attractive for partially
connected computing
How does a mobile agent work?
 An agent migrates off a mobile device and roams the network
to gather information

 It accesses the needed resources efficiently

 Not affected by sudden loss of connection

 When the user reconnects, the agent returns to the mobile


device with the results

 Can work in the reverse manner too


Advantages of Mobile Agents
 Reduction of network traffic
 In distributed systems, performing a simple job involves multiple

interactions, resulting in increased network traffic. In mobile agent


paradigm, the objective is to move the computation to the data rather than
the data to the computation, thus consuming fewer network resources and
thereby increasing efficiency
 Overcome network latency
 Management of critical real time systems with substantial size networks

creates latencies, which are unacceptable. Deployment of mobile agents


will overcome this problem since these agents can execute locally upon
the central controller's directions.
 Encapsulation of protocols
 Often, as new communication protocols which improve efficiency and

security emerge, businesses need to upgrade their protocols, otherwise


they turn into a legacy problem. This whole process is cumbersome.
Mobile agents will resolve this problem, as they can migrate to a remote
host and establish channels based on proprietary protocols
Advantages of Mobile Agents
 Asynchronous and autonomous execution
 For jobs that require a continuous open connection, deployment of

mobile agents will result in cost savings. Mobile agents with embedded
tasks can be dispatched into the network where they operate
independently and asynchronously
 Dynamic adoption
 Mobile agents can perceive the surrounding environment and can act

dynamically
 Seamless system integration
 Both from the perspectives of hardware and software, networking

computing are heterogeneous. Mobile agents can provide seamless


system integration since they are dependent only on those
environments in which they execute.
 Robust and fault-tolerant
 Since mobile agents can act and react dynamically in presence of

unfavorable conditions, it iseasy to build a robust and fault-tolerant


distributed system with mobile agents.
Applications of Mobile Agents
 Electronic Commerce
 Many commercial transactions require access to resources in real time.

The ability of a mobileagent to personify their creators intentions and


to act and negotiate on behalf of them makes it well suited for
electronic commerce.
 Personal Assistance
 An agent can act as a personal assistant to the user and perform tasks

for user on a remote host regardless of whether or not user is connected


to the network. For instance, to schedule a meeting, a user can dispatch
a mobile agent onto the network to interact with agents belonging to
other users. The agent can negotiate with other agents the convenient
time for all of the users and can schedule a meeting
 Secure brokering
 Mobile agent technology is an attractive solution to brokering,

particularly in the context of untrustworthy collaborators. In such a


situation, the interested parties can let the agents meet and negotiate at
a mutually agreed impartial secure host and form alliance
 Distributed information retrieval
 Mobile agent technology provides efficient information retrieval. When

dealing with large amounts of data, rather than moving all the data to
search engine to create search indexes, user can simply dispatch mobile
agents to remote sources to create those indexes locally and to ship them
back later to its origin.
 Telecommunication networks services
 Mobile agents provide an effective and flexible solution to the

management of advanced telecommunication services by providing


dynamic network reconfiguration and user customization
 Workflow applications and groupware
 Mobile agents because of their features such as autonomy, mobility etc,
provide autonomy to the workflow item and support the information flow
between co-workers
 Parallel processing
 Monitoring and notification
 Information dissemination

64
Service Discovery
 Service discovery is the automatic detection of devices and
services offered by these devices on a computer network

 A service discovery protocol (SDP) is a network protocol that


helps accomplish service discovery

 Service discovery aims to reduce the configuration efforts


from users

 Service discovery requires a common language to allow


software agents to make use of one another's services without
the need for continuous user intervention

65
 Service discovery provides a mechanism which allows
automatic detection of services offered by any node in the
network

 In other words, service discovery is the action of finding a


service provider for a requested service

 When the location of the demanded service is retrieved, the


user may further access and use it

66
Objectives
 Objective of a service discovery mechanism is to develop a
highly dynamic infrastructure where users would be able to
seek particular services of interest, and service providers
offering those services would be able to announce and
advertise their capabilities to the network

 Furthermore, service discovery minimize human intervention


and allows the network to be self-healing by automatic
detection of services which have become unavailable

 Once services have been discovered, devices in the network


could remotely control each other by adhering to some
standard of communication
67
Features

68
SLP
 Service location Protocol (SLP) is an open, simple, extensible,
and scalable standard for service discovery developed by the
IETF (Internet Engineering Task Force)
 It was intended to function within IP network. SLP addresses
only service discovery and leaves service invocation unspecified
 The SLP architecture consists of three main components:
 User Agent (UA): software entity that sends service discovery

request on a user application’s behalf


 Service Agent (SA): advertises the location and
characteristics of services on behalf of services
 Directory Agent (DA): a central directory collects service

descriptions received from SAs in its database and process


discovery queries from UAs
69
Jini
 Jini is a distributed service discovery system developed by Sun-
Microsystems in java
 The goal of the system is the federation of groups of
clients/services within a dynamic computing system
 A Jini federation is a collection of autonomous devices which
can become aware of one another and cooperate if need be.
 To achieve this goal, Jini uses a set of lookup services to
maintain dynamic information about available services and
specifies how service discovery and service invocation is to be
performed among Java-enabled devices
 The Jini discovery architecture is similar to that of SLP:
 Client: requests Lookup Service for available service.

 Service provider: registers its services and their descriptions

with Lookup Service 70


Protocols
 Bluetooth Service discovery protocol
 JINI for Java objects.
 SLP (service location protocol)
 UPnP (Universal Plug and Play) service discovery functions

71
Steps for Service discovery
1. Lets nearby service network (or device or system) recognize
that device

2. Lets the nearby network know of device service(s)

3. Searches and discovers a new service(s) at the network

4. Interacting with nearby network using discovered service(s)

72

You might also like