Test 9 CS Computer Network PDF
Test 9 CS Computer Network PDF
Corporate Office (Delhi): 44-A/1 Kalu Sarai (Sarvapriya Vihar), New Delhi-16, Ph: 011-45124612, 9958995830
Visit us at: www.madeeasy.in | E-mail us at: [email protected]
Delhi | Hyderabad | Noida | Bhopal | Jaipur | Lucknow | Indore | Pune | Bhubaneswar | Kolkata | Patna
EA
Lockdown Period
Open Practice Test Series
(Also useful for Other Exams)
E
17 to 28
29 to 33
Q.1 The best effort delivery services such as an IP does not include
(a) error checking (b) datagram acknowledgment
(c) error correction (d) All of these
1. (d)
• Error checking is only for header part.
• There is no acknowledgment for packets reaching the destination.
• IP has minimal error control and there is no concept of error correction for IP datagram.
SY
Assuming that byte stuffing is employed for the four character frame A B ESC FLAG, transmitter sends it
as
(a) 01111110 01000111 11100011 11100000 11100000 01111110
(b) 01111110 01000111 11100011 11100000 11100000 01111110 01111110
(c) 01111110 01000111 11100011 11100000 11100000 11100000 01111110 01111110
(d) None of these EA
2. (c)
Under byte stuffing flag bits are used as starting and ending delimiters. Apart from this if the code for flag
is there in the data, ESC character is used with the flag. If ‘ESC’ is also there in the code then one more
‘ESC’ character is used.
So,
of ESC in of flag in
data data
(d) By the help of 802.11 frame, we can come to known whether encryption is used on not.
Which of the above statement is correct?
3. (d)
• Both RTS and CTS control frames are required to deal with hidden terminals.
• RTS/CTS exchange can help reduce collisions but consume channel resources.
• 802.11 frame has 4 address fields.
• WEP field of 802.11 frame indicates whether encryption is being used or not.
4. (d)
• Time-to-live (TTL) field in IPv4 datagram is used to prevent packet looping.
• Ethernet frame has CRC field and IPv4 packet includes checksum field.
• In IPv6, when a datagram needs to be discarded in a congested network, the decision is based on the
SY
priority field in the base header.
Q.5 Suppose host A sends two TCP segments back to back to host B over a TCP connection. The first
segment has a sequence number 90. The second has a sequence number 110. Calculate how much data
is in the first segment and what will be the acknowledgment number in the acknowledgment that host B
sends to host A if the first segment is lost and second segment arrives at B.
(a) 18, 111
(c) 20, 90
EA (b) 20, 110
(d) 19, 111
5. (c)
Since the sequence number of the second segment is 110 and first segment is 90.
Here, data in first segment is 20 B.
TCP acknowledgment are cumulative and hence Host B will acknowledge that it has received everything
upto and excluding sequence number 90.
E
Q.6 Consider a scenario where UDP receiver computes the Internet checksum for the received UDP segment
and finds that it matches the value carried in the checksum field.
AD
Which of the statement below is true with respect to the above scenario?
(a) Receiver is absolutely sure that no bit errors have occurred.
(b) If the receiver is TCP instead of UDP, the receiver is still absolutely sure that no bit errors have
occurred.
(c) UDP receiver is absolutely sure about no error. But if it’s a TCP receiver it won’t be.
(d) Both TCP and UDP receivers will not be absolutely sure about no error.
M
6. (d)
UDP receiver can’t be absolutely sure that no bit errors have occurred. Because as per the checksum
calculation mechanism, if the corresponding bits of two 16 bit words in the packet were 0 and 1, then even
if these get flipped to 1 and 0 respectively, the sum still remains the same. Hence the 1’s complement, the
receiver calculate is also same.
Hence, checksum gets verified, even when there was actually an error during transmission. TCP also uses
the same checksum mechanism. Hence the statement will hold true for TCP also.
7. (d)
• An ARP request is normally broadcast and ARP reply is normally unicast.
• An ICMP error message may be generated only for the first fragment.
• ARP is a dynamic mapping protocol in which a physical address is found for a given logical address.
SY
• IGMP is not a multicasting routing protocol. It is a protocol that manages group membership.
8. (c)
• Manchester and differential Manchester encoding has a transition at the middle of each bit.
E
• Nyquist theorem specifies the minimum sampling rate to the twice the bandwidth of the signal.
• The signal rate is sometimes called as baud rate, whereas the data rate is sometimes called as bit
rate.
AD
• In synchronous transmission, we send bits one after another without start or stop. It is the responsibility
of the receiver to group the bits.
9. (d)
• Statement is correct.
• DES uses 16 rounds, whereas number of rounds in AES can be 10, 12 or 14.
• Statement is correct.
SY
10. (d)
• Distance vector and link state routing are intra-domain routing. Path vector is inter-domain routing
protocol.
• In distance vector routing, each node periodically shares its routing table with its neighbour and
whenever there is a change.
• Statement is correct.
EA
• OSPF is based on link state routing protocol.
• Statement is correct.
Q.11 The maximum length of the cable (in km) for transmitting data at a rate of 10 Mbps in an ethernet LAN with
frames of size 288 bits and the speed of propagation is 200 m/μsec __________. (Upto 1 decimal place)
E
11. (2.8)
In a Ethernet LAN
⇒ Transmission time ≥ 2 ∗ Propagation delay
AD
288 b x m
⇒ ≥2×
10 × 10 bps
6
200 × 10 m/ sec
6
⇒ x ≤ 2.8 km
Q.12 Consider a network connecting two systems located 4000 kilometers apart. The bandwidth of the network
is 64 Mbps. The propagation speed of the media is 2/3 of the speed of light in vacuum. It is needed to
design selective repeat sliding window protocol for this network. The average packet size is of 8 Kb. The
network is to be used to its full capacity.
Assume that processing delays at nodes are negligible. Then, the minimum size in bits of the sequence
number field has to be _________.
12. (10)
Distance (d) = 4000 km
Speed (s) = 2/3 × 3 × 108 = 2 × 108 m/s
Bandwidth (B) = 64 Mbps
4000 × 103m
= 20 msec
SY
Propagation delay (Tp) =
2 × 108 m/ sec
Packet size = 8 × 103 bits
1× 10−3 1
= sec = ms = 0.125 ms
8 8
Tp 20 msec
A = = = 160
Td 0.125 msec
Utilization = 100%
E
W W
1 = = [∴ W = Window size]
1 + 2 × 160 321
W = 321
AD
Q.13 Consider a wireless link, where the probability of packet error is 0.6. To transfer data across the links, Stop
and Wait protocol is used. The channel condition is assumed to be independent from transmission to
transmission. The average number of transmission attempts required to transfer x packets is 500. The
value of x is _______.
13. (200)
1
Number of retransmissions for one frame = .
1− p
x
Number of retransmissions for x frame =
1− p
x
⇒ 500 =
0.4
⇒ x = 500 × 0.4 = 200
SY
Q.14 In TCP round-trip time, RTT is currently 30 msec and the following acknowledgment come in after 26 and
32 msec respectively. The current RTT estimate using Jacobson’s algorithm is _______ (Use α = 0.9).
14. (29.84)
1. RTT = αRTT + (1 – α)R
= 0.9 ∗ 30 + (1 – 0.9)26
2.
=
RTT =
EA
27 + 2.6 = 29.6
αRTT + (1 – α)R
= 0.9 ∗ 29.6 + (1 – 0.9)32
= 26.64 + 3.2 = 29.84
Q.15 Consider the following network with 6 routers, R1 to R6 connected with links having weights as shown in the
following diagram:
E
R2 7 R4
7 9
R1 3 1 R6
AD
3 R3 R5 4
10
All the routers use the distance vector based routing algorithm to update their routing tables. Each router
starts with its routing table initialized to contain an entry for each neighbour with the weight of the respective
connecting link. After all the routing tables stabilize, The number of links are there in the network which if
goes down, don’t led to count-to-infinity problem __________.
M
15. (2)
If we prepare the routing tables for each of the six routers, we will get
R1 R2 R3 R4 R5 R6
R2 6 R3 R1 6 R3 R1 3 – R1 13 R2 R1 13 R3 R1 17 R5
R3 3 – R3 3 – R2 3 – R2 7 – R2 8 R2 R2 12 R5
R4 13 R3 R4 7 – R4 10 R2 R3 10 R2 R3 10 – R3 14 R5
R5 13 R3 R5 8 R4 R5 10 – R5 1 – R4 1 – R4 5 R5
R6 17 R3 R6 12 R4 R6 14 R5 R6 5 R5 R6 4 – R5 4 –
So, it can be clearly visualize from all the routing table construction that we never use the direct path
7 9
R1 R2 and R4 R6
Hence, even if these links are removed from the network or if there link go-down, they won’t led to count-
to-infinity problem.
Q.16 Assume 100 nodes are connected to a 10000 meter length of coaxial cable. Using some protocol, each
node can transmit 100 frames / seconds, where the average frame length is 2500 bits. The transmission
rate of the system is 108 bps. The efficiency of the protocol in percentage is _______.
16. (25)
Per node throughput = 100 frames / seconds
System throughput = 100 ∗ (Node throughput)
= 100 ∗ 100 = 10000 frames / second
Maximum system rate ⇒ 108 bits → 1 sec
1 bit → 1/108 sec
2500
2500 bits → sec ⇒ 1 frame = 25 × 10–6 sec
108
SY
25 × 10–6 sec → 1 Frame
1
1 sec → frame
25 × 10 −6
106
→ frames
25
EA
100 × 104
→ frames
25
→ 40000 frames / sec
10000
Efficiency = = 0.25 = 25%
40000
E
AD
M
Q.17 A bit stream 10011101 is transmitted using the standard CRC method. The generator polynomial is x3 +1.
Receiver receives the bit stream 10111101100. With respect to the above scenario, which of the following
statements is correct?
(a) There was no error in the received data hence receiver accept the data received.
(b) There was error in the received data, but the received bit stream is a multiple of 1001, hence error was
not detected.
(c) There was an error in the third bit from the left. Dividing that the generator yields 100.
(d) None of these
17. (c)
SY
1001
0001
0000
0011
0000
0110
0000
1101
1001
EA 1000
1001
0010
0000
0100
0000
100
0101
0000
1011
1001
0100
0000
1001
1001
0001
M
0000
0010
0000
0100
0000
100
18. (c)
SY
Option (a):
4th octet for subnet : 1 → 0 0000000 ...(1)
4 octet for subnet : 2 → 10 000000
th
(Comparing 3 and 4, address 11010000 can belong to both the subnets, hence subnet division is wrong).
Option (d): In first octet, there are just 6 bits for host, which can give maximum 61 addresses, hence 125
interfaces are not possible.
Option (c):
4th octet for subnet : 1 → 1 0000000
E
19. (c)
SY
• 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.
• Close ( ): It terminates the connection.
• Socket ( ): Creates a new socket of certain socket type.
EA
• Poll ( ): Used to check on the state of a socket.
• Accept ( ): Accepts a received incoming attempt to create a new TCP connection from the remote
client.
E
AD
M
Match List-I with List-II and select the correct answer using the codes given below the lists:
List-I List-II
A. 198.96.199.92 1. Interface 0
B. 198.96.105.151 2. Interface 1
C. 198.96.230.121 3. R2
SY
D. 198.96.119.121 4. R3
5. R4
Codes:
A B C D
(a) 1 3 5 4
(b) 1 4 2 5 EA
(c) 2 3 4 5
(d) 2 3 5 4
20. (d)
Since the 4th octet, has all 0’s in the net mask, hence any value can be assigned to it.
Coming to the 3rd octet:
Interface-0 → 1 0 0 1 0 0 0 0
Interface-1 → 1 1 0 0 0 0 0 0
E
R2 → 0 1 1 0 0 0 0 0
R3 → 0 1 1 0 0 0 0 0
rd
Calculating 3 octet for each option of list-1
AD
A. 1 1 0 0 0 1 1 1
B. 0 1 1 0 1 0 0 1
C. 1 1 1 0 0 1 1 0
D. 0 1 1 1 0 1 1 1
Comparing A with interface-1, both have common prefix. B matches its prefix with both R2 as well as R3,
but the maximum matching with R2.
Option (c) does not matches with any of the address hence belongs to default.
M
Q.21 Match List-I with List-II and select the correct answer using the codes given below the lists:
List-I
A. Passive scanning
B. Active scanning
C. Association
List-II
1. Assigning a one or two word SSID to the access point.
2. Creating a virtual wire between itself and AP by the wireless station.
3. Scanning channels and listening for beacon frames.
4. Broadcasting a probe frame that will be received by all APs within the wireless Host’s range.
Codes:
A B C
SY
(a) 3 2 1
(b) 3 4 2
(c) 4 2 1
(d) 4 3 1
21. (b)
• Passive scanning is a process of scanning channels and listening for beacon frames.
EA
• A wireless host can perform active scanning by broadcasting a probe frame that will be received by
all APs within the wireless host range.
• Associating means the wireless station creates a virtual wire between itself and the APs.
public key.
S4: Both RSA cryptosystem and RSA digital signature scheme uses same set of keys.
AD
22. (d)
• The integrity of the message is preserved, even if we sign the whole message because we can not get
the same signature, if the message is changed. Hence apart from authenticity, integrity is also ensured
M
in digital signature.
• No, A secret key is known by only two entities (Alice and BoB for eg.). So, if alice needs to sign
another document and send it to Ted, she needs to use another secret key.
• The signer signs using his private key and the verifies using signer’s public key.
• No, RSA digital signature scheme uses public and private key of sender not receiver.
Q.23 Consider the following statements with respect to TCP sliding window:
S1: Silly window syndrome is a problem caused by heavy congestion in the network.
S2: Nagle’s algorithm is used when silly window syndrome problem is created by the sender.
S3: Clark’s solution is used when silly window syndrome problem is created by receiver.
S4: When the advertized window by the receiver is 0, the sender can not send any type of segment.
Which of the above statement are correct?
(a) Only S1 and S2 (b) Only S1, S3 and S4
(c) Only S1, S2 and S4 (d) Only S2 and S3
23. (d)
• Silly window syndrome is a problem caused by poorly implementing TCP flow control.
• Nagle’s solution requires that the sender sends the first segment even if it’s a small one, then it wait
until an ack is received or a MSS is accumulated.
SY
• Clark’s solution closes the window until another segment of MSS can be received or the buffer is half
empty.
• When the advertized window by the receiver is 0, sender may not normally send segment with two
exceptions. First, urgent data may be send. Second, sender may send a 1 B segment to force the
receiver to renounce the next byte accepted and the window size.
EA
Q.24 The subnet mask for a particular network is 255.255.28.0. Which of the following pairs of IP addresses
could belong to this network. Also, the maximum number of host that can belong to this subnet.
(a) 172.57.88.62 and 172.56.87.232 ; 198
(b) 10.35.38.2 and 10.35.39.4 ; 1024
(c) 191.203.31.87 and 191.234.31.88 ; 1024
(d) 191.203.30.85 and 191.203.31.87 ; 1022
24. (d)
E
Option (a): Since the second octet is 00011100, hence 88 and 87 not possible.
Option (b): Same as option (a) 38 and 39 not possible for second octet.
Option (c): The octets are possible, but number of host possible are {210 – 2} = 1022, hence it’s incorrect.
AD
M
25. (d)
SY
• Hubs are designed to transmit the packet to other appended devices regardless of the fact if data
packets is destined for the device connected or not.
• Bridge connects two LAN; two physical LANs into larger logical LAN or two segments of the same
LAN, that uses the same protocol.
• Just as hub, devices in switches are connected to them through twisted pair cabling. But difference
is unlike hub, switch forwards the packets just to the destination device.
EA
• When a router receives a packet, it determines the destination address by reading the header of the
packet, then search the routing table to search the route and forward the packet to higher hop.
26. (d)
• TCP involves a connection establishment phase while UDP does not. Using TCP for DNS may end up
involving several TCP connections to be established since several name server may have to be
contacted to translate a name into an IP address. This imposes a high overhead in delay. Hence DNS
M
27. (d)
• Routing is done at network layer which is independent of transport layer protocols. Hence packets of
SY
same session may be routed through different paths in UDP as well as TCP.
• In TCP, a unique sequence number is assigned to each byte.
• Slow start mechanism deals with congestion, but not flow control.
• TCP has option for selective acknowledgment.
Host A
EA Router R1 Router R2 Host B
Suppose a TCP message that contains 900 B of data and 20 B of TCP header is passed to IP code at host
A for delivery to B. IP header is of 20 B.
Assume that link A-R1 has maximum frame size of 1024 B including a 14-B frame header, link R1 – R2 can
support a maximum frame size of 512 B, including an 8 B frame header and link R2-B can support a
maximum frame size 512 B including a 12 B frame header.
E
The length of the last fragment at each of the three links respectively are:
(a) 920 ; 440 ; 440 (b) 960 ; 460 ; 440
(c) 960 ; 460 ; 460 (d) 940 ; 460 ; 460
AD
28. (d)
Frame header are the headers attached at DLL. Since fragmentation is at network layer. Hence
MTU for A-R1 → 1010 B
MTU for R1 – R2 → 504 B
MTU for R2-B → 500 B
Total IP packet size → 940 B [920 B + 20 B]
M
Link A-R1:
Length = 940, DF = 0, MF = 0, Offset = 0 [920 B + 20 B]
Link R1 – R2:
1. Length = 500, DF = 0, MF = 1, Offset = 0 [480 B + 20 B]
2. Length = 460, DF = 0, MF = 0, Offset = 60 [440 B + 20 B]
Link R2 -B:
1. Length = 500, DF = 0, MF = 1, Offset = 0 [480 B + 20 B]
2. Length = 460, DF = 0, MF = 0, Offset = 60 [440 B + 20 B]
Q.29 Ten thousand airline reservations stations are competing for the use of single slotted ALOHA channel. On
an average 36 request are made per hour by a station. A slot is of 200 μsec. The approximate total channel
load is _______ (in %).
29. (2)
Request made by 10 k stations
104 × 36
= request/sec
60 × 60
104 × 36
= request/sec = 100request/sec
3600
SY
Slot time = 200 μsec
1 slot = 200 × 10–6 sec
1
slot = 1 sec
200 × 10 −6
Number of slots = 5000 slots/sec
G = Channel load =
EA
No. of request / sec
No. of slots / sec
100 1
= = = 0.02
5000 50
In percentage = 0.02 × 100 = 2%
E
Q.30 Computer A has 19.5 MB to send on a network and transmits the data in burst at 6 Mbps. The maximum
transmission rate across routers in the network is 4 Mbps. If computer A’s transmission is shaped using a
leaky bucket. The capacity that the queue in the bucket must hold so that no data is discarded is ______
AD
19.5 × 8 Mb
Time for computer to transmit data = sec = 26sec
6 Mb
M
Q.31 Consider the effect of using slow start on a line with 10 msec round trip time. The receiver window and the
size of congestion window are set to 38 KB and 36 KB respectively. Sender side threshold is set to 18 KB.
After 8 transmission a time-out occurs, after time out, the time taken to send first full window of 18 KB is
________ (in msec). Assume window size at the start of slow start phase is 2 KB.
31. (70)
Since, the window size is the minimum of (receiver window, congestion window). Hence, the window size
is 36 KB and threshold is 18 KB given.
Sender Receiver
1 2 KB
Ack
2 4 KB
SY
Ack
3 8 KB
Ack
4 16 KB
EA Ack
5 18 KB
Ack
6 20 KB
22
Ack
KB
7 22 KB
Ack
E
8 24 KB
Ack
Timeout 1 2 KB Threshold = 12 KB
AD
Ack
2 4 KB
Ack
3 8 KB
Ack
M
4 12 KB
Ack
5 14 KB
Ack
6 16 KB
Ack
22 KB
7 18 KB
Q.32 Assume that X and Y are the only two stations on an Ethernet. Each has a steady queue of frames to send.
Both X and Y attempt to transmit a frame, they wait to get the control of channel using binary exponential
algorithm. The probability that both were successfully allowed to send the frame on fifth round of the
algorithm (assuming every time both X and Y will collide in back-off race till 4th round) is ________.
32. (0.0145)
At attempt 1, both will try and will result in a collision.
At attempt 2, number of slots will be 2 i.e., 0, 1. Similarly for attempt 3, number of slots will be 4 i.e., 0, 1,
2, 3.
So, on attempt ‘i’, number of slots 2i–1. Probability of collision = 2–(i–1) for the failure in 4 rounds.
Failure in 1st round × Failure in 2nd round × Failure in 3rd round × Failure in 4th round × Success in 5th round
= 2–(1–1) ∗ 2–(2–1) ∗ 2–(3–1) ∗ 2–(4–1) × [1 – 2–(5–1)]
= {1 ∗ 2–1 ∗ 2–2 ∗ 2–3 × [1 – 2–4]}
SY
= {1 ∗ 0.5 ∗ 0.25 ∗ 0.125 ∗ 0.9375}
= 0.0145
Q.33 Suppose you needed to use HTTP to download a webpage with three embedded images. The total number
messages saved between the client and server starting from initiates TCP connection to receive the third
object and close connection when using persistent HTTP without pipelining insteed of non-persistent
EA
HTTP are ________.
33. (8)
For persistent HTTP: For all files one connection sufficient
1-RTT time for connection establish = 2 message
∴ 1-RTT means two message send, one for connection one for ack.
1-RTT time for request and response for file = 2 message
1-RTT time for 1st file = 2 message
E
For non-persistent HTTP: In this for every file new connection is established.
1-RTT for connection establishment = 2 message
1-RTT for request and response = 2 message
1-RTT for 1st file = 2 message
Total message for 1st file = 6 message
1-RTT for connection establishment = 2 message
M