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

Transport layer protacols.pptx

Transport Layer Notes

Uploaded by

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

Transport layer protacols.pptx

Transport Layer Notes

Uploaded by

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

Process-to-Process Delivery:

UDP, TCP, and SCTP

23.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Transport Layer

✔ The transport layer is responsible for


process-to-process delivery of entire message
from one process to another.
✔ Two processes communicate in a client/server
relationship.

22.2
Types of Data Deliveries

23.3
Types of data deliveries

Node-to-Node delivery : Data Link layer > Physical Address


Host-to- Host delivery : Network layer > IP Address
Process –to- Process delivery : Transport layer > Port /Socket Address

23.4
Transport Layer

✔ Node-to-node delivery :The data link layer is responsible


for delivery of frames between two neighboring nodes.
✔ Host-to-host delivery: The network layer is responsible for
delivery of datagram between two hosts of different
networks.
✔ Process-to-process delivery: Communication on the
Internet is not defined as the exchange of data between two
nodes or between two hosts. Real communication takes
place between two processes (application programs).

22.5
Function of Transport Layer

✔ Service-Point Addressing
✔ Segmentation and Reassembly
✔ Connection control
✔ Flow control
✔ Error control

22.6
Process Addressing at Transport Layer

✔ A port number is used to define a process among


multiple processes running on the host.
✔ The destination port number is needed for
delivery; the source port number is needed for the
reply.
✔ The port numbers are 16-bit integers between 0
and 65,535.

22.7
Application Address : Port Numbers

23.8
IP Addresses versus Port Numbers

23.9
Process Addressing (Port Number) at Transport Layer

✔ Ephemeral port number :


✔ The client side port number for a process.
✔ It chosen randomly by the client host.
✔ Well-Known port number :
✔ The server side port number for a process.
✔ It can not chosen randomly by the server host.
✔ At the Internet universal port numbers are used for
servers; these are called well-known port numbers.

22.10
Process Addressing (Port Number) at Transport Layer

The IANA (Internet Assigned Number Authority) has divided


the port numbers into three ranges:
1. Well-known ports ( 0 to 1023) :
✔ assigned and controlled by IANA; used for server process.
2. Registered ports (1024 to 49151 ) :
✔ are not assigned but controlled by IANA.
✔ They can only be registered with IANA to prevent
duplication.

22.11
Process Addressing (Port Number) at Transport Layer

3. Dynamic ports (49152 to 65535) :

✔ neither controlled nor registered.


✔ They can be used by any process. These are the ephemeral
ports.

22.12
Socket Addressing at Transport Layer

✔ The combination of an IP address and a port number is


called a socket address.
✔ Process-to-process delivery needs two identifiers, IP address
and the port number, at each end to make a connection.
✔ The client socket address defines the client process uniquely
just as the server socket address defines the server process
uniquely.

22.13
Socket Address

23.14
Socket Addressing at Transport Layer

✔ A transport layer protocol needs a pair of socket addresses:


the client socket address and
the server socket address.
Generally known as “Connection”.
✔ These information are part of the IP header and the transport
layer protocol header.
✔ The IP header contains the IP addresses; the UDP or TCP
header contains the port numbers.

22.15
IP addresses versus port numbers

23.16
Multiplexing and Demultiplexing at Transport Layer

Multiplexing :
✔ Multiplexing is the process when data of several processes of
the sender are acquired and merged into one packet along
with headers and sent as a single packet.
✔ Multiplexing allows the simultaneous use of different
processes over a network that is running on a host.
✔ The processes are differentiated by their port numbers.

22.17
Multiplexing and Demultiplexing at Transport Layer

✔ At the sender site, multiple processes to send packets.


✔ However, only one transport layer protocol work at any time.
✔ This is a many-to-one relationship and requires multiplexing.
✔ The protocol accepts messages from different processes,
differentiated by their assigned port numbers.
✔ After adding the header, the transport layer passes the packet
to the network layer.

