Review Question # 9

Review Question # 9

NFS-612 Assignment #2 (Fall –2001)

CHAPTER # 2

Review Question # 9 :

In persistent TCP with pipelining server leaves the TCP connection open after sending the response. Subsequent requests and responses between the same client and server can be sent over the same connection. Due to the pipelining HTTP client issues a request as soon as it encounters a reference. Thus the HTTP client can make back-to-back requests for the referenced objects. When the server receives the requests, it can send the objects back to back. If all the requests are sent back to back and all the responses are sent back to back, then only one RTT is expended for all the referenced objects. The pipelined TCP connection hangs for a smaller fraction of time

In non-persistent TCP without pipelining the client issues the new request only when the previous response have been received. In this case each of the reference object experiences one RTT in order to request and receive the object. Also after the server sends an object over the persistent TCP connection, the connection hangs--does nothing--while it waits for another request to arrive. This hanging wastes server resources.

HTTP/1.1 uses persistent connection with pipelining as its default.

Review Question # 10 :

Following is the required request and its result.

mason2.gmu.edu> telnet 80

Trying 193.55.113.142...

Connected to fantasia.eurecom.fr.

Escape character is '^]'.

GET /~ross/index.html HTTP/1.0

HTTP/1.1 200 OK

Date: Mon, 08 Oct 2001 18:07:12 GMT

Server: Apache/1.3.19 (Unix) PHP/4.0.4pl1

Last-Modified: Fri, 09 Feb 2001 17:10:24 GMT

ETag: "19ad1-265c-3a842480"

Accept-Ranges: bytes

Content-Length: 9820

Connection: close

Content-Type: text/html

<html>

<head>

.

.

.

</html>

Connection closed by foreign host.

mason2.gmu.edu> telnet 80

Trying 193.55.113.142...

Connected to fantasia.eurecom.fr.

Escape character is '^]'.

GET /~ross/index.html HTTP/1.0

If-modified-since: Fri, 09 Feb 2001 17:10:24 GMT

HTTP/1.1 304 Not Modified

Date: Mon, 08 Oct 2001 18:09:51 GMT

Server: Apache/1.3.19 (Unix) PHP/4.0.4pl1

Connection: close

ETag: "19ad1-265c-3a842480"

Connection closed by foreign host.

mason2.gmu.edu>

Review Question # 15 :

In download-and-delete mode user cannot check his already checked mail from the other machine. Once the mail is downloaded to one machine it is deleted form the server and no more on the server to appear again on some other machine on user request. In this way user mail is scattered in this mode.

In download-and-keep mode user can check his mail any time and anywhere. It is because in this mode server do not delete the mail and it is always present on the server. So user can check the mail at home and can check the same mail at office PC.

Review Question # 18 :

YES. It is possible for the organization’s mail server and the web server to have the identical alias for the hostname.

The type of RR would be MX.

Problem # 4:

Suppose

RTT0 = RTT between Server (containing the object) and local Host

n = Number of DNS servers visited.

Now

Time-- bring the object at client from server = 2* RTT + Transmission time( zero our case)

As DNS use UDP so no shack handing process is there.

SO

Required time = (RRT1 + RRT2 +…….+RRTn) + 2*RRT0 + 2*RRT 0

Required time = (RRT1 + RRT2 +…….+RRTn) + 4*RRT0 ( 2 for link, 2 for object)

Problem # 5:

HTML file plus 3 small indexes objects on the same server.

a)Non persistent HTTP with no parallel TCP connections.

Total Time = (RRT1 + RRT2 +…….+RRTn) + 8*RRT0 ( 2 for link, 2 for each object)

b)Non persistent HTTP with parallel TCP connections.

Total Time = (RRT1 + RRT2 +…….+RRTn) + 4*RRT0 ( 2 for link, 2 for other 3 objects)

c)Persistent HTTP with pipelining TCP connections.

Total Time = (RRT1 + RRT2 +…….+RRTn) + 2RRT0 ( 1 for TCP connection, 1 for all other references)

Problem # 9:

a) If we run TCPClient before TCP Server then the result would be as follows

osf1.gmu.edu> java TCPClient

java.net.ConnectException: Connection refused

at java.net.PlainSocketImpl.doConnect(Compiled Code)

at java.net.PlainSocketImpl.connectToAddress(Compiled Code)

at java.net.PlainSocketImpl.connect(Compiled Code)

at java.net.Socket.<init>(Compiled Code)

at java.net.Socket.<init>(Compiled Code)

at TCPClient.main(Compiled Code)

Connection refused because, it is the requirement of the TCPClient that TCPServer should be in running condition to make its request possible.

b)If we run UDPClient before UDPServer then

The program runs fine. Because for the UDP it is not the shake hand process, which invoked when UDPClient is executed.

A representative execution is as follows.

chrono ~ javac UDPClient.java

chrono ~ java UDPClient

It is the test line. May God help us.

FROM SERVER:IT IS THE TEST LINE. MAY GOD HELP US.

chrono ~

c)If we use different port # for the client and server side then

There is no response from the server because it could only response to the specific client process. And that client process does not exists here.

CHAPTER # 3

Problem # 1:

a) Segment from Client A to Server S for Telnet

Source Port # =x

Destination Port # =23

b) Segment from Client B to Server S for Telnet

Source Port # =x

Destination Port # =23

c) Segment from Server S to Client A for Telnet

Source Port # =23

Destination Port # =x

d) Segment from Server S to Client B for Telnet

Source Port # =23

Destination Port # =x

e) If A and B are two different Hosts, It is possible for the Segments from Client A to Server S and from Client B to Server S to have the same port numbers. It is because IP addresses are also included in the segments to recognize the correct host.

f) No, In case of same host it is not possible to have the same port number in the given segments. Because In this case server process could not recognize the client process.

Problem # 2:

Given: 01010101, 01110000, and 11001100

Sum of first two numbers is

01010101

01110000

11000101

Adding 3rd number

11000101

11001100

10010001

1’s compliment will be 01101110

UDP takes the 1’s compliment of the sum and not the sum due to the following reasons.

At the receiving end the sum of all the bits including the check sum (1’s complement of the sum) should be zero when no errors are introduced into the packets

With 1’s complement schema if the sum of all the bits and the check sum is in the order of 1111…. then it means no error in the packet. This is the way in which receiver detects error.

No it is not possible that 1-bit error go undetected.

Yes , in 2-bit error case error can go undetected.

[1/6]