0% found this document useful (0 votes)
8 views28 pages

NET102 WEEK-NO5 Role of TCP in Transport Layer

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

NET102 WEEK-NO5 Role of TCP in Transport Layer

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

WEEK 5

(THE ROLE OF TCP/IP IN


TRANSPORT LAYER)

NET102 – NETWORKING 2
• Understand the process of a TCP/IP in the
transport layer

NET102 - INTRODUCTION TO COMPUTING


WEEK 5- THE ROLE OF TCP/IP IN TRANSPORT LAYER

Transport Layer Functions


The TCP/IP transport layer is responsible for providing a logical connection
between two hosts and can provide these functions:
• Flow control (through the use of windowing)
• Reliable connections (through the use of sequence numbers and
acknowledgments)
• Session multiplexing (through the use of port numbers and IP addresses)
• Segmentation (through the use of segment protocol data units, or PDUs)

NET102 – NETWORKING 2
WEEK 5- THE ROLE OF TCP/IP IN TRANSPORT LAYER

Flow Control
Flow control is used to ensure that the destination doesn’t become overwhelmed by
the source sending too much information at once.
• Two kinds of flow control exist:
1. Ready/not-ready signals
These are signals that are not very efficient when a lot of delay is present in
the data transmission.
2. Windowing. ready/not-ready
Windowing is a much more efficient process, since the size of the window
determines how many segments can be sent before waiting for an
acknowledgment to send the next batch of segments.
NET102 – NETWORKING 2
WEEK 5- THE ROLE OF TCP/IP IN TRANSPORT LAYER

Reliability
When reliability is necessary, it should cover these four items:
1. Recognizing lost packets and having them re-sent
2. Recognizing packets that arrive out of order and reordering them
3. Detecting duplicate packets and dropping the extra ones
4.Avoiding congestion
• Most protocols with built-in reliability use sequence and acknowledgment
numbers to deal with the first three bullet points.

NET102 – NETWORKING 2
WEEK 5- THE ROLE OF TCP/IP IN TRANSPORT LAYER

Multiplexing
• Multiplexing is the ability of a single host to have multiple concurrent
sessions open to one or many other hosts.
• A session occurs when the source opens a connection by sending one or
more PDUs and typically, but not always, receives a reply from the
destination.
• A session can be reliable or unreliable and may or may not involve flow
control.

NET102 – NETWORKING 2
WEEK 5- THE ROLE OF TCP/IP IN TRANSPORT LAYER

Segmentation
• Segmentation is the process of breaking up data into smaller, identifiable
PDUs at the transport layer.
• In TCP/IP, the transport layer packages application layer data into segments to
send to a destination device.
• The remote destination is responsible for taking the data from these
segments and directing it to the correct application.

NET102 – NETWORKING 2
WEEK 5- THE ROLE OF TCP/IP IN TRANSPORT LAYER

Transport Layer Protocols


TCP/IP uses two transport layer protocols:
1. TCP
2. UDP
The following two sections discuss these protocols in depth and describe their
characteristics and the segmentation they use, including the layout of their
segment headers.

NET102 – NETWORKING 2
WEEK 5- THE ROLE OF TCP/IP IN TRANSPORT LAYER

Transmission Control Protocol


• TCP uses a reliable delivery system to deliver layer 4 segments to the
destination. This would be analogous to using a certified, priority, or next-day
service with the US Postal Service.
• TCP’s main responsibility is to provide a reliable full-duplex, connection-
oriented, logical service between two devices.
• TCP goes through a three-way handshake to establish a session before data
can be sent (discussed later in the “TCP’s Three-Way Handshake” section).

NET102 – NETWORKING 2
WEEK 5- THE ROLE OF TCP/IP IN TRANSPORT LAYER

Transmission Control Protocol


• TCP Segment Components

NET102 – NETWORKING 2
WEEK 5- THE ROLE OF TCP/IP IN TRANSPORT LAYER

User Datagram Protocol


• UDP uses a best-effort delivery system, similar to how first class and lower
postal services of the US Postal Service work. With a first class letter, you
place the destination address and return address on the envelope, put it in
your mailbox, and hope that it arrives at the destination.
• UDP Segment Components

NET102 – NETWORKING 2
WEEK 5- THE ROLE OF TCP/IP IN TRANSPORT LAYER

TCP and UDP Applications


• One main difference between the OSI Reference Model and TCP/IP’s model is
that TCP/IP lumps together the application, presentation, and session layers
into one layer, called the application layer.
• Hundreds and hundreds of TCP/IP applications are available. The most
common ones are used to share information, such as file transfers, e-mail
communications, and web browsing

NET102 – NETWORKING 2
WEEK 5- THE ROLE OF TCP/IP IN TRANSPORT LAYER

Common TCP/IP Applications


and Protocols
• Common TCP/IP Applications and Protocols

NET102 – NETWORKING 2
WEEK 5- THE ROLE OF TCP/IP IN TRANSPORT LAYER

Ports
• TCP/IP’s transport layer uses port numbers and IP addresses to multiplex
sessions between multiple hosts.
• As you can see from the port number field, the port numbers are 16 bits in
length, allowing for port numbers from 0 to 65,535 (a total of 65,536 ports).
Port numbers fall under three types:
• Well-known
• Registered
• Dynamically assigned

NET102 – NETWORKING 2
WEEK 5- THE ROLE OF TCP/IP IN TRANSPORT LAYER

