GATE 2005
203 questions
MCQ 2031-mark 203
Questions 186–190 of 203
Consider a simple graph with unit edge costs. Each node in the graph represents a router. Each node maintains a routing table indicating the next hop router to be used to relay a packet to its destination and the cost of the path to the destination through that router. Initially, the routing table is empty. The routing table is synchronously updated as follows. In each updated interval, three tasks are performed.
i. A node determines whether its neighbors in the graph are accessible. If so, it sets the tentative cost to each accessible neighbor as 1. Otherwise, the cost is set to .
ii. From each accessible neighbor, it gets the costs to relay to other nodes via that neighbor (as the next hop).
iii. Each node updates its routing table based on the information received in the previous two steps by choosing the minimum cost.
For the graph given above, possible routing tables for various nodes after they have stabilized, are shown in the following options. Identify the correct table.
i. A node determines whether its neighbors in the graph are accessible. If so, it sets the tentative cost to each accessible neighbor as 1. Otherwise, the cost is set to .
ii. From each accessible neighbor, it gets the costs to relay to other nodes via that neighbor (as the next hop).
iii. Each node updates its routing table based on the information received in the previous two steps by choosing the minimum cost.
For the graph given above, possible routing tables for various nodes after they have stabilized, are shown in the following options. Identify the correct table.
Answer: (C)
All links have cost 1, so each cost is the number of hops of a shortest path. Links in the graph: A-B, A-C, B-C, B-D, C-D, C-E, D-E, D-F.
Stabilized costs (destination: next hop, cost):
- Node A: B: B, 1; C: C, 1; D: B, 2; E: C, 2; F: C, 3
- Node B: A: A, 1; C: C, 1; D: D, 1; E: C, 2; F: D, 2
- Node C: A: A, 1; B: B, 1; D: D, 1; E: E, 1; F: D, 2
- Node D: A: B, 2; B: B, 1; C: C, 1; E: E, 1; F: F, 1
Compare with the options:
- (A) Node A: D, E and F are given costs 3, 3 and 4, but the true costs are 2, 2 and 3 (A-B-D, A-C-E, A-C-D-F).
- (B) Node C: F is given as via E with cost 3, but the shortest path is C-D-F with cost 2 via D.
- (C) Node B matches the table above in every entry. (E can also go via D at cost 2; either next hop gives a valid table.)
- (D) Node D: A is given cost 3, but D-B-A has cost 2.
Answer: (C)
Stabilized costs (destination: next hop, cost):
- Node A: B: B, 1; C: C, 1; D: B, 2; E: C, 2; F: C, 3
- Node B: A: A, 1; C: C, 1; D: D, 1; E: C, 2; F: D, 2
- Node C: A: A, 1; B: B, 1; D: D, 1; E: E, 1; F: D, 2
- Node D: A: B, 2; B: B, 1; C: C, 1; E: E, 1; F: F, 1
Compare with the options:
- (A) Node A: D, E and F are given costs 3, 3 and 4, but the true costs are 2, 2 and 3 (A-B-D, A-C-E, A-C-D-F).
- (B) Node C: F is given as via E with cost 3, but the shortest path is C-D-F with cost 2 via D.
- (C) Node B matches the table above in every entry. (E can also go via D at cost 2; either next hop gives a valid table.)
- (D) Node D: A is given cost 3, but D-B-A has cost 2.
Answer: (C)
Assume that "host1.mydomain.dom" has an IP address of 145.128.16.8. Which of the following options would be most appropriate as a subsequence of steps in performing the reverse lookup of 145.128.16.8 ? In the following options "NS" is an abbreviation of "nameserver".
Answer: (C)
A reverse lookup finds a name from an address. The address 145.128.16.8 is written with its octets reversed under the special domain in-addr.arpa: . The name is resolved from the right, one label at a time, through the domain tree: root, then arpa, then in-addr.arpa, then 145.in-addr.arpa, then 128.145.in-addr.arpa, and so on. Each name server points to the server of the next label.
(A) and (B) follow the forward name host1.mydomain.dom, not the reverse name, so they are wrong.
(C) is a correct part of this sequence: ask a server for in-addr.arpa, and later the server for 128.145.in-addr.arpa. A subsequence may skip a step between them, such as 145.in-addr.arpa.
(D) says to query the server for 145.in-addr.arpa directly. A resolver starts knowing only the root servers, so it cannot go straight to 145.in-addr.arpa. It has to get there through the root and in-addr.arpa servers first.
Answer: (C)
(A) and (B) follow the forward name host1.mydomain.dom, not the reverse name, so they are wrong.
(C) is a correct part of this sequence: ask a server for in-addr.arpa, and later the server for 128.145.in-addr.arpa. A subsequence may skip a step between them, such as 145.in-addr.arpa.
(D) says to query the server for 145.in-addr.arpa directly. A resolver starts knowing only the root servers, so it cannot go straight to 145.in-addr.arpa. It has to get there through the root and in-addr.arpa servers first.
Answer: (C)
A company has a class C network address of 204.204.204.0. It wishes to have three subnets, one with 100 hosts and two with 50 hosts each. Which one of the following options represents a feasible set of subnet address/subnet mask pairs?
Answer: (D)
Host capacity needed:
100 hosts need at least 7 host bits, so a /25 (mask 255.255.255.128), which gives hosts.
50 hosts need at least 6 host bits, so a /26 (mask 255.255.255.192), which gives hosts.
Each subnet address must be a multiple of its block size, and the blocks must not overlap. A /25 block has 128 addresses, so it starts at .0 or .128. A /26 block has 64 addresses, so it starts at .0, .64, .128 or .192.
(D): .128/25 covers 128 to 255, .64/26 covers 64 to 127, .0/26 covers 0 to 63. All are aligned and disjoint, and the masks match the sizes, so (D) is feasible.
(A): .64 with mask .128 is not a valid /25 start, and its block 64 to 191 overlaps the others.
(B): .192 with mask .128 is not a valid /25 start, and .64 with mask .128 is not valid either.
(C): .192/26 (192 to 255) lies inside .128/25 (128 to 255), so they overlap, and .224 is not a valid /26 start.
Answer: (D)
100 hosts need at least 7 host bits, so a /25 (mask 255.255.255.128), which gives hosts.
50 hosts need at least 6 host bits, so a /26 (mask 255.255.255.192), which gives hosts.
Each subnet address must be a multiple of its block size, and the blocks must not overlap. A /25 block has 128 addresses, so it starts at .0 or .128. A /26 block has 64 addresses, so it starts at .0, .64, .128 or .192.
(D): .128/25 covers 128 to 255, .64/26 covers 64 to 127, .0/26 covers 0 to 63. All are aligned and disjoint, and the masks match the sizes, so (D) is feasible.
(A): .64 with mask .128 is not a valid /25 start, and its block 64 to 191 overlaps the others.
(B): .192 with mask .128 is not a valid /25 start, and .64 with mask .128 is not valid either.
(C): .192/26 (192 to 255) lies inside .128/25 (128 to 255), so they overlap, and .224 is not a valid /26 start.
Answer: (D)
Count to infinity is a problem associated with:
Answer: (B)
In distance vector routing, each router learns routes only from the distance vectors its neighbours send, and it never sees the whole topology. When a link fails, a router can accept a neighbour's old advertisement that still claims a route through the broken link. The two routers then keep passing the stale route back and forth, each time adding one hop, so the cost climbs slowly towards infinity.
Why the others are wrong: (A) link state routing gives every router the full map and runs a shortest-path algorithm, so it does not count up like this. (C) DNS name resolution does not exchange route costs. (D) TCP congestion control adjusts the window size and has no routing cost to count.
Answer: (B)
Why the others are wrong: (A) link state routing gives every router the full map and runs a shortest-path algorithm, so it does not count up like this. (C) DNS name resolution does not exchange route costs. (D) TCP congestion control adjusts the window size and has no routing cost to count.
Answer: (B)
An organization has a class B network and wishes to form subnets for 64 departments. The subnet mask would be:
Answer: (D)
A class B network has a default mask of , so the last 16 bits are for subnet and host.
64 subnets need bits, since . Borrow these 6 bits from the left end of the third octet.
Third octet: .
So the subnet mask is . The other options give too few subnets or are not valid masks: gives 1 subnet, gives 2, and has the ones not in one block.
Answer: (D)
64 subnets need bits, since . Borrow these 6 bits from the left end of the third octet.
Third octet: .
So the subnet mask is . The other options give too few subnets or are not valid masks: gives 1 subnet, gives 2, and has the ones not in one block.
Answer: (D)