0% found this document useful (0 votes)
50 views42 pages

1.1. Motivation: Packet Reordering in Transmission Control Protocol

This document discusses packet reordering in Transmission Control Protocol (TCP). It begins by stating that standard TCP implementations perform poorly when packets are reordered. It then proposes a new version of TCP called TCP-PR that maintains high throughput during reordering and is friendly to other TCP versions when reordering does not occur. TCP-PR detects packet loss using timers instead of duplicate acknowledgments to be robust against reordering. The document reviews the existing TCP system and its disadvantages, and analyzes the proposed TCP-PR system to overcome these issues by relying on timers instead of duplicate acknowledgments for packet loss detection.

Uploaded by

rakesh reddy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views42 pages

1.1. Motivation: Packet Reordering in Transmission Control Protocol

This document discusses packet reordering in Transmission Control Protocol (TCP). It begins by stating that standard TCP implementations perform poorly when packets are reordered. It then proposes a new version of TCP called TCP-PR that maintains high throughput during reordering and is friendly to other TCP versions when reordering does not occur. TCP-PR detects packet loss using timers instead of duplicate acknowledgments to be robust against reordering. The document reviews the existing TCP system and its disadvantages, and analyzes the proposed TCP-PR system to overcome these issues by relying on timers instead of duplicate acknowledgments for packet loss detection.

Uploaded by

rakesh reddy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 42

PACKET REORDERING IN TRANSMISSION CONTROL PROTOCOL

1. INTRODUCTION
1.1. MOTIVATION

Most standard implementations of TCP perform poorly when packets are reordered. In this
paper, we propose a new version of TCP that maintains high throughput when reordering occurs
and yet, when packet reordering does not occur, is friendly to other versions of TCP. The proposed
TCP variant, or TCP-PR, does not rely on duplicate acknowledgments to detect a packet loss.
Instead, timers are maintained to keep track of how long ago a packet was transmitted. In case the
corresponding acknowledgment has not yet arrived and the elapsed time since the packet was sent
is larger than a given threshold, the packet is assumed lost. Because TCP-PR does not rely on
duplicate acknowledgments, packet reordering (including out-or-order acknowledgments) has no
effect on TCP-PR’s performance.

1.2. PROBLEM DEFINATION

 TCP perform poorly when packets are reordered


 TCP sender backs off its transmission rate by decreasing its congestion window.

1.3. OBJECTIVE OF PROJECT

The purpose of this Software Requirement Specification (SRS) is to help the project. It is
provided prepared with helping of SRS. The purpose of this document is to detail the requirements
placed on the load balancing. System and serves as a contract between the customer and the
developers as to what is to be expected of the load balancing and how the components of the
system are to work with each other with external systems.

1
1
PACKET REORDERING IN TRANSMISSION CONTROL PROTOCOL

1.4. LIMITATION OF PROJECT

 TCP detects packet loss through duplicate Acknowledgement.


 It performs poorly when packets are reordered.
 Its Throughput decreases whenever packet is reordered.

1.5. ORGANIZATION OF DOCUMENTATION

PATH CREATOR Software Solutions is an IT solution provider for dynamic environment


where business and technology strategies converge. Their approach focuses on new ways of business
combining IT innovation and adoption while also leveraging an organization’s current IT assets.
Their work with large global corporations and new products or services and to implement prudent
business and technology strategies in today’s environment.

2
2
PACKET REORDERING IN TRANSMISSION CONTROL PROTOCOL

2. LITERATURE SURVEY
2.1. Introduction

Most standard implementations of TCP perform poorly when packets are reordered. In this
paper, we propose a new version of TCP that maintains high throughput when reordering occurs
and yet, when packet reordering does not occur, is friendly to other versions of TCP. The proposed
TCP variant, or TCP-PR, does not rely on duplicate acknowledgments to detect a packet loss.
Instead, timers are maintained to keep track of how long ago a packet was transmitted. In case the
corresponding acknowledgment has not yet arrived and the elapsed time since the packet was sent
is larger than a given threshold, the packet is assumed lost. Because TCP-PR does not rely on
duplicate acknowledgments, packet reordering (includingout-or-order acknowledgments) has no
effect on TCP-PR’s performance.
Due to the scheduling algorithms used different packet sizes and arrivals times may result in the
reordering of packets entering on a single interface. While the exact cause of packet reordering
lies in the details of the scheduling algorithm, a more general reason is that parallel paths are
employed for economic reasons; it is cheaper to build multiple moderate speed paths than a single
very high-speed path.