22.18
Multiplexing and Demultiplexing at Transport Layer

Demultiplexing is the reverse of multiplexing; where


the data of a single packets are divided into its process’s
contents identified by their process port number.
✔ Performed at the receiver site.
✔ the relationship is one-to-many.
✔ After error checking and dropping of the header, the
transport layer delivers each message to the
appropriate process based on the port number.

22.19
Multiplexing and Demultiplexing at Transport Layer

23.20
Why Error control is required at Transport Layer?

23.21
Transport layer Protocols : Position of UDP, TCP, and SCTP in TCP/IP suite

23.22
User Datagram Protocol

✔ UDP is a connectionless, unreliable transport protocol.


✔ UDP is a very simple protocol using a minimum of overhead; it
performs very limited error checking.
✔ No error control and flow control.
✔ If a process wants to send a small message and does not care
much about reliability, it can use UDP.
✔ Sending a small message by using UDP takes much less
interaction between the sender and receiver than using TCP/
SCTP.

22.23
User datagram Header format

23.24
User Datagram Protocol header Format

UDP packets, called user datagrams, a fixed-size header of 8 bytes. The


fields are as follows:
✔ Source port number (16 bit long) : used by the source process .
✔ Destination port number (16 bit long) : used by the destination process.
✔ Length (16 bit ) : defines the total length of the user datagram, header
plus data. The 16 bits can define a total length of 0 to 65,535 bytes.
✔ However, the total length needs to be much less because a UDP user
datagram is stored in an IP datagram with a total length of 65,535 bytes.
✔ Checksum (16 bit ): This field is used to detect errors over the entire user
datagram (header plus data). The checksum is discussed next.

22.25
Transmission Control Protocol

✔ TCP is a connection-oriented, stream-of-byte oriented and


reliable 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.

22.26
Transmission Control Protocol (TCP) Services

1. Connection oriented
✔ A Virtual connection is setup between sender and receiver before
data exchange.
2. Stream-of-bytes service
✔ Unlike UDP, Sends and receives a stream of bytes, not messages.
3. Reliable, in-order delivery
✔ Checksums to detect corrupted data.
✔ Acknowledgments & retransmissions for reliable delivery.
✔ Sequence numbers to detect losses and reorder data.

22.27
Stream delivery at Transport Layer

23.28
Transmission Control Protocol

4. Flow control
✔ Prevent overflow of the receiver’s buffer space.
5. Buffer Control
✔ Maintain buffers separately for sender and receiver.
6. Congestion control
✔ Adapt to network congestion for the greater good.
7. Segmentation and reassembly

22.29
Buffer Management at Transport Layer : Sending and Receiving
buffers

23.30
TCP Segments

23.31
Segmentation and reassembly in TCP

✔ The bytes of data being transferred in each connection are


numbered by TCP.
✔ The numbering starts with a randomly generated number
called Initial sequence Number (ISN).
✔ The value in the sequence number field of a segment defines
the number of the first data byte contained in that segment.
✔ The value of the acknowledgment field in a segment defines
the number of the next byte a party expects to receive.
✔ The acknowledgment number is cumulative.

22.32
TCP Segment Header Format

23.33
TCP Segment Header Format

✔ 20 to 60 byte header part ;


✔ 20 byte fixed part ; 40 bytes optional part
✔ Source Port Number ; Destination Port Number (16 bits)
✔ Sequence Number (32 bits)
✔ Acknowledgement Number (32 bits)
✔ HLEN (4 bits)
✔ Reserved : for future use. (6 bits)
✔ Control Flags: (6 bits)

22.34
Control field of TCP Protocol

23.35
TCP Segment Header Format

✔ Window Size : define the size of window to handle flow


control. (16 bits)
✔ Checksum: error control (16 bits)
✔ Urgent pointer : applied when urgent pointer is set and
indicate the segment has urgent data to send. (16 bits)
✔ Options: 40 bytes variable size optional part like as IPv4
options.

22.36
Connection Establishment in TCP

