intTypePromotion=1
zunia.vn Tuyển sinh 2024 dành cho Gen-Z zunia.vn zunia.vn
ADSENSE

Bài giảng Nhập môn mạng máy tính: Chương 3 - Trường ĐH Công nghệ thông tin

Chia sẻ: _ _ | Ngày: | Loại File: PDF | Số trang:109

4
lượt xem
1
download
 
  Download Vui lòng tải xuống để xem tài liệu đầy đủ

Bài giảng "Nhập môn mạng máy tính - Chương 3: Tầng vận chuyển" tập trung vào các nguyên tắc và cơ chế hoạt động của tầng vận chuyển trong mô hình OSI, bao gồm multiplexing, demultiplexing, truyền dữ liệu tin cậy, điều khiển luồng và điều khiển tắc nghẽn. Chương trình trình bày hai giao thức quan trọng: UDP, giao thức vận chuyển không kết nối và TCP, giao thức vận chuyển định hướng kết nối tin cậy, cùng với cơ chế điều khiển tắc nghẽn của TCP. Mời các bạn cùng tham khảo bài giảng để biết thêm chi tiết!

Chủ đề:
Lưu

Nội dung Text: Bài giảng Nhập môn mạng máy tính: Chương 3 - Trường ĐH Công nghệ thông tin

  1. ĐẠI HỌC QUỐC GIA THÀNH PHỐ HỒ CHÍ MINH TRƯỜNG ĐẠI HỌC CÔNG NGHỆ THÔNG TIN CHƯƠNG 3 TẦNG VẬN CHUYỂN NHẬP MÔN MẠNG MÁY TÍNH Thực hiện bởi Trường Đại học Công nghệ Thông tin, ĐHQG-HCM 1
  2. A note on the use of these PowerPoint slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint form so you see the animations; and can add, modify, and delete slides (including this one) and slide content to suit your needs. They obviously represent a lot of work on our part. In return for use, we only ask the following: ▪ If you use these slides (e.g., in a class) that you mention their source (after all, we’d like people to use our book!) ▪ If you post any slides on a www site, that you note that they are adapted from (or perhaps identical to) our slides, and note our copyright of this material. For a revision history, see the slide note for this page. Thanks and enjoy! JFK/KWR All material copyright 1996-2020 J.F Kurose and K.W. Ross, All Rights Reserved Computer Networking: A Top-Down Approach 8th edition Jim Kurose, Keith Ross Pearson, 2020
  3. Tổng quan Mục đích: ▪ Hiểu các giao thức: ▪ Hiểu được các nguyên • UDP: connectionless tắc/cơ chế hoạt động: transport • multiplexing, demultiplexing • TCP: connection-oriented reliable transport • reliable data transfer • TCP congestion control • flow control • congestion control 3
  4. Nội dung oCác dịch vụ tầng vận chuyển oMultiplexing and demultiplexing oUDP oNguyên lý truyền tin cậy oTCP oTCP - Điều khiển tắc nghẽn oSự phát triển của các tính năng của tầng vận chuyển 4
  5. Giao thức và dịch vụ o Cung cấp “truyền thông luận lý application transport (logical communication)” giữa các mobile network network data link physical tiến trình trên các “host” khác nhau national or global ISP o Các giao thức vận chuyển hoạt động trên các thiết bị đầu cuối: • Bên gửi: chia các “messages – thông local or regional ISP điệp” thành các “segments” và chuyển xuống tầng mạng. home network content provider • Bên nhận: ghép các segment thành network datacenter application transport network messages, chuyển đến tầng ứng dụng. network data link physical o 2 giao thức chính: TCP và UDP enterprise network 5
  6. Hoạt động của tầng vận chuyển Bên gửi: application ▪ Nhận message từ tầng ứng application app. msg dụng (nhận thư) transport ▪ Xác định giá trị header TThtransport h app. msg (thông tin phong bì) network (IP) ▪ Tạo segment (bỏ thư vào network (IP) phong bì) link link ▪ Chuyển segment đến physical physical tầng mạng 6
  7. Transport Layer Actions Bên nhận: ▪ Nhận segment từ tầng application mạng application ▪ Kiểm tra giá trị header transport app. msg transport ▪ Bỏ header, trích xuất network (IP) thông điệp của tầng ứng network (IP) dụng link link ▪ Chuyển thông điệp đến physical physical tầng ứng dụng qua socket Th app. msg 7
  8. Giao thức tầng vận chuyển oTCP: Transmission Control Protocol application transport ▪ Tin cậy, vận chuyển đúng thứ tự mobile network network data link physical ▪ Điều khiển tắc nghẽn national or global ISP ▪ Điều khiển luồng ▪ Thiết lập kết nối oUDP: User Datagram Protocol ▪ Không tin cậy, truyền nhận không local or regional ISP đúng thứ tự ▪ Phần mở rộng của giao thức IP home network content provider “best-effort” network datacenter application oKhông cung cấp các dịch vụ sau: network transport network ▪ Đảm bảo độ trễ data link physical ▪ Đảm bảo băng thông enterprise network 8
  9. Nội dung oCác dịch vụ tầng vận chuyển oMultiplexing and demultiplexing oUDP oNguyên lý truyền tin cậy oTCP oTCP - Điều khiển tắc nghẽn oSự phát triển của các tính năng của tầng vận chuyển 9
  10. HTTP server client application application HTTP msg transport transport network transport network link network link physical link physical physical 10
  11. HTTP server client application application HTTP msg transport Ht HTTP msg transport network transport network link network link physical link physical physical 11
  12. HTTP server client application application HTTP msg transport Ht HTTP msg Hnnetworkmsg Ht HTTP transport transport network link network link physical link physical physical 12
  13. HTTP server client application application transport transport network transport network link network link physical link physical physical Hn Ht HTTP msg 13
  14. HTTP server client application application HTTP msg transport Ht HTTP msg transport network transport network Hn Ht HTTP msg link network link physical link physical physical 14
  15. HTTP server client application application HTTP msg transport Ht HTTP msg transport Ht HTTP msg network transport network link network link physical link physical physical 15
  16. Q: Làm thế nào mà tầng vận chuyển biết gửi đúng message tới trình duyệt Firefox thay vì Netflix hoặc Skype? client application application HTTP msg HTTP msg transport Ht HTTP msg transport network transport network link network link physical link physical physical 16
  17. Multiplexing/demultiplexing multiplexing tại bên gửi: demultiplexing tại bên nhận: Nhận dữ liệu từ socket, thêm Sử dụng thông tin trong header header của tầng vận chuyển để chuyển segment nhận được đến đúng socket. application application P1 P2 application socket P3 transport P4 process transport network transport network link network link physical link physical physical 17
  18. Demultiplexing làm việc thế nào? o Khi host nhận được một IP “datagram” 32 bits ▪ Mỗi datagram có địa chỉ IP nguồn và IP source port # dest port # đích ▪ Mỗi datagram này chứa 1 segment (đơn other header fields vị dữ liệu của tầng vận chuyển) o Mỗi segment có port nguồn và port application đich data (payload) ▪ “Host” dùng địa chỉ IP & port numbers để chuyển segment đến đúng socket tương ứng TCP/UDP segment format 18
  19. Ví dụ về “connectionless - không kết nối” mySocket = socket(AF_INET,SOCK_DGRAM) mySocket.bind(myaddr,6428); mySocket = mySocket = socket(AF_INET,SOCK_STREAM) socket(AF_INET,SOCK_STREAM) mySocket.bind(myaddr,9157); mySocket.bind(myaddr,5775); application application application P1 P3 P4 transport transport transport network network link network link physical link physical physical B D source port: 6428 source port: ? dest port: 9157 dest port: ? A C source port: 9157 source port: ? dest port: 6428 dest port: ? 19
  20. Hướng kết nối o TCP socket được xác định o Server có thể hỗ trợ nhiều bởi 4-tuple (4 thông tin TCP socket cùng lúc: chính): : ▪ Mỗi socket được xác định bởi 4 ▪ source IP address thông tin ▪ source port number ▪ Mỗi socket tương ứng với một client đang kết nối với nó ▪ dest IP address ▪ dest port number o demux: bên nhận sử dụng cả 4 thông tin chính để chuyển segment đến đúng socket 20
ADSENSE

CÓ THỂ BẠN MUỐN DOWNLOAD

 

Đồng bộ tài khoản
2=>2