# Computer Networks | Set 13

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

Attention reader! Don’t stop learning now. Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in **GATE Test Series Course**.

Learn all **GATE CS concepts with Free Live Classes** on our youtube channel.

**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*10^{6}) So, t = L/B = 8192/(1.5*10^{6}) = 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 10^{7} bps and uses CSMA/CD, then what is the minimum size of the packet?

Given:

velocity(v) = 2*10^{8}m/sec

**(A)** 200 bits**(B)** 10**(C)** 50**(D)** 100

**Explanation:**

Here,

Distance(d) = 1 km = 1*10^{3}meter, and BW = 10^{7}bps So, p = propagation delay = (d/v) = (10^{3}/2*10^{8}) = 5*10^{(-6)}

Therefore, minimum size of the packet is,

= (2*p*BW) = 2*5*10^{(-6)}*10^{7}= 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 = (2^{12}- 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)** 2^{n}**(B)** 2^{n}-1**(C)** 2^{n-2}**(D)** 2^{n-1}

**Explanation:**

Since, window size of sender(W) = window size of the receiver(R) and we know that,

(W + R) = 2^{n}or, (W + W) = 2^{n}since, (W = R) or, 2*W = 2^{n}or, W = 2^{n-1}

Hence, option (D) is correct.