Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

COMSATS UNIVERSITY, ISLAMABAD

Islamabad Campus
Department of Computer Science
2nd Sessional EXAMINATION – FALL 2020
Class: BS (SE), (CS) Semester: Five
Subject: CSC 339 Data Communication & Computer Networks Date: December 1, 2020
CSC339 Computer Communication and Networks
FA18-bcs-039
Muhammad Abubakar

Total Time Allowed: 60 minutes

Total Marks: 25

Question # 1 Marks 3

Computing an Internet Checksum for the following payload:


16 bits 01101101 next 8 bits are your reg#.
16 bits 01000010 next 8 bits are increment 1 of your reg#.
i.e. if reg is 001 than 8bit code would be 00000001

Sum = 1011000100111100
Taking complement
Checksum= 0100111011000011

Sum + Checksum=1111111111111111
No error occurred

Question # 2 Marks 4

Suppose that the two measured SampleRTT values are 100ms and 110ms, assuming that the
value of EstimatedRTT was 80ms just before the first of these two samples were obtained. Use
the values of α = 0.25, and β = 0.125. Round your answers to two decimal places after leading
zeros. Answer the following.
a. What is the EstimatedRTT after each SampleRTT?

EstimatedRTT = α * SampleRTT + ( 1- α ) * EstimatedRTT


= 0.25 * 100 + ( 1 – 0.25 ) * 80
= 25 + (0.75) * 80
= 85 ms.
EstimatedRTT = α * SampleRTT + ( 1- α ) * EstimatedRTT
= 0.25 * 110 + ( 1 – 0.25 ) * 80
= 27.5 + (0.75) * 80
= 87.5 ms

b. What is the RTT Deviation after each SampleRTT?

DeviationRTT = β * | SampleRTT – EstimatedRTT | + ( 1 - β ) * DeviationRTT


= 0.125 * | 100 – 85 | + ( 1 - 0.125 ) * 10
= 0.125 * |15| + (0.875) * 10
= 1.875 + 8.75
= 10.625 ms = 10.63 ms

DeviationRTT = β * | SampleRTT – EstimatedRTT | + ( 1 - β ) * DeviationRTT


= 0.125 * |110 – 87.5| + (1 – 0.125 ) * 10
= 0.125 *| 22.5 | + (0.875) *10
= 2.8125 + 8.75
= 10.9325 ms = 10.93 ms

c. What is the TCP timeout after each SampleRTT?

TimeOut = EstimatedRTT + 4DevRTT


= 85 + 4 * 10.63
= 127.52 ms

TimeOut = EstimatedRTT + 4DevRTT


= 87.5 + 4 * 11.56
= 133.74 ms

Question # 3 Marks 4

Consider the following graph where the y-axis shows the sender’s TCP window size and the x-
axis provides the behavior of TCP working.
1. What behavior is observed in A? Provide reason.

This behaviour in A shows the slow-start period quickly discovers the maximum acceptable
throughput that the path supports

2. What caused the decrease in window size at point B? Provide reason.

Triple duplicate ACK caused the decrease in window size at point B

3. What caused the decrease in window size at point D?

Timeout caused the decrease in window size at point D

4. Describe the behavior from point E to F?

At E to F ot shows the behaviour of slow start and will incresase until it will reach thread
where it start congestion control

Question # 4 Marks 7 (3+2+2)

1. A company is granted the site address 172.168.20.0 (Class C). The company needs X
number of subnets. Your answer includes A) Design of subnets and provide block detail. B) The
number of addresses in each subnet and the broadcast address.
Note: X represents the last two digits of your reg number.
2. What is the subnetwork address if the destination address is 200.24.X.26 and the subnet
mask is 255.255.232.0? Note: X represents the last two digits of your reg number.

200.24.24 .0

3. Which of the following set of class C blocks can be used to form a supernet for a
company?

1. 200.24.52.0 200.24.53.0 200.24.54.0

2. 200.24.52.0 200.24.53.0 200.24.54.0 200.24.55.0

3. 200.24.42.0 200.24.52.0 200.24.43.0 200.24.44.0

4. 200.24.51.1 200.24.52.2 200.24.52.3 200.24.52.4

2. 200.24.52.0 200.24.53.0 200.24.54.0 200.24.55.0

Question # 5 Marks 3

Consider the TCP reliable data transport protocol. The sender sends two packets, first one with
15 bytes of data and second one with 25 bytes of data. The initial sequence number is 107 and
the first ACK is lost. Draw a space time diagram to show the sequence of events.
Question # 6 Marks 4

1. How many sockets does a UDP server need to communicate with 100 remote clients
concurrently? How many port numbers does it need?
UDP needs 1 socket to communicate with 100 remote clients and 1 port number

2. How many sockets does a TCP server need to communicate with 100 remote clients
concurrently? How many port numbers does it need?

1 listening socket and one socket per active client


1 port number is needed

3. How does the network stack identify the socket to which an incoming TCP data
packet is to be delivered?
4.
Network stack identify the socket by the 4-tuple (SA,SP,DA,DP)
5. TCP socket is identified by how many attributes?
TCP socket is identified by the source IP address, source port number, destination IP address,
destination port number
…Good Luck…

You might also like