Overview of UDP protocol.
UDP (User Datagram Protocol) is a simple extension of the Internet Protocol services. It basically provides simple packet transport service without any quality of service functions.
Unlike TCP, UDP is connection-less and packet-based. Application PDUs (application packets) sent over a UDP socket are delivered to the receiving host application as is without fragmentation.
UDP is mostly used by applications with simple request-response communication patterns like DNS, DHCP, RADIUS, RIP or RPC.
Since UDP does provide any error recovery such as retransmission of lost packets, the application protocols have to take care of these situations.
Overview of UDP protocol.
UDP (User Datagram Protocol) is a simple extension of the Internet Protocol services. It basically provides simple packet transport service without any quality of service functions.
Unlike TCP, UDP is connection-less and packet-based. Application PDUs (application packets) sent over a UDP socket are delivered to the receiving host application as is without fragmentation.
UDP is mostly used by applications with simple request-response communication patterns like DNS, DHCP, RADIUS, RIP or RPC.
Since UDP does provide any error recovery such as retransmission of lost packets, the application protocols have to take care of these situations.
description of the services to the networks .
how to apply quality of service
how to improve the networks
summary in personal point of view
please don't hesitate if you have further question
IT2255 Web Essentials - Unit II Web Designingpkaviya
HTML - Form Elements - Input types and Media elements - HTML 5 - CSS3 - Selectors, Box Model, Backgrounds and Borders, Text Effects, Animations, Multiple Column Layout, User Interface.
IT2255 Web Essentials - Unit I Website Basicspkaviya
Internet Overview – Fundamental computer network concepts – Web Protocols – URL – Domain Name – Web Browsers and Web Servers – Working principle of a Website – Creating a Website – Client-side and server-side scripting.
BT2252 - ETBT - UNIT 3 - Enzyme Immobilization.pdfpkaviya
Enzymes are catalysts that perform all vital biological reactions within an organism’s body. Their distinguishing characteristic is that they endure the reaction unchanged.
Therefore, they can be utilised repeatedly. However, soluble enzymes are limited by their separation from the product and substrate.
The majority of Enzymes in a living organism are either connected to the cell membrane or encapsulated within the cells.
This result led to the hypothesis that pure separated enzymes may work better when immobilised on a solid substrate.
The phrase immobilised enzyme refers to “catalytically active enzymes that are physically limited or localised in a specific region of space and can be used again and continuously.”
The benefit of immobilisation is that it promotes work-up product isolation. Listed below are some potential advantages and disadvantages of immobility.
Soluble Enzyme + Substrate———– Product (single time usage of enzyme)
Immobilized Enzyme + Substrate———Product (Repeated usage of enzyme)
A number of essential considerations must be made when immobilising an enzyme.
The enzyme’s biological activity should be maintained.
The enzyme ought to be more stable than its soluble equivalent.
The price of immobilisation shouldn’t be excessively high.
The relationship between humans and enzymes has evolved over time. Even during historical times, where there was no concept of enzymes, ancient Egypt people produced beer and wine by enzymatic fermentation. After several thousand years, enzymatic studies have significantly progressed. Enzymes are proteins that accelerate many biochemical and chemical reactions. They are natural catalysts and are ubiquitous, in plants, animals, and microorganisms, where they catalyze processes that are vital to living organisms. The growing knowledge and technique improvement about protein extraction and purification lead to the production of many enzymes at an analytical grade purity for research and biotechnological applications. Enzymes are intimately involved in a wide variety of traditional food processes, such as cheese making, beer brewing, and wine industry. Recent advances in biotechnology, particularly in protein engineering, have provided the basis for the efficient development of enzymes with improved properties. This has led to establishment of novel, tailor-made enzymes for completely new applications, where enzymes were not previously used. The technology of immobilized enzymes is still going through a phase of evolution and maturation. Evolution is reflected in the ever-broadening range of applications of immobilized enzymes. Maturation is mirrored in the development of the theory of how immobilized enzymes function and how the technique of immobilization is related to their primary structure through the formation and configuration of their three dimensional structure. There still remains much room for the development of useful processes and materials based on this hard-won understanding.
Instructions for Submissions thorugh G- Classroom.pptxJheel Barad
This presentation provides a briefing on how to upload submissions and documents in Google Classroom. It was prepared as part of an orientation for new Sainik School in-service teacher trainees. As a training officer, my goal is to ensure that you are comfortable and proficient with this essential tool for managing assignments and fostering student engagement.
How to Make a Field invisible in Odoo 17Celine George
It is possible to hide or invisible some fields in odoo. Commonly using “invisible” attribute in the field definition to invisible the fields. This slide will show how to make a field invisible in odoo 17.
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxEduSkills OECD
Andreas Schleicher presents at the OECD webinar ‘Digital devices in schools: detrimental distraction or secret to success?’ on 27 May 2024. The presentation was based on findings from PISA 2022 results and the webinar helped launch the PISA in Focus ‘Managing screen time: How to protect and equip students against distraction’ https://www.oecd-ilibrary.org/education/managing-screen-time_7c225af4-en and the OECD Education Policy Perspective ‘Students, digital devices and success’ can be found here - https://oe.cd/il/5yV
Ethnobotany and Ethnopharmacology:
Ethnobotany in herbal drug evaluation,
Impact of Ethnobotany in traditional medicine,
New development in herbals,
Bio-prospecting tools for drug discovery,
Role of Ethnopharmacology in drug evaluation,
Reverse Pharmacology.
Synthetic Fiber Construction in lab .pptxPavel ( NSTU)
Synthetic fiber production is a fascinating and complex field that blends chemistry, engineering, and environmental science. By understanding these aspects, students can gain a comprehensive view of synthetic fiber production, its impact on society and the environment, and the potential for future innovations. Synthetic fibers play a crucial role in modern society, impacting various aspects of daily life, industry, and the environment. ynthetic fibers are integral to modern life, offering a range of benefits from cost-effectiveness and versatility to innovative applications and performance characteristics. While they pose environmental challenges, ongoing research and development aim to create more sustainable and eco-friendly alternatives. Understanding the importance of synthetic fibers helps in appreciating their role in the economy, industry, and daily life, while also emphasizing the need for sustainable practices and innovation.
The French Revolution, which began in 1789, was a period of radical social and political upheaval in France. It marked the decline of absolute monarchies, the rise of secular and democratic republics, and the eventual rise of Napoleon Bonaparte. This revolutionary period is crucial in understanding the transition from feudalism to modernity in Europe.
For more information, visit-www.vavaclasses.com
This is a presentation by Dada Robert in a Your Skill Boost masterclass organised by the Excellence Foundation for South Sudan (EFSS) on Saturday, the 25th and Sunday, the 26th of May 2024.
He discussed the concept of quality improvement, emphasizing its applicability to various aspects of life, including personal, project, and program improvements. He defined quality as doing the right thing at the right time in the right way to achieve the best possible results and discussed the concept of the "gap" between what we know and what we do, and how this gap represents the areas we need to improve. He explained the scientific approach to quality improvement, which involves systematic performance analysis, testing and learning, and implementing change ideas. He also highlighted the importance of client focus and a team approach to quality improvement.
1. CS8591 – Computer Networks
Unit IV – Transport Layer
KAVIYA P, AP/IT
KAMARAJ COLLEGE OF ENGINEERING & TECHNOLOGY
2. UNIT IV – Transport Layer
Introduction – Transport Layer Protocols – Services – Port
Numbers – User Datagram Protocol – Transmission Control
Protocol – SCTP.
11/2/2020 KAVIYA P, AP/IT, KCET 2
3. Introduction
• 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, which means that the two
application layers, which can be located in different parts of the globe.
• Alice’s host in the Sky Research company creates a logical connection with Bob’s host
in the Scientific Books company at the transport layer.
• The two companies communicate at the transport layer as though there is a real
connection between them.
11/2/2020 KAVIYA P, AP/IT, KCET 3
5. Introduction: Transport Layer Services
1. Process-to-process Communication
• The first duty of a transport-layer protocol is to provide process-to-process
communication.
• A process is an application-layer entity (running program) that uses the services of the
transport layer.
• A transport-layer protocol is responsible for delivery of the message to the appropriate
process.
11/2/2020 KAVIYA P, AP/IT, KCET 5
6. Introduction: Transport Layer Services
2. Addressing: Port Numbers
• To define the processes, identifiers are needed, called port numbers.
• In the TCP/IP protocol suite, the port numbers are integers between 0 and 65,535 (16
bits).
ICANN Ranges
• Well-known Ports: The ports ranging from 0 to 1023 are assigned and controlled by
ICANN.
• Registered Ports: The ports ranging from 1024 to 49,151 are not assigned or controlled
by ICANN. They can only be registered with ICANN to prevent duplication.
• Dynamic ports: The ports ranging from 49,152 to 65,535 are neither controlled nor
registered. They can be used as temporary or private port numbers.
11/2/2020 KAVIYA P, AP/IT, KCET 6
7. Introduction: Transport Layer Services
2. Addressing: Port Numbers
Socket Address
• The combination of an IP address and a port number is called a socket address.
• The client socket address defines the client process uniquely.
• The server socket address defines the server process uniquely.
11/2/2020 KAVIYA P, AP/IT, KCET 7
IP addresses versus port numbers
Port numbers
8. Introduction: Transport Layer Services
3. Encapsulation and Decapsulation
• To send a message from one process to another, the transport-layer protocol encapsulates
and decapsulates messages.
• When a process has a message to send, it passes the message to the transport layer along
with a pair of socket addresses and some other pieces of information.
• The transport layer receives the data and adds the transport-layer header.
• When the message arrives at the destination transport layer, the header is dropped and
the transport layer delivers the message to the process running at the application layer.
• The sender socket address is passed to the process in case it needs to respond to the
message received.
11/2/2020 KAVIYA P, AP/IT, KCET 8
9. Introduction: Transport Layer Services
4. 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).
• The transport layer at the source
performs multiplexing; the transport
layer at the destination performs
demultiplexing
11/2/2020 KAVIYA P, AP/IT, KCET 9
10. Introduction: Transport Layer Services
5. Flow Control
• Delivery of items from a producer to a consumer can occur in one of two ways: pushing
or pulling.
• Pushing: If the sender delivers items whenever they are produced without a prior
request from the consumer.
• Pulling: If the producer delivers the items after the consumer has requested them.
• When the producer pushes the items, the consumer may be overwhelmed and there is a
need for flow control, in the opposite direction, to prevent discarding of the items.
• When the consumer pulls the items, it requests them when it is ready. In this case, there
is no need for flow control.
11/2/2020 KAVIYA P, AP/IT, KCET 10
11. Introduction: Transport Layer Services
5. Flow Control
• Communication at the transport layer deals with four entities: sender process, sender
transport layer, receiver transport layer, and receiver process.
Buffers
• One of the solutions for flow control is normally to use two buffers.
• One at the sending transport layer and the other at the receiving transport layer.
• A buffer is a set of memory locations that can hold packets at the sender and receiver.
11/2/2020 KAVIYA P, AP/IT, KCET 11
12. Introduction: Transport Layer Services
5. Error Control
• Reliability can be achieved to add error control services to the transport layer.
• 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.
• Sequence Number: 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.
• Acknowledgement: Use both positive and negative signals as error control.
11/2/2020 KAVIYA P, AP/IT, KCET 12
13. Introduction: Transport Layer Services
6. Congestion Control
• Congestion in a network may occur if the load on the network (the number of packets
sent to the network) is greater than the capacity of the network (the number of packets a
network can handle).
• Congestion control refers to the mechanisms and techniques that control the congestion
and keep the load below the capacity.
7. Connectionless and Connection Oriented Protocols
• In a connectionless service, the source process needs to divide its message into chunks
and deliver them to the transport layer one by one.
• The transport layer treats each chunk as a single unit without any relation between the
chunks.
• When a chunk arrives from the application layer, the transport layer encapsulates it in a
packet and sends it.
11/2/2020 KAVIYA P, AP/IT, KCET 13
14. Introduction: Transport Layer Services
7. Connectionless and Connection Oriented Protocols
• Since there is no dependency between the packets at the transport layer, the packets
may arrive out of order at the destination and will be delivered out of order to the
server process
• No flow control, error control, or congestion control can be effectively implemented in a
connectionless service.
11/2/2020 KAVIYA P, AP/IT, KCET 14
15. Introduction: Transport Layer Services
7. Connectionless and Connection Oriented Protocols
• In a connection-oriented service, the client and the server first need to establish a
logical connection between themselves.
• The data exchange can only happen after the connection establishment. After data
exchange, the connection needs to be torn down.
• Flow control, error control, and congestion control are implemented in a connection
oriented protocol.
11/2/2020 KAVIYA P, AP/IT, KCET 15
16. Transport Layer Protocols
1. Simple Protocol
• A simple connectionless protocol with neither flow nor error control.
• The receiver can never be overwhelmed with incoming packets.
• 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.
• The transport layers of the sender and receiver provide transmission services for their
application layers.
11/2/2020 KAVIYA P, AP/IT, KCET 16
17. Transport Layer Protocols
2. Stop-and-Wait Protocol
• A connection-oriented protocol, which uses both flow and error control.
• 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.
• To detect corrupted packets, we need to add a checksum to each data packet.
• Every time the sender sends a packet, it starts a timer.
• If an acknowledgment arrives before the timer expires, the timer is stopped and the
sender sends the next packet.
• If the timer expires, the sender resends the previous packet, assuming that the packet was
either lost or corrupted.
11/2/2020 KAVIYA P, AP/IT, KCET 17
18. Transport Layer Protocols
3. Go-Back-N Protocol (GBN)
• To improve the efficiency of transmission, multiple packets must be in transition while
the sender is waiting for acknowledgment.
• The key to Go-back-N is that the sender can send several packets before receiving
acknowledgments, but the receiver can only buffer one packet.
• Sender must keep a copy of the sent packets until the acknowledgments arrive.
• The acknowledgment number is cumulative and defines the sequence number of the next
packet expected to arrive.
11/2/2020 KAVIYA P, AP/IT, KCET 18
Design of piggybacking in Go-Back-N
19. Transport Layer Protocols
4. Selective-Repeat Protocol
• The Go-Back-N protocol simplifies the process at the receiver.
• The receiver keeps track of only one variable, and there is no need to buffer out-of-
order packets; they are simply discarded.
• Each time a single packet is lost or corrupted, the sender resends all outstanding packets,
even though some of these packets may have been received safe and sound but out of
order.
• If the network layer is losing many packets because of congestion in the network, the
resending of all of these outstanding packets makes the congestion worse.
• Selective-Repeat (SR) protocol resends only selective packets, those that are actually
lost.
• An acknowledgment number defines the sequence
number of the error-free packet received.
11/2/2020 KAVIYA P, AP/IT, KCET 19
20. Transport Layer Protocols
5. Bidirectional Protocols: Piggybacking
• Unidirectional Protocols: data packets flow in only one direction and acknowledgments
travel in the other direction.
• In real life, data packets are normally flowing in both directions: from client to server
and from server to client.
• A technique called piggybacking is used to improve the efficiency of the bidirectional
protocols.
• When a packet is carrying data from A to B, it can also carry acknowledgment feedback
about arrived packets from B; when a packet is carrying data from B to A, it can also
carry acknowledgment feedback about the arrived packets from A.
11/2/2020 KAVIYA P, AP/IT, KCET 20
21. Transport Layer Protocols
• Responsible for process-to-process delivery of the entire message.
11/2/2020 KAVIYA P, AP/IT, KCET 21
Position of transport-layer protocols in the TCP/IP protocol suite
22. Services
• UDP: Unreliable connectionless transport-layer protocol used for its simplicity and
efficiency in applications where error control can be provided by the application-layer
process.
• TCP: Reliable connection-oriented protocol that can be used in any application where
reliability is important.
• SCTP: A new transport-layer protocol that combines the features of UDP and TCP.
11/2/2020 KAVIYA P, AP/IT, KCET 22
23. Port Numbers
• To create a process-to-process communication, these protocols use port numbers to
accomplish.
• Port numbers provide end-to-end addresses at the transport layer and allow multiplexing
and demultiplexing.
11/2/2020 KAVIYA P, AP/IT, KCET 23
24. User Datagram Protocol
• A connectionless, unreliable transport protocol.
• It does not add anything to the services of IP except for providing process-to-process
communication.
• UDP is a very simple protocol using a minimum of overhead.
• If a process wants to send a small message and does not care much about reliability, it
can use UDP.
User Datagram
11/2/2020 KAVIYA P, AP/IT, KCET 24
25. User Datagram Protocol
User Datagram
• UDP packets, called user datagrams, have a fixed-size header of 8 bytes made of four
fields, each of 2 bytes (16 bits).
• Source Port Number: Port number of the source process.
• Destination Port Number: Port number of the destination process.
• Header: Total length of the UDP datagram
• Checksum: For error correction
• The total length of a UDP user datagram is stored in an IP datagram: 65,535 bytes.
11/2/2020 KAVIYA P, AP/IT, KCET 25
26. User Datagram Protocol
UDP Services
• Process-to-Process Communication: UDP provides process-to-process communication
using socket addresses, a combination of IP addresses and port numbers.
• Connectionless Services: User datagram sent by UDP is an independent datagram.
There is no connection establishment and no connection termination. Each user
datagram can travel on a different path.
• Flow Control: There is no flow control, and hence no window mechanism. The
receiver may overflow with incoming messages.
• Error Control: There is no error control mechanism in UDP except for the
checksum. The sender does not know if a message has been lost or duplicated. When the
receiver detects an error through the checksum, the user datagram is silently discarded.
• Congestion Control: It does not provide congestion control. UDP assumes that the
packets sent are small and sporadic and cannot create congestion in the network.
11/2/2020 KAVIYA P, AP/IT, KCET 26
27. User Datagram Protocol
UDP Services
• Encapsulation and Decapsulation: To send a message from one process to another, the
UDP protocol encapsulates and decapsulates messages.
• Queuing: In UDP, queues are associated with ports.
• Multiplexing and Demultiplexing: Several processes that may want to use the services
of UDP. To handle this situation, UDP multiplexes and demultiplexes.
• Checksum: UDP checksum calculation includes three sections: a pseudoheader, the
UDP header, and the data coming from the application layer.
11/2/2020 KAVIYA P, AP/IT, KCET 27
28. User Datagram Protocol
UDP Applications
• UDP Features:
– Connectionless Service
– Lack of Error Control.
• Typical Applications:
– Suitable for a process that requires simple request-response communication with
little concern for flow and error control.
– Suitable for a process with internal flow- and error-control mechanisms.
– Suitable transport protocol for multicasting.
– Used for management processes such as SNMP.
– Used for some route updating protocols such as Routing Information Protocol (RIP).
– Used for interactive real-time applications that cannot tolerate uneven delay between
sections of a received message
11/2/2020 KAVIYA P, AP/IT, KCET 28
29. Transmission Control Protocol
• Connection-oriented, reliable protocol.
• TCP explicitly defines connection establishment, data transfer, and connection
teardown phases to provide a connection-oriented service.
• To ensure reliability, TCP uses checksum (for error detection), retransmission of lost
or corrupted packets, cumulative and selective acknowledgments, and timers.
11/2/2020 KAVIYA P, AP/IT, KCET 29
30. Transmission Control Protocol
TCP Services
• Process-to-Process Communication: TCP provides process-to-process communication using port
numbers.
• Stream Delivery Service: Allows the sending process to deliver data as a stream of bytes and allows
the receiving process to obtain data as a stream of bytes.
– Sending and Receiving Buffers: TCP needs buffers for storage. The sending buffer and the
receiving buffer, one for each direction.
– Segments: TCP groups a number of bytes together into a packet called a segment.
• Full-Duplex Communication: Data can flow in both directions at the same time.
• Multiplexing and Demultiplexing: TCP performs multiplexing at the sender and demultiplexing at
the receiver.
• Connection-Oriented Service: The two TCP’s establish a logical connection between them. Data are
exchanged in both directions. The connection is terminated.
• Reliable Service: TCP uses an acknowledgment mechanism to check the safe and sound arrival of
data.
11/2/2020 KAVIYA P, AP/IT, KCET 30
31. Transmission Control Protocol
TCP Features
• Numbering System: TCP software keeps track of the segments being transmitted or
received.
• Byte Number: The bytes of data being transferred in each connection are numbered by
TCP. The numbering starts with an arbitrarily generated number.
• Sequence Number: Defines the number assigned to the first data byte contained in
that segment.
• Acknowledgment Number: Defines the number of the next byte a party expects to
receive. The acknowledgment number is cumulative.
11/2/2020 KAVIYA P, AP/IT, KCET 31
32. Transmission Control Protocol
Segment
• A packet in TCP is called a segment.
• The segment consists of a header of 20 to 60 bytes, followed by data from the application
program.
11/2/2020 KAVIYA P, AP/IT, KCET 32
33. Transmission Control Protocol
Segment
• Source port address: A 16-bit field that defines the port number of the application
program in the host that is sending the segment.
• Destination port address: A 16-bit field that defines the port number of the application
program in the host that is receiving the segment.
• Sequence number: A 32-bit field defines the number assigned to the first byte of data
contained in this segment.
• Acknowledgment number: A 32-bit field defines the byte number that the receiver of the
segment is expecting to receive from the other party.
• Header length: A 4-bit field indicates the number of 4-byte words in the TCP header.
• Control: This field defines 6 different control bits or flags.
11/2/2020 KAVIYA P, AP/IT, KCET 33
34. Transmission Control Protocol
Segment
• Window size: This field defines the window size of the sending TCP in bytes. The
maximum size of the window is 65,535 bytes.
• Checksum: A 16-bit field for error detection and correction.
• Urgent pointer: A 16-bit field, which is valid only if the urgent flag is set, is used when
the segment contains urgent data.
• Options: Can be up to 40 bytes of optional information in the TCP header.
Encapsulation
• A TCP segment encapsulates the data received from the application layer.
• The TCP segment is encapsulated in an IP datagram, which in turn is encapsulated in a
frame at the data-link layer.
11/2/2020 KAVIYA P, AP/IT, KCET 34
35. Transmission Control Protocol
TCP Connection – Connection Establishment
• TCP transmits data in full-duplex mode.
• The connection establishment in TCP is called three-way handshaking.
• The process starts with the server. The server program tells its TCP that it is ready to accept a
connection. This request is called a passive open.
• The client program issues a request for an active open.
• A SYN segment cannot carry data, but it consumes one sequence number.
• A SYN + ACK segment cannot carry data, but it does consume one sequence number.
• An ACK segment, if carrying no data, consumes no sequence number.
11/2/2020 KAVIYA P, AP/IT, KCET 35
• SYN Flooding Attack: Happens when one
or more malicious attackers send a large
number of SYN segments. It belongs to a
group of security attacks known as a denial
of service attack
36. Transmission Control Protocol
TCP Connection – Data Transfer
• After connection is established, bidirectional data transfer can take place.
• The client and server can send data and acknowledgments in both directions.
11/2/2020 KAVIYA P, AP/IT, KCET 36
• Pushing Data: The sending TCP must not
wait for the window to be filled. It must
create a segment and send it immediately.
The sending TCP must also set the push bit
(PSH) to let the receiving TCP know that
not to wait for more data to come.
• Urgent Data: The sending TCP creates a
segment and inserts the urgent data at the
beginning of the segment. The rest of the
segment can contain normal data from the
buffer. The urgent pointer field in the
header defines the end of the urgent data.
37. Transmission Control Protocol
TCP Connection – Connection Termination
• The two parties involved in exchanging data (client or server) can close the connection, although it is
usually initiated by the client.
• Two options for connection termination: Three-way handshaking and Four-way handshaking with
a half-close option.
Three-Way Handshaking
• The FIN segment consumes one sequence number if it does not carry data.
• The FIN + ACK segment consumes only one sequence number if it does not carry data.
• An ACK segment, to confirm the receipt of the FIN segment from the TCP server.
11/2/2020 KAVIYA P, AP/IT, KCET 37
38. Transmission Control Protocol
TCP Connection – Connection Termination
Half-Close
• In TCP, one end can stop sending data while still receiving data.
• After half-closing the connection, data can travel from the server to the client and acknowledgments
can travel from the client to the server. The client cannot send any more data to the server.
11/2/2020 KAVIYA P, AP/IT, KCET 38
40. Transmission Control Protocol
Windows in TCP
• TCP Sliding Window provides,
– Reliable delivery of data,
– Data is delivered in order, and
– Flow control between the sender and the receiver.
Reliable delivery and Ordered Delivery
11/2/2020 KAVIYA P, AP/IT, KCET 40
41. Transmission Control Protocol
Windows in TCP
Sending Side
• LastByteAcked ≤ LastByteSent
– Receiver cannot acknowledge a byte that has not been sent.
• LastByteSent ≤ LastByteWritten
– TCP cannot send a byte that the application process has not yet written.
– Left side of the LastByteAcked need not to be saved in the buffer.
Receiving Side
• LastByteRead<NextByteExpected
– All preceding bytes are already received.
– Byte cannot be read by application until it is received.
• NextByteExpected ≤ LastByteRcvd + 1
– If data has arrived in order, NextByteExpected points to the byte after
LastByteRcvd
– If data has arrives out of order, NextByteExpected points to the start of the first
gap in the data.
• Bytes to the left of LastByteRead need not be buffered.
11/2/2020 KAVIYA P, AP/IT, KCET 41
42. Transmission Control Protocol
TCP Flow Control
• Both sender and receiver buffer size is finite size, denoted by MaxSendBuffer,
MaxRcvBuffer.
• In sliding window, window size sets the amount of data that can be sent without waiting
for acknowledgement.
• Here receiver gives the maximum window size for the sender by advertising a window
that is no larger than the data that it can buffer.
• Receiver side must keep,
– LastByteRcvd – LastByteRead ≤ MaxRcvBuffer
• To avoid overflowing its buffer (Receive Buffer).
– AdvertisedWindow = MaxRcvBuffer – ((NextByteExpected -1) – LastByteRead)
• Represents the amount of free space remaining in the buffer
11/2/2020 KAVIYA P, AP/IT, KCET 42
43. Transmission Control Protocol
TCP Flow Control
• Sender side must keep,
– LastByteSent – LastByteAcked ≤ AdvertisedWindow
– EffectiveWindow = AdvertisedWindow – (LastByteSent – LastByteAcked)
– To avoid the overflow of the send buffer by local application process, sender must
make sure,
• LastByteWritten – LastByteAcked ≤ MaxSendBuffer
11/2/2020 KAVIYA P, AP/IT, KCET 43
44. Transmission Control Protocol
TCP Flow Control – Triggering Transmission
How does TCP decide to transmit a segment?
– TCP supports a byte stream abstraction.
– Application programs write bytes into streams.
– It is up to TCP to decide that it has enough bytes to send a segment.
TCP has three mechanisms to trigger the transmission of a segment
• TCP maintains a variable MSS and sends a segment as soon as it has collected MSS bytes from the
sending process
– MSS is usually set to the size of the largest segment TCP can send without causing local IP to
fragment.
– MSS: MTU of directly connected network – (TCP header + and IP header).
• Sending process has explicitly asked TCP to send it
– TCP supports push operation.
• When a timer fires
– Resulting segment contains as many bytes as are currently buffered for transmission.
11/2/2020 KAVIYA P, AP/IT, KCET 44
45. Transmission Control Protocol
TCP Flow Control – Silly Window Syndrome
• In TCP ―full‖ containers (data segments) going in one direction and empty containers (ACKs) going
in the reverse direction, then MSS-sized segments correspond to large containers and 1-byte
segments correspond to very small containers.
• If the sender aggressively fills an empty container as soon as it arrives, then any small container
introduced into the system remains in the system indefinitely.
• That is, it is immediately filled and emptied at each end.
• To avoid silly window syndrome Nagle’s algorithm is used.
11/2/2020 KAVIYA P, AP/IT, KCET 45
46. Transmission Control Protocol
TCP Flow Control – Nagle’s Algorithm
• If there is data to send but the window is open less than MSS, then we may want to wait some amount
of time before sending the available data.
• If we wait too long, then we hurt interactive applications like Telnet.
• If we don’t wait long enough, then we risk sending a bunch of tiny packets and falling into the silly
window syndrome.
– The solution is to introduce a timer and to transmit when the timer expires.
• Nagle introduced an elegant self-clocking solution.
• Key Idea
– As long as TCP has any data in flight, the sender will eventually receive an ACK.
– This ACK can be treated like a timer firing, triggering the transmission of more data.
11/2/2020 KAVIYA P, AP/IT, KCET 46
When the application produces data to send,
if both the available data and the window ≥ MSS
send a full segment
else if there is unACKed data in flight
buffer the new data until an ACK arrives
else
send all the new data now
47. Transmission Control Protocol
TCP Error Control
• TCP provides reliability using error control.
• Error control includes mechanisms for detecting and resending corrupted segments, resending lost
segments, storing out-of order segments until missing segments arrive, and detecting and discarding
duplicated segments.
• Error control in TCP is achieved through the use of three simple tools:
1. Checksum: Each segment includes a checksum field, which is used to check for a corrupted segment.
2. Acknowledgment: Confirm the receipt of data segments.
– Cumulative Acknowledgment (ACK)
– Selective Acknowledgment (SACK)
3. Time-out: When the retransmission timer expires or when the sender receives three duplicate ACKs
for the first segment in the queue, that segment is retransmitted.
– Retransmission after RTO
– Retransmission after Three Duplicate ACK Segments
11/2/2020 KAVIYA P, AP/IT, KCET 47
48. Transmission Control Protocol
TCP Congestion Control
• The idea of TCP congestion control is for each source to determine how much capacity
is available in the network, so that it knows how many packets it can safely have in
transit.
o Once a given source has this many packets in transit, it uses the arrival of an ACK
as a signal that one of its packets has left the network, and that it is therefore safe to
insert a new packet into the network without adding to the level of congestion.
o By using ACKs to pace the transmission of packets, TCP is said to be self-clocking.
11/2/2020 KAVIYA P, AP/IT, KCET 48
49. Transmission Control Protocol
TCP Congestion Control - Additive Increase/Multiplicative Decrease
• TCP maintains a new state variable for each connection, called CongestionWindow,
which is used by the source to limit how much data it is allowed to have in transit at a
given time.
• The congestion window is congestion control’s counterpart to flow control’s advertised
window.
• TCP is modified such that the maximum number of bytes of unacknowledged data
allowed is now the minimum of the congestion window and the advertised window.
• That is, MaxWindow replaces AdvertisedWindow in the calculation of
EffectiveWindow.
• Thus, a TCP source is allowed to send no faster than the slowest component—the network
or the destination host—can accommodate.
11/2/2020 KAVIYA P, AP/IT, KCET 49
MaxWindow = MIN(CongestionWindow, AdvertisedWindow)
EffectiveWindow = MaxWindow − (LastByteSent − LastByteAcked)
50. Transmission Control Protocol
TCP Congestion Control - Additive Increase/Multiplicative Decrease
• The problem, of course, is how TCP comes to learn an appropriate value for
CongestionWindow.
• Unlike the AdvertisedWindow, which is sent by the receiving side of the connection, there
is no one to send a suitable CongestionWindow to the sending side of TCP.
– The answer is that the TCP source sets the CongestionWindow based on the level of
congestion it perceives to exist in the network.
– This involves decreasing the congestion window when the level of congestion goes up
and increasing the congestion window when the level of congestion goes down.
– Taken together, the mechanism is commonly called additive increase/multiplicative
decrease (AIMD).
.
11/2/2020 KAVIYA P, AP/IT, KCET 50
51. Transmission Control Protocol
TCP Congestion Control - Additive Increase/Multiplicative Decrease
• How does the source determine that the network is congested and that it should
decrease the congestion window?
– Based on the observation that the main reason packets are not delivered, and a timeout
results, is that a packet was dropped due to congestion. It is rare that a packet is
dropped because of an error during transmission.
– Therefore, TCP interprets timeouts as a sign of congestion and reduces the rate at
which it is transmitting.
– Specifically, each time a timeout occurs, the source sets CongestionWindow to half of
its previous value. This halving of the CongestionWindow for each timeout
corresponds to the “multiplicative decrease” part of AIMD.
– For example, suppose the CongestionWindow is currently set to 16 packets. If a loss
is detected, CongestionWindow is set to 8.
11/2/2020z KAVIYA P, AP/IT, KCET 51
52. Transmission Control Protocol
TCP Congestion Control - Additive Increase/Multiplicative Decrease
• How does the source determine that the network is congested and that it should
decrease the congestion window?
– Additional losses cause CongestionWindow to be reduced to 4, then 2, and finally to 1
packet.
– CongestionWindow is not allowed to fall below the size of a single packet, i.e.,
maximum segment size (MSS).
• Increase the congestion window to take advantage of newly available capacity in the
network.
• This is the “additive increase” part of AIMD, and it works as follows.
– Every time the source successfully sends a CongestionWindow’s worth of packets—
that is, each packet sent out during the last RTT has been ACKed—it adds the
equivalent of 1 packet to CongestionWindow.
11/2/2020 KAVIYA P, AP/IT, KCET 52
53. Transmission Control Protocol
TCP Congestion Control - Additive Increase/Multiplicative Decrease
• TCP does not wait for an entire window’s worth of ACKs to add 1 packet’s worth to the
congestion window, but instead increments CongestionWindow by a little for each ACK
that arrives.
• Specifically, the congestion window is incremented as follows each time an ACK arrives:
– Increment = MSS × (MSS/CongestionWindow)
– CongestionWindow += Increment
– That is, rather than incrementing CongestionWindow by an entire MSS bytes each
RTT, we increment it by a fraction of MSS every time an ACK is received.
– Assuming that each ACK acknowledges the receipt of MSS bytes, then that fraction is
MSS/CongestionWindow.
11/2/2020 KAVIYA P, AP/IT, KCET 53
54. Transmission Control Protocol
TCP Congestion Control – Slow Start
• Additive Increase / Multiplicative Decrease is only suitable for source, that is operating
close to the available capacity of the network, but it takes too long to ramp up a connection
when it is starting from scratch.
• Slowstart, which is used to increase the congestion window rapidly from a cold start.
• Slow start effectively increases the congestion window exponentially, rather than linearly.
– The source starts out by setting CongestionWindow to one packet.
– When the ACK for this packet arrives, TCP adds 1 to CongestionWindow and then
sends two packets.
– Upon receiving the corresponding two ACKs, TCP increments CongestionWindow by
2 - one for each ACK - and next sends four packets.
– The end result is that TCP effectively doubles the number of packets it has in transit
every RTT.
11/2/2020 KAVIYA P, AP/IT, KCET 54
55. Transmission Control Protocol
TCP Congestion Control - Slow Start
Two different situations in which slow start runs,
• The first is at the very beginning of a connection, at which time the source has no idea
how many packets it is going to be able to have in transit at a given time.
– In this situation, slow start continues to double CongestionWindow each RTT until
there is a loss, at which time a timeout causes multiplicative decrease to divide
CongestionWindow by 2.
• The second situation in which slow start is used is a bit more subtle; it occurs when the
connection goes dead while waiting for a timeout to occur.
– The source then uses slow start to restart the flow of data.
• Specifically, the source has a current (and useful) value of CongestionWindow; this is the
value of CongestionWindow that existed prior to the last packet loss, divided by 2 as a
result of the loss.
11/2/2020 KAVIYA P, AP/IT, KCET 55
56. Transmission Control Protocol
TCP Congestion Control - Slow Start
• This value used as the ―target‖ congestion window also called as CongestionThreshold.
• Slow start is used to rapidly increase the sending rate up to this value, and then additive
increase is used beyond this point.
i.e., assume congestion window size is x at the time of timeout
• A time out happens, causing the congestion window to be divided by 2, dropping the
CongestionWindow size x to x/2 and CongestionThreshold is set to this amount (x/2).
• CongestionWindow is reset to one packet, as the sender enters slow start.
• Slow start increases the congestion window exponentially until it reaches
CongestionThreshold.
• CongestionWindow then grows linearly (i.e., it uses additive increase)
11/2/2020 KAVIYA P, AP/IT, KCET 56
57. Transmission Control Protocol
TCP Congestion Control - Fast Retransmit and Fast Recovery
• The idea of fast retransmit is straightforward.
• Every time a data packet arrives at the receiving side, the receiver responds with an
acknowledgment, even if this sequence number has already been acknowledged.
• Thus, when a packet arrives out of order— that is, TCP cannot yet acknowledge the data
the packet contains because earlier data has not yet arrived—TCP resends the same
acknowledgment it sent the last time.
• This second transmission of the same acknowledgment is called a duplicate ACK.
• When the sending side sees a duplicate ACK, it knows that the other side must have
received a packet out of order, which suggests that an earlier packet might have been lost.
• Since it is also possible that the earlier packet has only been delayed rather than lost, the
sender waits until it sees some number of duplicate ACKs and then retransmits the missing
packet.
11/2/2020 KAVIYA P, AP/IT, KCET 57
58. Transmission Control Protocol
TCP Congestion Control - Fast Retransmit and Fast Recovery
• In practice, TCP waits until it has seen three duplicate ACKs before retransmitting the
packet.
• When the fast retransmit mechanism signals congestion, rather than drop the congestion
window all the way back to one packet and run slow start, it is possible to use the ACKs
that are still in the pipe to clock the sending of packets.
• This mechanism, which is called fast recovery, effectively removes the slow start phase
that happens between when fast retransmit detects a lost packet and additive increase
begins.
11/2/2020 KAVIYA P, AP/IT, KCET 58
59. Stream Control Transmission Protocol (SCTP)
• A new transport-layer protocol designed to combine some features of UDP and TCP in
an effort to create a better protocol for multimedia communication.
SCTP Services
• Process-to-Process Communication: It provides process-to-process communication
• Multiple Streams: It allows multistream service in each connection, which is called
association in SCTP terminology. If one of the streams is blocked, the other streams can
still deliver their data.
• Multihoming: 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.
• Connection-Oriented Service: A connection is called an association.
• Reliable Service: It uses an acknowledgment mechanism to check the safe and sound
arrival of data.
11/2/2020 KAVIYA P, AP/IT, KCET 59
60. Stream Control Transmission Protocol (SCTP)
SCTP Features
• Transmission Sequence Number (TSN): It is used to number the data chunks. TSNs are
32 bits long and randomly initialized between 0 and 232 - 1.
• Stream Identifier (SI): Each stream in SCTP needs to be identified using a stream
identifier (SI).
• Stream Sequence Number (SSN): SCTP defines each data chunk in each stream with a
stream sequence number (SSN).
11/2/2020 KAVIYA P, AP/IT, KCET 60
61. Stream Control Transmission Protocol (SCTP)
Packets
• SCTP is totally different: data are carried as data chunks, control information as control
chunks.
• Several control chunks and data chunks can be packed together in a packet.
11/2/2020 KAVIYA P, AP/IT, KCET 61
SCTP Packet Format
General Header
The verification tag is a 32-bit field that
matches a packet to an association.
63. Stream Control Transmission Protocol (SCTP)
An SCTPAssociation – Association Establishment
• A connection in SCTP is called an association.
• No other chunk is allowed in a packet carrying an INIT or INIT ACK chunk.
• A COOKIE ECHO or a COOKIE ACK chunk can carry data chunks.
11/2/2020 KAVIYA P, AP/IT, KCET 63
64. Stream Control Transmission Protocol (SCTP)
An SCTPAssociation – Data Transfer
• 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.
11/2/2020 KAVIYA P, AP/IT, KCET 64
65. Stream Control Transmission Protocol (SCTP)
An SCTPAssociation – Association Termination
• SCTP does not allow a ―half-closed‖ association
11/2/2020 KAVIYA P, AP/IT, KCET 65