✔ TCP establishes a virtual path between the source


and destination. All the segments belonging to a
message are then sent over this virtual path.
✔ Using a single virtual pathway for the entire
message facilitates the acknowledgment process as
well as retransmission of damaged or lost frames.

22.37
Connection Establishment in TCP

✔ In TCP, connection-oriented transmission requires three


phases:
✔ connection establishment,
✔ data transfer, and
✔ connection termination.
✔ Three way handshaking protocol is used for connection
establishment in transport layer.

22.38
Connection Establishment in TCP

✔ The major problem in connection establishment is


arrival of a duplicate connection establishment
request.
✔ some methods are discussed here to solve this
problem-
✔ Providing a connection identifier for each connection.
✔ Killing off aged packet from subnets.
✔ Three way handshaking protocol is a better method,
used for connection establishment in transport layer.
22.39
Connection Establish: Three-way Handshaking Protocol
✔ 3WH uses a unique identifier by each host in a connection.
✔ It is changed for every transaction.
✔ The steps are :
✔ Sender issues a Connection request with his unique
sequence number.
✔ Receiver respond the CR with his own SeqNo. and Ack of
sender SeqNo.
✔ Now sender established the connection and exchange data
with his CR SeqNo. and receiver CR SeqNo.

22.40
Three-way Handshaking Protocol

✔ In 3WH, Host1 send a CR


with his seq. No. to host2.
✔ Host2 respond for this
connection by sending his
Seq. No. and ack. No.
✔ Host1 establishes the
connection and make data
transfer using Seq. no..

22.41
Three-way Handshaking Protocol: Handling of Flaws

Showing Duplicate connection request

22.42
Three-way Handshaking Protocol

Showing Duplicate connection request

22.43
Connection Release

✔ It seems that the release of connection is easier than


establishment of connection. But it is not true.
✔ There are two type of connection release-
✔ Asymmetric release or Simplex connection release,
✔ Symmetric release or duplex connection release.
✔ In Asymmetric any one host may release the connection
when it wants.
✔ Asymmetric release is abrupt and may result in data loss.
Like as telephone system.
22.44
Connection Release

Abrupt disconnection with loss of data

22.45
Connection Release

✔ Symmetric release treats the connection as two separate


unidirectional connection and required each one to be
release separately. In other words,
✔ Both host must be agree to release the connection.

22.46
Three-way Handshaking Protocol: Connection Release

✔ In three way handshaking connection release, both


satiations may agree to release the connection by sending
DR ( disconnect request) to each other.
✔ Once the DR is acknowledged, both station release the
connection.
✔ If any problem occurs such as ACK/ DR are lost, timer of
both host play their role and after the timer out , they
release their connections.

22.47
Three- way handshaking protocol: Connection Release

Normal case of three-way handshaking protocol

22.48
Connection Release

Handling of ACK lost during connection release in three-way


handshaking protocol

22.49
Connection Release

Handling of Response lost during connection release in three-way


handshaking protocol

22.50
Connection Release

Handling of Response and subsequent DRs lost during connection release in


three-way handshaking protocol

22.51
Stream Control Transmission Protocol

✔ Stream Control Transmission Protocol (SCTP) is a new


reliable, message-oriented transport layer protocol.
✔ SCTP is mostly designed for Internet applications that
have recently been introduced.

22.52
Stream Control Transmission Protocol

✔ SCTP is a message-oriented, reliable protocol that


combines the best features of UDP and TCP.
✔ It preserves the message boundaries and at the same time
detects lost data, duplicate data, and out-of-order data.
✔ It also has congestion control and flow control
mechanisms.

22.53
Stream Control Transmission Protocol (SCTP) : Services
✔ Process-to-Process Communication
✔ Full Duplex Communication
✔ Connection Oriented : in SCTP ( a connection
oriented) , a connection is called an association.
✔ Reliable Services : uses an acknowledgment
mechanism to check the safe and sound arrival of
data.

22.54
Stream Control Transmission Protocol (SCTP) : Services

