Computer Networks | Set 2
Last Updated :
28 Dec, 2024
Now, 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.
Similar Reads
Set Operations
A set is simply a collection of distinct objects. These objects can be numbers, letters, or even peopleâanything! We denote a set using curly brackets.For example: A = {1, 2, 3}Set Operations can be defined as the operations performed on two or more sets to obtain a single set containing a combinati
10 min read
Properties of Power Set
The power set of a set A, denoted as P(A), is the collection of all subsets of A, including:The empty set {}All single-element subsets {a}All possible combinations of elements from A, up to the entire set A itself.For example, if A={1,2}, the power set P(A) is {{},{1},{2},{1,2}}.Properties of Power
3 min read
Types of Sets in Set Theory
In mathematics, a Set is a fundamental concept representing a collection of well-defined objects or elements. Sets are typically denoted by capital letters, and the individual elements within a set are listed in curly braces, separated by commas. For example, A={1,2,3,4,5} represents a set A with el
7 min read
FIRST Set in Syntax Analysis
The FIRST set is used in syntax analysis to identify which terminal symbols can appear at the start of strings derived from a non-terminal. It is crucial for LL and LR parsers, helping them decide which rules to apply.To compute the FIRST set:Add the terminal itself to the FIRST set for all terminal
6 min read
Set Notation
Set notation refers to the different symbols used in the representation and operation of sets. Set notation is a fundamental concept in mathematics, providing a structured and concise way to represent collections of objects, numbers, or elements. The set notation used to represent the elements of se
7 min read
Representation of a Set
Sets are defined as collections of well-defined data. In Math, a Set is a tool that helps to classify and collect data belonging to the same category. Even though the elements used in sets are all different from each other, they are all similar as they belong to one group. For instance, a set of dif
7 min read
Class 11 NCERT Solutions - Chapter 1 Sets - Exercise 1.1
Chapter 1 of the Class 11 NCERT Mathematics textbook, titled "Sets," introduces students to the concept of sets, a fundamental idea in mathematics. This chapter covers various topics, including types of sets, subsets, power sets, and the representation of sets. Exercise 1.1 focuses on basic set oper
7 min read
Output of Python Programs | Set 24 (Sets)
Prerequisite: Python-Sets 1. What is the output of the code shown below? Python3 sets = {1, 2, 3, 4, 4} print(sets) Options: {1, 2, 3} {1, 2, 3, 4} {1, 2, 3, 4, 4} Error Output: 2. {1, 2, 3, 4} Explanation : Duplicate values are not allowed in sets. Hence, the output of the code shown above will be
2 min read
Set Theory
Set theory is a branch of mathematics that deals with collections of objects. These collections are called sets. A set is simply a group of distinct things, like numbers, letters, or even everyday objects, that are grouped based on some common property.A set is a well-defined collection of distinct
3 min read
Set-Builder Notation
Set-builder Notation is a type of mathematical notation used to describe sets by naming their components or highlighting the requirements that each member of the set must meet. Sets are written in the form of {y | (properties of y)} OR {y : (properties of y)} in the set-builder notation, where the c
11 min read