The Internet and Its Uses - Genesee Community College
Download
Report
Transcript The Internet and Its Uses - Genesee Community College
Chapter 4
OSI Transport Layer
Modified by Profs. Chen and Cappellino
Objectives
In this chapter, we examine the role of the Transport layer.
The Transport layer also encompasses these functions:
Enables multiple applications to communicate over the network at
the same time on a single device
Ensures that, if required, all the data is received reliably and in
order by the correct application
Employs error handling mechanisms
Learning Objectives
Upon completion of this chapter, you will be able to:
Explain the need for the Transport layer.
Identify the role of the Transport layer as it provides the end-to-end
transfer of data between applications.
Describe the role of two TCP/IP Transport layer protocols: TCP and
UDP.
Explain the key functions of the Transport layer, including reliability,
port addressing, and segmentation.
Explain how TCP and UDP each handle key functions.
Identify when it is appropriate to use TCP or UDP and provide
examples of applications that use each protocol.
Purpose of the Transport Layer
Transport layer is the ____________________________
__________ that are responsible for ___________________
Provides for the ___________________________________
Its primary responsibilities to accomplish are:
_________
the individual communication
between applications on the source and
destination hosts
Any host may have ___________________________________
_________________________________
It is the responsibility of the ____________________________
___________________________ between these applications.
_____________
The Transport layer protocols describe services that ___________
received from the Application layer.
data and managing each piece
Networks limit the amount of data that can be included in a single
PDU.
Segmentation necessary so data blocks are of the ______________
Each piece of application data requires headers at the Transport
layer to indicate which communication it is associated with
_
Purpose of the Transport Layer cont..
____________
the segments into application data
At the receiving host, these individual pieces of data
must:
Be ____
Be reassembled into a complete data stream that is useful to the
Application layer.
__________________
the different applications
In order to pass data streams to the proper applications,
the Transport layer must identify __________________.
Transport layer assigns an application an identifier called a
__________________________
Each software process that needs to access the network
is assigned a port number unique in that host.
Transport layer _____________________________
________________________________ before
delivering them to the appropriate application
Multiple Transport Layer protocols
Because different applications have different
requirements, there are _________________
______________________________
For
some applications, segments must arrive in a very
______________ in order to be processed successfully.
In some cases, ______________________________
for any of it to be of use.
In other cases, an ___________________________ of
data during transmission over the network.
The different Transport layer protocols have
different rules to handle diverse data requirements.
__________________________
provide robust
communication at the Transport layer
but also create ___________________________ and make
larger demands on the network.
Separating Multiple Communications
Example…
Consider a computer that is
simultaneously receiving and sending email and instant messages, viewing
websites, and conducting a VoIP phone
call.
Each
of these applications is sending and
receiving data over the network at the same
time.
Transport layer ensures that data from
the phone call is not directed to the web
browser, and text from an instant
message does not appear in an e-mail.
Controlling the Conversations
Conversation ________________
There
may be ________________
__________________________________
Each of these applications is assigned an
address known as a port so that the
Transport layer can determine with which
application or service the data is identified.
In addition to the basic functions
of data segmentation and
reassembly, some protocols at the
Transport layer provide:
Connection-oriented
Reliable delivery
Ordered data
Flow control
conversations
reconstruction
More to come on these…
Controlling the Conversations Cont…
Establishing a Session
Transport
layer protocol can be considered a ______________
_____________ by _____________________________________
Prepare the applications to communicate with each other before
________________________________
Reliable Delivery
The
Transport layer can _______________________________
____________________ by having the source device _________
___________________________________________
Same Order Delivery
By
__________________, Transport layer can ensure that segments
____________________________________ into the proper order.
Flow Control
When
Transport layer is aware that memory or bandwidth resources
are overtaxed, it can ____________________________________
_____________________________________
Flow control can _____________________________ on the network
and avoid the need for retransmission.
More to come on all of this…
Summarizing Reliable Communication
Recall, there are different Transport protocols
which have been developed to meet the varying
needs of applications.
A Transport layer protocol can implement a method
to ensure reliable delivery of the data with the
following operations:
tracking transmitted data
acknowledging received data
retransmitting
any unacknowledged data
These ________________________________
_____________________________ due to the
acknowledgement, tracking, and retransmission.
Control data contained within the Transport layer header
assists in supporting the reliability operations
Determining the Need for Reliability
At the Transport layer, there are protocols that specify
methods for either _____________________________
_______________________________
___________________________________,
because there is no
acknowledgement that the data is received at the destination.
Guaranteed (reliable) delivery example:
databases,
________________________________
_________________________________________________
Additional network overhead necessary
Best-effort (unreliable) delivery example:
____________________________ stream
_________________________________________________.
Small loss may create a momentary disruption in the stream.
Imposing
overhead to ensure reliability for this application could
___________________________________________ possibly
causing unacceptable delay
So what protocols
Are considered reliable vs
unreliable…
Common Transport layer protocols: TCP and UDP
Transmission Control Protocol (___)
A
_________________________________
______________________________
_____________________________
__________________________________
Each TCP segment has ___ bytes of overhead
in the header encapsulating the Application
layer data,
Two applications that use TCP are web
browsers & e-mail
User Datagram Protocol (_______)
A
_________________________________
_____________________ data delivery
_________________________________ ___________________ in UDP are called
________________________________.
Each UDP segment has ___ bytes of overhead.
Applications that use UDP are DNS & video
streaming and VoIP
More to come on
TCP and UDP…
Port Addressing: Identifying the Conversations
Recall: the header of both _________
____________________ that can
uniquely identify various applications.
The ___________________________
____________________________.
The
source port number is the number for
the communication associated with the
______________________________.
The destination port number is the number
for this communication associated with the
_________________________________
Server processes have _________
numbers assigned to them
They
are ___________________ that are
___________________ by clients.
___________________________
____________ for each conversation.
Port Addressing cont…
Client application sends a request to a server
application
Destination
port contained in the header is the
port number that is assigned to the service
daemon running on the remote host.
Generally a commonly known predefined port
number
Example, when a web browser application makes a
request to a web server, the browser uses TCP and
port number 80
_______________________________________
____________________________________
Can not conflict with other ports in use on the
system
Client can choose any port number higher than
1024
This port number ________________________
________________________________
The __________________________________
______________________________ so that
when a response is returned, it can be
forwarded to the correct application.
Socket
The ______________________________
_________________________________ is
called a socket number
uniquely
identifies a particular process running
on a specific host device.
A socket pair, consisting of the source and
destination IP addresses and port numbers,
is also unique and identifies the
conversation between the two hosts
The IANA assigns port numbers
Well Known Port Numbers (_________) - These numbers
are ___________________________________.
HTTP
(web server) POP3/SMTP (e-mail server) and Telnet.
Registered Port Numbers (__________) - These port
numbers are ____________________________________.
These
processes are primarily individual applications that a user has
chosen to install.
When not used for a server resource, these ports may also be used
dynamically selected by a client as its source port.
Dynamic or Private Port Numbers (_____________) - Also
known as Ephemeral Ports, these are ______________
_______________________________________________
_____________________________________
Some applications may ________________________.
For
example, the low overhead of UDP enables DNS to serve many client
requests very quickly.
Sometimes, however, sending the requested information may require the
reliability of TCP.
TCP & UDP port summary…
Port Addressing: _______ command
Netstat is a __________
______________________
______________________
______________________
_____________ on a
networked host.
Netstat lists:
the
protocol in use,
the local address and port
number,
the foreign address and port
number,
the state of the connection.
TCP/UDP Server Processes
It is common for a server ____________________
______________________, such as a web server
and an FTP server, ____________________
_______________ process running on the server is
configured to use a _______________________
An
individual server cannot have two services assigned to
the same port number within the same Transport layer
services.
When an active server application is assigned to a
specific port, that
_____________________________________
Any incoming client request addressed to the correct socket is accepted
and the data is passed to the server application.
One way to improve security on a server is to _____
_________________________________________
____________________ and applications that
should be _________________________________
TCP- Reliable protocol
The reliability of TCP communication is performed using
__________________________________________
Before
a host using TCP sends data to another host, the Transport
layer initiates a process to create a connection with the destination.
More to come…
After a session has been established – using a 3 way
handshake- the _____________________________ to
the source for the segments that it receives.
As
the source ______________________________, it _________
____________________________________________________
If the source does not receive an acknowledgement within
a predetermined amount of time, it ______________ that
data to the destination.
TCP Segment Header Fields
Individual
sections of a
segment
called ______
We’ll review
some fields on
the following
slide…
NOTE: Some texts
refer to this field as
the “control field”
Some Fields in Detail…
___________________________ – random numeric TCP session value of
the device opening the connection
____________________________________ – TCP session value of the
protocol or application on the remote site
_____________________________________ -- number used to ensure
correct sequencing of the arriving data
Allows the _______________________________________ in the order in
which they were transmitted.
____________________ - next TCP octet expected by the receiver
_________________ -- number of bytes that the sender can be send
before waiting for an acknowledgement
and the receiver can accept before having to send an acknowledgement back
to the sender
____________________________ upper-layer protocol data
Six One-bit fields…
These are ________________
that make up the “________” field
in our diagram
Fields _______________ used to
manage the TCP processes
URG - Urgent pointer field is valid
(when this bit set)
ACK - Acknowledgement field valid
PSH - Push the data
RST - Reset the connection
SYN - Synchronize sequence
numbers
FIN – Terminate the connection
Each one-bit field has only two
values: ___________________
Setting of
_____________________
____________________________.
Why used a three-way handshake?
______________________ that the destination
device is present
_________________ that the destination device
has an active service and is accepting requests
_______________________ the destination
device that the source client intends to establish
a communication session on that port number
Three-way Handshake
Steps in TCP connection
establishment are:
1. The initiating client sends a segment
containing an _____________, which
serves as a request to the server to
begin a communications session.
2. The server responds with a segment
containing an __________________
______________________________
______________________________
The value is one greater than the sequence
number because the ACK is always the next
expected byte
3. Initiating client responds with an
______________________________
____________________________
Connection established
TCP Termination
To terminate a single conversation supported by
TCP, ________ exchanges are needed to end the
entire session:
1. When the ___________ (A) has no more data to
send in the stream, it sends a segment with the
_______________________
2. The __________ (B) sends an ________ to
acknowledge the receipt of the FIN to terminate the
session from client to server.
3. The __________ (B) sends a _____________ to
the client, to _______ the server to client session.
4. The ________ (A) responds with an ___________
to acknowledge the FIN from the server.
It is also possible to terminate the connection by a
three-way handshake.
If
the server has no more data to send the client, it
can reply to the client’s FIN with both the FIN and
ACK flags set, combining steps #2 and #3 in the
above graphic into one step.
TCP Segment Reassembly
Segments may _______________________ and must be
__________________________
______________________________________________
This
ISN represents the starting value for the bytes that will be
transmitted to the receiving application.
As data is transmitted, the _____________________
_________________________________________
Enables __________________________ and any missing
segments can be identified.
The receiving TCP process places the data from a segment
into a ____________________________
Any
segments that arrive with noncontiguous sequence numbers
are __________________________________________
Then, when the segments with the missing bytes arrive, these
segments are processed.
TCP Acknowledgement with Windowing
The segment _______________________
________________________ are used to _____
_________ of the bytes of data in the segments.
The
sequence number is the relative number of bytes
that have been transmitted in this session plus 1
The ______________ is expected to send a segment
that uses a sequence number that is equal to the
_______________________________________
The source is informed that the destination has received all bytes in
this data up to, but not including, the byte indicated by the
acknowledgement number.
This is called ____________________________________
Let’s look at an example…
The host on the left is sending 10 bytes of
data and a sequence number equal to 1 in
the header.
Host on the right receives the segment
and determines that the sequence number
is 1 and that it has 10 bytes of data.
The
host then sends an acknowledgement #11 back
to the host on the left to acknowledge the receipt of
this data.
11 indicates to the receiving host that the next byte of
data it expects to receive is byte number 11.
When the sending host on the left receives
this acknowledgement, it can now send
the next segment starting with byte
number 11.
TCP Retransmission
When TCP at the source host has _______________
_________________________, it will _____________
____________________________ that it received and
______________________ from that point forward.
A destination host service generally only _____________
data for _________________________________
If
one or more segments are missing, _____________________
_____________________________________________
For example, if segments with sequence numbers 1500 to 3000 and
3400 to 3500 were received, the acknowledgement number would be
3001.
Because segments numbers 3001 to 3399 have not been received.
Hosts today may also employ an optional feature called
________________________________________
If
both hosts support Selective Acknowledgements, it is possible for
the _______________________________________________ and
the host only need to retransmit the missing data.
TCP Flow Control using variable window sizes
Flow control assists the reliability of TCP transmission by
_____________________________________________
between the two services.
Recall:
Window Size field specifies the amount of data that can be
transmitted before an acknowledgement must be received.
The ____________________________ that the network
and destination device can support ______________
_______________________________
is key
During the delay in receiving the acknowledgement, the
sender will not be sending any additional segments for this
session.
As
delay increases, the effective transmission rate of the data for
this session decreases.
If the receiver indicates a window size of 0, then the sender
cannot send any more bytes until the receiver sends a
packet with a window size greater than 0.
TCP Flow Control using variable window sizes
______________________ to
require that received segments be
________________________
during network congestion
If
the destination needs to slow down
the rate of communication it can send a
______________________________
_____________________________
After periods of transmission with no
data losses or constrained
resources, the receiver will begin to
increase the window field.
Window size will _______________
__________________ to obtain
optimum window size for each TCP
session.
Window size can be a factor in
determining the overall efficiency of the
network
Original window size
UDP:
Low Overhead vs. Reliability
UDP – Low Overhead vs. Reliability
UDP is a ________________________________________
__________________________________________
It
is _____________________________________
It
does ________________________________________________.
Will not establish a connection prior to sending data
If above functions are needed, must be implemented elsewhere
Less overhead results in _________________________
What are some Application layer protocols that use UDP?
If applications used TCP, they may experience large delays
while TCP detects data loss and retransmits data.
These
delays would be more detrimental to the application than
small data losses.
They are unnecessary for other applications
UDP Datagram Reassembly
UDP is said to be ________________________
When
an application has data to send, __________________
What is another – specific- name for the UDP segment?
When multiple datagrams are sent to a destination, they
may take different paths and arrive in the wrong order.
UDP
does not keep track of sequence numbers.
UDP has no way to reorder the datagrams into their transmission
order.
_______________________________________________
____________________________________
Application
layer determines how the data should be processed