✔ Multiple Streams
TCP is a stream-oriented protocol; involves only one
single stream between client and server.
A loss in the stream blocks the delivery of remaining data.
Acceptable for text; not for real-time data (audio or video).
SCTP allows multistream service in each connection,
which is called association. If one of the streams is
blocked, the other streams can still deliver their data.

22.55
Multiple-stream concept

23.56
Stream Control Transmission Protocol (SCTP) : Services
Multihoming
✔ A TCP connection does not support multihoming.
✔ An SCTP association supports multihoming service.
✔ The sending and receiving host can define multiple IP addresses in
each end for an association.
✔ In this fault-tolerant approach, when one path fails, another
interface can be used for data delivery without interruption.
✔ Very helpful for real-time communication such as Internet
telephony.

22.57
Multihoming concept

23.58
SCTP : Features

Transmission Sequence Number


✔ The unit of data in TCP is a byte and data transfer is controlled by
numbering bytes by using a sequence number.
✔ On the other hand, the unit of data in SCTP is a DATA chunk.
✔ SCTP uses a transmission sequence number (TSN) to number the
data chunks during data transfer.
✔ Each data chunk must carry the corresponding TSN in its header.

22.59
SCTP : Features

Stream Identifier
✔ In TCP, there is only one stream in each connection.
✔ In SCTP, there may be several streams in each association.
✔ Each stream is identified by a 16- bit number (start from 0) called
Stream identifier (SI).
✔ Each data chunk must carry the SI in its header so that when it
arrives at the destination, it can be properly placed in its stream.

22.60
SCTP : Features

Stream Sequence Number


✔ SCTP defines each data chunk in
each stream with a stream
sequence number (SSN).
✔ SSN is used to arrange the
received data chunks in proper
order.

22.61
SCTP : Features
Packets
✔ In TCP, a segment carries data and control information ( six
control flags in the header ).
✔ In SCTP, control information and data information are carried
in separate chunks.
✔ The design of SCTP is totally different:
✔ data (data chunks), control information (control chunks).
✔ Several control chunks and data chunks can be packed
together in a packet.
✔ A packet in SCTP plays the same role as a segment in TCP.

22.62
Packet, data chunks, and streams in SCTP

✔ In SCTP, we have data chunks, streams, and packets.


✔ An association may send many packets, a packet may contain
several chunks, and chunks may belong to different streams.
✔ 11 data chunks are send; numbered by TSN.
✔ Each data chunks send in a specific stream is numbered by SSN.

23.63
Packet, data chunks, and streams in SCTP

Each data chunk needs three identifiers: TSN, SI, and SSN.
TSN is a cumulative number and is used for flow and error control.
SI defines the stream to which the chunk belongs.

23.64
An SCTP packet

23.65
SCTP : Packets
Packets
✔ An SCTP packet has a mandatory 12-bytes long general
header and a set of variable size blocks called chunks.
✔ There are two types of chunks: control chunks and data
chunks.
✔ A control chunk controls and maintains the association;
✔ A data chunk carries user data.
✔ In a packet, the control chunks come before the data chunks.

22.66
SCTP packet format

23.67
SCTP General header

12- Bytes mandatory part, contains four fields-


Source and Destination Port number,
Verification tag
Checksum

23.68
SCTP : Packets
Verification tag:
✔ This is a number that matches a packet to an association.
✔ It serves as an identifier for the association; it is repeated in
every packet during the association.
✔ There is a separate verification used for each direction in the
association.
✔ This prevents a packet from a previous association from being
mistaken as a packet in this association.
Checksum:
✔ This 32-bit field contains a CRC-32 checksum
22.69
SCTP : Acknowledgement

✔ SCTP acknowledgment numbers are chunk-oriented.


✔ In SCTP, acknowledgment numbers are used to acknowledge
only data chunks;
✔ control chunks are acknowledged by other control chunks if
necessary.
✔ In SCTP, only DATA chunks consume TSNs;
✔ DATA chunks are the only chunks that are acknowledged.
✔ The acknowledgment in SCTP defines the cumulative TSN,
the TSN of the last data chunk received in order.

