0% found this document useful (0 votes)
15 views

Solution

Uploaded by

abdulnaveed2004
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Solution

Uploaded by

abdulnaveed2004
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

National University of Computer and Emerging Sciences, Lahore Campus

Course Name: Computer Networks Course Code: CS3001


Degree Program: BS (CS) Semester: Fall 2021
Exam Duration: 60 Minutes Total Marks: 37
Paper Date: 04-December-2021 Weight 15%
Section: ALL Page(s): 5 + 1 (Rough Page)
Exam Type: Mid-II
Name:______________________________________________ Roll No.________________ Section:_______
Instruction/Notes: ● Attempt all questions in the space provided on the question paper.
● Space for rough work is provided at the end of the paper.
● Even if you do use additional rough sheets, they should NOT be attached with final paper.

Problem 1: Answer the following multiple-choice questions by filling the following table. [1+1+1+1+1 = 5 Marks]

Any answers outside the table will NOT be marked.

1 D
2 C
3 D
4 B
5 B
1.1. In IP(v4) header, at the received end, which field is used to pass on the payload to the correct next layer protocol?
A. ver
B. Type of Service
C. Flags
D. Upper Layer
1.2. The sending rate in TCP is adjusted according to the
A. Congestion Window (cwnd)
B. Receive Window (rwnd)
C. Minimum of (cwnd , rwnd)
D. Urgent Data Pointer
1.3. The first 8 bits of IPv4 datagram will be ------------------- if all optional fields are included in header of datagram.
A. 01000101
B. 01001101
C. 01001100
D. 01001111
1.4 The size of an IPv4 header is:
A. Less than 20 bytes
B. At least 20 bytes
C. Always greater than 20 bytes
D. 40 bytes exactly

1.5 Size of source and destination port address of TCP header respectively are _______

A. 16-bits and 32-bits


B. 16-bits and 16-bits
C. 32-bits and 16-bits
D. 32-bits and 32-bits

Department of Computer Science Page 1 of 5


Problem 2: Refer to the diagram / chart below, please answer the following questions: [1+1+1+1+1+5=10 Marks]

a) Which of the below option(s) is/are true? [Encircle the correct option(s) clearly]
i) The above diagram depicts TCP Tahoe only
ii) The above diagram depicts TCP Reno only
iii) The above diagram depicts TCP Vegas only
iv) The above diagram depicts all, i.e. TCP Tahoe, Reno & Vegas

b) What happened at transmission round 3 (i.e. at RTT = 3), i.e. state the reason / event?
Time-Out

c) What happened at transmission round 5 (i.e. at RTT = 5), i.e. state the reason / event?
ssth reached

d) What happened at transmission round 13 (i.e. at RTT = 13), i.e. state the reason / event?
3 duplicate ACKs received

e) What happened at transmission round 16 (i.e. at RTT = 16), i.e. state the reason / event?
ssth reached

f) Which state is the TCP in between transmission rounds (RTT)


(i) 0 & 3 Slow Start

Department of Computer Science Page 2 of 5


(ii) 3 & 5 Slow Start

(iii) 5 & 13 Congestion Avoidance

(iv) 13 & 16 Slow Start

(v) 16 & 20 Congestion Avoidance

Problem 3: An organization is granted a block of addresses starting with 132.100.24.0/23 (512 addresses). The
organization needs to have four sub-blocks of addresses to use in its four subnets. Sub-blocks are designed in such a
way that 1st one can accommodate 256 addresses, 2nd can accommodate 128 addresses and remaining two sub-
blocks can accommodate 64 addresses each (including network address and broadcast address). With reference to this
scenario, answer the following: [2+2+2+2 = 8 Marks]

a) Write the subnet mask for each sub-block.


Subnet mask for the 1st sub-block: 255.255.255.0
Subnet mask for the 2nd sub-block: 255.255.255.128
Subnet mask for the 3rd sub-block: 255.255.255.192
Subnet mask for the 4th sub-block: 255.255.255.224
b) Write the Network (subnet) ID and broadcast ID for 2nd and 4th sub-blocks.
Network (subnet) ID for 2nd sub-block: 132.100.25.0/25
Broadcast ID for 2nd sub-block: 132.100.25.127/25
Network (subnet) ID for 4th sub-block: 132.100.25.192/26
Broadcast ID for 4th sub-block: 132.100.25.255/26
c) Write the first and last host address for 3rd and 4th sub-blocks.
First host address for 3rd sub-block: 132.100.25.129/26
Last host address for 3rd sub-block: 132.100.25.190/26
First host address for 4th sub-block: 132.100.25.193/26
Last host address for 4th sub-block: 132.100.25.254/26
d) Write the 25th and 50th host address for 1st and 3rd sub-blocks.
25th host address for 1st sub-block: 132.100.24.25/24
50th host address for 1st sub-block: 132.100.24.50/24
25th host address for 3rd sub-block: 132.100.25.153/26
50th host address for 3rd sub-block: 132.100.25.178/26

Department of Computer Science Page 3 of 5


Problem 4: Refer to the below diagram of a TCP Segment, write the corresponding names of the missing fields
(numbered 1. to 6.) in the table on the right side. [1+1+1+1+1+1 = 6]

Department of Computer Science Page 4 of 5


Problem 5: In the scenario below, the left and right clients communicate with a server using UDP sockets. The same
socket at the server is used to communicate with both clients. The Python code used to create the sockets is shown in
the figure. Consider the four transport-layer packets A, B, C, and D shown in the figure below. [1+1+1+1+1+1+1+1 = 8]

A. What is the source port number for packet A?

The source port for packet A is port 5249.

B. What is the Destination port number for packet A?


The destination port for packet A is port 5485.

C. What is the source port number for packet B?

The source port for packet B is port 5485.

D. What is the Destination port number for packet B?

The destination port for packet B is port 5249.

E. What is the source port number for packet C?

The source port for packet C is port 7147.

F. What is the Destination port number for packet C?

The destination port for packet C is port 5485.

G. What is the source port number for packet D?

The source port for packet D is port 5485.

H. What is the Destination port number for packet D?


The destination port for packet D is port 7147.

Department of Computer Science Page 5 of 5


Rough Work:

Department of Computer Science Page 6 of 5

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy