SlideShare a Scribd company logo
1 of 69
TCP/IP Protocol Suite 1
Copyright ยฉ The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 13
Introduction to
the Transport
Layer
TCP/IP Protocol Suite 2
OBJECTIVES:
๏ฑ To define process-to-process communication at the transport
layer and compare it with host-to-host communication at the
network layer.
๏ฑ To discuss the addressing mechanism at the transport layer, to
discuss port numbers, and to define the range of port numbers
used for different purposes.
๏ฑ To explain the packetizing issue at the transport layer:
encapsulation and decapsulation of messages.
๏ฑ To discuss multiplexing (many-to-one) and demultiplexing (one-
to-many) services provided by the transport layer.
๏ฑ To discuss flow control and how it can be achieved at the
transport layer.
TCP/IP Protocol Suite 3
OBJECTIVES (continued):
๏ฑ To discuss error control and how it can be achieved at the
transport layer.
๏ฑ To discuss congestion control and how it can be achieved at the
transport layer.
๏ฑ To discuss the connectionless and connection-oriented services at
the transport layer and show their implementation using an
FSM.
๏ฑ To discuss the behavior of four generic transport-layer protocols
and their applications: simple protocol, Stop-and-Wait protocol,
Go-Back-N protocol, and Selective-Repeat protocol.
๏ฑ To describe the idea of bidirectional communication at the
transport layer using the piggybacking method.
TCP/IP Protocol Suite 4
Chapter
Outline
13.1 Transport-Layer Services
13.2 Transport-Layer Protocols
TCP/IP Protocol Suite 5
13-1 TRANSPORT-LAYER SERVICES
As we discussed in Chapter 2, the transport layer is
located between the network layer and the application
layer. The transport layer is responsible for providing
services to the application layer; it receives services
from the network layer. In this section, we discuss the
services that can be provided by a transport layer; in
the next section, we discuss the principle beyond
several transport layer protocols.
TCP/IP Protocol Suite 6
Topics Discussed in the Section
๏ƒผ Process-to-Process Communication
๏ƒผ Addressing: Port Numbers
๏ƒผ Encapsulation and Decapsulation
๏ƒผ Multiplexing and Demultiplexing
๏ƒผ Flow Control
๏ƒผ Error Control
๏ƒผ Congestion Control
๏ƒผ Connectionless and Connection-Oriented Services
TCP/IP Protocol Suite 7
Figure 13.1 Network layer versus transport layer
TCP/IP Protocol Suite 8
Figure 13.2 Port numbers
TCP/IP Protocol Suite 9
Figure 13.3 IP addresses versus port numbers
13
Data
Destination port number
selects the process
TCP/IP Protocol Suite 10
Figure 13.4 ICANN ranges
TCP/IP Protocol Suite 11
The well-known port numbers are
less than 1,024.
Note
TCP/IP Protocol Suite 12
In UNIX, the well-known ports are stored in a file called
/etc/services. Each line in this file gives the name of the server
and the well-known port number. We can use the grep utility to
extract the line corresponding to the desired application. The
following shows the port for TFTP. Note that TFTP can use port
69 on either UDP or TCP. SNMP (see Chapter 24) uses two port
numbers (161 and 162), each for a different purpose.
Example 13.1
TCP/IP Protocol Suite 13
Figure 13.5 Socket address
TCP/IP Protocol Suite 14
Figure 13.6 Encapsulation and decapsulation
TCP/IP Protocol Suite 15
Figure 13.7 Multiplexing and demultiplexing
TCP/IP Protocol Suite 16
Figure 13.8 Pushing or pulling
TCP/IP Protocol Suite 17
Figure 13.9 Flow control at the transport layer
TCP/IP Protocol Suite 18
The above discussion requires that the consumers communicate
with the producers in two occasions: when the buffer is full and
when there are vacancies. If the two parties use a buffer of only
one slot, the communication can be easier. Assume that each
transport layer uses one single memory location to hold a packet.
When this single slot in the sending transport layer is empty, the
sending transport layer sends a note to the application layer to
send its next chunk; when this single slot in the receiving transport
layer is empty, it sends an acknowledgment to the sending
transport layer to send its next packet. As we will see later, this
type of flow control, using a single-slot buffer at the sender and
the receiver, is inefficient.
Example 13.2
TCP/IP Protocol Suite 19
Figure 13.10 Error control at the transport layer
Packets
Error Control
TCP/IP Protocol Suite 20
For error control, the sequence numbers
are modulo 2m, where m is the size of
the sequence number field in bits.
Note
TCP/IP Protocol Suite 21
Figure 13.11 Sliding window in circular format
TCP/IP Protocol Suite 22
Figure 13.12 Sliding window in linear format
TCP/IP Protocol Suite 23
Figure 13.13 Connectionless service
TCP/IP Protocol Suite 24
Figure 13.14 Connection-oriented service
TCP/IP Protocol Suite 25
Figure 13.15 Connectionless and connection-oriented services as FSMs
TCP/IP Protocol Suite 26
13-2 TRANSPORT-LAYER PROTOCOLS
We can create a transport-layer protocol by combining
a set of services described in the previous sections. To
better understand the behavior of these protocols, we
start with the simplest one and gradually add more
complexity. The TCP/IP protocol uses a transport
layer protocol that is either a modification or a
combination of some of these protocols.
TCP/IP Protocol Suite 27
Topics Discussed in the Section
๏ƒผ Simple Protocol
๏ƒผ Stop-and-Wait Protocol
๏ƒผ Go-Back-N Protocol
๏ƒผ Selective-Repeat Protocol
๏ƒผ Bidirectional Protocols: Piggybacking
TCP/IP Protocol Suite 28
Figure 13.16 Simple protocol
TCP/IP Protocol Suite 29
Figure 13.17 FSMs for simple protocol
TCP/IP Protocol Suite 30
The simple protocol is a connectionless
protocol that provides neither
flow nor error control.
Note
TCP/IP Protocol Suite 31
Figure 13.18 shows an example of communication using this
protocol. It is very simple. The sender sends packets one after
another without even thinking about the receiver.
Example 13.3
TCP/IP Protocol Suite 32
Figure 13.18 Example 13.3
TCP/IP Protocol Suite 33
Figure 13.19 Stop-and-wait protocol
TCP/IP Protocol Suite 34
In Stop-and-Wait protocol, flow
control is achieved by forcing the
sender to wait for an acknowledgment,
and error control is achieved by
discarding corrupted packets and letting
the sender resend unacknowledged
packets when the timer expires.
Note
TCP/IP Protocol Suite 35
In the Stop-and-Wait protocol, we can
use a 1-bit field to number the packets.
The sequence numbers are based on
modulo-2 arithmetic.
Note
TCP/IP Protocol Suite 36
In the Stop-and-Wait protocol, the
acknowledgment number always
announces in modulo-2 arithmetic the
sequence number of the next packet
expected.
Note
TCP/IP Protocol Suite 37
All calculation in the Stop-and-Wait
protocol is in modulo 2.
Note
TCP/IP Protocol Suite 38
Figure 13.20 FSMs for stop-and-wait protocol
TCP/IP Protocol Suite 39
Figure 13.21 shows an example of Stop-and-Wait protocol. Packet
0 is sent and acknowledged. Packet 1 is lost and resent after the
time-out. The resent packet 1 is acknowledged and the timer
stops. Packet 0 is sent and acknowledged, but the acknowledgment
is lost. The sender has no idea if the packet or the
acknowledgment is lost, so after the time-out, it resends packet 0,
which is acknowledged.
Example 13.4
TCP/IP Protocol Suite 40
Figure 13.21 Example 13.4
TCP/IP Protocol Suite 41
Assume that, in a Stop-and-Wait system, the bandwidth of the line
is 1 Mbps, and 1 bit takes 20 milliseconds to make a round trip.
What is the bandwidth-delay product? If the system data packets
are 1,000 bits in length, what is the utilization percentage of the
link?
Solution
The bandwidth-delay product is (1 ร— 106) ร— (20 ร— 10โˆ’3) = 20,000
bits. The system can send 20,000 bits during the time it takes for
the data to go from the sender to the receiver and the
acknowledgment to come back. However, the system sends only
1,000 bits. We can say that the link utilization is only 1,000/20,000,
or 5 percent. For this reason, for a link with a high bandwidth or
long delay, the use of Stop-and-Wait wastes the capacity of the
link.
Example 13.5
TCP/IP Protocol Suite 42
What is the utilization percentage of the link in Example 13.5 if we
have a protocol that can send up to 15 packets before stopping
and worrying about the acknowledgments?
Solution
The bandwidth-delay product is still 20,000 bits. The system can
send up to 15 packets or 15,000 bits during a round trip. This
means the utilization is 15,000/20,000, or 75 percent. Of course, if
there are damaged packets, the utilization percentage is much less
because packets have to be resent.
Example 13.6
TCP/IP Protocol Suite 43
Figure 13.22 Go-Back-N protocol
TCP/IP Protocol Suite 44
In the Go-Back-N Protocol, the sequence
numbers are modulo 2m, where m is the
size of the sequence number
field in bits.
Note
TCP/IP Protocol Suite 45
In the Go-Back-N protocol, the
acknowledgment number is
cumulative and defines the sequence
number of the next packet
expected to arrive.
Note
TCP/IP Protocol Suite 46
Figure 13.23 Send window for Go-Back-N
TCP/IP Protocol Suite 47
The send window is an abstract concept
defining an imaginary box of maximum
size = 2m โˆ’ 1 with three variables:
Sf, Sn, and Ssize.
Note
TCP/IP Protocol Suite 48
The send window can slide one or
more slots when an error-free ACK
with ackNo between Sf and Sn
(in modular arithmetic) arrives.
Note
TCP/IP Protocol Suite 49
Figure 13.24 Sliding the send window
TCP/IP Protocol Suite 50
Figure 13.25 Receive window for Go-Back-N
TCP/IP Protocol Suite 51
The receive window is an abstract
concept defining an imaginary
box of size 1 with
one single variable Rn.
The window slides when a correct
packet has arrived; sliding
occurs one slot at a time.
Note
TCP/IP Protocol Suite 52
Figure 13.26 FSMs for Go-Back-N
TCP/IP Protocol Suite 53
Figure 13.27 Send window size for Go-Back-N
TCP/IP Protocol Suite 54
In the Go-Back-N protocol, the size of
the send window must be less than 2m;
the size of the receive window
is always 1.
Note
TCP/IP Protocol Suite 55
Figure 13.28 shows an example of Go-Back-N. This is an example
of a case where the forward channel is reliable, but the reverse is
not. No data packets are lost, but some ACKs are delayed and one
is lost. The example also shows how cumulative acknowledgments
can help if acknowledgments are delayed or lost.
Example 13.7
TCP/IP Protocol Suite 56
Figure 13.28 Example 13.7
TCP/IP Protocol Suite 57
Figure 13.29 shows what happens when a packet is lost. Packets 0,
1, 2, and 3 are sent. However, packet 1 is lost. The receiver
receives packets 2 and 3, but they are discarded because they are
received out of order (packet 1 is expected). When the receiver
receives packets 2 and 3, it sends ACK1 to show that it expects to
receive packet 1. However, these ACKs are not useful for the
sender because the ackNo is equal Sf , not greater that Sf . So the
sender discards them. When the time-out occurs, the sender
resends packets 1, 2, and 3, which are acknowledged..
Example 13.8
TCP/IP Protocol Suite 58
Figure 13.29 Example 13.8
TCP/IP Protocol Suite 59
Figure 13.30 Outline of Selective-Repeat
TCP/IP Protocol Suite 60
Figure 13.31 Send window for Selective-Repeat protocol
TCP/IP Protocol Suite 61
Figure 13.32 Receive window for Selective-Repeat protocol
TCP/IP Protocol Suite 62
In the Selective-Repeat protocol, an
acknowledgment number defines
the sequence number of the
error-free packet received.
Note
TCP/IP Protocol Suite 63
Assume a sender sends 6 packets: packets 0, 1, 2, 3, 4, and 5. The
sender receives an ACK with ackNo = 3. What is the interpretation
if the system is using GBN or SR?
Solution
If the system is using GBN, it means that packets 0, 1, and 2 have
been received uncorrupted and the receiver is expecting packet 3.
If the system is using SR, it means that packet 3 has been
received uncorrupted; the ACK does not say anything about other
packets.
Example 13.9
TCP/IP Protocol Suite 64
Figure 13.33 FSMs for SR protocol
TCP/IP Protocol Suite 65
This example is similar to Example 3.8 (Figure 13.29) in which
packet 1 is lost. We show how Selective-Repeat behaves in this
case. Figure 13.34 shows the situation. At the sender, packet 0 is
transmitted and acknowledged. Packet 1 is lost. Packets 2 and 3
arrive out of order and are acknowledged. When the timer times
out, packet 1 (the only unacknowledged packet) is resent and is
acknowledged. The send window then slides.
Example 13.10
TCP/IP Protocol Suite 66
Figure 13.34 Example 13.10
TCP/IP Protocol Suite 67
Figure 13.35 Selective-Repeat window size
TCP/IP Protocol Suite 68
In Selective-Repeat, the size of the
sender and receiver window
can be at most one-half of 2m.
Note
TCP/IP Protocol Suite 69
Figure 13.36 Design of piggybacking for Go-Back-N

