Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Data Communication & Networks: Assignment #2 Solution - CSCI-GA.2662-001, Exams of Network Technologies and TCP/IP

This command also display Ethernet statistics, the IP routing table, IPv4 statistics (for the IP, ICMP, TCP, and UDP protocols), and IPv6 statistics (for the ...

Typology: Exams

2022/2023

Uploaded on 05/11/2023

tiuw
tiuw 🇺🇸

4.7

(18)

288 documents

1 / 13

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
New York University
Computer Science Department
Courant Institute of Mathematical Sciences
Course Title: Data Communication & Networks Course Number:CSCI-GA.2662-001
Instructor: Jean-Claude Franchitti Session: 2
Assignment #2 Solution
1. Problem 1 Modeling the network usage/performance of HTML pages download
Assuming you are surfing the Web and click on a link to an HTML page that never downloaded before,
how much time will it take for your client browser to download the page? Please take into account
the number of hops (and RTTs) it takes to obtain the IP address of the server hosting the page via a
DNS lookup, the RTT and transmission time to communicate with the server hosting the various
objects contained in the target HTML page, and consider the various HTTP configuration scenarios
that were discussed in class
Answer:
The DNS lookup time will vary depending on whether or not the DNS entry is cached within the
hierarchy of DNS servers (e.g., root, TLD, Authoritative, and Provider). We can refer to the DNS lookup
time at tDNS.
For non-persistent HTTP connections, it takes 2*RTT + Ttransmit where RTT is the round trip time and
Ttransmit is the time it take to transfer an HTML object from the HTTP server to the client browser. In the
case of non-persistent connections, it takes one RTT to setup a TCP connection and another RTT to get
the HTTP response.
For a persistent connection, it takes one RTT to open the initial connection, which stays open for the
duration of the keep alive, and a single RTT per HTML object thereafter.
So as an example, assuming we are trying to load an HTML page that contains four objects within it, it
will take the following amount of time to load the page:
Non-persistent HTTP connection: 4*(2RTT + Ttransmit) + tDNS
Persistent HTTP connection: 2*RTT + 4* Ttransmit
+ tDNS
pf3
pf4
pf5
pf8
pf9
pfa
pfd

Partial preview of the text

Download Data Communication & Networks: Assignment #2 Solution - CSCI-GA.2662-001 and more Exams Network Technologies and TCP/IP in PDF only on Docsity!

New York University

Computer Science Department

Courant Institute of Mathematical Sciences

Course Title: Data Communication & Networks Course Number: CSCI-GA.2662- Instructor: Jean-Claude Franchitti Session: 2

Assignment #2 Solution

1. Problem 1 – Modeling the network usage/performance of HTML pages download Assuming you are surfing the Web and click on a link to an HTML page that never downloaded before, how much time will it take for your client browser to download the page? Please take into account the number of hops (and RTTs) it takes to obtain the IP address of the server hosting the page via a DNS lookup, the RTT and transmission time to communicate with the server hosting the various objects contained in the target HTML page, and consider the various HTTP configuration scenarios that were discussed in class Answer: The DNS lookup time will vary depending on whether or not the DNS entry is cached within the hierarchy of DNS servers (e.g., root, TLD, Authoritative, and Provider). We can refer to the DNS lookup time at tDNS. For non-persistent HTTP connections, it takes 2RTT + Ttransmit where RTT is the round trip time and Ttransmit is the time it take to transfer an HTML object from the HTTP server to the client browser. In the case of non-persistent connections, it takes one RTT to setup a TCP connection and another RTT to get the HTTP response. For a persistent connection, it takes one RTT to open the initial connection, which stays open for the duration of the keep alive, and a single RTT per HTML object thereafter. So as an example, assuming we are trying to load an HTML page that contains four objects within it, it will take the following amount of time to load the page: Non-persistent HTTP connection: 4(2RTT + Ttransmit) + tDNS Persistent HTTP connection: 2RTT + 4 Ttransmit +^ tDNS

2. Problem 2 – Analyzing network usage/performance improvements in mainstream Web architectures (a) Research and explain the Common Gateway Interface (CGI) architecture that was created in the mid-1990s to add support for transactional services to Web based client-server applications. Model the performance of individual transactions in this context (only consider the transactional link used to invoke a remote program in your model). Answer: The Common Gateway Interface (CGI) architecture leverage the original Web architecture, which was designed to return information contained in static HTML pages and/or interact with users via HTML forms, and ads the ability to insert links to programs (within HTML pages or as actions on forms) that can be executed on the server side in a single-threaded fashion. Typical CGI programs are calling dynamic scripts (e.g., Bourne Shell, Perl, and PhP scripts) that execute in their own separate process. Therefore, multiple concurrent requests will execute in a separate process and, as a result, request response time decreases as the number of concurrent requests increases. When the Web servers detects a request for a link to a program, it spawns a process to run the corresponding script, which then executes and assembles an HTML response which is passed back to the Web server and sent back by the Web server to the original client that issued the request. (b) Research and explain the evolution of Web Frameworks since the mid-1990s and point out notorious performance improvements. Answer: A tag-based approach was developed to augment the set of HTML tags additional tags (e.g., ColdFusion Markup Language). Another approach was based on using a script-based approach that allowed the meshing of logic with HTML markup (e.g., PHP, ASP). These new tagging and scripting capabilities made it easier to generate HTML and it became possible at some point to process these tags and scripts in the same process as the Web server to optimize performance. A significant performance improvement was achieved with the introduction of application server technologies by Sun Microsystem and Microsoft. The two companies did not wait for the CORBA standard to fully emerge and started developing their own application server technology (i.e., Sun Microsystems’ J2EE then JEE and Microsoft (DCOM, COM+, ASP.Net). The major advantage of these technologies was to provide single process multithreaded engines (e.g., Sun Microsystems’ Servlet Containers) to execute logic without having to spawn processes for each client request. More recently, another significant performance improvement was achieved via the use of AJAX technology made it possible to eliminate the need for Web page refreshes to dynamically render portions of Web content. Please see below for recommended readings detailing specific Web frameworks and their evolution:

connections are supported for outgoing emails Port 993 is used for IMAP Port 995 is used for POP and port 993 is used for IMAP Port 995 is used for POP and port 993 is used for IMAP Port 110 is used for regular IMAP and port 993 is used for SSL IMAP. Port 110 is used for regular POP connection and port 995 is used for SSL POP Uses port 995 for POP and 993 for IMAP Port 587 is used for SMTP Port 465 is used if SSL is used, otherwise port 587 is used. If SSL is used, it is only possible to send emails to Gmail or Google applications users Either port 465 for SSL or 587 for TLS are used. Mails can be sent either way TLS and port 587 are the only options for SMTP connections Only TLS can be used for outgoing connection and both ports 25 and 587 can be used Non- conformant to RFC 5322 and RFC 3696 due to the fact that it does not support more than 21 characters for local part of the username (the specification mentions that applications have to support 64 octets). It also does not support non- encrypted connections Non-conformant to RFCs 5322/3696 due to the fact that it does not support IPv4 address literals in email addresses. It also does not support non-encrypted connections Mostly compliant to RFCs 5322/ but does not support non- encrypted connections Requires mail to be compliant to RFC 282 1 / 2822 (these RFCs are obsolete at this point). It also does not support non-encrypted connections Mostly compliant to RFCs 5322/3696 but does not support non-encrypted connections

(b) What specific information can you obtain using email headers and how do you gain access to such in the various approaches mentioned in 3. (a). Please provide examples and corresponding screenshots as necessary. Answer: As per RFC 5822, the information given in the table below can be placed in email headers: Field Min Number Max number Additional Info Trace 0 unlimited resent-date 0* unlimited* One per block, required if other resent fields are present resent-from 0 unlimited* One per block resent- sender 0* unlimited* One per block, MUST occur with multi-address resent-from - see 3.6. resent-to 0 unlimited* One per block resent-cc 0 unlimited* One per block resent-bcc 0 unlimited* One per block resent-msg- id 0 unlimited* One per block orig-date 1 1 from 1 1 sender 0* 1 MUST occur with multi-address from reply-to 0 1 to 0 1 cc 0 1 bcc 0 1 message-id 0* 1 SHOULD be present in-reply-to 0* 1 SHOULD occur in some replies references 0* 1 SHOULD occur in some replies subject 0 1 comments 0 unlimited keywords 0 unlimited optional- field 0 unlimited

This tool is used to obtain details information about network connections. It displays all current TCP/IP network configuration values and refreshes Dynamic Host Configuration Protocol (DHCP) (release and renew) and Domain Name System (DNS) setting (flushdns). The default gateway, subnet mask, and state of the network adapter are also accessible via this command. The syntax of the command is shown below: ipconfig [/all] [/renew [Adapter]] [/release [Adapter]] [/flushdns] [/displaydns] [/registerdns] [/showclassid Adapter] [/setclassid Adapter [ClassID]] Using the “/all” gives DNS, MAC, and other detailed information about each network component. Using “/release” forces the network adapter to release the current IP address. Using “/renew” forces the network adapter to renew the current IP address To learn more about the parameters available for any command, you can add a slash “/” after the command name and it will show all the parameters available with that particular command. NETSTAT: Netstat is the command used in Windows (lsof is used in Linux/Unix).

This command is used to display the number of active TCP socket connections, the ports on which the computer is listening, and to which processes these sockets belong. This command also display Ethernet statistics, the IP routing table, IPv4 statistics (for the IP, ICMP, TCP, and UDP protocols), and IPv6 statistics (for the IPv6, ICMPv6, TCP over IPv6, and UDP over IPv protocols). When used without any parameters, netstat displays all active TCP connections. Using “\a” shows all connections and listening ports. Using “\b” displays the executable programs using the corresponding socket. The syntax of the command is shown below: netstat [-a] [-b] [-e] [-f] [-n] [-o] [-p proto] [-r] [-s] [-x] [-t] [interval] Please type “netstat –a –b” in the command window to see the output. GPRESULT (Group Policy Settings):

TRACERT (Trace Route): This command is a route-tracing utility used to determine the path that an IP packet has taken to reach its final destination. The command shows all the hops to the destination. The command sends the first echo packet with a TTL of 1 and the TTL is then incremented by 1 for each subsequent transmission until the target responds or the maximum TTL is reached. The route is determined by examining the ICMP Time Exceeded messages sent back by intermediate routers (some routers drop packets with expired TTLs and are invisible to tracert). Please type “tracert [IP Address]” or “tracert [Host Name]” from the command prompt to run that command.

The syntax of the command is shown below: Usage: tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout] [-R] [-S srcaddr] [-4] [-6] target_name PING: This command is used to send ICMP echo packets to the destination server (e.g., to check whether a host is alive). This command also provides other useful information such as TTL (Time to Live), Round trip time, packet loss, etc. The command line usage is as follows: Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS] [-r count] [-s count] [[-j host-list] | [-k host-list]] [-w timeout] [-R] [-S srcaddr] [-c compartment] [-p] [-4] [-6] target_name Typing “ping google.com” on the command line results in the following: NSLOOKUP:

A node is a “good” node if it has responded to a query within the last 15 minutes. When a bucket is full with good nodes, it is split into two buckets with ranges 0 to 2^159 and 2^159 to 2^160, only if the node ID falls into the range of the bucket, otherwise the good node is discarded. To identify peer churn, the good nodes are queried on a regular basis, so a peer that has churned will not respond to the query, in which case it will be queried once more before being removed from the bucket. A new good node will then replace it in the bucket. (b) What potential issues need to be considered to optimize the performance of DHT usage in practical BitTorrent deployments? Please provide examples of issues and suggested improvements and estimate the performance savings. Answer: The process of updating the DHT of nodes must be optimized to ensure scalability. Requiring each node to keep track of the other nodes require lots of memory as well as computing overhead as the number of peers increases. A more efficient approach consists of using a circular DHT that only requires nodes to keep track of successor and predecessor nodes (N/2 messages exchanges as required in that case). The approach employed by practical BitTorrent networks is more efficient in that it requires each node to keep track of the closest nodes by computing the aforementioned distance metric (see 5.a). Using this approach, the overhead of maintaining peer information and the number of messages that need to be exchanged is much lower and the actual complexity is (^ ( ))^ for both the number of messages that are exchanged and the number of peers that need to be tracked.