Professional Documents
Culture Documents
Unit - 4: Mobile Agents and Routing Algorithms
Unit - 4: Mobile Agents and Routing Algorithms
THIS IS NOT THE SUBSTITUTE OF TEXT BOOK. PLEASE FOLLOW YOUR TEXT BOOK.
Mobile Agents:
In Mobile Computing, Mobile Agents are the composition of computer software
and data that can autonomously move from one computer to another computer
and continue its execution on the destination computer.
In other words, you can say that An Mobile Agent is an autonomous program
that is capable of moving from host to host in a network and interact with
resources and other agents. In this process, the chance of data loss is scarce
because the state of the running program is saved and then transported to the
new host. It allows the program to continue execution from where it left off
before migration. The most significant advantage of mobile agents is the
possibility of moving complex processing functions to the location where you
have enormous amounts of data and that have to be processed. Mobile Agents
are also called as transportable agents. They are classified into two types:
• Mobile Agents with pre-defined path: They have a static migration path.
• Mobile Agents with undefined path i.e., Roamer: They have dynamic
migration paths. The mobile agents choose their path according to the
present network condition.
They form a highly dynamic autonomous topology with the presence of one or
multiple different transceivers between nodes. The main challenge for the
MANET is to equip each device to continuously maintain the information
required to properly route traffic. MANETs consist of a peer-to-peer, self-
forming, self-healing network MANET’s circa 2000-2015 typically communicate
at radio frequencies (30MHz-5GHz). This can be used in road safety, ranging
from sensors for the environment, home, health, disaster rescue operations,
air/land/navy defence, weapons, robots, etc. Manets have many characteristics
and some of them are as follows:
Pros and Cons of MANETs: MANETs many advanced features but in other hand
it has some drawbacks also. These are as follows:
• Pros:
o Separation from central network administration.
o Each node can play both the roles i.e. of router and host showing
autonomous nature.
o Self-configuring and self-healing nodes do not require human
intervention.
• Cons:
o Resources are limited due to various constraints like noise,
interference conditions, etc.
o Lack of authorization facilities.
o More prone to attacks due to limited physical security.
• Distance Table: This table contains the distance of a node from all the
nodes in network.
• Topology Table: This table contains the information of Link state data
along with the sequence number which can be used to determine when
the information is updated last.
• Next Hop Table: Next hop table will contain the information about the
immediate neighbour of a particular node.
These tables are updated on every step and ensures that each node receives
correct information about all the nodes including their distances.
C
B
A
E
New route broadcasts contain the address of the destination, the number of hops
to reach the destination, the sequence number of the information received
regarding the destination, as well as a new sequence number unique to the
broadcast. The route labelled with the most recent sequence number is always
Dr. Qaim Mehdi Rizvi
IMRT, Lucknow
used. When the neighbours of the transmitting node receive this update, they
recognize that they are one hop away from the source node and include this
information in their distance vectors. Every node stores the “next routing hop”
for every reachable destination in their routing table. The route used is the one
with the highest sequence number i.e. the most recent one. When a neighbour B
of A finds out that A is no longer reachable, it advertises the route to A with an
infinite metric and a sequence number one greater than the latest sequence
number for the route forcing any nodes with B on the path to A, to reset their
routing tables.
Consider the network in the given figure that shows the movement of node N1.
Table 1 is the routing table at node N4 before node N1 moves. Table 2 is the
routing table updated for node N4 after node N1 moved. Routing table updates
in DSDV are distributed by two different types of update packets:
• DSR requires each node to maintain a route cache of all known self to
destination pairs. If a node has a packet to send, it attempts to use this
cache to deliver the packet.
• If the destination does not exist in the cache, then a route discovery phase
is initiated to discover a route to destination, by sending a route request.
• This request includes the destination address, source address and a unique
identification number.
• If a route is available from the route – cache, but is not valid any
more, a route maintenance procedure may be initiated.
• A node processes the route request packet only if it has not previously
processes the packet and its address is not present in the route cache.
• A route reply is generated by the destination or by any of the intermediate
nodes when it knows about how to reach the destination.
In this example, the destination S7, gets the request through two paths. It
chooses one path based on the route records in the incoming packet and sends
a reply using the reverse path to the source node. At each hop, the best route
with minimum hop is stored. In this example, it is shown the route record status
ate each hop to reach the destination from the source node. Here, the chosen
route is S1-S2-S4-S5-S7.
• The main advantage is that DSR uses a reactive approach which eliminates
the need to periodically flood the network with table update messages
which are required in a table-driven approach. The intermediate nodes
also utilize the route cache information efficiently to reduce the control
overhead.
• The disadvantage of DSR is that the route maintenance mechanism does
not locally repair a broken down link. The connection setup delay is higher
than in table- driven protocols. Even though the protocol performs well
in static and low-mobility environments, the performance degrades
rapidly with increasing mobility. Also, considerable routing overhead is
• RREQ(Route Request):
A node, Initiates to send/transmit a packet but doesn’t know how to get
there, it sends an RREQ multicast message to start the route discovery
process. Neighbouring nodes keep track of where the message originated
and move it on to their neighbours before it reaches the destination node.
• RREP(Route Reply):
The destination node responds with an RREP, which returns to the source
through the path taken by the RREQ. As the RREP returns to the source,
forward routes are formed in the intermediate nodes. If an intermediate
node knows the path to the destination, it may send an RREP in response
to a received RREQ, allowing nodes to enter an established route.
Communication between the source and the destination will begin once
the RREP arrives at the source and the route is established.
• REER(Route Error):
AODV typically has less overhead as a reactive protocol (less route
maintenance messages) than proactive. In the event of the connection
interruption that the path no longer functions, i.e. messages cannot be
sent, a RERR message is sent through a node detecting the link
interruption. The message is re-cast by other nodes. The RERR message
shows the unattainable destination. Message receiving nodes inactivates
the route.
The AODV protocol builds routes between nodes only if they are requested
by source nodes. AODV is therefore considered an on-demand algorithm
and does not create any extra traffic for communication along links. The
routes are maintained as long as they are required by the sources. They
also form trees to connect multicast group members. AODV makes use of
sequence numbers to ensure route freshness. They are self-starting and
loop-free besides scaling to numerous mobile nodes.
In AODV, networks are silent until connections are established. Network
nodes that need connections broadcast a request for connection. The
remaining AODV nodes forward the message and record the node that
requested a connection. Thus, they create a series of temporary routes
back to the requesting node.
A node that receives such messages and holds a route to a desired node
sends a backward message through temporary routes to the requesting
node. The node that initiated the request uses the route containing the
least number of hops through other nodes. The entries that are not used
in routing tables are recycled after some time. If a link fails, the routing
error is passed back to the transmitting node and the process is repeated.
b*a