Escolar Documentos
Profissional Documentos
Cultura Documentos
Simulation is the imitation of some real thing available, state of affairs, or process. Simulation is used in
many
contexts,
such
as
of technology for
simulation
performance
optimization, safety
The Transmission Control Protocol (TCP) is one of the core protocols of the Internet Protocol
Suite. TCP is one of the two original components of the suite, complementing the Internet
Protocol (IP), and therefore the entire suite is commonly referred to as TCP/IP. TCP provides reliable,
ordered delivery of a stream of bytes from a program on one computer to another program on another
computer. TCP
is
the
protocol
that
major
Internet
applications
such
as
the World
Wide
Web, email, remote administration and file transfer rely on. Other applications, which do not require
reliable
data
stream
service,
may
use
the User
Datagram
Protocol (UDP),
which
provides
a datagram service that emphasizes reduced latency over reliability. TCP is responsible for keeping the
unordered segments in the right order. TCP assures a reliable delivery by resending anything that gets
lost while traveling the network. TCP also implements a congestion control mechanism.
TCP provides the following facilities:
i)
Stream data transfer: The TCP is able to transfer a continuous stream of octets in each
direction between its users by packing some numbers of octets into segments for
transmission through the internet system. Applications working at the Application Layer
transfer a continuous stream of bytes to the bottom layers. It is the duty of TCP to pack this
byte stream to packets, known as TCP segments, which are passed to the IP layer for
transmission to the destination device. The application does not have to bother to chop the
ii)
iii)
slow receiver. It provides a mechanism for the receiver to control the transmission speed, so
that the receiving node is not overwhelmed with data from transmitting node. Flow control
should be distinguished from congestion control, which is used for controlling the flow of
data when congestion has actually occurred. TCP provides a means for the receiver to
govern the amount of data sent by the sender. This is achieved by returning a Window with
every ACK indicating a range of acceptable sequence numbers beyond the last segment
successfully received, The window indicates an allowed number of octets that the sender
transmit
before
receiving
further
permission.
The
TCP
at
the
receiving device,
when sending an ACK back to the sender, also indicates to the TCP at the sending device,
the number of bytes it can receive without causing serious problems in its internal buffers.
iv)
Multiplexing: To allow for many processes within a single host to use TCP communication
facilities simultaneously, the TCP provides a set of addresses or ports within each host.
Concatenated with the network and host addresses from the Internet communication layer,
this forms a socket (see Figure 1). A pair of sockets uniquely identifies each connection.
v)
above
require
that
TCPs
initializes
and
maintains
certain
status
information for each data stream. The combination of this status including
sockets, sequence numbers, window sizes is called a logical connection.
When two processes wish to communicate, Their TCPs must first establish
a connection. When their connection is completed, the connection is
terminated or closed to free the resources for other users. Since
connections must be established between unreliable hosts and over the
unreliable internet communication system, a handshake mechanism with
clock-based sequence numbers is used to avoid erroneous initialization of
connections.
vi)
Full Duplex: TCP establishes a full duplex virtual connection between two
order, regardless of any fragmentation, disordering, or packet loss that may occur during transmission.
For every payload byte transmitted, the sequence number must be incremented. In the first two steps of
the 3-way handshake, both computers exchange an initial sequence number (ISN). This number can be
arbitrary, and should in fact be unpredictable to defend against TCP Sequence Prediction Attacks.
TCP primarily uses a cumulative acknowledgment scheme, where the receiver sends an acknowledgment
signifying that the receiver has received all data preceding the acknowledged sequence number. The
sender sets the sequence number field to the sequence number of the first payload byte in the segment's
data field, and the receiver sends an acknowledgment specifying the sequence number of the next byte
they expect to receive. For example, if a sending computer sends a packet containing four payload bytes
with a sequence number field of 100, then the sequence numbers of the four payload bytes are 100, 101,
102 and 103. When this packet arrives at the receiving computer, it would send back an acknowledgment
number of 104 since that is the sequence number of the next byte it expects to receive in the next packet.
In addition to cumulative acknowledgments, TCP receivers can also send selective acknowledgments to
provide further information.
If the sender infers that data has been lost in the network, it retransmits the data.
Congestion control
The final main aspect of TCP is congestion control. TCP uses a number of
mechanisms to achieve high performance and avoid congestion collapse, where
network performance can fall by several orders of magnitude. These mechanisms
control the rate of data entering the network, keeping the data flow below a rate
that
would
trigger
collapse.
They
also
yield
an
approximately max-min
of
TCP
contain
four
intertwined
algorithms: Slow-
start, congestion avoidance, fast retransmit, and fast recovery. To support the
congestion avoidance algorithm, the sender keeps two state variables: congestion
window, cwnd and a threshold ssthresh which is used to indicate the adjustment of
the congestion window. So the algorithm adjusts the window to safe operating point
then additive increase takes over and slowly increases the window size to probe for
more bandwidth. This enables TCP to deliver its data reliably and efficiently even in
a congested environment.
Conclusions
TCP is a fairly complex protocol that handles the brunt of functionality in a packet switched
network such as the Internet. Supporting the reliable delivery of data on a packet switched
network is not a trivial task. This document only scratches the surface of the TCP internals,
but hopefully provided the reader with an appreciation and starting point for further interest
in TCP. Even after almost 20 years of standardization, the amount of work that goes into
supporting and designing reliable packet switched networks has not slowed. It is an area of
great activity and there are many problems to be solved. As the Internet continues to grow,
our reliance on TCP will become increasingly important. It is therefore imperative for network
engineers, designers and researchers to be as well versed in the technology as possible.
Time
Type
Sequence
Sent
Receive
No
from
d at
DATA
0.2016
DATA
0.2016
ACK
0.4032
ACK
0.4032
DATA
0.6448
DATA
0.6448
ACK
0.8464
ACK
0.8464
DATA
10
1.088
DATA
11
1.088
ACK
12
1.2896
ACK
13
1.2896
DATA
14
1.5312
DATA
15
1.5312
ACK
16
1.7328
ACK
17
1.7328
DATA
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
18
1.9744
DATA
19
1.9744
ACK
20
2.176
ACK
Time
Type
Sequence
2.176
DATA
2.176
DATA
Dropped on link 0 to
3.176
DATA
1
Sent from node 0
3.4176
DATA
Received at node 1
3.4176
ACK
3.6192
ACK
Received at node 0
3.6192
DATA
3.8608
DATA
Received at node 1
3.8608
ACK
10
4.0624
ACK
Received at node 0
11
4.0624
DATA
12
4.304
DATA
Received at node 1
13
4.304
ACK
14
4.5056
ACK
Received at node 0
15
4.5056
DATA
16
4.7472
DATA
Received at node 1
17
4.7472
ACK
18
4.9488
ACK
Received at node 0
19
4.9488
DATA
20
4.9488
DATA
Dropped on link 0 to
1
1
0
Remarks
No
21
5.9488
DATA
22
6.1904
DATA
Received at node 1
23
6.1904
ACK
24
6.392
ACK
Received at node 0
Size
Bytes Transmitted
4
5
6
7
8
538.0
671.0
804.0
936.0
1068.0
Size
Bytes Transmitted
1
2
3
4
5
6
7
8
10.0
20.0
29.0
38.0
46.0
54.0
62.0
70.0
Kbytes
Kbytes
Kbytes
Kbytes
Kbytes
Kbytes
Kbytes
Kbytes
No of pairs
Duration
Bytes Transmitted
Delay
6s
350 Kbytes
0.2498 s
6s
175 Kbytes
0.3397 s
6s
105.166 Kbytes
0.3561 s
6s
83.625 Kbytes
0.3796 s
10
6s
67.599 Kbytes
0.3624 s
12
6s
56.332 Kbytes
0.3674 s
14
6s
48.284 Kbytes
0.3685 s
16
6s
42.625 Kbytes
0.3950 s