2.2. Existing System :

The existing system is manual, and the manual system works in the following way:

The design of TCP’s error and congestion control mechanisms was based on the premise that
packet loss is an indication of network congestion.

 Therefore, upon detecting loss, the TCP sender backs off its transmission rate by decreasing its
congestion window.
 The TCP uses two strategies for detecting packet loss.
 The first one is based on the sender’s retransmission timeout (RTO) expiring and is sometimes
referred to as coarse timeout.

 The sender times out, congestion control responds by causing the sender to enter slow-start,
drastically decreasing its congestion window to one segment.
 The other loss detection mechanism originates at the receiver and uses TCP’s sequence number.
Essentially, the receiver observes the sequence numbers of packets it receives

3
3
PACKET REORDERING IN TRANSMISSION CONTROL PROTOCOL

DISADVANTAGES OF EXISTING SYSTEM

The design of TCP’s error and congestion control mechanisms was based on the premise that
packet loss is an indication of network congestion. Therefore, upon detecting loss, the TCP sender
backs off its transmission rate by decreasing its congestion window. TCP uses two strategies for
detecting packet loss. The first one is based on the sender’s retransmission timeout (RTO) expiring
and is sometimes referred to as coarse timeout. When the sender times out,congestion control
responds by causing the sender to enter slow-start, drastically decreasing its congestion window to
one segment. The other loss detection mechanism originates at the receiver and uses TCP’s sequence
number. Essentially, the receiver observes the sequence numbers of packets it receives; a “hole” in
the sequence is considered indicative of a packet loss. Specifically, the receiver generates a
“duplicate acknowledgment” (or DUPACK) for every “out-of-order” segment it receives. Note that
until the lost packet is received, all other packets with higher sequence number are considered “out-
of-order” and will cause DUPACKs to be generated. Modern TCP implementations adopt the fast-
retransmit algorithm which infers that a packet has been lost after the sender receives a few
DUPACKs.

The sender then retransmits the lost packet without waiting for a timeout and reduces its
congestion window in half. The basic idea behind fast retransmit is to improve TCP’s throughput
by avoiding the sender to timeout (which results in slow-start and consequently the shutting down
of the congestion window to one).

4
4
PACKET REORDERING IN TRANSMISSION CONTROL PROTOCOL

Fast retransmit can substantially improve TCP’s performance in the presence of sporadic
reordering but it still operates under the assumption that out-of-order packets indicate packet loss
and therefore congestion. Consequently, its performance degrades.

2.3. PROPOSED SYSTEM

To overcome all the difficulties of the existing system the management has proposed automated
the whole system and the development of the new automated system contains the following
activities, which try to automate the entire process keeping in view of the database integration
approach.

The basic idea behind TCP-PR is to detect packet losses using timers instead of duplicate
acknowledgments.

 This is prompted by the observation that, under persistent packet reordering, duplicate
acknowledgments are a poor indication of packet losses.
 The TCP-PR relies solely on timers to detect packet loss, it is also robust to acknowledgment
losses as the algorithm does not distinguish between data(on the forward path) or acknowledgment
(on the reverse path) losses.

2.4. CONCLUSION

The project entitled “PACKET REORDERING IN TRANSMISSION CONTROL


PROTOCOL” was successfully completed within the time span allotted. With implementation an
application capable of scheduling projects to subordinates.

All the modules are tested separately and put together to form the main system.

Finally, the system is tested with real data and everything worked successfully. Thus the system
has fulfilled the entire objective identified.

The entire system is user friendly and interactive. The performance of the system is provided
efficiently. The system tested with all possible sample data and was found to have an effective
planning of the functions or process with a high degree of accuracy and user friendliness.

5
5
PACKET REORDERING IN TRANSMISSION CONTROL PROTOCOL

3. ANALYSIS
3.1. INTRODUCTION

After analyzing the requirements of the task to be performed, the next step is to analyze the
problem and understand its context. The first activity in the phase is studying the existing system
and other is to understand the requirements and domain of the new system. Both the activities are
equally important, but the first activity serves as a basis of giving the functional specifications and
then successful design of the proposed system. Understanding the properties and requirements of a
new system is more difficult and requires creative thinking and understanding of existing running
system is also difficult, improper understanding of present system can lead diversion from
solution.
3.2. SOFTWARE REQUIREMENT SPECIFICATION

3.2.1. USER REQUIREMENT:

