Network Layer Protocol · Computer Networks
74 questions · asked in 23 of 27 years (2000–2026)
MCQ 54 · MSQ 7 · NAT 131-mark 44 · 2-mark 30
2000Questions per year2026
Questions 41–45 of 74
In the IPv4 addressing format, the number of networks allowed under Class C addresses is
Answer: (C)
In Class C, the first 3 bits are fixed as 110. The network part has 24 bits in all.
Network bits that can change = 24 3 = 21 networks.
Answer:
Network bits that can change = 24 3 = 21 networks.
Answer:
Consider a network with five nodes, N1 to N5, as shown below
The network uses a Distance Vector Routing protocol. Once the routes have stabilized, the distance vectors at different nodes are as following. N1: (0, 1, 7, 8, 4) N2: (1, 0, 6, 7, 3) N3: (7, 6, 0, 2, 6) N4: (8, 7, 2, 0, 4) N5: (4, 3, 6, 4, 0) Each distance vector is the distance of the best known path at the instance to nodes, N1 to N5, where the distance to itself is 0. Also, all links are symmetric and the cost is identical in both directions. In each round, all nodes exchange their distance vectors with their respective neighbors. Then all nodes update their distance vectors. In between two rounds, any change in cost of a link will cause the two incident nodes to change only that entry in their distance vectors.
After the update in the previous question (the cost of link N2-N3 reduces to 2 in both directions, and the next round of updates is done), the link N1-N2 goes down. N2 will reflect this change immediately in its distance vector cost as, . After the NEXT ROUND of update, what will be the cost to N1 in the distance vector of N3?
The network uses a Distance Vector Routing protocol. Once the routes have stabilized, the distance vectors at different nodes are as following. N1: (0, 1, 7, 8, 4) N2: (1, 0, 6, 7, 3) N3: (7, 6, 0, 2, 6) N4: (8, 7, 2, 0, 4) N5: (4, 3, 6, 4, 0) Each distance vector is the distance of the best known path at the instance to nodes, N1 to N5, where the distance to itself is 0. Also, all links are symmetric and the cost is identical in both directions. In each round, all nodes exchange their distance vectors with their respective neighbors. Then all nodes update their distance vectors. In between two rounds, any change in cost of a link will cause the two incident nodes to change only that entry in their distance vectors.
After the update in the previous question (the cost of link N2-N3 reduces to 2 in both directions, and the next round of updates is done), the link N1-N2 goes down. N2 will reflect this change immediately in its distance vector cost as, . After the NEXT ROUND of update, what will be the cost to N1 in the distance vector of N3?
Answer: (C)
After N1-N2 goes down, N2 sets its cost to N1 to . Only N2 and N1 change at once. N3 and N4 still hold their old vectors.
N3 has two neighbours, N2 and N4, and the link N3-N4 costs 2 (from the figure). In the next round N3 reads their vectors.
Via N2: N2 now says , so this route costs whatever the N3-N2 link costs.
Via N4: N4 still says 8 to N1. That value comes from the previous round: , that is, N4 hears 7 from N3 and 4 from N5. N4 does not yet know that its route through N5 and N2 is broken.
Answer: (C)
N3 has two neighbours, N2 and N4, and the link N3-N4 costs 2 (from the figure). In the next round N3 reads their vectors.
Via N2: N2 now says , so this route costs whatever the N3-N2 link costs.
Via N4: N4 still says 8 to N1. That value comes from the previous round: , that is, N4 hears 7 from N3 and 4 from N5. N4 does not yet know that its route through N5 and N2 is broken.
Answer: (C)
Consider a network with five nodes, N1 to N5, as shown below
The network uses a Distance Vector Routing protocol. Once the routes have stabilized, the distance vectors at different nodes are as following. N1: (0, 1, 7, 8, 4) N2: (1, 0, 6, 7, 3) N3: (7, 6, 0, 2, 6) N4: (8, 7, 2, 0, 4) N5: (4, 3, 6, 4, 0) Each distance vector is the distance of the best known path at the instance to nodes, N1 to N5, where the distance to itself is 0. Also, all links are symmetric and the cost is identical in both directions. In each round, all nodes exchange their distance vectors with their respective neighbors. Then all nodes update their distance vectors. In between two rounds, any change in cost of a link will cause the two incident nodes to change only that entry in their distance vectors.
The cost of link N2-N3 reduces to 2(in both directions). After the next round of updates, what will be the new distance vector at node, N3?
The network uses a Distance Vector Routing protocol. Once the routes have stabilized, the distance vectors at different nodes are as following. N1: (0, 1, 7, 8, 4) N2: (1, 0, 6, 7, 3) N3: (7, 6, 0, 2, 6) N4: (8, 7, 2, 0, 4) N5: (4, 3, 6, 4, 0) Each distance vector is the distance of the best known path at the instance to nodes, N1 to N5, where the distance to itself is 0. Also, all links are symmetric and the cost is identical in both directions. In each round, all nodes exchange their distance vectors with their respective neighbors. Then all nodes update their distance vectors. In between two rounds, any change in cost of a link will cause the two incident nodes to change only that entry in their distance vectors.
The cost of link N2-N3 reduces to 2(in both directions). After the next round of updates, what will be the new distance vector at node, N3?
Answer: (A)
N3 has two neighbours: N2, whose link cost is now 2, and N4, whose link cost is 2. These are the vectors N3 receives:
N2 = (1, 0, 2, 7, 3), N4 = (8, 7, 2, 0, 4)
- To N1: min(2 + 1, 2 + 8) = 3
- To N2: 2, and to N4: 2
- To N5: min(2 + 3, 2 + 4) = 5
The new vector at N3 is (3, 2, 0, 2, 5)
Answer: (3, 2, 0, 2, 5)
N2 = (1, 0, 2, 7, 3), N4 = (8, 7, 2, 0, 4)
- To N1: min(2 + 1, 2 + 8) = 3
- To N2: 2, and to N4: 2
- To N5: min(2 + 3, 2 + 4) = 5
The new vector at N3 is (3, 2, 0, 2, 5)
Answer: (3, 2, 0, 2, 5)
Consider a network with 6 routers R1 to R6 connected with links having weights as shown in the following diagram
Suppose the weights of all unused links in the previous question (R1-R2 and R4-R6, which carry no data with the weights shown) are changed to 2 and the distance vector algorithm is used again until all routing tables stabilize. How many links will now remain unused?
Suppose the weights of all unused links in the previous question (R1-R2 and R4-R6, which carry no data with the weights shown) are changed to 2 and the distance vector algorithm is used again until all routing tables stabilize. How many links will now remain unused?
Answer: (B)
In the previous graph two links were unused because a shorter path existed: R1-R2 (6) loses to R1-R3-R2 , and R4-R6 (8) loses to R4-R5-R6 . Both now get weight .
Links now: R1-R2 2, R1-R3 3, R2-R3 2, R2-R4 7, R3-R5 9, R4-R5 1, R4-R6 2, R5-R6 4. Check each one against the best alternative path between its end points:
- R1-R2 (2): other path R1-R3-R2 is 5. Used.
- R1-R3 (3): other path R1-R2-R3 is . Used.
- R2-R3 (2): other path R2-R1-R3 is . Used.
- R2-R4 (7): other path R2-R3-R5-R4 is . Used.
- R3-R5 (9): other path R3-R2-R4-R5 is . Used.
- R4-R5 (1): cheapest possible. Used.
- R4-R6 (2): other path R4-R5-R6 is . Used.
- R5-R6 (4): other path R5-R4-R6 is , which is shorter. Never used.
Only R5-R6 is left unused, so 1 link.
Answer: (B)
Links now: R1-R2 2, R1-R3 3, R2-R3 2, R2-R4 7, R3-R5 9, R4-R5 1, R4-R6 2, R5-R6 4. Check each one against the best alternative path between its end points:
- R1-R2 (2): other path R1-R3-R2 is 5. Used.
- R1-R3 (3): other path R1-R2-R3 is . Used.
- R2-R3 (2): other path R2-R1-R3 is . Used.
- R2-R4 (7): other path R2-R3-R5-R4 is . Used.
- R3-R5 (9): other path R3-R2-R4-R5 is . Used.
- R4-R5 (1): cheapest possible. Used.
- R4-R6 (2): other path R4-R5-R6 is . Used.
- R5-R6 (4): other path R5-R4-R6 is , which is shorter. Never used.
Only R5-R6 is left unused, so 1 link.
Answer: (B)
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?
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?
Answer: (C)
A link is never used if some other path between its end points is cheaper. Check every link:
- R1-R2 (6): R1-R3-R2 is shorter. Unused.
- R4-R6 (8): R4-R5-R6 is shorter. Unused.
- R1-R3 (3): other path R1-R2-R3 is . Used.
- R2-R3 (2): other path R2-R1-R3 is . Used.
- R2-R4 (7): other path R2-R3-R5-R4 is . Used.
- R3-R5 (9): other path R3-R2-R4-R5 is . Used.
- R4-R5 (1): cheapest possible. Used.
- R5-R6 (4): other path R5-R4-R6 is . Used.
So exactly 2 links are never used: R1-R2 and R4-R6.
Answer: (C)
- R1-R2 (6): R1-R3-R2 is shorter. Unused.
- R4-R6 (8): R4-R5-R6 is shorter. Unused.
- R1-R3 (3): other path R1-R2-R3 is . Used.
- R2-R3 (2): other path R2-R1-R3 is . Used.
- R2-R4 (7): other path R2-R3-R5-R4 is . Used.
- R3-R5 (9): other path R3-R2-R4-R5 is . Used.
- R4-R5 (1): cheapest possible. Used.
- R5-R6 (4): other path R5-R4-R6 is . Used.
So exactly 2 links are never used: R1-R2 and R4-R6.
Answer: (C)
Keep practising
Topics in Computer Networks
OSI LayerPhysical LayerData Link Layer
Network Layer ProtocolYou are here
Transport Layer ProtocolApplication Layer ProtocolsNetwork Security