1 / 37

TCP/IP

TCP/IP. 柯俊宇 Ke Chun-Yu Internet Technology Laboratory Institute of Computer and Communication Kun Shan University sacitta@gmail.com. Outline. 1. Communication Protocol 2. OSI Model ( Open System Interconnection Momdel ) 3. DoD Model (Department of Defense Model) 4.TCP/IP

vanna
Download Presentation

TCP/IP

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. TCP/IP 柯俊宇 KeChun-Yu Internet Technology Laboratory Institute of Computer and Communication Kun Shan University sacitta@gmail.com

  2. Outline • 1. Communication Protocol • 2. OSI Model (Open System Interconnection Momdel) • 3. DoD Model(Department of Defense Model) • 4.TCP/IP • IP (Inernet Protocol) • TCP(Transmission Control Protocol) • Reference

  3. Communication Protocol ??? 同語言(協定)才能溝通良好

  4. TCP connection reply. 最近在做什麼? 出國旅遊 <file> Communication Protocol 好久不見 TCP connection req. 好久不見

  5. 常見的通訊協定

  6. OSI Model7 Layer OSI Model的七個層次如下 第七層應用層(Application Layer) 第六層表達層(Presentation Layer) 第五層會議層(Session Layer) 第四層傳輸層(Transport Layer) 第三層網路層(Network Layer) 第二層資料連接層(Data Link Layer) 第一層實體層(Physical Layer)

  7. Layer 1-Physical Layer 此層主要包含以下兩項: 1.定義各種傳輸設備的規格 2.傳送訊號,將資料以實體呈現並傳輸的規格

  8. Layer 2-Data-Link Layer 此層主要包含以下三項: 同步 偵錯 制定 MAC Method

  9. Layer 3 -Network Layer • 此層主要包含以下兩項: • 1.IPaddressing • 2IPRouting

  10. Layer 4 -Transport Layer 此層主要包含以下三項: 封包的分割與組合、編定序號 控制資料流量 偵錯與錯誤處理 負責程序對程序間的連線 此層的資料傳輸單位稱segment

  11. Layer 5-Session Layer 雙方在正式開始傳輸前的互相溝通,目的在於建立傳輸時所遵循的規則。 如單工、半雙工/全雙工通訊模式的選擇

  12. Layer 6 -Presentation Layer 此層主要包含以下三項: 1.內碼轉換 2.壓縮與解壓縮 3.加密與解密

  13. Layer 7 -Application Layer 提供各式各樣的應用服務,使用者,應用程式與網路之間的溝通介面

  14. OSI Model’s Advantages 兩台網路主機互相通訊傳輸資料: • 分層負責 • 逐層處理 • 對等交談 • 提供網路標準 • 易於理解

  15. OSI Model’s Shortcome 效率低落

  16. DoD Model DoD:Department of Defence • DoD是由美國國防部設計 • OSI Model為網路參考模型 • DoD Model也採用「網路分層」概念,共分成四層模型。 • Application Layer • Host-to-Host Layer • Internet Layer • Network Access Layer

  17. Modeland Protocol 參照圖 應用服務 傳輸服務 連線服務 實體接線

  18. TCP/IP 克夫(Vin Cerf)與肯恩(Bob Kahn)在1973年發表了一篇劃時代的論文, 敘述如何到達端點對端點封包傳送的協定: 傳輸控制協定(transmission control protocol) 1977年10月,由ARPANET、封包式無線通訊及封包式衛星通訊三個不同網路構成的網際網路成功的被展示出來,使得不同網路間的通訊成為可能。之後TCP被分成兩個協定,即傳輸控制協定(Transmission Control Protocol,TCP)和網際網路協定(Internetworking Protocol,IP)。

  19. TCP/IP • TCP/ IP • IP (Internet Protocol) • IP所提供的服務大致上可歸納為兩項 • IP封包的傳送 • IPaddress • IPRouting • IP封包的分割與重組

  20. IPProtocol • IPaddress: • 決定網路裝置的位址或名稱分配 • 每一個使用IP的裝置,其IP位址必須是獨一無二的

  21. IPRouting IPRouting :選擇傳送路徑(選擇最佳路徑)

  22. IP封包的分割與重組 IP封包的分割(Fragmentation)與重組(Reassamble) IP在封包在傳送的過程中,可能經過使用不同技術,可能因封包太大而造成無法傳輸。

  23. IP特性 • IP的三種特性: • Connectionless • Unreliable • Best-Effort Delivery

  24. Host to Host • 在此層有兩個重要的傳輸協議 • TCP (Transmission Control Protocol) • UDP (User Datagram Protocol)

  25. TCP、UDP的優缺點比較

  26. UDP(User Datagram Protocol) • UDP協定的主要特性 • connectionless • Best-Effort Delivery • Unreliable

  27. UDP (User Datagram Protocol) • 對於某些訊息量較大、時效性大於可靠性傳輸,如影音可以容忍遺失一些封包,而感覺不出來,此時UDP會是一個不錯的選擇。 • 使用UDP的的應用程式,通常是基於以下考量: • 1.降低電腦資源的需求 • 2.應用程式本身已提供資料完整性的檢查機制 • 3.要使用Multicast或Broadcast等一對多傳送方式時,必須使用UDP。

  28. 常見的TCP、UDPProtocol 埠號

  29. TCP(Transmission Control Protocol) TCP協定的主要任務就是確保資料能夠在網路上正確的傳輸,提供流量控制的特性。 TCP協定使用IP來傳輸封包給Layer 7 的應用程式,建立一個連結導向的傳輸資料,負責發送端與接收端的協定建立,並保證資料在網路上流動的安全與可靠。

  30. TCP(Transmission Control Protocol) • TCP協定的主要功能 • 資料確認與重送 • 流量控制 • TCP協定的主要特性 • Connection-Oriented • Reliable • Full Duplex • Stream • Buffer

  31. TCP(Transmission Control Protocol) • 資料確認與重送 • Sequence Number • Acknowledgement • Checksum) • Retransmission • Flow Control)

  32. TCP的傳送機制 TCP的傳送機制-三向交握(three-way handshaking)

  33. TCP的確認機制 確認訊息(Acknowledgement) 傳送封包1 接收封包1 傳送確認封包1 接收確認封包1 傳送封包2 接收封包2 傳送確認封包2 接收確認封包2

  34. TCP的重送機制 傳送封包1 起始定時器 封包1應該到達 應該傳送確認封包1 確認封包1應該到達 逾時 重新傳送封包1 起始定時器 正常接收封包1 傳送確認封包2 接收確認封包1 取消定時器

  35. TCP 的 Sliding Window Packet 3 Packet 1 ACK 1 Packet 2 ACK 2,3 Packet 5,6

  36. Reference TCP/IP 協定 觀念與實作 V2 施威銘研究室 著作 TCP/IP 網路概論 宋天文 等人 著作 TCP/IP 最佳入門實用書 蕭文龍等人 著作 TCP/IP 協定 譯者:陳中和、吳秀峰 TCP/IPILLUSTRATED V1 翻譯:資策會中文化部門

  37. END

More Related