90 likes | 270 Views
World Wide Web Forouzan Chapter 22. Uniform Resource Locator http:// hostname [:port]/path Hostname = IP address :port = optional protocol port number (default is 80) Path = string specifying the document you want Absolute URL specifies complete info
E N D
World Wide Web Forouzan Chapter 22 Uniform Resource Locator http:// hostname [:port]/path Hostname = IP address :port = optional protocol port number (default is 80) Path = string specifying the document you want Absolute URL specifies complete info Relative URL once connected to a server browser can use this form
Hypertext Transfer Protocol (HTTP) • HTTP is an application that assumes a connection oriented transport protocol => TCP • After connection established browser sends an HTTP request to a server and the sever responds. • When a user submits a form, this is a browser to server transfer. HTTP is bidirectional. • An example server is APACHE. • Each HTTP request is self contained, server does not keep any “state” • Browsers and servers may negotiate character sets and capabilities • Browsers cache a copy of a web page. If user requests page again, HTTP allows query to server to determine if contents have changed.
HTTP GET METHOD Browser Request with a URL Browser uses domain name service to obtain IP address IP address and port 80 used to form TCP connection to server Now use HTTP to communicate, for example GET http://users.ece.gatech.edu/~owen/ HTTP/1.1 Now may use Relative URL GET ~owen/academic/4110
Persistent Connections In the good old days a new TCP Connection was used for each transfer, after one transfer connection was closed. Client read data until end of file then also closed. June 1999 HTTP version 1.1 introduced persistent connection. Can do multiple requests and responses over same connection. Persistent connection means can send several requests one right after another before any response. Ask for multiple images on a web page. With persistent connection how do you identify the beginning and end of each item? Send Lengths. If a common Gateway Interface (CGI) mechanism generates a web page dynamically, server may not know size in advance. In this case server tells browser it will close connection after sending that item.
HTTP HEADERS All HTTP transmissions contain a header, a blank line, and the item being sent. Example: Content-length: 25 Content-language: en Content-encoding: ascii <HTML> AN EXAMPLE <HTML/> If persistent connection need length or need in header: Connection: close Can negotiate or state what will accept: Accept-encoding: Accept-language: If-modified-since:
In experiment 5, a web browser was opened to the msn.com web page from 130.207.231.13 No. Time Source Destination Protocol Info 1 0.000000 130.207.231.3 224.0.0.5 OSPF Hello Packet 2 1.237429 130.207.231.2 Broadcast ARP Who has 130.207.231.135? Tell 130.207.231.2 3 1.289206 130.207.231.2 Broadcast ARP Who has 130.207.231.29? Tell 130.207.231.2 4 1.872016 130.207.231.2 224.0.0.2 HSRP Hello (state Active) 5 2.363230 130.207.231.3 224.0.0.2 HSRP Hello (state Standby) 6 4.489165 130.207.231.13 130.207.231.94 DNS Standard query A www.msn.com 7 4.496284 130.207.231.94 130.207.231.13 DNS Standard query response CNAME www.msn.com.nsatc.net A 207.68.183.32 8 4.500321 130.207.231.13 207.68.183.32 TCP 1048 > http [SYN] Seq=0 Ack=0 Win=65535 Len=0 MSS=1260 9 4.577502 207.68.183.32 130.207.231.13 TCP http > 1048 [SYN, ACK] Seq=0 Ack=1 Win=8190 Len=0 MSS=1260 10 4.577607 130.207.231.13 207.68.183.32 TCP 1048 > http [ACK] Seq=1 Ack=1 Win=65535 Len=0 11 4.578024 130.207.231.13 207.68.183.32 HTTP GET / HTTP/1.1 12 4.658821 130.207.231.2 Broadcast ARP Who has 130.207.231.29? Tell 130.207.231.2 13 4.667446 207.68.183.32 130.207.231.13 HTTP HTTP/1.1 200 OK (text/html) 14 4.667585 207.68.183.32 130.207.231.13 HTTP Continuation or non-HTTP traffic 15 4.667669 130.207.231.13 207.68.183.32 TCP 1048 > http [ACK] Seq=416 Ack=2521 Win=65535 Len=0 16 4.744921 207.68.183.32 130.207.231.13 HTTP Continuation or non-HTTP traffic 17 4.745025 207.68.183.32 130.207.231.13 HTTP Continuation or non-HTTP traffic 18 4.745089 130.207.231.13 207.68.183.32 TCP 1048 > http [ACK] Seq=416 Ack=5041 Win=65535 Len=0 19 4.745157 207.68.183.32 130.207.231.13 HTTP Continuation or non-HTTP traffic 20 4.745208 130.207.231.13 207.68.183.32 TCP 1048 > http [ACK] Seq=416 Ack=6301 Win=65535 Len=0 21 4.745259 207.68.183.32 130.207.231.13 HTTP Continuation or non-HTTP traffic 22 4.815911 130.207.231.2 224.0.0.2 HSRP Hello (state Active) 23 4.822330 207.68.183.32 130.207.231.13 HTTP Continuation or non-HTTP traffic 24 4.822433 130.207.231.13 207.68.183.32 TCP 1048 > http [ACK] Seq=416 Ack=8821 Win=65535 Len=0 25 4.822506 207.68.183.32 130.207.231.13 HTTP Continuation or non-HTTP traffic 26 4.822532 207.68.183.32 130.207.231.13 HTTP Continuation or non-HTTP traffic 27 4.822568 130.207.231.13 207.68.183.32 TCP 1048 > http [ACK] Seq=416 Ack=10534 Win=65535 Len=0 28 5.355137 130.207.231.3 224.0.0.2 HSRP Hello (state Standby) 29 5.383050 130.207.231.3 224.0.0.2 HSRP Unknown (state Initial) 30 6.888133 130.207.231.2 224.0.0.5 OSPF Hello Packet 31 7.727718 130.207.231.2 224.0.0.2 HSRP Hello (state Active) 32 7.766767 130.207.231.2 Broadcast ARP Who has 130.207.231.135? Tell 130.207.231.2 33 8.207042 130.207.231.3 224.0.0.2 HSRP Hello (state Standby) 34 8.927825 130.207.231.3 224.0.0.13 PIMv2 Assert 35 9.477908 130.207.231.13 130.207.231.94 DNS Standard query A c.msn.com 36 9.479365 130.207.231.94 130.207.231.13 DNS Standard query response A 65.54.140.158 A 207.68.177.126 37 9.480199 130.207.231.13 65.54.140.158 TCP 1049 > http [SYN] Seq=0 Ack=0 Win=65535 Len=0 MSS=1260 38 9.557634 65.54.140.158 130.207.231.13 TCP http > 1049 [SYN, ACK] Seq=0 Ack=1 Win=16384 Len=0 MSS=1460 39 9.557683 130.207.231.13 65.54.140.158 TCP 1049 > http [ACK] Seq=1 Ack=1 Win=65535 Len=0 40 9.557977 130.207.231.13 65.54.140.158 HTTP GET /c.gif?di=340&pi=7317&ps=83527&tp=http://www.msn.com/&rf= HTTP/1.1
Same as previous page except the ethereal HTTP decoding was turned off to show the underlying TCP segments No. Time Source Destination Protocol Info 1 0.000000 130.207.231.3 224.0.0.5 OSPF Hello Packet 2 1.237429 130.207.231.2 Broadcast ARP Who has 130.207.231.135? Tell 130.207.231.2 3 1.289206 130.207.231.2 Broadcast ARP Who has 130.207.231.29? Tell 130.207.231.2 4 1.872016 130.207.231.2 224.0.0.2 HSRP Hello (state Active) 5 2.363230 130.207.231.3 224.0.0.2 HSRP Hello (state Standby) 6 4.489165 130.207.231.13 130.207.231.94 DNS Standard query A www.msn.com 7 4.496284 130.207.231.94 130.207.231.13 DNS Standard query response CNAME www.msn.com.nsatc.net A 207.68.183.32 8 4.500321 130.207.231.13 207.68.183.32 TCP 1048 > http [SYN] Seq=0 Ack=0 Win=65535 Len=0 MSS=1260 9 4.577502 207.68.183.32 130.207.231.13 TCP http > 1048 [SYN, ACK] Seq=0 Ack=1 Win=8190 Len=0 MSS=1260 10 4.577607 130.207.231.13 207.68.183.32 TCP 1048 > http [ACK] Seq=1 Ack=1 Win=65535 Len=0 11 4.578024 130.207.231.13 207.68.183.32 TCP 1048 > http [PSH, ACK] Seq=1 Ack=1 Win=65535 Len=415 12 4.658821 130.207.231.2 Broadcast ARP Who has 130.207.231.29? Tell 130.207.231.2 13 4.667446 207.68.183.32 130.207.231.13 TCP http > 1048 [ACK] Seq=1 Ack=416 Win=8190 Len=1260 14 4.667585 207.68.183.32 130.207.231.13 TCP http > 1048 [PSH, ACK] Seq=1261 Ack=416 Win=8190 Len=1260 15 4.667669 130.207.231.13 207.68.183.32 TCP 1048 > http [ACK] Seq=416 Ack=2521 Win=65535 Len=0 16 4.744921 207.68.183.32 130.207.231.13 TCP http > 1048 [ACK] Seq=2521 Ack=416 Win=8190 Len=1260 17 4.745025 207.68.183.32 130.207.231.13 TCP http > 1048 [ACK] Seq=3781 Ack=416 Win=8190 Len=1260 18 4.745089 130.207.231.13 207.68.183.32 TCP 1048 > http [ACK] Seq=416 Ack=5041 Win=65535 Len=0 19 4.745157 207.68.183.32 130.207.231.13 TCP http > 1048 [ACK] Seq=5041 Ack=416 Win=8190 Len=1260 20 4.745208 130.207.231.13 207.68.183.32 TCP 1048 > http [ACK] Seq=416 Ack=6301 Win=65535 Len=0 21 4.745259 207.68.183.32 130.207.231.13 TCP http > 1048 [PSH, ACK] Seq=6301 Ack=416 Win=8190 Len=1260 22 4.815911 130.207.231.2 224.0.0.2 HSRP Hello (state Active) 23 4.822330 207.68.183.32 130.207.231.13 TCP http > 1048 [ACK] Seq=7561 Ack=416 Win=8190 Len=1260 24 4.822433 130.207.231.13 207.68.183.32 TCP 1048 > http [ACK] Seq=416 Ack=8821 Win=65535 Len=0 25 4.822506 207.68.183.32 130.207.231.13 TCP http > 1048 [ACK] Seq=8821 Ack=416 Win=8190 Len=1260 26 4.822532 207.68.183.32 130.207.231.13 TCP http > 1048 [PSH, ACK] Seq=10081 Ack=416 Win=8190 Len=453 27 4.822568 130.207.231.13 207.68.183.32 TCP 1048 > http [ACK] Seq=416 Ack=10534 Win=65535 Len=0 28 5.355137 130.207.231.3 224.0.0.2 HSRP Hello (state Standby) 29 5.383050 130.207.231.3 224.0.0.2 HSRP Unknown (state Initial) 30 6.888133 130.207.231.2 224.0.0.5 OSPF Hello Packet 31 7.727718 130.207.231.2 224.0.0.2 HSRP Hello (state Active) 32 7.766767 130.207.231.2 Broadcast ARP Who has 130.207.231.135? Tell 130.207.231.2 33 8.207042 130.207.231.3 224.0.0.2 HSRP Hello (state Standby) 34 8.927825 130.207.231.3 224.0.0.13 PIMv2 Assert 35 9.477908 130.207.231.13 130.207.231.94 DNS Standard query A c.msn.com 36 9.479365 130.207.231.94 130.207.231.13 DNS Standard query response A 65.54.140.158 A 207.68.177.126 37 9.480199 130.207.231.13 65.54.140.158 TCP 1049 > http [SYN] Seq=0 Ack=0 Win=65535 Len=0 MSS=1260 38 9.557634 65.54.140.158 130.207.231.13 TCP http > 1049 [SYN, ACK] Seq=0 Ack=1 Win=16384 Len=0 MSS=1460 39 9.557683 130.207.231.13 65.54.140.158 TCP 1049 > http [ACK] Seq=1 Ack=1 Win=65535 Len=0 40 9.557977 130.207.231.13 65.54.140.158 TCP 1049 > http [PSH, ACK] Seq=1 Ack=1 Win=65535 Len=487
HSRP = hot standby routing protocol. HSRP allows one router to automatically assume the function of the second router if the second router fails. PIMv2 = protocol independent multicast