Computer Networks | Set 4
Last Updated :
12 Jun, 2024
Following Questions have been asked in GATE 2010 CS exam.
1) One of the header fields in an IP datagram is the Time to Live (TTL) field. Which of the following statements best explains the need for this field?
(A) It can be used to prioritize packets
(B) It can be used to reduce delays
(C) It can be used to optimize throughput
(D) It can be used to prevent packet looping
Answer) (D) Time to Live can be thought as an upper bound on the time that an IP datagram can exist in the network. The purpose of the TTL field is to avoid a situation in which an undeliverable datagram keeps circulating.
2) Suppose computers A and B have IP addresses 10.105.1.113 and 10.105.1.91 respectively and they both use the same netmask N. Which of the values of N given below should not be used if A and B should belong to the same network?
(A) 255.255.255.0
(B) 255.255.255.128
(C) 255.255.255.192
(D) 255.255.255.224
Answer) (D) The last octets of IP addresses of A and B are 113 (01110001) and 91 (01011011). The netmask in option (D) has first three bits set in last octet. If netmask has first 3 bits set, then these bits must be same in A and B, but that is not the case. In simple words, we can say option (D) is not a valid netmask because doing binary ‘&’ of it with addresses of A and B doesn’t give the same network address. It must be same address as A and B are on same network. See this for more details.
3) Consider a network with 6 routers R1 to R6 connected with links having weights as shown in the following diagram
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, how many links in the network will never be used for carrying any data?
(A) 4
(B) 3
(C) 2
(D) 1
Answer (C) We can check one by one all shortest distances. When we check for all shortest distances for Ri we don’t need to check its distances to R0 to Ri-1 because the network graph is undirected. Following will be distance vectors of all nodes. Shortest Distances from R1 to R2, R3, R4, R5 and R6 R1 (5, 3, 12, 12, 16) Links used: R1-R3, R3-R2, R2-R4, R3-R5, R5-R6 Shortest Distances from R2 to R3, R4, R5 and R6 R2 (2, 7, 8, 12) Links used: R2-R3, R2-R4, R4-R5, R5-R6 Shortest Distances from R3 to R4, R5 and R6 R3 (9, 9, 13) Links used: R3-R2, R2-R4, R3-R5, R5-R6 Shortest Distances from R4 to R5 and R6 R4 (1, 5) Links used: R4-R5, R5-R6 Shortest Distance from R5 to R6 R5 (4) Links Used: R5-R6 If we mark, all the used links one by one, we can see that following links are never used. R1-R2 R4-R6
4) Suppose the weights of all unused links in the previous question are changed to 2 and the distance vector algorithm is used again until all routing tables stabilize. How many links will now remain unused?
(A) 0
(B) 1
(C) 2
(D) 3
Answer (B) After the weights of unused links () are changed to following graph.
Following will be distance vectors of all nodes R1 (2, 3, 9, 10, 11) Links used: R1-R2, R1-R3, R2-R4, R4-R5, R4-R6 R2 (2, 7, 8, 9) Links used: R2-R3, R2-R4, R4-R5, R4-R6 R3 (9, 9, 11) Links used: R3-R2, R2-R4, R3-R5, R4-R6 R4 (1, 2) Links used: R4-R5, R4-R6 R5 (3) Links Used: R5-R4, R4-R6 If we mark, all the used links one by one, we can see that all links are used except the following link. R5-R6
Please see GATE Corner for all previous year paper/solutions/explanations, syllabus, important dates, notes, etc. Please write comments if you find any of the answers/explanations incorrect, or you want to share more information about the topics discussed above.
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 combinat
11 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
Number of possible Functions
In the below articles, we are going to calculate the number of functions possible from given two sets of the element. Statement: Suppose there are two sets 'A' and 'B' containing 'n' and 'm' number of elements respectively, i.e., Sets, 'A' = {1, 2, 3, 4, ............, n}, 'B' = {1, 2, 3, 4, ........
2 min read
Mathematics | Independent Sets, Covering and Matching
Mathematics | Independent Sets, Covering and Matching1. Independent SetsA set of vertices I is called an independent set if no two vertices in set I are adjacent to each other in other words the set of non-adjacent vertices is called an independent set.It is also called a stable set.The parameter α0
5 min read
Mathematics | Total number of Possible Functions
In this article, we are discussing how to find a number of functions from one set to another. For understanding the basics of functions, you can refer to this: Classes (Injective, surjective, Bijective) of Functions. Number of functions from one set to another: Let X and Y be two sets having m and n
5 min read
Number of Boolean functions
In the below article, we are going to find the number of Boolean Functions possible from the given sets of binary number. Statement-1: Suppose two sets are set 'A' = {1, 2, 3, 4, ........, n} where each number will be either '0' or '1' and hence the total number of boolean variable possible will be
2 min read
Discrete Mathematics | Hasse Diagrams
A Hasse diagram is a graphical representation of the relation of elements of a partially ordered set (poset) with an implied upward orientation. A point is drawn for each element of the partially ordered set (poset) and joined with the line segment according to the following rules: If p<q in the
10 min read
Inclusion-Exclusion and its various Applications
In the field of Combinatorics, it is a counting method used to compute the cardinality of the union set. According to basic Inclusion-Exclusion principle: For 2 finite sets [Tex]A_1 [/Tex]and [Tex]A_2 [/Tex], which are subsets of Universal set, then [Tex](A_1-A_2), (A_2-A_1) [/Tex]and [Tex](A_1\bigc
7 min read
Fuzzy Logic | Set 2 (Classical and Fuzzy Sets)
Prerequisite : Fuzzy Logic | Introduction In this post, we will discuss classical sets and fuzzy sets, their properties and operations that can be applied on them. Set: A set is defined as a collection of objects, which share certain characteristics. Classical set Classical set is a collection of di
2 min read
Difference Between set, multiset, unordered_set, unordered_multiset in C++
In C++ Standard Template Library, set, multiset, unordered_set, unordered_multiset are used to store elements. Although they are similar but differ from each other in some functionalities. The differences are discussed below: 1. Set: Sets are associative containers that store unique elements followi
5 min read