Ports
• When you want to connect to an application on a destination host, the source
port field in the TCP or UDP header will have a dynamically assigned port.
• The destination port field will have either a well-known or registered port
number, depending on the application to which you are connecting.
• The destination host can use this information to determine what application
needs to process the session data.

NET102 – NETWORKING 2
WEEK 5- THE ROLE OF TCP/IP IN TRANSPORT LAYER

Application Mapping
• TCP and UDP provide a multiplexing function for simultaneously supporting
multiple sessions to one or more hosts: This allows multiple applications to
send and receive data to many devices simultaneously.
• With these protocols, port numbers (at the transport layer) and IP addresses
(at the Internet layer) are used to differentiate the sessions.

NET102 – NETWORKING 2
WEEK 5- THE ROLE OF TCP/IP IN TRANSPORT LAYER

Application Mapping
• Multiplexing Connections

NET102 – NETWORKING 2
WEEK 5- THE ROLE OF TCP/IP IN TRANSPORT LAYER

Application Mapping
• Using port numbers

NET102 – NETWORKING 2
WEEK 5- THE ROLE OF TCP/IP IN TRANSPORT LAYER

Session Establishment
• TCP and UDP use completely different processes when establishing a session
with a remote peer. As you probably already have guessed, UDP uses a fairly
simple process. With UDP, one of two situations will occur that indicate that
the session is established:
* The source sends a UDP segment to the destination and receives a
response
* The source sends a UDP segment to the destination

NET102 – NETWORKING 2
WEEK 5- THE ROLE OF TCP/IP IN TRANSPORT LAYER

Session Establishment
• As to which of the two are used, that depends on the application. And as to
when a UDP session is over, that is also application-specific:
* The application can send a message, indicating that the session is now
over, which could be part of the data payload
* An idle timeout is used, so if no segments are encountered over a
predefined period, the application assumes the session is over

NET102 – NETWORKING 2
WEEK 5- THE ROLE OF TCP/IP IN TRANSPORT LAYER

Session Establishment
• TCP, on the other hand, is much more complicated. It uses what is called a
defined state machine.
• A defined state machine defines the actual mechanics of the beginning of the
state (building the TCP session), maintaining the state (maintaining the TCP
session), and ending the state (tearing down the TCP session).

NET102 – NETWORKING 2
WEEK 5- THE ROLE OF TCP/IP IN TRANSPORT LAYER

TCP’s Three Way Handshake


• With reliable TCP sessions, before a host can send information to another
host, a handshake process must take place to establish the connection.
• Setting up a reliable connection: threeway handshake

NET102 – NETWORKING 2
WEEK 5- THE ROLE OF TCP/IP IN TRANSPORT LAYER

TCP’s Three Way Handshake


• The following three steps occur during the three-way handshake:
1. The source sends a synchronization (SYN) segment (where the SYN control
flag is set in the TCP header) to the destination, indicating that the source
wants to establish a reliable session.
2. The destination responds with both an acknowledgment and
synchronization in the same segment.
3. Upon receiving the SYN/ACK, the source responds with an ACK segment
(where the ACK flag is set in the TCP header).

NET102 – NETWORKING 2
WEEK 5- THE ROLE OF TCP/IP IN TRANSPORT LAYER

TCP’s Sequencing and


Acknowledgments
• Sequence and acknowledgment numbers to the process:
1. The source sends a synchronization frame with the SYN bit marked in the
Code field. This segment contains an initial sequence number. This is referred
to as a SYN segment.
2. Upon receipt of the SYN segment, the destination responds with its own
segment, with its own initial sequence number and the appropriate value in
the Acknowledgment field indicating the receipt of the source’s original SYN
segment.

NET102 – NETWORKING 2
WEEK 5- THE ROLE OF TCP/IP IN TRANSPORT LAYER

TCP’s Sequencing and


Acknowledgments
• 3. Upon receipt of the SYN/ACK segment, the source will acknowledge receipt
of this segment by responding to the destination with an ACK segment, which
has the Acknowledgment field set to an appropriate value based on the
destination’s sequence number and the appropriate bit set in the Code field.

NET102 – NETWORKING 2
WEEK 5- THE ROLE OF TCP/IP IN TRANSPORT LAYER

TCP’s Sequencing and


Acknowledgments
• Here is a simple example of a three-way handshake with sequence and
acknowledgment numbers:
1. Source sends a SYN: sequence number = 1
2. Destination responds with a SYN/ACK:
Sequence number = 10, acknowledgment = 2
3. Source responds with an ACK segment:
Sequence number = 2, acknowledgment = 11

NET102 – NETWORKING 2
WEEK 5- THE ROLE OF TCP/IP IN TRANSPORT LAYER

TCP’s Flow Control and


Windowing
• TCP allows the regulation of the flow of segments, ensuring that one host
doesn’t flood another host with too many segments, overflowing its receiving
buffer. TCP uses a sliding windowing mechanism to assist with flow control.
• TCP employs a positive acknowledgment with retransmission (PAR)
mechanism to recover from lost segments. The same segment will be
repeatedly re-sent, with a delay between each segment, until an
acknowledgment is received from the destination. The acknowledgment
contains the sequence number of the segment received and verifies receipt
of all segments sent prior to the retransmission process. This eliminates the
need for multiple acknowledgments and resending acknowledgments.
NET102 – NETWORKING 2

You might also like