# Computer Networks | Set 2

In this article, we are going to see the questions of GATE’s previous year’s questions of CN. An explanation of each question is also mentioned in this article.

1. The protocol data unit(PDU) for the application layer in the Internet stack is [GATE CSE 2012]

(A) Segment

(B) Datagram

(C) Message

(D) Frame

Solution: (C
The Protocol Data Unit for the Application layer in the Internet Stack (or TCP/IP) is called Message.

2. Which of the following transport layer protocols is used to support electronic mail? [GATE CSE 2012]

(A) SMTP

(B) IP

(C) TCP

(D) UDP

Solution: (C)                                                                                                                                                                                                                                               E-mail uses SMTP as an application layer protocol. SMTP uses TCP as a transport layer protocol.

3. In the IPv4 addressing format, the number of networks allowed under Class C addresses is [GATE CSE 2012]

(A) 2^14

(B) 2^7

(C) 2^21

(D) 2^24

Solution: (C
In class C, 8 bits are reserved for Host Id and 24 bits are reserved for Network Id. Out of these 24 Network Id bits, the leading 3 bits are fixed as 110. So remaining 21 bits can be used for different networks. See this for more details.

4. An Internet Service Provider(ISP) has the following chunk of CIDR-based IP addresses available with it:245.248.128.0/20. The ISP wants to give half of this chunk of addresses to Organization A, and a quarter to Organization B while retaining the remaining with itself. Which of the following is a valid allocation of addresses to A and B? [GATE CSE 2012]
(A) 245.248.136.0/21 and 245.248.128.0/22
(B) 245.248.128.0/21 and 245.248.128.0/22
(C) 245.248.132.0/22 and 245.248.132.0/21
(D) 245.248.136.0/22 and 245.248.132.0/21

Solution: (A
Since the routing prefix is 20, the ISP has 2^(32-20) or 2^12 addresses. Out of these 2^12 addresses, half (or 2^11) addresses have to be given to organization A, and a quarter (2^10) addresses have to be given to organization B. So routing prefix for organization A will be 21. For B, it will be 22. If we see all options given in the question, only options (A) and (B) are left as only these options have the same number of routing prefixes. Now we need to choose from options (A) and (B).
To assign addresses to organization A, ISP needs to take the first 20 bits from 245.248.128.0 and fix the 21st bit as 0 or 1. Similarly, ISP needs to fix the 21st and 22nd bits for organization B. If we take a closer look at options (A) and (B), we can see the 21st and 22nd bits for organization B are considered as 0 in both options. So 21st bit of organization A must be 1. Now take the first 20 bits from 245.248.128.0 and the 21st bit as 1, we get addresses for organization A as 245.248.136.0/21

5. Consider a source computer (S) transmitting a file of size 106 bits to a destination computer (D) over a network of two routers (R1 and R2) and three links (L1, L2, and L3). L1 connects S to R1; L2 connects R1 to R2; and L3 connects R2 to D. Let each link be of length 100km. Assume signals travel over each link at a speed of 10^8 meters per second. Assume that the link bandwidth on each link is 1Mbps. Let the file be broken down into 1000 packets each of size 1000 bits. Find the total sum of transmission and propagation delays in transmitting the file from S to D. [GATE CSE 2012] Question 6

(A) 1005ms

(B) 1010ms

(C) 3000ms

(D) 3003ms

Solution: (A)

Propagation delay to travel from S to R1 = (Distance) / (Link Speed) = 10^5/10^8 = 1ms Total prorogation delay to travel from S to D = 3*1 ms = 3ms Total Transmission delay for 1 packet = 3 * (Number of Bits) / Bandwidth = 3*(1000/10^6) = 3ms. The first packet will take 6ms to reach D. While the first packet was reaching D, other packets must have been processed in parallel. So D will receive the remaining packets 1 packet per 1 ms from R2. So the remaining 999 packets will take 999 ms. And total time will be 999 + 6 = 1005 ms

6. Consider an instance of TCP’s Additive Increase Multiplicative Decrease(AIMD) algorithm where the window size at the start of the slow start phase is 2 MSS and the threshold at the start of the first transmission is 8 MSS. Assume that a time-out occurs during the fifth transmission. Find the congestion window size at the end of the tenth transmission. [GATE CSE 2012]

(A) 8 MSS

(B) 14 MSS

(C) 7 MSS

(D) 12 MSS

Solution: (C)

Since Slow Start is used, the window size is increased by the number of segments successfully sent. This happens until either the threshold value is reached or time out occurs. In both of the above situations AIMD is used to avoid congestion. If the threshold is reached, the window size will be increased linearly. If there is a timeout, the window size will be reduced to half. Window size for 1st transmission = 2 MSS Window size for 2nd transmission = 4 MSS Window size for 3rd transmission = 8 MSS threshold reached, increase linearly (according to AIMD) Window size for 4th transmission = 9 MSS Window size for 5th transmission = 10 MSS time out occurs, resend 5th with window size starts with a slow start. Window size for 6th transmission = 2 MSS Window size for 7th transmission = 4 MSS threshold reached, now increase linearly (according to AIMD) Additive Increase: 5 MSS (since 8 MSS isn’t permissible anymore) Window size for 8th transmission = 5 MSS Window size for 9th transmission = 6 MSS Window size for 10th transmission = 7 MSS

Please see GATE Corner for all previous year papers/solutions/explanations, syllabi, important dates, notes, etc.