Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Faculty of Computer & Information Instructor: Dr.

Islam Hegazy
Sciences, Ain Shams University Academic year: 2021-2022
Course Name: Computer Networks Exam: (Midterm) 29/08/2022
Course code: CIS 365 Duration: 1 hour
Year: (Summer term) 3rd undergraduate Total Grade: 30

Answer the following 3 questions in 2 pages: (Total marks: 30)


Question 1: marks: 13
a)

1. Give 2 examples of guided transmission media and 2 examples of unguided transmission


media. (2 marks)
2. What does a network protocol define? (2 marks)
3. A network of 15 users and bandwidth 1 Gbps. Each user can be active for 25% of the
time and uses only 100 Mbps.
a. How many users can use the link in parallel if circuit-switching is used? (2 marks)
b. What is the probability that a user is active in packet-switching mode? (2 marks)
c. What is the probability that exactly 5 users are active in packet-switching mode?
(2 marks)
d. What is the probability that at most 2 users are active in packet-switching
mode? (3 marks)
Sol:
1. Guided: CAT5/6 cables, fiber optics.
Unguided: WiFi, Satellite.
2. A network protocol defines format, order of messages sent and received among
network entities, and actions taken on message transmission/reception.
3. N = 100, R = 1 * 109 bps, Ru = 100 * 106 bps
a. N for circuit switching = R/Ru = 1 * 109 / 100 * 106 = 10 users
b. p = 0.25
𝟏𝟓 𝟏𝟓
c. P(exactly 5 active users) = ( ) 𝒑𝟓 (𝟏 − 𝒑)𝟏𝟎 = ( ) 𝟎. 𝟐𝟓𝟓 (𝟎. 𝟕𝟓)𝟏𝟎 = 0.165
𝟓 𝟓
𝟏𝟓 𝟏𝟓
d. P(at most 3 active users) = ( ) 𝟎. 𝟐𝟓 (𝟎. 𝟕𝟓)𝟏𝟓 + ( ) 𝟎. 𝟐𝟓𝟏 (𝟎. 𝟕𝟓)𝟏𝟒 +
𝟎
𝟎 𝟏
𝟏𝟓
( ) 𝟎. 𝟐𝟓𝟐 (𝟎. 𝟕𝟓)𝟏𝟑 = 0.0134 + 0.0668 + 0.1559 = 0.2361
𝟐
Question 2: marks: 10
a)

1. What does it mean that HTTP is a stateless protocol? (2 marks)


2. Explain why a web cache (proxy server) works as a server and a client. (3 marks)
3. Explain how the receiver controls the flow of the sender in TCP protocol? (2 marks)
4. A client is connecting to a web server to download a web page of size 100 KB over a
non-persistent connection. The web page contains 6 objects. Three of the objects are of
size 200 KB each and the other three are of size 500 KB each. The RTT between the
client and the server is 100 msec and the transmission time for a 100 KB is 1 sec. What is
the required time to download all the files if parallel connections are to be utilized?
(3 marks)
Sol:
1. It means that the server maintains no information about past client requests.
2. Web browser sends all HTTP requests to web cache and if the requested object is in
cache, then it will return the object. Thus, it behaves like a server. Otherwise, the web
cache requests the object from the origin server. Thus, it behaves like a client.

1
Faculty of Computer & Information Instructor: Dr. Islam Hegazy
Sciences, Ain Shams University Academic year: 2021-2022
Course Name: Computer Networks Exam: (Midterm) 29/08/2022
Course code: CIS 365 Duration: 1 hour
Year: (Summer term) 3rd undergraduate Total Grade: 30

3. The receiver adds the number of bytes it is willing to receive in the receive window field
in the TCP header.
4. File transmission for web page is 1 sec
Time to download the web page = 2 * RTT + file transmission = 200 * 10-3 + 1 = 1.2 sec
File transmission for 200 KB object = 2 sec
File transmission for 500 KB object = 5 sec
Time to download all objects using non-persistent parallel connections = Time to
download web page + max of time to download one object file = 1.2 + 2 * 100 * 10-3 + 5
= 6.4 sec
Question 3: marks: 7
a)

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 only one DNS server, the local DNS cache, is visited with an RTT delay of
RTT0 = 2 msec. 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 = 8 msec.
1. 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? (2 marks)
2. Now suppose the HTML object references 10 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 10 additional objects are received from
web server at the client, assuming non-persistent
HTTP and no parallel TCP connections? (2 marks)
3. Suppose the HTML object references 10 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. (3 marks)
Sol:
1. RTT0 + 2*RTTHTTP = 2 + 2*8 = 18 msec
2. RTT0 + 2*RTTHTTP + 2*10*RTTHTTP = 2 + 2*8 + 2*10*8 = 178 msec
3. RTT0 + 2*RTTHTTP + 4*RTTHTTP = 2 + 2*8 + 4*8 = 50 msec

2 With My Best Regards,


Islam Hegazy

You might also like