Professional Documents
Culture Documents
1.1 About The Project: Unidirectional Link Routing (UDLR) Proposes A Protocol That Invokes Tunneling
1.1 About The Project: Unidirectional Link Routing (UDLR) Proposes A Protocol That Invokes Tunneling
CHAPTER 1
INTRODUCTION
1.1 About the Project
Fig. 1.1 A unidirectional ad hoc network. A → B is a unidirectional link, and B → C → A is its reverse route.
Reverse route forwarding is used for finding reverse routes for unidirectional links
in an asymmetric network is non-trivial. While it may appear that a straightforward
application of a standard distance-vector or link-state algorithm will provide the necessary
reverse route information, several problems arise while applying them in an asymmetric
network.
Switch is a device that channels incoming data from any of multiple input ports to the
specific output port that will take the data toward its intended destination.
Disadvantage: If we use switch between any two networks we need more than one
switch to connect between them and the cost will also increases.
Router is a device that forwards data packets along networks. A router is connected
to at least two networks, commonly two LANs or WANs or a LAN and its ISP's network.
Routers are located at gateways, the places where two or more networks connect, and
are the critical device that keeps data flowing between networks and keeps the networks
connected to the Internet. When data is sent between locations on one network or from one
network to a second network the data is always seen and directed to the correct location by
the router.
There are mainly two types of Scheduling namely the system level scheduling and
the application level scheduling. The scheduling system will analyze the load situation of
every node and select one node to run the job. The scheduling policy is to optimize the total
performance of the whole system. If the system is heavily loaded, the scheduling system has
to realize the load balancing and increase the throughput and resource utilization under
restricted conditions. This kind of scheduling is known as the system level scheduling.
If multiple jobs arrive within a unit scheduling time slot, the scheduling system shall
allocate an appropriate number of jobs to every node in order to finish these jobs under a
defined objective. Obviously, the objective is usually the minimal average execution time.
This scheduling policy is application-oriented so we call it application-level scheduling.
Data mining, the extraction of hidden predictive information from large databases, is
a powerful new technology with great potential to help companies focus on the most
important information in their data warehouses.
CHAPTER 2
LITERATURE SURVEY
This work first presents a simulation study quantifying the impact of asymmetric
links on network connectivity and routing performance. It then presents a framework called
BRA that provides a bidirectional abstraction of the asymmetric network to routing
protocols.
Extensive simulations of AODV layered on BRA show that packet delivery increases
substantially (two-fold in some instances) in asymmetric networks compared to regular
AODV, which only routes on bidirectional links.
For instance, a routing protocol that cannot distinguish whether two nodes are
connected through a direct link or a multi-hop reverse route might mistake the reverse route
for a fast, direct-hop route and route packets through the longer route; such an action may
increase the cost of routing, introduces additional congestion in the network, and decreases
the overall throughput of the system.
The services that BRA offers are: reverse route forwarding (“A loop free extended
Bellman-Ford routing protocol without bouncing effect,”[8]), reliable packet delivery, and
link status monitoring. The rest of this section describes these services in detail. “A
Bidirectional Routing Abstraction for Asymmetric Mobile Ad Hoc Network” [1].
Link-state protocols such as OLSR [2] maintain a view of the network topology at
each node; nodes broadcast their views of the topology to their neighbors and in turn update
their topology views based on their neighbors’ state. Clearly, with a complete view of the
network, link-state protocols do not have a problem finding routes in an asymmetric
networks. Practical implementations of link-state protocols, however, maintain partial views
in order to reduce the worst-case message complexity, where denotes the number of nodes;
the partial views may not have sufficient information to handle unidirectional links. “A
tunneling approach used in our project for routing with unidirectional links in mobile ad hoc
networks,” [2].
AODV Algorithm
On-demand protocols such as AODV [3] further decrease the routing overhead by
maintaining routes only when required for communication.In typical on-demand protocols, a
source node S that requires to communicate with a destination node D first initiates a route
discovery process, where a route request packet (RREQ) is broadcast typically to the entire
network. The destination, or another intermediate node that knows a route to the destination,
sends a route reply (RREP) back to the source upon receiving the RREQ.
Typically, the RREP is sent along the discovered path in the reverse direction. The
state about the discovered path is either retained at each intermediate node (as in AODV) or
carried along with each packet (as in DSR). If the current route to the destination breaks, a
process similar to route discovery is performed to repair the route. “Ad-hoc on demand
distance vector (AODV) routing,” [3].
Java have two things: a programming language and a platform. Java The
complete reference [6].
Java is also unusual in that each Java program is both compiled and interpreted. With
a compile you translate a Java program into an intermediate language called Java byte codes
the platform-independent code instruction is passed and run on the computer.
Compilation happens just once; interpretation occurs each time the program is
executed. The figure illustrates how this works.
Compilers My Program
You can think of Java byte codes as the machine code instructions for the Java
Virtual Machine (Java VM). Every Java interpreter, whether it’s a Java development tool or
a Web browser that can run Java applets, is an implementation of the Java VM. The Java
VM can also be implemented in hardware.
Java byte codes help make “write once, run anywhere” possible. You can compile
your Java program into byte codes on my platform that has a Java compiler. The byte codes
can then be run any implementation of the Java VM. For example, the same Java program
can run Windows NT, Solaris, and Macintosh.
2.2.1 Swing
Swing is a set of classes that provides more powerful and flexible components that
are possible with AWT. In addition to the familiar components, such as button checkboxes
and labels, swing supplies several exciting additions, including tabbed panes, scroll panes,
trees and tables. Java2 The Complete Reference [6].
2.2.2 Applet
Applet is a dynamic and interactive program that can run inside a web page displayed
by a java capable browser such as hot java or Netscape [5].
CHAPTER 3
PROBLEM DESCRIPTION
Network asymmetry
Network asymmetry adversely affects routing in several different ways:
3) Link-layer Services: In addition to the routing layer, unidirectional links also pose several
problems at the lower layers such as the data link and the MAC layers. Common MAC-level
schemes for congestion avoidance (RTS-CTS) and packet loss recovery (ACKs) fail for
unidirectional links. Moreover, other useful services such as detection of link breaks and
discovery of new neighbors provided by some MAC protocols become unavailable to the
routing protocols.
This paper first presents a simulation study to quantify the impact of asymmetry on
network connectivity and routing performance.
BRA takes the approach of discovering and maintaining reverse paths for
unidirectional links. Its core is a novel algorithm called Reverse Distributed Bellman–Ford
Algorithm (RDBFA), which efficiently searches for reverse routes in a bounded search
region around each node.
BRA keeps the overhead of maintaining reverse routes low by dynamically adjusting
the size of the search region, and thereby the length of the reverse routes, independently at
each node based on the prevailing extent of asymmetry around that node.
Finally, it implements critical functionalities that MAC and link layers are often
unable to provide in asymmetric networks; namely, recovery of lost packets sent across
unidirectional links, proactive detection of new neighbors, and notifications about failed
links.
CHAPTER 4
SYSTEM ANALYSIS
System analysis can be defined, as a method that is determined to use the resources,
machine in the best manner and perform tasks to meet the information needs of an
organization.
Hardware specifications:
Processor : Intel Processor IV
RAM : 128 MB
Hard disk : 20 GB
Monitor : 15’ Samtron color
Keyboard : 108 mercury keyboard
Mouse : Logitech mouse
Software Specification:
AODV Algorithm
AODV builds routes using a route request / route reply query cycle. When a source
node desires a route to a destination for which it does not already have a route, it broadcasts a
route request (RREQ) packet across the network. Nodes receiving this packet update their
information for the source node and set up backwards pointers to the source node in the route
tables.
In addition to the source node's IP address, current sequence number, and broadcast
ID, the RREQ also contains the most recent sequence number for the destination of which the
source node is aware. A node receiving the RREQ may send a route reply (RREP) if it is
either the destination or if it has a route to the destination with corresponding sequence
number greater than or equal to that contained in the RREQ. If this is the case, it unicast a
RREP back to the source. Otherwise, it rebroadcasts the RREQ. Nodes keep track of the
RREQ's source IP address and broadcast ID. If they receive a RREQ which they have already
processed, they discard the RREQ and do not forward it.
As the RREP propagates back to the source, nodes set up forward pointers to the
destination. Once the source node receives the RREP, it may begin to forward data packets to
the destination. If the source later receives a RREP containing a greater sequence number or
contains the same sequence number with a smaller hop count, it may update its routing
information for that destination and begin using the better route.
This proposed system takes care of data transfer between computers of two networks.
Generally, during data transfer between pc of two different networks, a router will be present
in between the networks and it will take care of the scheduling of data packets between the
source and destination computers.
In the router there will be a number of ports and each port will take care of one data
transfer. In each port, there will be a queue for data packets and this is where scheduling is
applied. There are various scheduling algorithms possible to schedule the packets in each
port of the router. The objective of each router is to reduce the congestion of data transfer.
We will first select a certain number of inputs, say, x1, and x2 ... xn belonging to the
input space X. In the GA terminology, each input is called an organism or chromosome. The
set of chromosomes is designated as a colony or population. Computation is done over
epochs. In each epoch the colony will grow and evolve according to specific rules
reminiscent of biological evolution.
To each chromosome xi, we assign a fitness value which is nothing but f (xi).
Stronger individual that is those chromosomes with fitness values closer to the colony
optimal will have greater chance to survive across epochs and to reproduce than weaker
individuals which will tend to perish. In other words, the algorithm will tend to keep inputs
that are close to the optimal in the set of inputs being considered (the colony) and discard
those that under-perform the rest.
The crucial step in the algorithm is reproduction or breeding that occurs once per
epoch. The content of the two chromosomes participating in reproduction are literally
merged together to form a new chromosome that we call a child. This heuristic allows us to
possibly combine the best of both individuals to yield a better one (evolution).
During each epoch, a given fraction of the organisms is allowed to mutate. This
provides a degree of randomness which allows us to span the whole input space by
generating individuals with partly random genes.
Each epoch ends with the deaths of inapt organisms. We eliminate inputs exhibiting
bad performance compared to the overall group. This is based on the assumption that they're
less inclined to give birth to strong individuals since they have poor quality genes and that
therefore we can safely disregard them (selection).
Now that we've outlined the basic principles, let's examine in further detail how this
whole process is accomplished and how the algorithm works in practice. Let's take the
example of optimizing a function f over a space X.
Every input x in X is an integer vector x=(x1, x2... xn). For the sake of simplicity,
assume 0<=xi<=k for i=1...n. In order to implement our Bi-Directional Routing Algorithm
for optimizing f, we first need to encode each input into a chromosome. We can do it by
having log (k) bits per component and directly encoding the value xi (figure 4.1). Each bit
will be termed gene. Of course, we may choose any other encoding based on our
requirements and the problem at hand.
Mutation: A new organism is created by randomly modifying some of its genes. This
can be done right after reproduction on the newly created child or as a separate process.
Death: Worst performers among the colony are given a high probability of dying at
the end of each epoch. We may also consider eliminating old chromosomes. The highest
performer is immune from death from old age.
Similarities among the strings with high fitness value suggest a relationship between
those similarities and good solutions.
Mutation leaves a schema unaffected with high probability (since mutation has a low
probability).
Highly-fit, short schemas (called building blocks) are propagated from generation to
generation with high probability.
The effectiveness of the search depends on the population size and the number of
generations.
The larger the population, the more likely that our initial population is representative
of the search space, and the more likely that a probabilistic survival of the fittest mechanism
produces the expected outcomes.
Each successive generation should improve the fitness of the result, so longer runs
usually produce better solutions.
The connection to a resource is limited and a limited service is provided to the jobs.
The scheduling policies used are the greedy algorithm which assigns the resources as and
when it is found.
Suppose that there are three data servers {S1, S2, S3}, each having two available
connections. Let S1 have resources {r1, r2, r3, r4} and both S2 and S3 have resources {r1, r2,
r5, r6}. Suppose the scheduler has four tasks each processing one of the resources. Each task
with no contention, run for one hour. A greedy scheduler could allocate the two connections
of S1 for running the resources r1 and r2. The running time is two hours as the other tasks
cannot be run.
Total execution time is the time between the beginning of execution of the first job of a
series and completion of the last job.
Average turnaround time is the average, for each job from when the job arrives to when
the job finished.
Parallel BRA Routing algorithm PGA has the same advantage as a serial BRA
Routing algorithm, consisting in using representation of the problem parameters, robustness,
easy customization for a new problem and multiple solution capabilities. PGA is usually
faster, less prone to finding only sub-optimal solutions, and able of cooperating with other
search techniques in parallel. PGA can be divided into global, fine grained, coarse grained
and hybrid models.
The global single population master slave Bi-Directional Routing Algorithm tells the
master stores the population, executes the Bi-Directional operators, and distributes
individuals to the slaves. The slave evaluates the fitness of the individual and reports the
fitness value to the master.
We propose a model of the scheduling algorithm where the scheduler can learn from
the previous experiences.
We assume that the resource a job needs are in a location and not split over nodes.
Each node that has a resource runs a fixed number of jobs. This paper is limited to the
application level scheduling and does not discuss system level scheduling.
A type of parallel Bi-Directional Routing Algorithm is used called the Global single
population master slave BRA Routing algorithm. Selection and crossover are considered
in the entire population; each individual may compete and mate.
The scheduler starts with no prior information about the jobs at first, after each
allocation the information is stored to the history base.
The next time the job of specific requirement comes a different combination is tried
according to the resource availability and if the execution time is lower then it is recorded.
This is called the learning phase.
If a new job which has not yet scheduled by the scheduler, then the system is put to a
brief learning phase again.
The encoding process is done by assuming that a chromosome has the following
gene structure.
The fitness function f is the execution time of that job at the node. The population
generation is done by assigning binary set values for each of the genes.
Job A may be encoded as 00 and job B may be encoded as 01 and so on. The same
method can be used to represent all genes.
The sample population may have individuals like 00 01 10. After the population is
built in the learning phase, the fitness of the individual is recorded as the execution time of
the job at the node. The next time the same job is to be scheduled the history information is
checked and a new gene combination is found and job scheduled and the fitness recorded.
After time T the Bi-Directional operator of crossover is applied and the individuals of the
same job type are selected for crossover.
The above representation says that job A which needed resource X has an execution
time of 20 ms in node n2 and 15 ms in node n3. The dotted lines indicate the crossover point.
CHAPTER 5
SYSTEM DESIGN
Modularity is one of the desirable properties of large systems. It implies that the
system is divided into several parts. In such a manner, the interaction between parts is
minimal clearly specified.
Design will explain software components in detail. This will help the implementation
of the system. Moreover, this will guide the further changes in the system to satisfy the future
requirements.
Form is a tool with a message; it is the physical carrier of data or information. The
form is design in such a way that the simulated networks of computers connected through
router. The button is provided to invoke the network model. When this button is clicked the
two different networks are formed as Network 0 and network 1. In between we have router.
SWINGS:
Swing is a set of classes that provides more powerful and flexible components than
are possible with the AWT. In addition to that the familiar components such as buttons,
check box and labels swings supplies several exciting additions including tabbed panes,
scroll panes, trees and tables.
Even familiar components such as buttons have more capabilities in swing. For
example a button may have both an image and text string associated with it. Also the image
can be changed as the state of button changes.
Void add(comp)
Here, comp is the component to be added to the content pane.
Object Hierarchy:
Component
+------Container
+------Panel
+------Applet
+------JApplet
JFrame- It is a Standard top level window with title bar, close, minimize,
maximize and restore buttons and a System menu.
Void add(comp)
Here,comp is the component to be added to the content pane.
Creating a Frame:
JFrame frmMain=new JFrame(strTitle);
Object Hierarchy:
Component
+------Container
+------Panel
+------Applet
+------JApplet
+------JFrame
Jlabel(Icon i)
Is a constructor which labels the specified icon.
Void setText(String s)
Is a method that will give a name to the label as specified by user.
Creating a JLabel:
JLabel lblNodeCount=new JLabel("");
Void add(comp)
Here, comp is the component i.e. JLabel to be added to the content pane.
Object Hierarchy:
Component
+------Container
+------Panel
+------Applet
+------JApplet
+------JFrame
+------JLabel
Details:
JButton(Icon icon)
JButton(String str)
JButton(String str,Icon icon)
Str and icon are string and icon used for button.
Creating JButton:
JButton btAddNodes=new JButton("Add Nodes");
Void add(comp)
Here, comp is the component i.e. JButton to be added to the content pane.
frmMain.getContentPane().add(btAddNodes);
Object Hierarchy:
Component
+------Container
+------Panel
+------Applet
+------JApplet
+------JFrame
+------JButton
Details:
JScrollPane(Component comp)
The component to be scrolled is specified by comp.
Creating ScrollPane:
Void add(comp)
Here, comp is the component i.e. JScrollPane to be added to the content pane.
spInput.setBounds(frmWidth-160-30,60,160,60);
spInput.setColumnHeaderView(new JLabel("Input:"));
frmMain.getContentPane().add(spInput);
Dept of ISE, RLJIT 24
BIDIRECTIONAL ROUTING ABSTRACTION FOR ASYMMETRIC MOBILE ADHOC NETWORKS 2009-2010
Object Hierarchy:
Component
+------Container
+------Panel
+------Applet
+------JApplet
+------JFrame
+------JScrollPane
Details:
JTextField(int cols)
JTextField(String str)
Here str is the String to be initially presented and cols is the number of columns in
the text field.
Void add(comp)
Here, comp is the component i.e. JTextField to be added to the content pane.
Object Hierarchy:
Component
+------Container
+------Panel
+------Applet
+------JApplet
+------JFrame
+------JTextField
Now when you click the source and destination computer, the path between them is
drawn by invoking the algorithms called first Come First serve and Bi-Directional Routing
Algorithm for scheduling packet data transfer across the network.
The comparative study is also projected to the user, to check the efficiency of BRA
Routing algorithm.
Inaccurate input data is the most common case of errors in data processing. Errors
entered by data entry operators can control by input design.
Simulated Model:
The packet transfer between the networks in implemented using AODV algorithm.
unitsize=(int)((double)speed*(1.0-(double)0.7));
long tstart=System.currentTimeMillis();
initializeGraph();
xmaxmain=(int)((double)totalsize/(double)unitsize);
for(int i=0,tindex=0;i<tpaths.size();i++)
{
Path tpath=tpaths.getPath(i);
int delivered=0;
while(delivered<totalsize)
{
for(int t=0;t<tpath.size();t++)
{
if(t>0)
{
int node1=tpath.getNode(t-1);
int node2=tpath.getNode(t);
g.setColor(new Color(255,0,0));
drawPath(node1,node2);
delivered+=unitsize;
if(delivered>=totalsize) break;
long tend=System.currentTimeMillis();
double tseconds=((double)(tendtstart))/(double)1000;
double trate=((double)delivered/(double)tseconds);
tbandwidth=(int)(trate/1024.0);
showDelivered(delivered,tbandwidth);
drawGraph(tindex,tbandwidth,0);
tindex+=1;
}
Globals.wait(Globals.DataTransferDelay);
}
showPaths(tpaths);
}
delivered=totalsize;
showDelivered(delivered,tbandwidth);
}
frmMain.setTitle(strTitle);
displayStatus();
}
The packet transfer between the networks in implemented using BRA Routing
algorithm. The algorithm details were discussed in proposed system design.
unitsize=(int)((double)speed*(1.0-(double)0.85));
long tstart=System.currentTimeMillis();
initializeGraph();
xmaxmain=(int)((double)totalsize/(double)unitsize);
for(int i=0,tindex=0;i<tpaths.size();i++)
{
Path tpath=tpaths.getPath(i);
int delivered=0;
while(delivered<totalsize)
{
for(int t=0;t<tpath.size();t++)
{
if(t>0)
{
int node1=tpath.getNode(t-1);
int node2=tpath.getNode(t);
g.setColor(new Color(255,0,0));
drawPath(node1,node2);
delivered+=unitsize;
if(delivered>=totalsize) break;
long tend=System.currentTimeMillis();
double tseconds=((double)(tendtstart))/(double)1000;
double trate= ((double)delivered/(double)tseconds);
tbandwidth=(int)(trate/1024.0);
showDelivered(delivered,tbandwidth);
drawGraph(tindex,tbandwidth,0);
tindex+=1;
}
Globals.wait(Globals.DataTransferDelay);
}
showPaths(tpaths);
}
delivered=totalsize;
showDelivered(delivered,tbandwidth);
}
frmMain.setTitle(strTitle);
displayStatus();
}
Drawing the path between source and destination shows the data transfer between the
network of source and destination. For drawing the path, the points across the network are
also collected. The comparison of two algorithm result are displayed to the user in separate
frame to see the efficiency of BRA routing algorithm.
Figure 5.7 Status and Result for AODV and BRA algorithm
In this data flow diagram we are adding the nodes to the networks by clicking on add
nodes button and taking input parameters from parameter frame such as source data size and
link speed. After that nodes are added to the networks. Now we select the source and
destination nodes from each networks. Then we select any one of the algorithm such as
AODV or BRA for routing of packets from source to destination. Finally we will get the
status, result and comparison graph for the above algorithms.
INPUT PARAMETERS:
ADD NODES SOURCE DATA SIZE
LINK SPEED
NETWORK1 NETWORK 2
SELECT SOURCE / SELECT SOURCE /
DESTINATION NODES DESTINATION NODES
User selects source and destination nodes from both the networks. Here we use the
router to communicate between two networks for transmission of packets from source to
destination.
NETWORK 1
SOURCE/DESTINATION
ROUTER
NETWORK 2
SOURCE/DESTINATION
CHAPTER 6
6.1 Implementation
Implementation includes all those activities that take place to convert from the old
system to the new. The new system may be totally new, replacing an existing system or it
may be major modification to the system currently put into use. This application
implemented with simulation model of computer network, constructed along with the router.
The options are given to invoke the AODV and BRA Routing algorithm. The path
between source and destination were drawn and the result of both algorithms is discussed.
1. Defect detection
2. Reliability estimation.
White box testing is concerned only with testing the software product; it cannot
guarantee that the complete specification has been implemented. White box testing is testing
against the implementation and will discover faults of commission, indicating that part of
the implementation is faulty.
Black box testing is concerned only with testing the specification; it cannot
guarantee that all parts of the implementation have been tested. Thus black box testing is
testing against the specification and will discover faults of omission, indicating that part of
the specification has not been fulfilled.
In order to fully test a software product both black and white box testing are required.
The problem of applying software testing to defect detection is that software can only
suggest the presence of flaws, not their absence (unless the testing is exhaustive). The
problem of applying software testing to reliability estimation is that the input distribution
used for selecting test cases may be flawed. In both of these cases, the mechanism used to
determine whether program output is correct is often impossible to develop. Obviously the
benefit of the entire software testing process is highly dependent on many different pieces. If
any of these parts is faulty, the entire process is compromised.
Software is now unique unlike other physical processes where inputs are received and
outputs are produced. Where software differs is in the manner in which it fails. Most physical
systems fail in a fixed (and reasonably small) set of ways. By contrast, software can fail in
many bizarre ways. Detecting all of the different failure modes for software is generally
infeasible.
The key to software testing is trying to find the myriad of failure modes – something
that requires exhaustively testing the code on all possible inputs. For most programs, this is
computationally infeasible. It is commonplace to attempt to test as many of the syntactic
features of the code as possible (within some set of resource constraints) are called white box
software testing technique. Techniques that do not consider the code’s structure when test
cases are selected are called black box technique.
Final stage of the testing process should be System Testing. This type of test
involves examination of the whole computer system, all the software components, all the
hard ware components and any interfaces.The whole computer based system is checked not
only for validity but also to meet the objectives.
CHAPTER 7
SCREEN SHOTS
This is the first screen we view after executing the project, next we are going to show
how to add the nodes to the networks.
MAIN FRAME
PARAMETERS FRAME
COMPARISON FRAME
Here we will select source and destination nodes from both networks by left clicking
the node for source and right clicking the node for destination.
After selecting the nodes we go for AODV algorithm to transmit the packets from
source to destination.The corresponding Status and Results are displayed for AODV
algorithm.
The comparison graph shows the variation of Bandwidth at router for AODV algorithm.
After selecting the nodes we go for BRA algorithm to transmit the packets from
source to destination.The corresponding Status and Results are displayed for BRA algorithm.
Here we show the transmission of packets from multiple sources to multiple destinations.
Here we show the transmission of packets from multiple sources to multiple destinations.