Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lab312. Lab312 專題生暑假需知 每一課程都會有作業 且點名與作業表現將影響專題生是否能續留本實驗室 修習本實驗室之專題生務必要出席 在開學前會公告 final project 的機測時間,詳細資訊請看 Room312 板 點名 + 課程作業 +final project 此為續留本實驗室之條件.

Similar presentations


Presentation on theme: "Lab312. Lab312 專題生暑假需知 每一課程都會有作業 且點名與作業表現將影響專題生是否能續留本實驗室 修習本實驗室之專題生務必要出席 在開學前會公告 final project 的機測時間,詳細資訊請看 Room312 板 點名 + 課程作業 +final project 此為續留本實驗室之條件."— Presentation transcript:

1 Lab312

2 Lab312 專題生暑假需知 每一課程都會有作業 且點名與作業表現將影響專題生是否能續留本實驗室 修習本實驗室之專題生務必要出席 在開學前會公告 final project 的機測時間,詳細資訊請看 Room312 板 點名 + 課程作業 +final project 此為續留本實驗室之條件 缺 一不可

3 protocol 大概說說 TCP 大概說說 HTTP

4 TCP Transmission Control Protocol point-to-point: –one sender, one receiver reliable, in-order byte steam: –no “message boundaries connection-oriented: –handshaking (exchange of control msgs) init’s sender, receiver state before data exchange

5 TCP Transmission Control Protocol

6 TCP

7

8 source port # dest port # 32 bits application data (variable length) sequence number acknowledgement number Receive window Urg data pnter checksum F SR PAU head len not used Options (variable length) URG: urgent data (generally not used) ACK: ACK # valid PSH: push data now (generally not used) RST, SYN, FIN: connection estab (setup, teardown commands) # bytes rcvr willing to accept counting by bytes of data (not segments!) Internet checksum (as in UDP)

9 TCP Seq. #’s: –byte stream “number” of first byte in segment’s data ACKs: –seq # of next byte expected from other side –cumulative ACK Q: how receiver handles out-of-order segments –A: TCP spec doesn’t say, - up to implementor Host A Host B Seq=42, ACK=79, data = ‘C’ Seq=79, ACK=43, data = ‘C’ Seq=43, ACK=80 User types ‘C’ host ACKs receipt of echoed ‘C’ host ACKs receipt of ‘C’, echoes back ‘C’ time simple telnet scenario

10 HTTP Hypertext Transfer Protocol Web page consists of objects Object can be HTML file, JPEG image, Java applet, audio file,… Web page consists of base HTML-file which includes several referenced objects Each object is addressable by a URL Example URL: host name path name

11 HTTP HTTP: hypertext transfer protocol Web’s application layer protocol client/server model –client: browser that requests, receives, “displays” Web objects –server: Web server sends objects in response to requests HTTP 1.0: RFC 1945 HTTP 1.1: RFC 2068 PC running Explorer Server running Apache Web server Mac running Navigator HTTP request HTTP response

12 HTTP Request Message two types of HTTP messages: request, response HTTP request message: –ASCII (human-readable format) GET /somedir/page.html HTTP/1.1 Host: User-agent: Mozilla/4.0 Connection: close Accept-language:fr (extra carriage return, line feed) request line (GET, POST, HEAD commands) header lines Carriage return, line feed indicates end of message

13 HTTP Request Message

14 HTTP Method HTTP/1.0 GET POST HEAD –asks server to leave requested object out of response HTTP/1.1 GET, POST, HEAD PUT –uploads file in entity body to path specified in URL field DELETE –deletes file specified in the URL field

15 HTTP Response Message HTTP/ OK Connection close Date: Thu, 06 Aug :00:15 GMT Server: Apache/1.3.0 (Unix) Last-Modified: Mon, 22 Jun 1998 …... Content-Length: 6821 Content-Type: text/html data data data data data... status line (protocol status code status phrase) header lines data, e.g., requested HTML file

16 HTTP Response Status Codes 200 OK –request succeeded, requested object later in this message 301 Moved Permanently –requested object moved, new location specified later in this message (Location:) 400 Bad Request –request message not understood by server 404 Not Found –requested document not found on this server 505 HTTP Version Not Supported In first line in server->client response message. A few sample codes:

17 WireShark Wireshark (前稱 Ethereal )是一個網路封 包分析軟體。網路封包分析軟體的功能是 擷取網路封包,並盡可能顯示出最為詳細 的網路封包資料。

18 安裝 WireShark

19 安裝 WireShark

20

21

22

23

24 WireShark

25

26

27

28

29 作業一 1. 利用 wireshark 錄製連線封包,並標出 three way handshake 步驟的幾個封包。 2. 找出 TCP Header 中 Sequence number 以及 Acknowledgment number 欄位是做什麼用途,在 連線過程中裡面的內容代表什麼意義,請清楚說 明。 Mail 到 mail 標題 :Lab312 作業一 Mail 內容 : 請包含學號、姓名。 Due:8/4


Download ppt "Lab312. Lab312 專題生暑假需知 每一課程都會有作業 且點名與作業表現將影響專題生是否能續留本實驗室 修習本實驗室之專題生務必要出席 在開學前會公告 final project 的機測時間,詳細資訊請看 Room312 板 點名 + 課程作業 +final project 此為續留本實驗室之條件."

Similar presentations


Ads by Google