More Related Content

Similar to Chap-13.ppt

Chapter Five - Transport Layer.pptx
Chapter Five - Transport Layer.pptxChapter Five - Transport Layer.pptx
Chapter Five - Transport Layer.pptx
GirT2
ย 
Improving Performance of TCP in Wireless Environment using TCP-P
Improving Performance of TCP in Wireless Environment using TCP-PImproving Performance of TCP in Wireless Environment using TCP-P
Improving Performance of TCP in Wireless Environment using TCP-P
IDES Editor
ย 
transport layer protocols
transport layer protocolstransport layer protocols
transport layer protocols
BE Smรขrt
ย 
User datagram protocol
User datagram protocolUser datagram protocol
User datagram protocol
Mohd Arif
ย 
Lecture 19 22. transport protocol for ad-hoc
Lecture 19 22. transport protocol for ad-hoc Lecture 19 22. transport protocol for ad-hoc
Lecture 19 22. transport protocol for ad-hoc
Chandra Meena
ย 

Similar to Chap-13.ppt (20)

DCN 5th ed. slides ch24 Transport-Layer Protocols.pdf
DCN 5th ed. slides ch24 Transport-Layer Protocols.pdfDCN 5th ed. slides ch24 Transport-Layer Protocols.pdf
DCN 5th ed. slides ch24 Transport-Layer Protocols.pdf
ย 
TCP Vs UDP
TCP Vs UDP TCP Vs UDP
TCP Vs UDP
ย 
Computer Communication Networks- TRANSPORT LAYER PROTOCOLS
Computer Communication Networks- TRANSPORT LAYER PROTOCOLSComputer Communication Networks- TRANSPORT LAYER PROTOCOLS
Computer Communication Networks- TRANSPORT LAYER PROTOCOLS
ย 
Chap 12 tcp
Chap 12 tcpChap 12 tcp
Chap 12 tcp
ย 
Chap 12 tcp
Chap 12 tcpChap 12 tcp
Chap 12 tcp
ย 
Tcp
TcpTcp
Tcp
ย 
TCP Congestion Control
TCP Congestion ControlTCP Congestion Control
TCP Congestion Control
ย 
Chapter Five - Transport Layer.pptx
Chapter Five - Transport Layer.pptxChapter Five - Transport Layer.pptx
Chapter Five - Transport Layer.pptx
ย 
Improving Performance of TCP in Wireless Environment using TCP-P
Improving Performance of TCP in Wireless Environment using TCP-PImproving Performance of TCP in Wireless Environment using TCP-P
Improving Performance of TCP in Wireless Environment using TCP-P
ย 
20CS2007 Computer Communication Networks
20CS2007 Computer Communication Networks 20CS2007 Computer Communication Networks
20CS2007 Computer Communication Networks
ย 
04 MK-PPT End-to-End Protocols.ppt
04 MK-PPT End-to-End Protocols.ppt04 MK-PPT End-to-End Protocols.ppt
04 MK-PPT End-to-End Protocols.ppt
ย 
Chap 10 igmp
Chap 10 igmpChap 10 igmp
Chap 10 igmp
ย 
IMPACT OF CONTENTION WINDOW ON CONGESTION CONTROL ALGORITHMS FOR WIRELESS ADH...
IMPACT OF CONTENTION WINDOW ON CONGESTION CONTROL ALGORITHMS FOR WIRELESS ADH...IMPACT OF CONTENTION WINDOW ON CONGESTION CONTROL ALGORITHMS FOR WIRELESS ADH...
IMPACT OF CONTENTION WINDOW ON CONGESTION CONTROL ALGORITHMS FOR WIRELESS ADH...
ย 
UDP and TCP Protocol & Encrytion and its algorithm
UDP and TCP Protocol & Encrytion and its algorithmUDP and TCP Protocol & Encrytion and its algorithm
UDP and TCP Protocol & Encrytion and its algorithm
ย 
07 coms 525 tcpip - udp
07    coms 525 tcpip - udp07    coms 525 tcpip - udp
07 coms 525 tcpip - udp
ย 
Unit 5.Transport Layer.pptx
Unit 5.Transport Layer.pptxUnit 5.Transport Layer.pptx
Unit 5.Transport Layer.pptx
ย 
transport layer protocols
transport layer protocolstransport layer protocols
transport layer protocols
ย 
Chap 11
Chap 11Chap 11
Chap 11
ย 
User datagram protocol
User datagram protocolUser datagram protocol
User datagram protocol
ย 
Lecture 19 22. transport protocol for ad-hoc
Lecture 19 22. transport protocol for ad-hoc Lecture 19 22. transport protocol for ad-hoc
Lecture 19 22. transport protocol for ad-hoc
ย 