The software requirements specification document lists sufficient and necessary requirements for
the project development.[3] To derive the requirements, the developer needs to have clear and
thorough understanding of the products under development. This is achieved through detailed and
continuous communications with the project team and customer throughout the software
development process.

 Operating System : - Microsoft Windows XP/2000 or Higher


 Clients: CONSOLE
 Development Tools: Netbeans 6.8
 Documentation Tools: MS Office 2003/2007
 Drawing Tools: IBM Rational Rose Enterprise, MS Office Visio 2007
 User Interface: AWT & SWINGS
 Code Behind: AWT & SWINGS

6
6
PACKET REORDERING IN TRANSMISSION CONTROL PROTOCOL

3.2.2. SOFTWARE REQUIREMENT:

Client : CONSOLE.
Database Server : Mysql or Ms- Access.
Development End : NetBeans6.x/MyEclips6.x
User Interface : AWT & SWINGS and JDBC

3.2.3. HARDWARE REQUIREMENT:

Processor : Any Processor above 500 Mhz.


Ram : 128Mb.
Hard Disk : 10 Gb.
Compact Disk : 650 Mb
Input device : Standard Keyboard and Mouse.
Output device : VGA and High Resolution Monitor.

3.3. CONTENT DIAGRAM OF PROJECT

7
7
PACKET REORDERING IN TRANSMISSION CONTROL PROTOCOL

3.4. FLOWCHARTS

The data flow diagrams are very helpful in determining the flow of data in an application.

user

Without With packet Extreme loss


packet reordering.
reordering.

Send Send message


message

Ackno Se
wledg Trasmissio Packet le
n segmentation cti
emen
t ve

Destination Timer Trasmission Ac


k

Reordering

Comparision chart

Destination

Figure 3.4 Data flow diagram of packet reordering in tcp

8
8
PACKET REORDERING IN TRANSMISSION CONTROL PROTOCOL

3.5. CONCLUSION

In the analysis phase, a flowchart and the algorithm for the proposed system are implemented.
The software requirement specifications are defined which includes the user requirements, software
requirements and hardware requirements. The flowchart and the content diagram will describe the
process that is involved in using the website at the user end and the admin end.

9
9
PACKET REORDERING IN TRANSMISSION CONTROL PROTOCOL

4 DESIGN
4.1 INTRODUCTION
Design is how we communicate what an object does, or its function, through its shape or form.
Design is also the process we undertake to solve a problem. Once we have that high-level
statement of what we're trying to achieve, we can begin to sketch out a rough plan for our code -
where do we want to start from, and what are the steps we expect to have to go through to get to
our goal? At this stage, we aren't trying to lay out every single implementation detail; rather, we
want a roadmap that lets us do two things:
Separate and simplify the steps to achieving our goals.
Communicate our goals to our collaborators.
The importance can be stated with a single word “Quality”. Design is the place where quality
isfostered in software development. Design provides us with representations of software that can
assess for quality. Design is the only way that we can accurately translate a customer’s view into a
finished software product or system. Software design serves as a foundation for all the software
engineering steps that follow. Without a strong design we risk building an unstable system – one
that will be difficult to test, one whose quality cannot be assessed until the last stage.

4.2 UML DIAGRAM

The Unified Modeling Language (UML) is a standard language for specifying, visualizing,
constructing and documenting the artifacts of software systems as well as for business modeling
and other non-software systems. The UML represents a collection of best engineering practices
that have proven successful in the modeling of large and complex systems.
The UML uses mostly graphical notations to express the design of software projects. Using the
UML helps project teams communicate, explore potential design and validate the architectural
design of the software diagrams are designed to let developers and customers view a software
system from a different perspective and in varying degrees of abstraction diagrams commonly
created using visual modeling tools.

4.2.1 Class diagram

Class diagram is a static diagram. It represents the static view of an application. Class diagram is
not only used for visualizing, describing, and documenting different aspects of a system but also
for constructing executable code of the software application.Class diagram shows a collection of

10
10
PACKET REORDERING IN TRANSMISSION CONTROL PROTOCOL

classes, interfaces, associations, collaborations, and constraints. It is also known as a structural


diagram.

TCPPr SEnder
Sender
+String name
+String name
+readData(String file)
+readData(String file) +routerAddress(String ip)
+routerAddress(String ip)

Routers Timer Control

+String routerId +TimeStamp time

+sendData(Queue packets) +checkPacketQuesing()

Destination

+String destname

+viewData(File data)

Fig 4.2.1: Class Diagramof packet reordering in tcp

11
11
PACKET REORDERING IN TRANSMISSION CONTROL PROTOCOL

