The document discusses the User Datagram Protocol (UDP) and the Transmission Control Protocol (TCP). UDP is a connectionless protocol that provides process-to-process communication over IP. TCP is connection-oriented and establishes a virtual connection between hosts to reliably send data using flow and error control. TCP numbers data bytes and uses sequence numbers and acknowledgments to ensure reliable in-order delivery. Connection establishment and termination with TCP uses three-way and four-way handshaking protocols. TCP guarantees in-order delivery of data to processes and handles lost packets.
Introduction to Yarmouk University, Faculty of Information Technology, specifically focusing on the Computer Science Department and the Transport Layer.
Discussion on UDP as a connectionless and unreliable transport protocol providing process-to-process communication. It includes well-known ports and UDP length calculations.
Overview of TCP as a connection-oriented protocol with flow and error control. Details include well-known ports, segment formats, and key fields.Detailed description of TCP segment fields such as source/destination port, sequence and acknowledgment numbers, and control bits.
TCP connection establishment process using a three-way handshake, including sequence number allocation and segment characteristics.
Description of simultaneous connection establishment processes that handle handshakes without a third ACK segment.
Explains the process of data transfer and connection termination via three-way handshaking, including specifics of segment consumption.
Details on connection termination methods, including simultaneous terminations and half-close methodologies, where clients can stop sending but still receive.
Notes on sequence number consumption by ACK segments and TCP's guarantee of ordered data delivery, including figures for normal operation.
Yarmouk University –Faculty of Information
Technology and CS Computer Science
Department
Transport Layer
2.
23-2 USER DATAGRAMPROTOCOL (UDP)
The User Datagram Protocol (UDP) is called a
connectionless, unreliable transport protocol. It does
not add anything to the services of IP except to provide
process-to-process communication instead of host-to-host
23.2
communication.
23-3 TCP
TCPis a connection-oriented protocol; it creates a
virtual connection between two TCPs to send data. In
addition, TCP uses flow and error control mechanisms
at the transport level.
23.6
23.8
The bytesof data being transferred in each connection are numbered by TCP.
The numbering starts with a randomly generated number.
USING sequence number and the acknowledgment number FIELDS. These two
fields refer to the byte number and not the segment number.
Note
Field Description
Sourceport address. This is a 16-bit
Destination port
address
This is a 16-bit field
Sequence number This 32-bit field defines the number assigned to the first byte of data contained in this segment.
Acknowledgment
number
This 32-bit field defines the byte number that the receiver of the segment is expecting to receive from the
other party. If the receiver of the segment has successfully received byte number x from the other party, it
defines x + I as the acknowledgment number.
Header length This 4-bit field indicates the number of 4-byte words in the TCP Header. The length of the header can be
between 20 and 60 bytes. Therefore, the value of this field can be between 5 (5 x 4 =20) and 15 (15 x 4 =60).
Reserved This is a 6-bit field reserved for future use
Control This field defines 6 different control bits or flags
Window size This field defines the size of the window, in bytes, that the other
party must maintain. Note that the length of this field is 16 bits, which means that
the maximum size of the window is 65,535 bytes. This value is normally referred
to as the receiving window (rwnd) and is determined by the receiver.
Checksum This 16-bit field
Urgent pointer •This l6-bit field, which is valid only if the urgent flag is set, is
used when the segment contains urgent data. It defines the number that must be
added to the sequence number to obtain the number of the last urgent byte in the
data section of the segment
Options There can be up to 40 bytes of optional information in the TCP header
11.
Figure 23.17 Controlfield
23.11
These bits enable flow control, connection establishment and termination,
connection abortion, and the mode of data transfer in TCP.
Connection establishment usingthree-way handshaking
Random
With the connection now established, the client will send data whose first byte will be
given sequence number 4,568. The server's first byte of data will be numbered 12,999.
Note
• ASYN segment cannot carry data, but it consumes one sequence number.
• A SYN + ACK segment cannot carry data, but does consume one sequence number.
• An ACK segment, if carrying no data, consumes no sequence number.
23.16
Note
• TheFIN segment consumes one sequence number if it not carry data.
• The FIN + ACK segment consumes one sequence number if it does not carry data.
23.20
Connection termination usingHalf-close Four-way handshaking
23.24
One End can stop sending data
while receiving data.
And normally issued by the
CLIENT
The termination can be only for
the outbound connection (i.e.
Sorting) for the client
(requester) and the server can
terminate the inbound
connection and maintain the
outbound
Request for the
termination but the 3rd
way is not initiated yet.
Until the server finishes
the processing and send
a FIN back to the client.
In the half closed
connection, the client
closes outbound, thus
cannot send out data
only ACK. And server
closes inbound
connection, thus he still
can send data if
needed.
25.
Note
• ACKsegments do not consume sequence numbers and are not acknowledged.
• Data may arrive out of order and be temporarily stored by the receiving TCP, but
TCP guarantees that no out-of-order segment is delivered to the process.
23.25