Recently uploaded

VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
SUHANI PANDEY
ย 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
sivaprakash250
ย 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
ย 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
MsecMca
ย 
Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar โ‰ผ๐Ÿ” Delhi door step de...
Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar  โ‰ผ๐Ÿ” Delhi door step de...Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar  โ‰ผ๐Ÿ” Delhi door step de...
Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar โ‰ผ๐Ÿ” Delhi door step de...
9953056974 Low Rate Call Girls In Saket, Delhi NCR
ย 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
ย 
Call Girls in Ramesh Nagar Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort Service
Call Girls in Ramesh Nagar Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort ServiceCall Girls in Ramesh Nagar Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort Service
Call Girls in Ramesh Nagar Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
ย 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
ย 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
ankushspencer015
ย 

Recently uploaded (20)

(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
ย 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
ย 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
ย 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
ย 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
ย 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
ย 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
ย 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
ย 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
ย 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
ย 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
ย 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ย 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
ย 
Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar โ‰ผ๐Ÿ” Delhi door step de...
Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar  โ‰ผ๐Ÿ” Delhi door step de...Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar  โ‰ผ๐Ÿ” Delhi door step de...
Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar โ‰ผ๐Ÿ” Delhi door step de...
ย 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
ย 
Call Girls in Ramesh Nagar Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort Service
Call Girls in Ramesh Nagar Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort ServiceCall Girls in Ramesh Nagar Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort Service
Call Girls in Ramesh Nagar Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort Service
ย 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ย 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
ย 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
ย 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
ย 

Chap-13.ppt

  • 1. TCP/IP Protocol Suite 1 Copyright ยฉ The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 13 Introduction to the Transport Layer
  • 2. TCP/IP Protocol Suite 2 OBJECTIVES: ๏ฑ To define process-to-process communication at the transport layer and compare it with host-to-host communication at the network layer. ๏ฑ To discuss the addressing mechanism at the transport layer, to discuss port numbers, and to define the range of port numbers used for different purposes. ๏ฑ To explain the packetizing issue at the transport layer: encapsulation and decapsulation of messages. ๏ฑ To discuss multiplexing (many-to-one) and demultiplexing (one- to-many) services provided by the transport layer. ๏ฑ To discuss flow control and how it can be achieved at the transport layer.
  • 3. TCP/IP Protocol Suite 3 OBJECTIVES (continued): ๏ฑ To discuss error control and how it can be achieved at the transport layer. ๏ฑ To discuss congestion control and how it can be achieved at the transport layer. ๏ฑ To discuss the connectionless and connection-oriented services at the transport layer and show their implementation using an FSM. ๏ฑ To discuss the behavior of four generic transport-layer protocols and their applications: simple protocol, Stop-and-Wait protocol, Go-Back-N protocol, and Selective-Repeat protocol. ๏ฑ To describe the idea of bidirectional communication at the transport layer using the piggybacking method.
  • 4. TCP/IP Protocol Suite 4 Chapter Outline 13.1 Transport-Layer Services 13.2 Transport-Layer Protocols
  • 5. TCP/IP Protocol Suite 5 13-1 TRANSPORT-LAYER SERVICES As we discussed in Chapter 2, the transport layer is located between the network layer and the application layer. The transport layer is responsible for providing services to the application layer; it receives services from the network layer. In this section, we discuss the services that can be provided by a transport layer; in the next section, we discuss the principle beyond several transport layer protocols.
  • 6. TCP/IP Protocol Suite 6 Topics Discussed in the Section ๏ƒผ Process-to-Process Communication ๏ƒผ Addressing: Port Numbers ๏ƒผ Encapsulation and Decapsulation ๏ƒผ Multiplexing and Demultiplexing ๏ƒผ Flow Control ๏ƒผ Error Control ๏ƒผ Congestion Control ๏ƒผ Connectionless and Connection-Oriented Services
  • 7. TCP/IP Protocol Suite 7 Figure 13.1 Network layer versus transport layer
  • 8. TCP/IP Protocol Suite 8 Figure 13.2 Port numbers
  • 9. TCP/IP Protocol Suite 9 Figure 13.3 IP addresses versus port numbers 13 Data Destination port number selects the process
  • 10. TCP/IP Protocol Suite 10 Figure 13.4 ICANN ranges
  • 11. TCP/IP Protocol Suite 11 The well-known port numbers are less than 1,024. Note
  • 12. TCP/IP Protocol Suite 12 In UNIX, the well-known ports are stored in a file called /etc/services. Each line in this file gives the name of the server and the well-known port number. We can use the grep utility to extract the line corresponding to the desired application. The following shows the port for TFTP. Note that TFTP can use port 69 on either UDP or TCP. SNMP (see Chapter 24) uses two port numbers (161 and 162), each for a different purpose. Example 13.1
  • 13. TCP/IP Protocol Suite 13 Figure 13.5 Socket address
  • 14. TCP/IP Protocol Suite 14 Figure 13.6 Encapsulation and decapsulation
  • 15. TCP/IP Protocol Suite 15 Figure 13.7 Multiplexing and demultiplexing
  • 16. TCP/IP Protocol Suite 16 Figure 13.8 Pushing or pulling
  • 17. TCP/IP Protocol Suite 17 Figure 13.9 Flow control at the transport layer
  • 18. TCP/IP Protocol Suite 18 The above discussion requires that the consumers communicate with the producers in two occasions: when the buffer is full and when there are vacancies. If the two parties use a buffer of only one slot, the communication can be easier. Assume that each transport layer uses one single memory location to hold a packet. When this single slot in the sending transport layer is empty, the sending transport layer sends a note to the application layer to send its next chunk; when this single slot in the receiving transport layer is empty, it sends an acknowledgment to the sending transport layer to send its next packet. As we will see later, this type of flow control, using a single-slot buffer at the sender and the receiver, is inefficient. Example 13.2
  • 19. TCP/IP Protocol Suite 19 Figure 13.10 Error control at the transport layer Packets Error Control
  • 20. TCP/IP Protocol Suite 20 For error control, the sequence numbers are modulo 2m, where m is the size of the sequence number field in bits. Note
  • 21. TCP/IP Protocol Suite 21 Figure 13.11 Sliding window in circular format
  • 22. TCP/IP Protocol Suite 22 Figure 13.12 Sliding window in linear format
  • 23. TCP/IP Protocol Suite 23 Figure 13.13 Connectionless service
  • 24. TCP/IP Protocol Suite 24 Figure 13.14 Connection-oriented service
  • 25. TCP/IP Protocol Suite 25 Figure 13.15 Connectionless and connection-oriented services as FSMs
  • 26. TCP/IP Protocol Suite 26 13-2 TRANSPORT-LAYER PROTOCOLS We can create a transport-layer protocol by combining a set of services described in the previous sections. To better understand the behavior of these protocols, we start with the simplest one and gradually add more complexity. The TCP/IP protocol uses a transport layer protocol that is either a modification or a combination of some of these protocols.
  • 27. TCP/IP Protocol Suite 27 Topics Discussed in the Section ๏ƒผ Simple Protocol ๏ƒผ Stop-and-Wait Protocol ๏ƒผ Go-Back-N Protocol ๏ƒผ Selective-Repeat Protocol ๏ƒผ Bidirectional Protocols: Piggybacking
  • 28. TCP/IP Protocol Suite 28 Figure 13.16 Simple protocol
  • 29. TCP/IP Protocol Suite 29 Figure 13.17 FSMs for simple protocol
  • 30. TCP/IP Protocol Suite 30 The simple protocol is a connectionless protocol that provides neither flow nor error control. Note
  • 31. TCP/IP Protocol Suite 31 Figure 13.18 shows an example of communication using this protocol. It is very simple. The sender sends packets one after another without even thinking about the receiver. Example 13.3
  • 32. TCP/IP Protocol Suite 32 Figure 13.18 Example 13.3
  • 33. TCP/IP Protocol Suite 33 Figure 13.19 Stop-and-wait protocol
  • 34. TCP/IP Protocol Suite 34 In Stop-and-Wait protocol, flow control is achieved by forcing the sender to wait for an acknowledgment, and error control is achieved by discarding corrupted packets and letting the sender resend unacknowledged packets when the timer expires. Note
  • 35. TCP/IP Protocol Suite 35 In the Stop-and-Wait protocol, we can use a 1-bit field to number the packets. The sequence numbers are based on modulo-2 arithmetic. Note
  • 36. TCP/IP Protocol Suite 36 In the Stop-and-Wait protocol, the acknowledgment number always announces in modulo-2 arithmetic the sequence number of the next packet expected. Note
  • 37. TCP/IP Protocol Suite 37 All calculation in the Stop-and-Wait protocol is in modulo 2. Note
  • 38. TCP/IP Protocol Suite 38 Figure 13.20 FSMs for stop-and-wait protocol
  • 39. TCP/IP Protocol Suite 39 Figure 13.21 shows an example of Stop-and-Wait protocol. Packet 0 is sent and acknowledged. Packet 1 is lost and resent after the time-out. The resent packet 1 is acknowledged and the timer stops. Packet 0 is sent and acknowledged, but the acknowledgment is lost. The sender has no idea if the packet or the acknowledgment is lost, so after the time-out, it resends packet 0, which is acknowledged. Example 13.4
  • 40. TCP/IP Protocol Suite 40 Figure 13.21 Example 13.4
  • 41. TCP/IP Protocol Suite 41 Assume that, in a Stop-and-Wait system, the bandwidth of the line is 1 Mbps, and 1 bit takes 20 milliseconds to make a round trip. What is the bandwidth-delay product? If the system data packets are 1,000 bits in length, what is the utilization percentage of the link? Solution The bandwidth-delay product is (1 ร— 106) ร— (20 ร— 10โˆ’3) = 20,000 bits. The system can send 20,000 bits during the time it takes for the data to go from the sender to the receiver and the acknowledgment to come back. However, the system sends only 1,000 bits. We can say that the link utilization is only 1,000/20,000, or 5 percent. For this reason, for a link with a high bandwidth or long delay, the use of Stop-and-Wait wastes the capacity of the link. Example 13.5
  • 42. TCP/IP Protocol Suite 42 What is the utilization percentage of the link in Example 13.5 if we have a protocol that can send up to 15 packets before stopping and worrying about the acknowledgments? Solution The bandwidth-delay product is still 20,000 bits. The system can send up to 15 packets or 15,000 bits during a round trip. This means the utilization is 15,000/20,000, or 75 percent. Of course, if there are damaged packets, the utilization percentage is much less because packets have to be resent. Example 13.6
  • 43. TCP/IP Protocol Suite 43 Figure 13.22 Go-Back-N protocol
  • 44. TCP/IP Protocol Suite 44 In the Go-Back-N Protocol, the sequence numbers are modulo 2m, where m is the size of the sequence number field in bits. Note
  • 45. TCP/IP Protocol Suite 45 In the Go-Back-N protocol, the acknowledgment number is cumulative and defines the sequence number of the next packet expected to arrive. Note
  • 46. TCP/IP Protocol Suite 46 Figure 13.23 Send window for Go-Back-N
  • 47. TCP/IP Protocol Suite 47 The send window is an abstract concept defining an imaginary box of maximum size = 2m โˆ’ 1 with three variables: Sf, Sn, and Ssize. Note
  • 48. TCP/IP Protocol Suite 48 The send window can slide one or more slots when an error-free ACK with ackNo between Sf and Sn (in modular arithmetic) arrives. Note
  • 49. TCP/IP Protocol Suite 49 Figure 13.24 Sliding the send window
  • 50. TCP/IP Protocol Suite 50 Figure 13.25 Receive window for Go-Back-N
  • 51. TCP/IP Protocol Suite 51 The receive window is an abstract concept defining an imaginary box of size 1 with one single variable Rn. The window slides when a correct packet has arrived; sliding occurs one slot at a time. Note
  • 52. TCP/IP Protocol Suite 52 Figure 13.26 FSMs for Go-Back-N
  • 53. TCP/IP Protocol Suite 53 Figure 13.27 Send window size for Go-Back-N
  • 54. TCP/IP Protocol Suite 54 In the Go-Back-N protocol, the size of the send window must be less than 2m; the size of the receive window is always 1. Note
  • 55. TCP/IP Protocol Suite 55 Figure 13.28 shows an example of Go-Back-N. This is an example of a case where the forward channel is reliable, but the reverse is not. No data packets are lost, but some ACKs are delayed and one is lost. The example also shows how cumulative acknowledgments can help if acknowledgments are delayed or lost. Example 13.7
  • 56. TCP/IP Protocol Suite 56 Figure 13.28 Example 13.7
  • 57. TCP/IP Protocol Suite 57 Figure 13.29 shows what happens when a packet is lost. Packets 0, 1, 2, and 3 are sent. However, packet 1 is lost. The receiver receives packets 2 and 3, but they are discarded because they are received out of order (packet 1 is expected). When the receiver receives packets 2 and 3, it sends ACK1 to show that it expects to receive packet 1. However, these ACKs are not useful for the sender because the ackNo is equal Sf , not greater that Sf . So the sender discards them. When the time-out occurs, the sender resends packets 1, 2, and 3, which are acknowledged.. Example 13.8
  • 58. TCP/IP Protocol Suite 58 Figure 13.29 Example 13.8
  • 59. TCP/IP Protocol Suite 59 Figure 13.30 Outline of Selective-Repeat
  • 60. TCP/IP Protocol Suite 60 Figure 13.31 Send window for Selective-Repeat protocol
  • 61. TCP/IP Protocol Suite 61 Figure 13.32 Receive window for Selective-Repeat protocol
  • 62. TCP/IP Protocol Suite 62 In the Selective-Repeat protocol, an acknowledgment number defines the sequence number of the error-free packet received. Note
  • 63. TCP/IP Protocol Suite 63 Assume a sender sends 6 packets: packets 0, 1, 2, 3, 4, and 5. The sender receives an ACK with ackNo = 3. What is the interpretation if the system is using GBN or SR? Solution If the system is using GBN, it means that packets 0, 1, and 2 have been received uncorrupted and the receiver is expecting packet 3. If the system is using SR, it means that packet 3 has been received uncorrupted; the ACK does not say anything about other packets. Example 13.9
  • 64. TCP/IP Protocol Suite 64 Figure 13.33 FSMs for SR protocol
  • 65. TCP/IP Protocol Suite 65 This example is similar to Example 3.8 (Figure 13.29) in which packet 1 is lost. We show how Selective-Repeat behaves in this case. Figure 13.34 shows the situation. At the sender, packet 0 is transmitted and acknowledged. Packet 1 is lost. Packets 2 and 3 arrive out of order and are acknowledged. When the timer times out, packet 1 (the only unacknowledged packet) is resent and is acknowledged. The send window then slides. Example 13.10
  • 66. TCP/IP Protocol Suite 66 Figure 13.34 Example 13.10
  • 67. TCP/IP Protocol Suite 67 Figure 13.35 Selective-Repeat window size
  • 68. TCP/IP Protocol Suite 68 In Selective-Repeat, the size of the sender and receiver window can be at most one-half of 2m. Note
  • 69. TCP/IP Protocol Suite 69 Figure 13.36 Design of piggybacking for Go-Back-N