0% found this document useful (0 votes)
3 views

Module 4 Computer Networks

Uploaded by

kiran
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Module 4 Computer Networks

Uploaded by

kiran
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 40

MODULE-4

• Introduction to Transport Layer: Introduction, Transport-


Layer Protocols: Introduction, User Datagram Protocol,
Transmission Control Protocol: services, features,
segments, TCP connections, flow control, Error control,
Congestion control.
• Textbook: Ch. 23.1- 23.2, 24.1-24.3.4, 24.3.6-24.3.9
Introduction to Transport Layer
• The transport layer is located between the application
layer and the network layer.
• It provides a process-to-process communication between
two application layers, one at the local host and the other
at the remote host.
• Communication is provided using a logical connection:
• Means that the two application layers, which can be
located in different parts of the globe, assume that there
is an imaginary direct connection through which they can
send and receive messages.
Introduction to Transport Layer
Transport-Layer Services
• Process-to-Process Communication
• The first duty of a transport-layer protocol is to provide
process-to-process communication.
Transport-Layer Services
• Addressing: Port Numbers
• To define the processes, we need second identifiers,
called port numbers.
• In the TCP/IP protocol suite, the port numbers are integers
between 0 and 65,535 (16 bits).
• TCP/IP has decided to use universal port numbers for
servers; these are called well-known port numbers.
• Daytime client process, a well-known client program, can
use a temporary port number, 52,000, to identify itself.
• The daytime server process must use the well-known
(permanent) port number 13.
Transport-Layer Services
• Addressing: Port Numbers
Transport-Layer Services
• Socket Addresses
• The combination of an IP address and a port number is
called a socket address.
Transport-Layer Services
• Encapsulation and DE capsulation
• To send a message from one process to another, the
transport-layer protocol encapsulates and decapsulates
messages.
• Encapsulation happens at the sender site.
• DE capsulation happens at the receiver site.
Transport-Layer Services
• Multiplexing and Demultiplexing
• Whenever an entity accepts items from more than one
source, this is referred to as multiplexing (many to one).
• whenever an entity delivers items to more than one
source, this is referred to as Demultiplexing (one to
many).
Transport-Layer Services
Transport-Layer Services
• Flow Control
• Whenever an entity produces items and another entity
consumes them, there should be a balance between
production and consumption rates.
• Pushing or Pulling
• If the sender delivers items whenever they are produced
without a prior request from the consumer the delivery is
referred to as pushing.
• If the producer delivers the items after the consumer has
requested them, the delivery is referred to as pulling.
Transport-Layer Services
• Flow Control at Transport Layer
• Buffers
• When the buffer of the sending transport layer is full, it
informs the application layer to stop passing chunks of
messages
• When the buffer of the receiving transport layer is full, it
informs the sending transport layer to stop sending
packets.
Transport-Layer Services
• Flow Control at Transport Layer
Transport-Layer Services
• Error Control
• Error control at the transport layer is responsible for
• 1. Detecting and discarding corrupted packets.
• 2. Keeping track of lost and discarded packets and
resending them.
• 3. Recognizing duplicate packets and discarding them.
• 4. Buffering out-of-order packets until the missing packets
arrive
Transport-Layer Services
• Error Control
• Sequence Numbers
• When a packet is corrupted or lost, the receiving
transport layer can somehow inform the sending
transport layer to resend that packet using the sequence
number.
• Packets are numbered sequentially, because we need to
include the sequence number of each packet in the
header.
Sliding Window
Sliding Window
Connectionless and Connection-Oriented Protocols
• Connectionless Service
Connectionless and Connection-Oriented Protocols
• Connection-Oriented Service
Finite State Machine for Connection-Oriented and
connectionless services
TRANSPORT-LAYER PROTOCOLS

• Simple Protocol
• The transport layer at the sender gets a message from its
application layer, makes a packet out of it, and sends the
packet.
• The transport layer at the receiver receives a packet from
its network layer, extracts the message from the packet,
and delivers the message to its application layer.
TRANSPORT-LAYER PROTOCOLS
• FSMs for the simple protocol

• Flow diagram for simple protocol


TRANSPORT-LAYER PROTOCOLS
• Stop-and-Wait Protocol
• Both the sender and the receiver use a sliding window of
size 1.
• The sender sends one packet at a time and waits for an
acknowledgment before sending the next one.
FSMs for the Stop-and-Wait protocol
TRANSPORT-LAYER PROTOCOLS
TRANSPORT-LAYER PROTOCOLS
• Go-Back-N Protocol (GBN)
• In the Go-back-N we can send several packets before
receiving acknowledgments, but the receiver can only
buffer one packet. We keep a copy of the sent packets
until the acknowledgments arrive.
TRANSPORT-LAYER PROTOCOLS
FSMs for the Go-Back-N protocol
FSMs for the Go-Back-N protocol
Flow Diagram for Go-Back-N
Selective-Repeat Protocol
Bidirectional Protocols: Piggybacking
• In real life, data packets are normally flowing in both
directions: from client to server and from server to client.
• This means that acknowledgments also need to flow in
both directions.
• A technique called piggybacking is used to improve the
efficiency of the bidirectional protocols.
INTRODUCTION TO UDP
USER DATAGRAM PROTOCOL
• The User Datagram Protocol (UDP) is a
connectionless, unreliable transport protocol.
USER DATAGRAM PROTOCOL
• UDP Services
• Process-to-Process Communication
• Connectionless Services
• No Flow Control and Error Control
• Checksum
USER DATAGRAM PROTOCOL
TRANSMISSION CONTROL PROTOCOL
• Transmission Control Protocol (TCP) is a
connection-oriented, reliable protocol.
• TCP Services
• Process-to-Process Communication
• Full-Duplex Communication
• Multiplexing and Demultiplexing
• Connection-Oriented Service
• Reliable Service
TCP segment format
TCP segment format
TCP segment format(Checksum)

You might also like