4.2.2 USE CASE DIAGRAM

A use case is a set of scenarios that describing an interaction between a user and a system. A use case
diagram displays the relationship among actors and use cases. The two main components of a use case
diagram are use cases and actors. An actor is representing a user or another system that will interact
with the system you are modeling. A use case is an external view of the system that represents some
action in the user might perform in order to complete a task.

Fig 4.2.2:Use Case Diagramof packet reordering in tcp

12
12
PACKET REORDERING IN TRANSMISSION CONTROL PROTOCOL

4.2.3 SEQUENCE DIAGRAM

Sequence diagrams describe interactions among classes in terms of an exchange of messages


over time. They’re also called event diagrams. A sequence diagram is a good way to visualize and
validate various runtime scenarios. These can help to predict how a system will behave and to
discover responsibilities.

Fig 4.2.3: Sequence Diagramof packet reordering in tcp

13
13
PACKET REORDERING IN TRANSMISSION CONTROL PROTOCOL

4.2.4 ACTIVITY DIAGRAM

An activity diagram is basically a flowchart to represent the flow from one activity to another
activity. The control flow is drawn from one operation to another. This flow can be sequential,
branched or concurrent.

TCP Sends TCP PR Sends

Router Outgress Router

Destination

Fig 4.2.4:Activity Diagramof packet reordering in tcp

14
14
PACKET REORDERING IN TRANSMISSION CONTROL PROTOCOL

4.3 MODULE DESIGN AND ORGANIZATION

Modules:

 Transmission without Reordering

 Transmission with Packet Reordering


 Segmentation
 Timer Control.
 Packet Reordering.

MODULE DESCRIPTION:

TRANSMISSION WITHOUT REORDERING:

If we transmit a message without packet reordering, then If part of a message is lost during the
transmission then we need to retransmit the entire message, or we need to retransmit from that
particular part.

Therefore, upon detecting loss, the TCP sender backs off its transmission rate by decreasing
its congestion window. TCP uses two strategies for detecting packet loss. The first one is based on
the sender’s retransmission timeout (RTO) expiring and is sometimes referred to as coarse
timeout. When the sender times out, congestion control responds by causing the sender to enter
slow-start, drastically decreasing its congestion window to one segment. The other loss detection
mechanism originates at the receiver and uses TCP’s sequence number. Essentially, the receiver
observes the sequence numbers of packets it receives; a “hole” in the sequence is considered
indicative of a packet loss. Specifically, the receiver generates a “duplicate acknowledgment” (or
DUPACK) for every “out-of-order” segment it receives. Note that until the lost packet is received,
all other packets with higher sequence number are considered “out-of-order” and will cause
DUPACKs to be generated. Modern TCP implementations adopt the fast-retransmitalgorithm
which infers that a packet has been lost after the sender receives a few DUPACKs.

15
15
PACKET REORDERING IN TRANSMISSION CONTROL PROTOCOL

TRANSMISSION WITH PACKET REORDERING:

If we transmit a message as packets, then we need to retransmit only the packet which is lost and
not the entire message. The message is sent from the source to the ingress router and then to the
intermediate routers and then to the outgoes router and the destination.

The basic idea behind TCP-PR is to detect packet losses using timers instead of duplicate
acknowledgments. This is prompted by the observation that, under persistent packet reordering,
duplicate acknowledgments are a poor indication of packet losses. Because TCP-PR relies solely
on timers to detect packet loss, it is also robust to acknowledgment losses as the algorithm does
not distinguish between data (on the forward path) or acknowledgment (on the reverse path)
losses.

The proposed algorithms only require changes in the TCP sender and are therefore backward-
compatible with any TCP receiver. TCP-PR’s sender algorithm is still based on the concept of a
congestion window, but the update of the congestion window follows slightly different rules than
standard TCP. However, significant care was placed in making the algorithm fair with respect to
other versions of TCP to ensure they can coexist.

Packets being processed by the sender are kept in one of two lists: the to-be-sent list contains all
packets whose transmission is pending, waiting for an “opening” in the congestion window. The
to-be-ack list contains those packets that were already sent but have not yet been acknowledged.
Typically, when an application produces a packet it is first placed in the to-be-sent list; when the
congestion window allows it, the packet is sent to the receiver and moved to the to-be-ack list;
finally when an ACK for that packet arrives from the receiver, it is removed from the to-be-ack
list (under cumulative ACKs, many packets will be simultaneously removed from to-be-ack).
Alternatively, when it is detected that a packet was dropped, it is moved from the to-be-ack list
back into the to-be-sent list.

