MMT - Chương 4 - EN - Transport Layer
MMT - Chương 4 - EN - Transport Layer
MMT - Chương 4 - EN - Transport Layer
CHAPTER 4
Transport Layer
1
OBJECTIVES
• Describe the purpose of the layer in managing the transportation of data in end-to-end communication
KEY WORDS
• The Transport Layer
• UDP Protocol
• TCP Protocol
2
CONTENTS
3
Transport Layer
Transport Layer – Overview
4
Transport Layer
Transport Layer – Overview
The primary responsibilities of transport layer:
• Tracking Individual Conversations
• Segmenting Data and Reassembling Segments
• Identifying the Applications
5
Transport Layer
Transport Layer – Overview
6
Transport Layer
Transport Layer – Overview
Transport layer protocols:
• The transport layer ensures the data can be properly put back together on the receiving end, by
segmentation and reassembly processes
• In TCP/IP, these processes can be achieved using two very different transport layer protocols:
✓ Transmission Control Protocol (TCP): define by IETF in RFC 793
✓ User Datagram Protocol (UDP): define by IETF in RFC 768
7
Transport Layer
Transport Layer – Overview
Transport layer protocols:
8
Transport Layer
Transport Layer – Encapsulation
Transport layer encapsulation:
✓ TCP: Segment
✓ UDP: Datagram
9
Transport Layer
Transport Layer – Port Number and Socket
What is a port number ?
• Examples.
✓ TCP/80 = HTTP; UDP/161 = SNMP
✓ TCP/53 or UDP/53 = DNS
10
Transport Layer
Transport Layer – Port Number and Socket
Types of port number:
The range of port number is 0 to 65535 and the port numbers are divided into three categories:
• Well-known ports: for services and applications (Ex. DNS, HTTP, SNMP,...)
• Registered ports: for user application or user process
• Dynamic ports (Ephemeral ports): These are assigned dynamically to client applications when the client
initiates a connection to a service.
11
Transport Layer
Transport Layer – Port Number and Socket
Socket concept:
12
User Datagram Protocol
UDP – Overview
UDP basic functions
UDP provides the basic functions for delivering datagrams between the appropriate applications, with very
little overhead and data checking.
• UDP is known as a best-effort delivery protocol because there is no acknowledgment that the data is
received at the destination.
13
User Datagram Protocol
UDP – Overview
UDP features
14
User Datagram Protocol
UDP – Overview
Applications that use UDP
15
User Datagram Protocol
UDP – Header format
UDP header: 8 bytes
16
User Datagram Protocol
UDP – Well Known Port Numbers
17
User Datagram Protocol
UDP – Communication
Low resource consumption and low reliability
• UDP provides low overhead data transport because it has a small header and no network management
traffic.
18
User Datagram Protocol
UDP – Communication
19
User Datagram Protocol
UDP – Communication
UDP Server Processes and Requests
20
User Datagram Protocol
UDP – Communication
UDP Client Processes
• Number and track data segments transmitted to a specific host from a specific application
• Ensures Reliable Delivery - For many reasons, it is possible for a segment to become corrupted or lost, as it is
transmitted over the network. TCP ensures that each segment that is sent by the source arrives at the destination.
• Supports Flow Control - Network hosts have limited resources (i.e., memory and processing power). When TCP
is aware that these resources are overtaxed, it can request that the sending application reduce the rate of data flow.
• Provides Same-Order Delivery - Because networks may provide multiple routes that can have different
transmission rates, data can arrive in the wrong order.
23
Transmission Control Protocol
TCP – Overview
Applications that use TCP
• TCP handles all tasks associated with dividing the data stream into segments, providing reliability,
controlling data flow, and reordering segments.
24
Transmission Control Protocol
TCP – Header format
TCP header: 20 – 60 bytes
25
Transmission Control Protocol
TCP – Header format
26
Transmission Control Protocol
TCP – Well Known Port Numbers
27
Transmission Control Protocol
TCP – Communication
TCP Server Processes
28
Transmission Control Protocol
TCP – Communication
TCP Connection Establishment (or Setup)
29
Transmission Control Protocol
TCP – Communication
Session Termination or TCP Shutdown
31
Transmission Control Protocol
TCP – Reliability and Flow Control
32
Transmission Control Protocol
TCP – Reliability and Flow Control
TCP Flow Control – Window Size and Acknowledgments
Note:
35
Transmission Control Protocol
TCP – Connection Setup Example
An example about TCP Connection Setup
36
Transmission Control Protocol
TCP – Reliability Example
An example about TCP Reliability
• Sequence Number and Acknowledgement Number fields are used to implement reliable and ordered
data transmission in TCP
37
Transmission Control Protocol
TCP –Flow Control Example
An example about TCP Flow Control (Window Sliding Mechanism)
• TCP uses the sliding window mechanism to control the data transmission rate
38
Transmission Control Protocol
TCP – Session Termination Example
An example about TCP Shutdown (Four-Way Handshake)
• After data transmission is complete, TCP needs to use the four-way handshake mechanism to
disconnect the TCP connection and release system resources
39
Questions and Answers
40