Bài giảng Mạng máy tính - Chapter 3: Transport layer

MẠNG MÁY TÍNH  
(COMPUTER NETWORKING)  
J.F Kurose and K.W. Ross. Computer  
Networking A Top Down Approach.  
6th edition, Addision Wesley, 2013  
Nội dung môn học  
Chapter 1: Computer Networks and the Internet  
Chapter 2: Application Layer  
Chapter 3: Transport Layer  
Chapter 4: Network Layer  
Chapter 5: The Link Layer and Local Area Network  
Data Link  
Chapter 6: Wireless and Mobile Networks  
Chapter 7: Multimedia Networking  
Chapter 8: Security in Computer Networks  
Chapter 9: Network Management  
1.2  
Chapter 3: TRANSPORT  
LAYER  
Mục tiêu  
Hiểu các nguyên tắc đằng sau các dịch vụ lớp transport  
Multiplexing/ Demultiplexing  
Truyền dữ liệu tin cậy  
Điều khiển luồng  
Điều khiển tắc nghẽn  
Nghiên cứu các giao thức lớp transport trên Internet  
UDP: vận chuyển không kết nối (connectionless)  
TCP: vận chuyển hướng kết nối (connection-oriented)  
Điều khiển tắc nghẽn TCP  
1.4  
Chapter 3 outline  
3.1 Introduction and Transport-Layer Services  
3.2 Multiplexing and Demultiplexing  
3.3 Connectionless Transport: UDP  
3.4 Principles of Reliable Data Transfer  
3.5 Connection-Oriented Transport: TCP  
Segment structure  
Reliable data transfer  
Flow control  
Connection management  
3.6 Principles of Congestion Control  
3.7 TCP Congestion Control  
1.5  
Chapter 3 outline  
3.1 Introduction and Transport-Layer Services  
3.2 Multiplexing and Demultiplexing  
3.3 Connectionless Transport: UDP  
3.4 Principles of Reliable Data Transfer  
3.5 Connection-Oriented Transport: TCP  
Segment structure  
Reliable data transfer  
Flow control  
Connection management  
3.6 Principles of Congestion Control  
3.7 TCP Congestion Control  
1.6  
1.7  
3.1.1 Relationship between Transport and  
Network Layers  
Situation:  
Network layer: logic  
Cousins live in two different  
houses try to send letter to each  
others  
communication among  
hosts  
Transport layer: logic  
communication among  
processes  
Application messages = letter  
in envelopes  
Processes = cousins  
Host = houses  
Transport-layer protocol = Ann  
and Bill  
Network-layer protocol =  
postal service  
1.8  
3.1.2 Overview of the Transport Layer in  
the Internet  
Unreliable, connectionless service to the invoking application (User  
Datagram Protocol)  
Reliable, connection-oriented service to the invoking application  
(Transmission Control Protocol)  
Reliable data transfer  
Using flow control, sequence number, acknowledgments, and timer  
Ensure data is delivered from sending process to receiving process,  
correctly and in order  
Provides congestion control  
The most fundamental responsibility of UDP and TCP is to extend IP’s  
delivery service between two end systems to a delivery service between two  
processes running on the end systems  
Extending host-to-host delivery to process-to-process delivery is called  
transport-layer multiplexing and demultiplexing.  
1.9  
Chapter 3 outline  
3.1 Introduction and Transport-Layer Services  
3.2 Multiplexing and Demultiplexing  
3.3 Connectionless Transport: UDP  
3.4 Principles of Reliable Data Transfer  
3.5 Connection-Oriented Transport: TCP  
Segment structure  
Reliable data transfer  
Flow control  
Connection management  
3.6 Principles of Congestion Control  
3.7 TCP Congestion Control  
1.10  
Multiplexing/demultiplexing  
Demultiplexing at rcv host:  
Delivering received segments  
to correct socket  
Multiplexing at send host:  
Gathering data from multiple  
sockets, enveloping data with  
header (later used for  
demultiplexing)  
1.13  
How demultiplexing works  
16-bit# [0-65535]  
Well-known port# [0-1023]  
host receives IP datagrams  
each datagram has source IP  
address, destination IP address  
each datagram carries 1  
transport-layer segment  
each segment has source,  
TCP/UDP segment format  
destination port number  
host uses IP addresses & port  
numbers to direct segment to  
appropriate socket  
Well-known port number  
[RFC 1700 & RFC 3232]  
• HTTP: port # 80  
• FTP: port #21, #20  
When we develop a new application, we must assign the  
application a port number!!!!  
1.14  
Connectionless Demultiplexing  
Create socket with port  
When host receives UDP  
numbers:  
segment:  
DatagramSocket mySocket1 = new  
DatagramSocket(12534);  
Check dest port number  
in segment  
DatagramSocket mySocket2 = new  
DatagramSocket(12535)  
Direct UDP segment to  
socket with that port  
number  
IP datagrams with different  
source IP addresses and/or  
source port numbers  
UDP socket identified by two-  
tuple:  
(dest IP address, dest port  
number)  
directed to same socket  
1.15  
Connectionless Demultiplexing  
1.16  
Connection-Oriented Demultiplexing  
TCP socket được xác định bởi  
Server host có thể hỗ trợ  
bộ 4:  
nhiều socket đồng thời  
source IP address  
source port number  
dest IP address  
Mỗi socket được xác  
định bởi bộ 4 của nó  
Web servers có các socket  
khác nhau cho mỗi kết nối  
client  
dest port number  
recv host sử dụng 4 giá trị để  
điều hướng segment tới socket  
thích hợp  
non-persistent HTTP sẽ  
có các socket khác nhau  
cho từng yêu cầu  
1.17  
Connection-Oriented Demultiplexing  
1.18  
Connection-Oriented Demultiplexing:  
Threaded Web Server  
1.19  
Chapter 3 outline  
3.1 Introduction and Transport-Layer Services  
3.2 Multiplexing and Demultiplexing  
3.3 Connectionless Transport: UDP  
3.4 Principles of Reliable Data Transfer  
3.5 Connection-Oriented Transport: TCP  
Segment structure  
Reliable data transfer  
Flow control  
Connection management  
3.6 Principles of Congestion Control  
3.7 TCP Congestion Control  
1.20  
UDP: User Datagram Protocol [RFC 768]  
Giao thức Internet transport “đơn  
giản hóa”  
Có UDP để làm gì?  
- Không thiết lập kết nối  
“best effort” service, UDP  
segment có thể  
có thể add delay  
Bị mất  
- Đơn giản: không lưu  
trạng thái kết nối tại  
sender, receiver  
Vận chuyển không thứ tự đến  
app  
- Segment header nhỏ  
- Không điều khiển tắc  
nghẽn: UDP có thể gởi  
nhanh nhất theo mong  
muốn  
Connectionless: không kết nối  
Không “handshaking” giữa  
bên nhận và bên gởi  
Mỗi UDP segment được quản  
lý độc lập  
1.21  
UDP: (tt)  
Thường dùng cho các ứng dụng  
streaming multimedia  
Chịu mất mát (loss tolerant)  
Tỷ lệ nhạy cảm (rate sensitive)  
UDP khác dung  
DNS  
SNMP (Simple Network  
Management Protocol)  
Truyền tin cậy trên UDP: thêm khả  
năng này tại application layer  
Application-specific error  
recovery  
1.22  
Tải về để xem bản đầy đủ
pdf 109 trang myanh 6370 Free
Bạn đang xem 20 trang mẫu của tài liệu "Bài giảng Mạng máy tính - Chapter 3: Transport layer", để tải tài liệu gốc về máy hãy click vào nút Download ở trên

File đính kèm:

  • pdfbai_giang_mang_may_tinh_chapter_3_transport_layer.pdf