SEGMENTATION:

Segmentation is the process of dividing the source code into small number of packets and
transmitting the packets through the routers. We define certain limits for the size of the packets.
We send the packet as 48 bytes data + 5-byte header information. The header information includes
source machine name, destination machine name, position of the packet and the related

16
16
PACKET REORDERING IN TRANSMISSION CONTROL PROTOCOL

information. The message as packets is sent to the router where it splits and gets the destination
address name and forwards the message’s packet to the destination.

TIMER CONTROL:

Whenever each and individual packet starts sending a timer is started. The system current time is
taken as a start time and added with delay and it acts as a threshold time and if the threshold time
exceeds the maximum elapsed time of the packet then the packet is retransmitted. If the time
doesn’t exceed then the packet may arrive safe. If so the next packet is transmitted else the current
packet is transmitted until it arrives safely. Thread concept is used to implement the timer.

COMPARISION CHART:

Comparison chart compares the throughput of Tcp without Packet Reordering with New TCP
with packet Reordering. The performance is shown by comparing the Transmission rate of
existing system with proposed system.

4.4 CONCLUSION
In the design phase, goals of the design phase are defined, and a basic design of the proposed
system is made. With the help of UML diagrams, an abstract picture of what happens in the
system is visualized. In our case, we have used use case and activity diagrams to explain the two
basic modules of this project. The entire project is divided into modules to make it easy to code
the design and to understand. The two modules are further divided in to sub-modules which will
give brief information about the project. This design is implemented step by step in the later
phases.

17
17
PACKET REORDERING IN TRANSMISSION CONTROL PROTOCOL

5. IMPLEMENTATION & RESULTS

5.1 INTRODUCTION

Software testing is a critical element of software quality assurance and represents the ultimate
review of specification, design and coding. In fact, testing is the one step in the software
engineering process that could be viewed as destructive rather than constructive.

A strategy for software testing integrates software test case design methods into a well-planned
series of steps that result in the successful construction of software. Testing is the set of activities
that can be planned and conducted systematically. The underlying motivation of program testing is
to affirm software quality with methods that can economically and effectively apply to both
strategic to both large and small-scale systems.

5.2 Explanation of Key functions

The requirement specification for any system can be broadly stated as given below:

 The system should be able to interface with the existing system


 The system should be accurate
 The system should be better than the existing system

5.3 Method of Implementation

SENDER CODE:

import java.io.*;

importjava.awt.*;

importjava.awt.event.*;

importjavax.swing.*;

import java.net.*;

importjava.util.*;

importjava.awt.Color;

18
18
PACKET REORDERING IN TRANSMISSION CONTROL PROTOCOL

public class SSource extends JFrame implements ActionListener

JLabelheading,destname,mtitle;

JTextArea ta;

JTextFieldin_destname;

JButtonsend,clear,browse,exit;//,chart;

JScrollPanejp;

Socket source;

String st;

String destadd;

DataOutputStream dos;

InetAddressslocalhost;

SIGRouter sig;

SSource()

setTitle("Packet Reordering");

heading=new JLabel("PACKET REORDERING - SOURCE");

heading.setFont(new Font("Garamond",Font.BOLD,20));

heading.setForeground(new Color(0,0,0));

heading.setBackground(new Color(198,195,255));

exit.setBounds( 657,426,115,30);

//chart.setBounds(210,426,115,30);

send.addActionListener(this);

19
19
PACKET REORDERING IN TRANSMISSION CONTROL PROTOCOL

browse.addActionListener(this);

clear.addActionListener(this);

exit.addActionListener(this);

//chart.addActionListener(this);

sig=new SIGRouter();

public void actionPerformed(ActionEventae)

if(ae.getSource()==browse)

try

FileDialogfd=new FileDialog(this,"Open",FileDialog.LOAD);

fd.show();

FileInputStreamfos=new FileInputStream(fd.getDirectory()+fd.getFile());

System.out.println(fd.getDirectory()+fd.getFile());

int b;

st="";

while((b=fos.read())!=-1)

st+=(char)b;

ta.setText(st);

fos.close();

20
20
PACKET REORDERING IN TRANSMISSION CONTROL PROTOCOL

}catch(Exception e){JOptionPane.showMessageDialog(this,e,"BrowseError",

JOptionPane.ERROR_MESSAGE);}

else if(ae.getSource()==send)

try

slocalhost=InetAddress.getLocalHost();

destadd = null;

destadd=in_destname.getText().trim();

