1 / 33

簡簡單單 Internet

簡簡單單 Internet. @ 講師 : 資工 96A 李承翰 @CCCA ID : soiwill @Email : lch@csie.nctu.edu.tw. PPT 位置 : http://ccca.nctu.edu.tw. Outline. 什麼是網路 網路架構 LAN Devices TCP/IP 簡介 Reference. 什麼是網路. History ARPA ( advanced research projects Agency) Net 網路就是一群通過一定形式連接起來的電腦 Node ,LAN, CAN, WAN

theta
Télécharger la présentation

簡簡單單 Internet

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. 簡簡單單 Internet @講師 : 資工96A 李承翰 @CCCA ID : soiwill @Email : lch@csie.nctu.edu.tw PPT位置: http://ccca.nctu.edu.tw

  2. Outline • 什麼是網路 • 網路架構 • LAN Devices • TCP/IP簡介 • Reference

  3. 什麼是網路 • History • ARPA( advanced research projects Agency) Net • 網路就是一群通過一定形式連接起來的電腦 • Node ,LAN, CAN, WAN • 網路架構(Star, Bus, Ring)

  4. 網路架構 - Star 星狀架構

  5. 網路架構 - Bus 匯流排架構

  6. 網路架構 - Ring 環狀架構

  7. 網路架構 - 交大宿舍網路拓樸 • 已變革 Switch

  8. LAN Devices

  9. LAN Devices - HUB • HUB • Layer1 device • Multi-port repeater • Increasing collision domain size

  10. LAN Devices - SWITCH • Switch • Layer2 device • Multi-port bridge • Each port is a single collision domain • Learning • Each port can learn 1024 Ethernet Address • Store-and-Forward

  11. TCP/IP簡介 • Transmission Control Protocol / Internet Protocol • TCP 電腦間傳送資料的規則 • 資料的傳送,穩定性、連續性 • IP 網海中的電腦的位置規則 • 讓不同網路有規則可循的標準 • Packets 在 network 中的移動

  12. TCP/IP簡介 • OSI 模型 • 七個層級。 • 網路群組﹕由實體層﹑資料連接層﹑和網路層組成。 • 使用者群組﹕由傳送層﹑會談層﹑表現層﹑和應用層組成。 • Internet Protocol Suit 模型 • 應用層 (Application Layer) • 傳送層 (Transport Layer) • 網際網路層 (Internet Layer) • 網路存取層 (Network Access Layer) • 業界標準

  13. TCP/IP簡介

  14. TCP/IP簡介 • 應用層 • 傳送層 • 傳送層的主要目的向應用程式之間提供點對點的通訊。它規劃了資料流量﹐也提供一可靠傳輸以確保資料能正確的抵達目的地。傳送層必須能夠提供一套機制來控制和檢測資料傳送的正確性﹐例如安排接收端傳回確認信息﹑重發遺失資料﹑以及剔除重複資料﹑等等。 • 傳送層軟體會將應用程式送下來的資料切割分包﹐以符合下層傳輸要求的一定體積﹐交由網際網路層處理。傳送層協定會在每一個資料包上面加上一個標頭 (header)﹐記錄一些資訊﹐用來辨識該資料包屬於哪個個程式和由哪個程式來接收。再配以檢測和供接收機器來檢測資料是否完整。 • TCP/IP 的傳送層協定主要分為 TCP 與 UDP 兩種,前者為可靠性傳輸、後者為非可靠性傳輸。 • 網際網路層 • 這裡處理的是機器之間的通訊﹐為每一個傳送層交下來的封包加上 IP 標頭。網際網路層協定會根據傳送層的位址資料﹐使用路由演算法進行路由判斷﹐然後在 IP 標頭上填上路由資訊﹐以及其它相關的傳送選項資訊﹔再把封包交由下層處理。 • 這層協定的處理關鍵是路由﹐假如資料包的目的地是本機﹐則將標頭去除﹐將剩下部份交給合適的傳送協定處理﹔否則﹐就要判斷封包是直接傳送到本地網路節點﹐還是要傳送給路由器。如有需要﹐還會送出 ICMP 錯誤和控制訊息﹐同時也要處理接收到的 ICMP 訊。 • 網路存取層

  15. TCP/IP簡介 • 每個層級的例子

  16. TCP/IP簡介 • 在每個層級裡面所對應的通訊協定

  17. TCP/IP簡介

  18. TCP/IP簡介 – IP header

  19. TCP/IP簡介 • Version • 版本 (VER)。表示的是 IP 規格版本﹐目前的 IP 規格多為版本 4 (version 4)﹐所以這裡的數值通常為 0x4 (注意﹕封包使用的數字通常都是十六進位的)。 • Internet Header Length • 標頭長度 (IHL)。 • 每列32bits,最小(扣除OP.)共有五列->20bytes. • Normally, the value is 5 (no option),每32Bits(4Bytes)為一個單位。 • Type of Service • Next slider. • Total Length • 封包總長 (TL)。通常以 byte 做單位來表示該封包的總長度﹐此數值包括標頭和數據的總和。

  20. TCP/IP簡介 • Type of Service • 服務類型 (TOS)這裡指的是IP封包在傳送過程中要求的服務類型,其中一共由 8 個 bit 組成,每組 bit 組合分別代表不同的意思﹕

  21. TCP/IP簡介 • Identification (16bit) • Fragmentation offset (13bit) • Flags (3bit) • All these three fields are used for fragmentation

  22. TCP/IP簡介 • Time To Live • 存活時間 (TTL)。這個 TTL 的概念﹐在許多網路協定中都會碰到。當一個封包被賦予 TTL 值(以秒或跳站數目(hop)為單位)﹐之後就會進行倒數計時。在 IP 協定中,TTL 是以 hop 為單位,每經過一個 router 就減一)﹐如果封包 TTL 值被降為 0 的時候﹐就會被丟棄。這樣﹐當封包在傳遞過程中由於某些原因而未能抵達目的地的時候﹐就可以避免其一直充斥在網路上 • Protocol • 協定(PROT)。這裡指的是該封包所使用的網路協定類型﹐例如﹕ICMP 或 TCP/UDP 等等。要注意的是這裡使用的協定是網路層的協定。 • TCP, UDP, ICMP, IGMP

  23. TCP/IP簡介 • /etc/protocols

  24. TCP/IP簡介 • Header Checksum • 標頭檢驗值(HC)。這個數值主要用來檢錯用的﹐用以確保封包被正確無誤的接收到。當封包開始進行傳送後﹐接收端主機會利用這個檢驗值會來檢驗餘下的封包﹐如果一切看來無誤﹐就會發出確認信息﹐表示接收正常。

  25. TCP/IP簡介 • Source IP Address • 來源位址(SA)。相信這個不用多解釋了﹐就是發送端的 IP 位址是也﹐長度為 32 bit。 • Destination IP Address • 目的地位址(DA)。也就是接收端的 IP 位址﹐長度為 32 bit。

  26. TCP/IP簡介 • NCTU • Class B address: 140.113.0.0 • Network ID: 140.113 • Number of hosts: 255*255 = 65535

  27. TCP/IP簡介 • Not mention • IP routing • Mask • …

  28. TCP/IP簡介 • TCP 介紹 • Connection-oriented • Establish TCP connection before exchanging data • Reliability • Acknowledgement when receiving data • Retransmission when timeout • Ordering • Discard duplicated data • Flow control

  29. TCP/IP簡介 – TCP header

  30. TCP/IP簡介 • Flags • SYN • -Establish new connection • ACK • -Acknowledgement number is valid • -Used to ack previous data that host has received • RST • -Reset connection • FIN • The sender is finished sending data Three-way handshake TCP’s half close

  31. 了解了可以幹麻- -”爽!?

  32. Reference • http://www.study-area.net • Internet 無限擴展你的視野 2E • 交大校園網路策進會 編著. • 完全理解 TCP/IP Network • 戶根 勤 編著. • TCP/IP 網路實驗程式設計 • 李傳亮 編著. • Gooooooooooooooogle 大神.

  33. The End.

More Related