Computer Networks | Set 13 - GeeksforGeeks

25 Feb, 2019
These questions for practice purpose for GATE CS Exam.
Ques-1: How many bits are allocated for network id (NID) and host id(HID) in the IP address 25.193.155.233?
(A) 24 bit for NID, 8 bits for HID(B) 8 bit for NID, 24 bits for HID(C) 16 bit for NID, 16 bits for HID(D) none
Explanation:It is class A IP address and you know, that class A has 24 bits in HID and 8 bits in NID part.
So, option (B) is correct.
Ques-2: The bandwidth of the line is 1.5 Mbps with round trip time(RTT) as 45 milliseconds.If the size of each packet is 1 KB(kilobytes), then what is the efficiency in Stop and wait protocol?
(A) 20.3(B) 10.0(C) 10.8(D) 11
Explanation:So in order to find the efficiency, lets first calculate the propagation delay (p) and transmission delay(t). You know that,
(2*p) = RTT = 45 ms 
Therefore,
p = 45/2 = 22.5 ms 
Now, lets find transmission delay (t), you know that, t = L/B (where, L= size of packet and B= bandwidth). Therefore,
L = 1KB = (1024*8) = 8192 bits

And 
B = (1.5*106)

So, 
t = L/B = 8192/(1.5*106) = 5.461 ms 
Thus efficiency,
= 1/(1 + 2a) {where a = p/t = 22.5/5.461 = 4.12}
= 1/(1 + 2*4.12)
= 0.108 
= 10.8 % 
So, option (C) is correct.
Ques-3: A 1 km long broadcast LAN has bandwidth (BW) of 107 bps and uses CSMA/CD, then what is the minimum size of the packet?Given:
velocity(v) = 2*108 m/sec 
(A) 200 bits(B) 10(C) 50(D) 100
Explanation:Here,
Distance(d) = 1 km = 1*103 meter, 
and BW = 107 bps

So,
p = propagation delay
= (d/v) = (103/2*108) = 5*10(-6) 
Therefore, minimum size of the packet is,
= (2*p*BW)
= 2*5*10(-6)*107
= 100 bits 
So, option (D) is correct.
Ques-4: Consider Subnet mask of class B network on the internet is 255.255.240.0 then, what is the maximum number of hosts per subnets?
(A) 4098(B) 4096(C) 4094(D) 4092
Explanation:To find number of hosts per Subnet, you need to check number of zeroes in the host id part.Here, Subnet mask
= 255.255.240.0
= 11111111.11111111.11110000.00000000 
Therefore, number of zeroes is 12 so,
Number of hosts
= (212 - 2) 
= 4096 - 2
= 4094 
Since, one of them is used for network id of entire network and the other one is used for the directed broadcast address of the network so, two is subtracted.
So, option (C) is correct.
Ques-5: What is the maximum window size for data transmission Using Selective Repeat protocol with n-bit frame sequence number?
(A) 2n(B) 2n-1(C) 2n-2(D) 2n-1
Explanation:Since, window size of sender(W) = window size of the receiver(R) and we know that,
(W + R) = 2n
or, (W + W) = 2n since, (W = R)
or, 2*W = 2n
or, W = 2n-1 
Hence, option (D) is correct.
Computer Networks Quiz
GATE
GATE CS
Writing code in comment?
Please use ide.geeksforgeeks.org,
generate link and share the link here.
Comments
Old Comments
Computer Networks | IP Addressing | Question 8
Computer Networks | IP Addressing | Question 8
Message encryption and decryption using UDP server
Computer Networks | IP Addressing | Question 2
Computer Networks | Network Layer | Question 2
GATE | GATE-CS-2016 (Set 2) | Question 48
GATE | GATE CS 2008 | Question 66
GATE | GATE-CS-2014-(Set-1) | Question 30
GATE | GATE-CS-2001 | Question 23
GATE | GATE-CS-2015 (Set 1) | Question 65