destadd.trim();

if(destadd != null)

st=ta.getText().trim();

System.out.println("Sending to the ingress router-before");

sig.clearList();

sig.messageToDestination(destadd,st);

System.out.println("Sending to the ingress router-after");

}catch(Exception e){}

else if(ae.getSource()==clear)

21
21
PACKET REORDERING IN TRANSMISSION CONTROL PROTOCOL

ta.setText("");

/* else if(ae.getSource()==chart)

System.out.println("Exist " + ESource.exist);

System.out.println("Proposed " + SIGRouter.proposed);

chart demo = new chart("Bar Chart Demo ");

// demo.pack();

demo.setVisible(true);

}*/

else

System.exit(0);

public static void main(String ar[])

SSource s=new SSource();

s.setLocation(new Point(100, 100));

s.setSize(new Dimension(825, 555));

s.setVisible(true);

22
22
PACKET REORDERING IN TRANSMISSION CONTROL PROTOCOL

RECIEVER CODE :

import java.io.*;

importjava.awt.*;

importjava.awt.event.*;

importjavax.swing.*;

import java.net.*;

importjava.util.*;

ublic class SDestination extends JFrame implements ActionListener

JTextAreata,ta_saddr;

JButtonclear,exit;

JScrollPanejp;

JLabelheading,saddr,mtitle;

SDestination()

setTitle("Packet Reordering");

heading=new JLabel("PACKET REORDERING -Destination");

heading.setFont(new Font("Garamond",Font.BOLD,20));

heading.setForeground(new Color(0,0,0));

heading.setBackground(new Color(198,195,255));

saddr=new JLabel("source ");

saddr.setFont(new Font("Garamond",Font.BOLD,15));

saddr.setForeground(new Color(0,0,0));

saddr.setBackground(new Color(198,195,255));

mtitle=new JLabel("Message ");

23
23
PACKET REORDERING IN TRANSMISSION CONTROL PROTOCOL

mtitle.setFont(new Font("Garamond",Font.BOLD,15));

mtitle.setForeground(new Color(0,0,0));

mtitle.setBackground(new Color(198,195,255));

ta=new JTextArea();

ta_saddr=new JTextArea();

jp=new JScrollPane(ta);

clear=new JButton("Clear");

exit=new JButton("Exit");

Container c=this.getContentPane();

c.setLayout(null);

c.add(heading);

c.add(saddr);

c.add(ta_saddr);

c.add(mtitle);

c.add(jp);

c.add(clear);

c.add(exit);

heading.setBounds( 350,5,500,200);

saddr.setBounds(306,150,146,26);

ta_saddr.setBounds(382,152,176,26);

mtitle.setBounds(306,200,129,26);

jp.setBounds(305,243,496,151);

clear.setBounds(339,426,115,30);

exit.setBounds( 500,426,115,30);

clear.setForeground(new Color(255, 255, 255));

clear.setIcon(new ImageIcon("Images\\clear1.jpg"));

24
24
PACKET REORDERING IN TRANSMISSION CONTROL PROTOCOL

exit.setForeground(new Color(255, 255, 255));

exit.setIcon(new ImageIcon("Images\\Exit.jpg"));

c.setBackground(new Color(198,195,255));

clear.addActionListener(this);

exit.addActionListener(this);

this.setLocation(new Point(100, 100));

this.setSize(new Dimension(825, 555));

this.setVisible(true);

public voidoriginalMessage(Hashtablehs,Stringdname)

ta_saddr.setText(dname);

String st="";

JOptionPane.showMessageDialog(rootPane, "Message received");

for(Iterator i=hs.keySet().iterator();i.hasNext();)

st=hs.get(i.next())+st;

ta.setText(st);

/*int opt=JOptionPane.showConfirmDialog(this,"Message Received!!!

Open?","confirmation",JOptionPane.YES_NO_OPTION);

if(opt==JOptionPane.YES_OPTION)

for(Iterator i=hs.keySet().iterator();i.hasNext();)

st=hs.get(i.next())+st;

25
25
PACKET REORDERING IN TRANSMISSION CONTROL PROTOCOL

ta.setText(st);

else if(opt==JOptionPane.NO_OPTION){

ta.setText("");

try {

Socket ddd = new Socket("162.168.0.91", 8008);

DataOutputStreamra_dis = new DataOutputStream(ddd.getOutputStream());

ra_dis.writeUTF("NO");

} catch (Exception e) {

// e.printStackTrace();

}*/

public void actionPerformed(ActionEventae)

