Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lab312.

Similar presentations


Presentation on theme: "Lab312."— 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 , end to end 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 TCP

8 TCP source port # dest port # sequence number acknowledgement number
32 bits application data (variable length) sequence number acknowledgement number Receive window Urg data pnter checksum F S R P A U head len not used Options (variable length) URG: urgent data (generally not used) counting by bytes of data (not segments!) ACK: ACK # valid PSH: push data now (generally not used) # bytes rcvr willing to accept RST, SYN, FIN: connection estab (setup, teardown commands) 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 User types ‘C’ Seq=42, ACK=79, data = ‘C’ host ACKs receipt of ‘C’, echoes back ‘C’ Seq=79, ACK=43, data = ‘C’ host ACKs receipt of echoed ‘C’ Seq=43, ACK=80 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 HTTP request PC running Explorer HTTP response HTTP request Server running Apache Web server HTTP response Mac running Navigator

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

13 HTTP Request Message

14 HTTP Method HTTP/1.0 GET POST HEAD HTTP/1.1 GET, POST, HEAD PUT DELETE
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 status line (protocol status code status phrase)
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 ... header lines data, e.g., requested HTML file

16 HTTP Response Status Codes
In first line in server->client response message. A few sample 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

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

18 安裝 WireShark

19 安裝 WireShark

20 安裝 WireShark

21 安裝 WireShark

22 安裝 WireShark

23 安裝 WireShark

24 WireShark

25 WireShark

26 WireShark

27 WireShark

28 WireShark

29 作業一 1.利用wireshark錄製連線封包,並標出three way handshake步驟的幾個封包。
2.試著用firefox的POSTER送出HTTP的POST,HEAD,PUT,DELETE封包,用WIRESHARK錄製並標示出來,試著說明SERVER回應的封包代表的意思 Mail到 mail標題:Lab312作業一 Mail內容:請包含學號、姓名。 Due:8/15


Download ppt "Lab312."

Similar presentations


Ads by Google