CNET Sessional-II (Solution) Spring-2024
CNET Sessional-II (Solution) Spring-2024
DNS Root
b) Between steps 2 and 3, where does the root DNS forward the
request to? Answer with 'DNS Local', 'DNS Root', 'DNS TLD',
or 'DNS Authoritative'.
DNS TLD
d) In steps 6-8, the response is sent back in the reverse direction until it reaches the user. What type of
DNS record is returned?
e) Which type of query is considered best practice and why? Iterative or Recursive?
Iterative is considered 'best practice' because it puts less strain on the Root and TLD DNS servers
Page 1 of 4
National University of Computer and Emerging Sciences
FAST School of Computing Spring-2024 Islamabad Campus
Q2: DNS AND HTTP DELAYS [08 marks]
Suppose within your Web browser you click on a link to obtain a Web page. The IP address for the
associated URL is not cached in your local host, so a DNS lookup is necessary to obtain the IP address.
Suppose that two DNS servers are visited before your host receives the IP address from DNS. The first
DNS server visited is the local DNS cache, with an RTT delay of RTT0 = 2 msecs. The second DNS
server contacted has an RTT1 of 26 msecs. Initially, let's suppose that the Web page associated with the
link contains exactly one object, consisting of a small amount of HTML text. Suppose the RTT between
the local host and the Web server containing the object is RTTHTTP = 1 msecs.
a) Assuming zero transmission time for the HTML object, how much
time (in msec) elapses from when the client clicks on the link until
the client receives the object?
The time from when the Web request is made in the browser until
the page is displayed in the browser is: RTT0 + RTT1 + 2* RTTHTTP
= 2 + 26 + 2*1 = 30 msecs.
Note that 2 RTTHTTP are needed to fetch the HTML object - one
RTTHTTP to establish the TCP connection, and then one RTTHTTP to
perform the HTTP GET/response over that TCP connection.
b) Now suppose the HTML object references 5 very small objects on the same server. Neglecting
transmission times, how much time (in msec) elapses from when the client clicks on the link until
the base object and all 5 additional objects are received from web server at the client, assuming non-
persistent HTTP and no parallel TCP connections?
The time from when the Web request is made in the browser until the page is displayed in the
browser is: RTT0 + RTT1 + 2* RTTHTTP + 2*5* RTTHTTP = 2 + 26 + 2*1 + 2*5*1 = 40 msecs
Note that two RTTHTTP delays are needed to fetch the base HTML object - one RTTHTTP to establish
the TCP connection, and one RTTHTTP to send the HTTP request, and receive the HTTP reply. Then,
serially, for each of the 5 embedded objects, a delay of 2* RTTHTTP is needed - one RTTHTTP to
establish the TCP connection and then one RTTHTTP to perform the HTTP GET/response over that
TCP connection.
c) Suppose the HTML object references 5 very small objects on the same server, but assume that the
client is configured to support a maximum of 5 parallel TCP connections, with non-persistent
HTTP.
Since there are only 5 objects, there's a delay of 28 msec for the DNS query, two RTTHTTP for the
base page, and 2*RTTHTTP for the objects since the requests for these can be run in parallel. The
total is 28 + 2 + 2 = 32 msec. As in 2 above, 2 RTTHTTP are needed to fetch the base HTML object
- one RTTHTTP to establish the TCP connection, and one RTTHTTP to send the HTTP request
and receive the HTTP reply containing the base HTML object. Once the base object is received at
the client, the 5 HTTP GETS for the embedded objects can proceed in parallel. Each (in parallel)
requires two RTTHTTP delays - one RTTHTTP to set up the TCP connection, and one RTTHTTP
to perform the HTTP GET/response for an embedded object.
Page 2 of 4
National University of Computer and Emerging Sciences
FAST School of Computing Spring-2024 Islamabad Campus
Q3: Look at the scenario below, where Alice sends an email to Bob. [8 marks]
Note: For the questions below, assume both Bob's and Alice's user agents use the POP3 protocol.
a) At point 2 in the diagram, what protocol is being used?
TCP protocol
'push' protocol
'pull' protocol
port 25
port 110
Page 3 of 4
National University of Computer and Emerging Sciences
FAST School of Computing Spring-2024 Islamabad Campus
Q4: In this problem, you'll compare the time needed to distribute a file that is initially located at
a server to clients via either client-server download or peer-to-peer download. [5+1+5+1 marks]
The problem is to distribute a file of size F = 4 Gbits to each of these 5 peers. Suppose the server has
an upload rate of u = 76 Mbps.
The 5 peers have upload rates of: u1 = 28 Mbps, u2 = 22 Mbps,
u3 = 24 Mbps, u4 = 25 Mbps, and u5 = 27 Mbps
The 5 peers have download rates of: d1 = 22 Mbps, d2 = 29
Mbps, d3 = 14 Mbps, d4 = 11 Mbps, and d5 = 17 Mbps
a) What is the minimum time (in seconds) needed to distribute
this file from the central server to the 5 peers using the
client-server model? Show complete working.
The minimum time needed to distribute the file = max of: N*F / US and F / dmin = 363.64 seconds.
b) For part a, what is the root cause of this specific minimum time? Answer as 's' or 'ci' where 'i' is the
client's number.
c) What is the minimum time (in seconds) needed to distribute this file using peer-to-peer download?
Show complete working.
The minimum time needed to distribute the file = max of: F / US, F / dmin, and N * F / sum of ui
for all i + uS = 363.64 seconds
d) For part c, what is the root cause of this specific minimum time: the server (s), client (c), or the
combined upload of the clients and the server (cu)
Page 4 of 4