NET102 WEEK-NO5 Role of TCP in Transport Layer
NET102 WEEK-NO5 Role of TCP in Transport Layer
NET102 – NETWORKING 2
• Understand the process of a TCP/IP in the
transport layer
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
NET102 – NETWORKING 2
WEEK 5- THE ROLE OF TCP/IP IN TRANSPORT LAYER
NET102 – NETWORKING 2
WEEK 5- THE ROLE OF TCP/IP IN TRANSPORT LAYER
NET102 – NETWORKING 2
WEEK 5- THE ROLE OF TCP/IP IN TRANSPORT LAYER
NET102 – NETWORKING 2
WEEK 5- THE ROLE OF TCP/IP IN TRANSPORT LAYER
NET102 – NETWORKING 2
WEEK 5- THE ROLE OF TCP/IP IN TRANSPORT LAYER
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
NET102 – NETWORKING 2
WEEK 5- THE ROLE OF TCP/IP IN TRANSPORT LAYER
NET102 – NETWORKING 2
WEEK 5- THE ROLE OF TCP/IP IN TRANSPORT LAYER
NET102 – NETWORKING 2
WEEK 5- THE ROLE OF TCP/IP IN TRANSPORT LAYER
NET102 – NETWORKING 2
WEEK 5- THE ROLE OF TCP/IP IN TRANSPORT LAYER
NET102 – NETWORKING 2
WEEK 5- THE ROLE OF TCP/IP IN TRANSPORT LAYER