Computer Network Class Test Instructions
Computer Network Class Test Instructions
: 01_JP_CS_26092022
1. This question paper contains 30 objective questions. Q.1-10 carry one mark each and
Q.11-30 carry two marks each.
3. Questions must be answered on Objective Response Sheet (ORS) by darkening the appropriate
bubble (marked A, B, C, D) using HB pencil against the question number. Each question has
only one correct answer. In case you wish to change an answer, erase the old answer completely
using a good soft eraser.
4. There will be NEGATIVE marking. For each wrong answer 1/3rd of the full marks of the question
will be deducted. More than one answer marked against a question will be deemed as an
incorrect response and will be negatively marked.
5. Write your name & Roll No. at the specified locations on the right half of the ORS.
8. If a candidate gives more than one answer, it will be treated as a wrong answer even if one
of the given answers happens to be correct and there will be same penalty as above to that
questions.
9. If a question is left blank, i.e., no answer is given by the candidate, there will be no penalty for
that question.
32
destination MAC address.
(Segments)
26
(c) If there are some errors in routing table 21
at any router, then it is possible that a 8
packet loops forever in IPv4. 1
(d) Both (a) and (c) 0
1 6 16 17 22 23 26
0 Transmission round (Time)
Q.5 Which of the timer is responsible for keeping
the window size information flowing even What is the time interval where the slow
if the other end closes its receiver window? start runs again because of a time-out and
(a) Retransmission timer because of 3 ACKs respectively ?
(b) Persistent timer (a) 16, 22 (b) 23, 17
(c) 17, 23 (d) 17, 22
[Link] © Copyright :
CT-2022 CS • Computer Network 3
© Copyright : [Link]
4 Computer Science & IT
[Link] © Copyright :
CT-2022 CS • Computer Network 5
Q.23 Which of the following is true? Q.26 Consider a 800 Kbps link. What is the
(a) The count to infinity problem may arise maximum bandwidth (in Kbps) when pure
in distance vector routing protocol when aloha and slotted aloha is used is
network gets disconnected. respectively ?
(b) The “path vector” enhancement to a (a) 147.2 Kbps, 294.4 Kbps
distance vector protocol always enables (b) 294.4 Kbps, 147.2 Kbps
the protocol to converge without (c) Can’t be determined
counting to infinity. (d) None of these
(c) The count to infinity problem may arise
in distance vector routing protocol even Q.27 Consider Dijkstra’s algorithm in the link-
state routing protocol at node u, Professor
when the network never get
Ram first sets the route for each directly
disconnected.
connected node v to be the link connecting
(d) Both (a) and (b)
u to v. Ram then implements the rest of the
Q.24 Consider the following statements algorithm correctly, aiming to produce
S1 : Unlike circuit switching, packet minimum-cost routes, but does not change
switching is not based on store and the routes to the directly connected nodes.
forward technique. In this network, u has at least two directly
S2 : Unlike synchronous serial transmissions, connected nodes and there is more than one
synchronous bits are not treated as the path between any two nodes. Assume that
part of data in asynchronous serial all link costs are non-negative. Which of the
transmission. following statements is False of u’s routing
S3 : TCP depends upon ICMP to send error table?
reporting messages. (a) There are topologies and link costs
Which of the following is not correct? where the majority of the routes to other
(a) S1 and S2 are false nodes will be incorrect.
(b) There are topologies and link costs
(b) S3 is false
where no routing table entry (other than
(c) Only S1 is true
from u to itself) will be correct.
(d) None of these
(c) There are topologies and link costs
Q.25 Consider an IP router with Maximum where all routing table entry (other than
Transferable Unit (MTU) of 500 B has from u to itself) will be correct.
received an IP datagram of size 3000 B with (d) Both (a) and (b)
an IP header of length 15 B. Which of the
Q.28 ICMP has error reporting messages. Which
following is true about IP fragments
of the following error reporting message
generated by router for this packet? describes the given statement ‘S’?
(a) Number of fragments = 6, last fragment S : The packet is discarded due to the
offset and datagram length 306 and 120 processing problem observing a change
(b) Number of fragments = 7, last fragment in the header format of the IP datagram.
offset and datagram length 300 and 120 (a) Destination unreachable
(c) Number of fragments = 7, last fragment (b) Source quench
offset and datagram length 360 and 120 (c) Parameter problem
(d) Number of fragments = 6, last fragment (d) Redirection
offset and datagram length 300 and 120
© Copyright : [Link]
6 Computer Science & IT
Q.29 Consider sending a large file of F bits from Suppose that a TCP message that contains
Host A to Host B. There are two links (and 1000 bytes of data including 20 bytes of TCP
one router) between A and B and the links header is passed to the IP layer at the host
are uncongested (that is, no queuing delays). A for delivery to B. Maximum frame size
Host A segments the file into segments of between link A-R1 is 1500 bytes including a
S bits each and adds 40 bits of header to 15-byte frame header. Link R 1 -R 2 can
each segment, forming packets of L = 40 + S support a maximum frame size 700 bytes
bits. Each link has a transmission rate of R including 10-byte frame header and link R2-
bps. What is the value of S that minimizes B can support maximum frame size of
the delay of moving the file from Host A 600 bytes including a 12-byte frame header.
to Host B? (ignore the propagation delay) Which of the following is correct about the
(a) (15F)1/2 (b) (25F)1/2 total length, DF, MF and fragment offset
(c) (30F)1/2 (d) (40F)1/2 fields of the IP header in the last packet
transmitted over the link R1-R2? [Assume
Q.30 Host A is connected to a router R1 . R1 is
20 B of IP header]
connected to another router R2 and R2 is
(a) Length = 600; DF = 0; MF = 0; Offset =
connected to host B.
60
A R1 R2 B (b) Length = 128; DF = 0; MF = 0; Offset =
71
(c) Length = 336; DF = 0; MF = 0; Offset =
83
(d) Length = 356; DF = 0; MF = 0; Offset =
83
[Link] © Copyright :
CLASS TEST [Link]. : 01_JP_CS_26092022
COMPUTER NETWORK
COMPUTER SCIENCE & IT
Date of Test : 26/09/2022
ANSWER KEY h
D E TA I L E D E X P L A N AT I O N S
1. (c)
IP of block: [Link] /25
Subnet mask: [Link]
Perform ‘AND’ operation between IP of block and subnet mask to get subnet id.
[Link]
[Link]
[Link]
First assigned address to host: [Link]
Last assigned address to host: [Link]
[Link] is subnet id and [Link] is direct broadcast address, so cannot assigned to any
host.
2. (b)
• POP3 and IMAP4 are well known pull protocols used between receiver’s client and mail server.
• In Web Based Protocol, HTTP is work as push and pull protocol.
• SMTP is well known push protocol, it cannot be used between receiver’s client and mail
server.
3. (b)
• 1st packet that waves will be Ethernet.
• 2nd will be IP packet.
• 3rd packet will be UDP packet before DNS request.
• 4th packet will be DNS request packet.
Note: Before DNS request, UDP packet is sent and DNS uses UDP as transport layer protocol but
not TCP.
4. (a)
• When an IP router between two ethernet segments forwards an IP packet, it does not modify
the destination IP address but can change the MAC address. Infact, source and destination
IPs are never changed.
• IPv4 uses time to live field to prevent looping when due to some errors in routing table
packet start looping in network.
5. (b)
1. A retransmission timer is used when expecting an acknowledgment from the other end.
2. A persistent timer keeps window size information flowing even if the other end closes its
receiver window.
3. A keep alive timer detects when the other end on an otherwise idle connection crashes or
reboots.
4. A 2MSL timer measures the time a connection has been in the TIME_WAIT state.
6. (b)
In SR protocol both sender and receiver will have same window size (K in this case).
∴ Total sequence bits are log2 (K + K) = log2 (2K) = log2 2 + log2 K = 1 + log2 K.
[Link] © Copyright :
CT-2022 CS • Computer Network 9
7. (c)
• Socket is the software interface which is used by process sends/receives messages to/from
the network
• To determine the number of hops to a destination and the round trip time for each hop
“Traceroute” is used.
8. (a)
Transmission Time = 2 × Propagation Time
Frame size d
= 2×
Bandwidth v
64 × 8 bits x
8 = 2× 8
10 bits/sec 2 × 10 m/sec
⇒ x = 512 meters
9. (b)
If a time out occurs there is a stronger possibility of congestion, hence TCP reacts strongly. It sets
the value of threshold to one-half of current window size. Set cwnd to size of one segment and
starts slow start phase again.
If three ACKs are received, there is a weaker possibility of congestion, a segment may have been
dropped. Hence TCP has a weaker reaction. It sets value of threshold to half of current window
size. It sets cwnd to the value of threshold. It starts congestion avoidance phase again.
10. (c)
Chance of a frame of getting through undamaged
= 0.6
Chance of whole message getting through is
P = (0.6)8 = 0.01679616
Mean number of transmissions
1 1
= =
P 0.01679616
= 59.54
11. (a)
For stop and wait
Data rate r = 5000 bps
Distance
Propagation delay TP = Speed
60 × 103 meters
= sec = 15 msec
4 × 106 meters
Utilization (U) = 60%
Bandwidth (B) = 5000 bps
Frame size F = ?
U = 60%
F
Transmission delay Tt =
B
© Copyright : [Link]
10 Computer Science & IT
Tt 1
⇒ 0.6 = = Tp
Tt + 2Tp
1+2
Tt
1
⇒ 0.6 = 2 × 15
1+ ×5
F
⇒ F = 225 bits
12. (d)
Total data = 30 × 8 Mb
30 × 8 Mb
Time for computer to transmit data = sec = 40sec
6 Mb
13. (b)
Packet A: The source IP contain direct broad cast address and we never use direct broadcast
address in source IP. It is always used in destination IP. Hence packet A never exists.
Packet B: If destination IP address contain all 1’s then it broadcasts within same network (Limited
Broadcasting).
Packet C: It is a unicast packet within the same network as network ID [Link] is same for both
source and destination IP.
14. (a)
• Listen ( ): Used on server side, cause a bound TCP socket to enter listening state.
• Bind ( ): Associates a socket with socket address structure.
• Connect ( ): It assigns a free local port number to a socket. In case of TCP socket, it causes an
attempt to establish a new TCP connection.
• Accept ( ): Accepts a received incoming attempt to create a new TCP connection from the
remote client.
15. (b)
C
t = M −ρ
[Link] © Copyright :
CT-2022 CS • Computer Network 11
16. (d)
Considering each statements,
• SMTP is text-based protocol and MIME extension helps in sending graphics and multimedia.
POP3 and IMAP4 are used for retrieving information from server, they do not help SMTP to
send multimedia.
17. (d)
Before sending
0 1 2 3 4 5 6 7 ..... 31 0 0 1 2 3 4 5 6 7 ..... 31
1
2
3
4
0 1 2 3 4 5 6 7 ..... 31 0 0 1 2 3 4 5 6 7 ..... 31
1
2
3
4
100011
1101 110110000
1101
0001
0000
0010
0000
0100
0000
1000
1101
1010
1101
111
© Copyright : [Link]
12 Computer Science & IT
19. (b)
• Loss of ACK from client does not effect on termination of connection because client use timeout
timer, after it expire it send “ACK” and goes in closed state, where if server does not receive
“ACK” then its timer expire and send FIN segment one more time and termination of
connection. So True
• Client moves FIN-Wait-1 → FIN-Wait-2 → Timeout → Closed. So False
• Loss of ACK from server does not effect since when client receive FIN from server, then the
client understand that “ACK” was lost. So False
20. (c)
Block size = [Link]/16
Number of subnets to be created = 10
Subnet Id = [Link]
Now, the remaining 8 bits of 4th octet will be used for addressing.
Hence, the first address will be [Link]/26
and the last address will be [Link]/26.
21. (b)
The datagram of 1800 bytes cannot be carried in one unit by Ethernet. Hence 2 fragments are
required.
Data Header Total
Frag 1 1480 20 1500 bytes
Frag 2 300 20 320 bytes
1780 bytes of data
At the entry to the WAN, the Router has to further fragment FRAG 1. FRAG 2 goes through the
WAN as it is.
Since every sub-fragment must have an IP header of 20 bytes, the WAN can carry a maximum
data size of 556 bytes. However 556 is not divisible by 8, as required the Fragment Offset. Hence
we decide to send 552 bytes of data in the first sub-fragment of FRAG 1.
Data Header Total
Frag 1 A 552 + 20 572
Frag 1 B 552 + 20 572
Frag 1 C 376 + 20 396
1480 bytes of data
Hence at destination would reach 4 fragments namely FRAG 1A, FRAG 1B, FRAG 1C, And
FRAG 2.
MFB FO TL
FRAG 1A 1 0 572
FRAG 1B 1 69 572
FRAG 1C 1 138 396
FRAG 2 0 185 320
So, option (b) is correct.
[Link] © Copyright :
CT-2022 CS • Computer Network 13
22. (c)
RTT No. 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Cong. window 1 2 4 8 16 17 18 1 2 4 8 9 10 11
Threshold 16 16 16 16 16 16 16 9 9 9 9 9 9 9
23. (d)
• Count to infinity problem in distance vector routing protocol arise when network gets
disconnected. But this problem doesnot occur in such cases when the network not get
disconnected.
• To make distance vector routing protocol coverage without count to infinity problem,
enhancement to distance vector routing protocol is used i.e. path vector routing.
24. (c)
Considering each statements:
S1 : Circuit switching is not a store and forward technique and path is predefined and router
need not apply any routing algorithm until which packet would have to be stored at router.
But packet switching is based on store and forward technique.
S2 : In synchronous transmission, the synchronous bits are neglected by receiver, hence not
considered as part of data.
S3 : Since TCP has error control, it will not depend upon ICMP to send error reporting message.
25. (c)
Maximum Transferable Unit = 500 B
Data bytes that can be transfered in 1 fragment = 500 – 15 = 485
3000 − 15
Number of fragments =
480
2985
= = 6.218 = 7
480
Since 485 is not divided by 8. So, 480 is sent in one fragment
1st fragment = offset = 0, datagram length = 480 + 15 = 495
2nd fragment = offset = 60, datagram length = 480 + 15 = 495
3rd fragment = offset = 120, datagram length = 480 + 15 = 495
4th fragment = offset = 180, datagram length = 480 + 15 = 495
5th fragment = offset = 240, datagram length = 480 + 15 = 495
6th fragment = offset = 300, datagram length = 480 + 15 = 495
7th fragment = offset = 360, datagram length = 105 + 15 = 120
© Copyright : [Link]
14 Computer Science & IT
26. (a)
For pure aloha maximum throughput is 18.4%
For slotted aloha maximum throughput is 36.8%
18.4
∴ Pure aloha = × 800 = 147.2 Kbps
100
36.8
∴ For slotted Aloha = × 800 = 294.4 Kbps
100
27. (b)
(a) Is true since for example, all the neighbors but one could have very high cost, and all the other
links have low cost, so all the routes could in fact be just one link.
(b) Is false since The lowest-cost neighbor’s route will be the direct link, of course!
(c) Is true since A trivial example is when all the links have equal cost.
28. (c)
• In redirection packet is not discarded but it is redirected to a n/w as the host doesn’t belong
to this network.
• In source quench packet is discarded due to congestion in the n/w.
• Destination unreachable means host is not present in the n/w or the host is not responding to
the request, then the packet is discarded.
29. (d)
File size F
Number of packet required to send file of size F = =
Size of segment S
S + 40
Time at which the 1st packet is received at the destination = × 2 sec. After this, one packet
R
S + 40
is received by the destination every sec because packets are transmitted back to back by
R
Host A.
Thus delay in sending the whole file is,
S + 40 F S + 40 S + 40 F
delay = × 2 + − 1 × = × + 1
R S R R S
To calculate the value of S which leads to the minimum delay, we take the derivative and equate
it to zero,
∂ delay F 1 40 + S 1
= 0⇒ − + =0
∂S RS S2 R
⇒ S = 40F
[Link] © Copyright :
CT-2022 CS • Computer Network 15
30. (d)
Frame header are the headers attached at DLL. Since fragmentation is at network layer. Hence
MTU for A-R1 → 1485 B
MTU for R1 – R2 → 690 B
MTU for R2-B → 588 B
Total IP packet size → 1020 B [1000 B + 20 B]
1000 20
Data IP header
Link (A - R1)
Packet 1 1000 20
Data IP header
Link (R1 - R2)
Packet 1 664 20
Packet 2 336 20
Link (R1 - B)
Packet 1ab 96 20
Packet 1b 336 20
© Copyright : [Link]