if(ae.getSource()==clear)

ta.setText("");

else

System.exit(0);

26
26
PACKET REORDERING IN TRANSMISSION CONTROL PROTOCOL

/*public static void main(String ar[])

SDestination s=new SDestination();

}*/

27
27
PACKET REORDERING IN TRANSMISSION CONTROL PROTOCOL

5.3.1 Forms

The Java Programming Language:

Java is a high-level programming language that is all of the following:

 Simple
 Object-oriented
 Distributed
 Interpreted
 Robust
 Secure
 Architecture-neutral
 Portable
 High-performance
 Multithreaded

Java is also unusual in that each Java program is both compiled and interpreted. With a compiler,
you translate a Java program into an intermediate language called Java byte codes--the platform-
independent codes interpreted by the Java interpreter. With an interpreter, each Java byte code
instruction is parsed and run on the computer. Compilation happens just once; interpretation
occurs each time the program is executed.

Java byte codes can be considered 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. The Java program can be
compiled into byte codes on any platform that has a Java compiler. The byte codes can then be run
on any implementation of the Java VM. For example, the same Java program can run on Windows
NT, Solaris, and Macintosh.

The Java Platform


A platform is the hardware or software environment in which a program runs. The Java platform
differs from most other platforms in that it's a software-only platform that runs on top of other,

28
28
PACKET REORDERING IN TRANSMISSION CONTROL PROTOCOL

hardware-based platforms. Most other platforms are described as a combination of hardware and
operating system.

The Java platform has two components:

 The Java Virtual Machine (Java VM)


 The Java Application Programming Interface (Java API)

The Java API is a large collection of ready-made software components that provide many useful
capabilities, such as graphical user interface (GUI) widgets. The Java API is grouped into libraries
(packages) of related components.

AWT

AWT stands for Abstract Window ToolKit. It is a portable GUI library between Solaris and
Windows 95/NT and Mac System 7.X(soon) for stand-alone applications and/or applets. Since it
can be used in applets it can be used on IRIX, SunOS, HP/UX, Linux which Netscape 2.0
supports.

The Abstract Window Toolkit provides many classes for programmers to use. It is your
connection between your application and the native GUI. The AWT hides you from the underlying
details of the GUI your application will be running on and thus is at very high level of abstraction.
It takes the lowest common denominator approach to retain portability. No floating toolbars or
Balloon help here...

It is a Java package and can be used in any Java program by importing java.awt.* via the import
keyword. The documentation for the package is available at the Java hompage. The package will
be covered briefly as this document is not considered advanced material because it does not
discuss Peers, ImageConsumers/Producers, Toolkits and other advanced AWT ilk. It is
recommend you look at the source code to see how the AWT really works.

5.3.2 OUTPUT SCREENS:

29
29
PACKET REORDERING IN TRANSMISSION CONTROL PROTOCOL

5.3.2(i) SENDER SENDS THE SAMPLE MESSAGE TO RECEIVER

30
30
PACKET REORDERING IN TRANSMISSION CONTROL PROTOCOL

5.3.2(ii) RECEIVER RECEIVE THE SAMPLE MESSAGE FROM SENDER

31
31
PACKET REORDERING IN TRANSMISSION CONTROL PROTOCOL

5.3.2(iii) NEW TCP PERSISTENT PACKET REORDERING

32
32
PACKET REORDERING IN TRANSMISSION CONTROL PROTOCOL

5.3.2(iv) RESULT OF PACKET REORDERING

33
33
PACKET REORDERING IN TRANSMISSION CONTROL PROTOCOL

5.3.2(v) TCP/IP WITH PACKET REORDERING

34
34
PACKET REORDERING IN TRANSMISSION CONTROL PROTOCOL

5.3.3(vi) COMPARISION CHART

35
35
PACKET REORDERING IN TRANSMISSION CONTROL PROTOCOL

5.4 CONCLUSION

The output of this phase results in passing all the required key functions of implementation.
Once the implementation phase is done, the project is almost ready and just needs simplechanges
which can be done later while testing is processed. This phase results in an efficient order status
updating system that almost satisfies the requirements of the proposed system.

36
36
PACKET REORDERING IN TRANSMISSION CONTROL PROTOCOL

6. TESTING & VALIDATION


6.1 Introduction

Software testing is a critical element of software quality assurance and represents the ultimate
review of specification, design and coding. In fact, testing is the one step in the software
engineering process that could be viewed as destructive rather than constructive.

A strategy for software testing integrates software test case design methods into a well-planned
series of steps that result in the successful construction of software. Testing is the set of activities
that can be planned and conducted systematically. The underlying motivation of program testing is
to affirm software quality with methods that can economically and effectively apply to both
strategic to both large and small-scale systems.

6.2 Design of test cases and scenarios

The purpose of testing is to discover errors. Testing is the process of trying to discover every
conceivable fault or weakness in a work product. It provides a way to check the functionality of
components, sub-assemblies, assemblies and/or a finished product It is the process of exercising
software with the intent of ensuring that the Software system meets its requirements and user
expectations and does not fail in an unacceptable manner. There are various types of test. Each test
type addresses a specific testing requirement.
Activities:
 Unit testing
 Integration testing
 Acceptance testing

37
37
PACKET REORDERING IN TRANSMISSION CONTROL PROTOCOL

 UNIT TESTING:

Unit testing is usually conducted as part of a combined code and unit test phase of the software
lifecycle, although it is not uncommon for coding and unit testing to be conducted as two distinct
phases.

Test strategy and approach


Field testing will be performed manually, and functional tests will be written in detail. We have
to check all the packets being transferred are arrived in the correct order. Each packet must be
tested before transmission.

 INTEGRATION TESTING:

Software integration testing is the incremental integration testing of two or more integrated
software components on a single platform to produce failures caused by interface defects.

The task of the integration test is to check that components or software applications, e.g.
components in a software system or – one step up – software applications at the company level –
interact without error.

Here all the modules are checked before integrating the system. Here we have shown a chart
between the old TCP and New TCP. Which collects the results after transmitting the packets from
existing and proposed system.

 ACCEPTANCE TESTING:
User Acceptance Testing is a critical phase of any project and requires significant participation
by the end user. It also ensures that the system meets the functional requirements.

6.3 VALIDATION

There are a common set of validation documents used to provide this evidence. A validation
project usually follows this process:
 Validation Planning – The decision is made to validate the system. A project lead is identified,
and validation resources are gathered.
 Requirement Gathering – System Requirements are identified. Requirements are documented
in the appropriate specifications. Specification documents are reviewed and approved.

38
38
PACKET REORDERING IN TRANSMISSION CONTROL PROTOCOL

 System Testing – Testing Protocols are written, reviewed, and approved. The protocol is
executed to document that the system meets all requirements.
 System Release – The Summary Report is written and system is released to the end-users for
use.
 Change Control – If changes need to be made after validation is complete, Change Control
ensures that the system change does not affect the system in unexpected ways.

6.4 CONCLUSION

What to be tested and how to be tested are defined in the initial state of testing. In validation state,
what modules have to be tested is defined and then validated accordingly. Different types of tests
are performed in order to make the code run efficiently. Once the testing phase is completed and if
the code is error-free, the proposed system is ready as per the requirements. If the code passes this
stage, the code is being tested with all the possible test cases and all the test scenarios are verified
and validated.

39
39
PACKET REORDERING IN TRANSMISSION CONTROL PROTOCOL

7. CONCLUSION

7.1 PROJECT CONCLUSION

The project entitled “PACKET REORDERING IN TRANSMISSION CONTROL


PROTOCOL” was successfully completed within the time span allotted. With implementation an
application capable of scheduling projects to subordinates.
All the modules are tested separately and put together to form the main system.
Finally, the system is tested with real data and everything worked successfully. thus the system
has fulfilled the entire objective identified.
The entire system is user friendly and interactive. The performance of the system is provided
efficiently. The system tested with all possible sample data and was found to have an effective
planning of the functions or process with a high degree of accuracy and user friendliness.

7.2 FUTURE ENHANCEMENT

 Furthermore, TCP-PR is expected to work well in wireless multi-hop environments allowing


wireless routing protocols to make use of multiple paths when available.
 While the protocol described in this paper focuses on wired networks, we plan to adapt it for
wireless environments as part of our future work.

40
40
PACKET REORDERING IN TRANSMISSION CONTROL PROTOCOL

41
41
PACKET REORDERING IN TRANSMISSION CONTROL PROTOCOL

8. REFERENCE

8.1 REFERRED BOOKS

Java Complete reference 2.0

Head First Java

Network simulator (ns-3)

Data and communications

Data communication and networking

Computer networks

Internetworking with TCP/IP

TCP/IP Illustrated

8.2 REFERRED SITES

http://java.sun.com

http://www.analysisandsolution.com

http://www.dbbalance.com/

http://www.java2s.com/

https://www.nsnam.org/

42
42

You might also like