Thursday, October 17, 2013

Chapter 2 HW

HW2
P2) The client commands that are supported by RFC are
-          CONTROL COMMANDS
o   USER NAME (USER)
o   PASSWORD (PASS)
o   ACCOUNT (ACCT)
o   CHANGE WORKING DIRECTORY (CWD)
o   CHANGE TO PARENT DIRECTORY (CDUP)
o   STRUCTURE MOUNT (SMNT)
o   REINITIALIZE (REIN)
o   LOGOUT (QUIT)

-          TRANSFER COMMANDS
o   DATA PORT (PORT)
o   PASSIVE (PASV)
o   REPRESENTATION TYPE (TYPE)
o   FILE STRUCTURE (STRU)
o   TRANSFER MODE (MODE)

-          FTP SERVICE COMMANDS
o   RETRIEVE (RETR)
o   STORE (STOR)
o   STORE UNIQUE (STOU)
o   APPEND (APPE)
o   ALLOCATE (ALLO)
o   RESTART (TEST)
o   RENAME FROM  (RNFR)
o   RENAME TO (RNTO)
o   ABORT (ABOR)
o   DELETE (DELE)
o   REMOVE DIRECTORY (RMD)
o   MAKE DIRECTORY (MKD)
o   PRINT WORKING DIRECTORY (PWD)
o   LIST (LIST)
o   NAME LIST (NLIST)
o   SITE PARAMETERS (SITE)
o   SYSTEM (SYST)
o   STATUS (STAT)
o   HELP (HELP)
o   NOOP (NOOP)
P3) The application layer protocols are DNS and HTTP. The transport layer protocols are UDP for DNS and TCP for HTTP.

P6)a) Either the client or the server can indicate to the other that it is going to close the persistent connection. By using the connection token “close” in the header of the request or the reply.
b) HTTP does not provide any encryption services
c) Yes, but it is not recommended. A single-user client should not maintain more than 2 connections with any proxy or server.
d) “A client might have started to send a new request at the same time that the server has decided to close the "idle" connection. From the server's point of view, the connection is being closed while it was idle, but from the client's point of view, a request is in progress.”

P7) The total amount of time to retrieve the IP address would be

RTT(1) + RTT(2) +RTT(3) + … + RTT(n)

Next part – A TCP connection has to be established once the IP address is known. Then another RTT(o) has to be sent to get the small object. So the total response time would be equal to

2RTT(o) + RTT(1) + RTT(2) + RTT(3) + … + RTT(n)

P8) 
Part A - RTT(1)+ RTT(2) + … + RTT(n) + 2RTT(o) + 8*2RTT(o)
Part B - RTT(1) + RTT(2) + … + RTT(n) + 2RTT(o) + 2*2RTT(o)
Part C - RTT(1) + RTT(2) + … + RTT(n) + 2RTT(o) + RTT(o)

P10) First we need to denote the propagation delay for each of the downloaded objects which will be x. Next since a parallel download splits up the bandwidth by how many parallel downloads there are, the 150 bits/sec bandwidth for 10 connections would become 15 bits/sec.  So for the non-persistant connection, we see that the total time needed to download all the objects is
200/150 + x + 200/150 + x + 200/150 + x + 100,000/150 + x
+
200/15 + x + 200/15 + x + 200/15 + x + 100,000/15 + x
______________________________________________
7377 + 8*x

Then for the PERSISTENT connection, the total time needed is
200/150 + x + 200/150 + x + 200/150 + x + 100,000/150 + x
+
10(200/150 + x + 100,000/150 + x)
______________________________________________
7351 + 24*x

-- There is no big gain with the persistent connection over the non-persistent connection.

P13) The MAIL FROM: in SMTP is just a message from the SMTP client that figures out the sender of the mail to the SMTP server. The From: is not a SMTP message but just a regular line of text in the mail.
P14) A line with just a period is used to mark the end of a message body. HTTP cannot use the same method used by SMTP because HTTP could be binary where the SMTP MUST be in ASCII.

P15) MTA stands for Mail Transfer Agents. The malicious host is IP address 58.88.21.177 and the e-mail address is inbnd55.exchangeddd.com. You can see that this host is trying to hide behind the honest looking e-mail address tennis5… because the e-mail is BY inbnd and from tennis5.

P16) A good way to find out would be to take periodic looks at the DNS cache of the department. The web servers that are more popular are going to the ones that appear more frequently in the DNS cache.

No comments:

Post a Comment