22.70
Comparison between a TCP segment and an SCTP packet

23.71
Congestion Control

✔ When too many packets are present in the subnet and network
is unable to deliver all of them successfully. This situation is
called congestion .
✔ A situation in a part of network when traffic is so heavy that it
slows down network and delivery of packets are badly
affected.
✔ The network and transport layers share the responsibility for
handling congestion.

22.72
Congestion Control

✔ If suddenly, streams of packets begin arriving on three or more input


lines and all need the same output line, a queue will build up.
✔ If there is insufficient memory to hold all of them, packets will be lost.
✔ Additional memory unable to handle the situation after a limit. (Nagle
(1987)).
✔ providing an infinite amount of memory, congestion gets worse, not
better.
✔ Why? Time-out and retransmission of (Duplicate) packets.
✔ This makes matters worse, not better—it leads to congestion collapse.

22.73
Difference between Congestion Control & Flow Control

✔ Congestion control has to do with making sure the network is


able to carry the offered traffic.
✔ It is a global issue, involving the behavior of all the hosts and
routers.
✔ Flow control, in contrast, relates to the traffic between a
particular sender and a particular receiver.
✔ Its job is to make sure that a fast sender cannot continually
transmit data faster than the receiver is able to absorb it.

22.74
Factors of Congestion Control

The following policy of Data link layer, network layer and


transport layer affects congestion problem in network:
✔ Retransmission Policy
✔ Out-of-order caching Policy
✔ Acknowledgement Policy
✔ Flow control policy
✔ Routing algorithm
✔ Packet discard policy
✔ Packet lifetime management
✔ Effects of Congestion

22.75
Effects of Congestion Control

✔ Effects of Congestion
✔ As delay increases, performance decreases.
✔ If delay increases, retransmission occurs, making
situation worse.

22.76
Approaches of Congestion Control

✔ The presence of congestion means that the load is (temporarily)


greater than the resources (in a part of the network) can handle.
✔ Two solutions come to mind:
✔ increase the resources or decrease the load.

22.77
Congestion Control Algorithms

✔ Admission Control in Virtual Circuit Subnets


✔ Chock packets
✔ Load shedding
✔ Hop by hop packets
✔ Jitter Control
✔ Traffic Shaping
✔ Leaky Bucket Algorithm
✔ Token Bucket Algorithm

22.78
Choke Packets : Traffic Throttling

22.79
Hop-by-hop Choke Packets : Traffic Throttling

22.80
Jitter Control :

✔ The variation in the packet arrival time is called jitter.


✔ When a packet arrives at a router, the router checks to see
how much the packet is behind or ahead of its schedule.
✔ This information is stored in the packet and updated on each
hop.
✔ If the packet is ahead of its schedule, it is held at the router.
✔ And if it is behind the schedule, the router tries to get it out
from there.

22.81
Traffic Shaping
✔ The way to limit the amount of data an application sends.
✔ Traffic shaping is a technique for regulating the average rate
and burstiness of a flow of data that enters the network.
✔ Traffic shaping reduces congestion .
✔ Packets in excess of the agreed pattern might be dropped by the
network, or they might be marked as having lower priority.
✔ Monitoring a traffic flow is called traffic policing.
✔ Two methods come under this approach:
✔ Leaky Bucket Algorithm
✔ Token Bucket Algorithm
22.82
Traffic Shaping: Leaky Bucket Algorithm
✔ Abnormal flow of packets in network is one the main reason of
Congestion.
✔ Abnormal Flow - means some time very less number of packets
to deliver while some other times a huge amount of packets
appears abruptly to deliver.
✔ If this abnormal flow may be regulated, it reduces the chance of
congestion to arise.
✔ Leaky Bucket Algorithm is the method to convert the abnormal
flow of packets into a fixed and regulated flow.

22.83
Traffic Shaping: Leaky Bucket Algorithm

22.84
Traffic Shaping: Leaky Bucket Algorithm
The Concept of Leaky Bucket is As:
✔ Imagine a bucket with a small hole in the bottom, as illustrated
in Figure of previous slide.
✔ No matter the rate at which water enters the bucket, the outflow
is at a constant rate, R, when there is any water in the bucket
and zero when the bucket is empty.
✔ Also, once the bucket is full to capacity B, any additional water
entering it spills over the sides and is lost.
✔ This bucket can be used to shape or police packets entering the
network.
22.85
Traffic Shaping: Leaky Bucket Algorithm

✔ Conceptually, each host is connected to the network by an


interface Which work as leaky bucket.
✔ If a packet arrives when the bucket is empty , it has been passed
by the bucket to the network.
✔ If a packet arrives when the bucket is full, the packet must either
be queued until enough water leaks out to hold it or be
discarded.
✔ This technique was proposed by Turner (1986) and is called the
leaky bucket algorithm.

22.86
Traffic Shaping: Leaky Bucket Algorithm

✔ A leaky bucket algorithm shapes bursty traffic into fixed-rate


traffic by averaging the data rate.
✔ It may drop the packets if the bucket is full.
✔ The leaky bucket is very restrictive.
✔ It does not consider the time of an idle host.
✔ The time when the host was idle is not taken into account.
✔ For example, if a host is not sending for a while, its bucket
becomes empty.

22.87
Traffic Shaping: Token Bucket Algorithm

✔ The time when the host was idle is not taken into account.
✔ Leaky Bucket does neither consider the idle time of a host, nor
compensate the sender host for it.
✔ It always maintains a fixed rate flow in the network.

22.88
Traffic Shaping: Token Bucket Algorithm

✔ On the other hand, the token bucket algorithm allows idle hosts
to accumulate credit for the future in the form of tokens.
✔ For each tick of the clock, the system sends n tokens to the
bucket either it is empty or not.
✔ The system removes one token for every cell (or byte) of data
sent.
✔ The token bucket allows bursty traffic at a regulated maximum
rate.

22.89
Traffic Shaping: Token Bucket Algorithm

23.90
Quality of Service

✔ One way to limit the amount of data an application sends.


✔ A stream of packets from a source to a destination is called a
flow.
✔ A flow might be all the packets of a connection in a
connection-oriented network, or all the packets sent from one
process to another process in a connectionless network.
✔ The needs of each flow can be characterized by four primary
✔ parameters: bandwidth, delay, jitter, and loss.

22.91
Quality of Service

✔ bandwidth,
✔ delay,
✔ Jitter : The variation in the delay or packet arrival times is
called jitter.
✔ Reliability / Loss.

22.92
Quality of Service

To accommodate a variety of applications, networks may support


different categories of QoS.
✔ Real-time variable bit rate (ex. compressed video
conferencing).
✔ Constant bit rate (e.g., telephony).
✔ Non-real-time variable bit rate (e.g., watching a movie on
demand).
✔ Available bit rate (e.g., file transfer).

22.93
Quality of Service

✔ Constant bit rate (e.g., telephony): Constant bit rate is an


attempt to simulate a wire by providing a uniform bandwidth
and a uniform delay.
✔ Real-time variable bit rate (ex. compressed videoconferencing)
: Variable bit rate occurs when video is compressed, with some
frames compressing more than others. Sending a frame with a
lot of detail in it may require sending many bits, whereas a shot
of a white wall may compress extremely well.

22.94
Quality of Service

✔ Non-real-time variable bit rate (e.g., watching a movie on


demand): Movies on demand are not actually real time
because a few seconds of video can easily be buffered at the
receiver before playback starts, so jitter on the network merely
causes the amount of stored-but-not-played video to vary.
✔ Available bit rate (e.g., file transfer) : Available bit rate is for
applications such as email that are not sensitive to delay or
jitter and will take what bandwidth they can get.

22.95

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy