Routing Protocols and Packet Forwarding Short Notes for Gate Cs
Routing Protocols and Packet Forwarding short notes for GATE CS: 2 study cards covering concepts, formulas, shortcuts and exam traps, plus solved practice que
Routing Protocols and Packet Forwarding short notes
[ ]LS Core: Flood LSPs → Build global graph → Run Dijkstra.
[ ]Dijkstra Rule: Always pick the node with the minimum D(v) not yet in N′, then update its neighbors.
[ ]Protocol Mapping: RIP = DV (Hop count, max 15). OSPF = LS (Bandwidth cost, hierarchical).
[ ]Complexity: LS has higher message overhead (O(N⋅E)) but faster, more robust convergence than DV.
Try a question
Answer it here to see how it works. Nothing is recorded until you sign in.
Question 1
Level 1: Warm-up
Consider the Bellman-Ford equation dx(y)=minv(c(x,v)+dv(y)). If node x has exactly 4 direct neighbors, what is the minimum number of terms that must be evaluated in the min function to compute the least cost path to a destination y?
Question 2
Level 1: Warm-up
In the Bellman-Ford equation dx(y)=minv{c(x,v)+dv(y)}, router x evaluates paths to destination y through its neighbors. If neighbor v1 reports dv1(y)=8 with c(x,v1)=3, and neighbor v2 reports dv2(y)=5 with c(x,v2)=5, what is the minimum computed cost dx(y)?
Question 3
Level 1: Warm-up
Consider a network with source node S and three other nodes A, B, C. The link costs are: c(S,A)=1, c(S,B)=6, c(S,C)=3, c(A,B)=2, c(A,C)=5, c(B,C)=1. Using Dijkstra's algorithm starting from S, what is the correct order in which nodes are added to the set N′ (after S)?
Question 4
Level 1: Warm-up
Which of the following statements is TRUE regarding the comparison between Distance-Vector and Link-State routing protocols?
Question 5
Level 1: Warm-up
In a Distance-Vector routing network, router x has four direct neighbors v1,v2,v3,v4. The direct link costs from x to these neighbors are c(x,v1)=3, c(x,v2)=5, c(x,v3)=∞, and c(x,v4)=2. The neighbors report their least costs to destination y as dv1(y)=4, dv2(y)=1, dv3(y)=3, and dv4(y)=6. Using the Bellman-Ford equation, what is the new least cost dx(y) computed by router x?
Question 6
Level 1: Warm-up
In the step-by-step packet forwarding algorithm, which of the following statements is TRUE regarding the default route 0.0.0.0 / 0?
Question 7
Level 1: Warm-up
A forwarding table entry is defined as 10.0.0.0/12. Which of the following destination IP addresses is IMPOSSIBLE to match this entry?
Question 8
Level 1: Warm-up
A router's forwarding table contains the entry 172.16.0.0/20. If a packet arrives with destination IP 172.16.15.255, the router performs a bitwise AND between the IP and the subnet mask. What is the decimal value of the third octet of the resulting network prefix?
Question 9
Level 1: Warm-up
Match the following routing concepts with their correct descriptions:
List I (Concept)
P: Split Horizon
Q: Poison Reverse
R: Count-to-Infinity
S: Distance-Vector
List II (Description)
1: A router advertises a route back to the neighbor it learned it from, but with infinite cost.
2: Bad news travels slowly, causing routers to incrementally increase their cost to a destination.
3: A router does not advertise a route back to the neighbor from which it learned that route.
4: Each router maintains a table of best known distances and periodically sends it to neighbors.
Question 10
Level 1: Warm-up
The Distance-Vector routing algorithm fundamentally relies on a specific recursive equation to update its routing table based on neighbor information. What is the name of this equation?
Free preview ends here
Login to view the complete short notes
Creating an account is free. You get the rest of this chapter, step-by-step solutions, and a study plan built around the topics you are actually weak at.
Most platforms hand everyone the same content. Here the content moves with your performance, topic by topic.
Built around you, not around a syllabus PDF
Every answer you give moves your topic-level intelligence rate. The next question, the next revision card and tomorrow's plan all change with it.
Revision that hits your weak spots
We only revise topics you have actually attempted and are still below the safe bar on — never the same chapter on repeat.
Questions calibrated to the real exam
Each question carries a measured toughness. You are served a rung above your current level, so practice keeps stretching you.
Notes written for recall, not for volume
Full lesson cards for first study, curated short-note cards for the last mile — with derivations, traps and exam patterns marked.
One place for everything
Notes, chapter practice, previous-year questions, test series and full-length papers — all feeding one picture of your preparation.
Honest progress
No vanity streaks. Progress here means chapters mastered and accuracy that held up on harder questions.
Unlock the whole course
Full notes and short notes, the complete question bank with worked solutions, mock tests, full-length papers, and an adaptive plan that rebuilds itself as you improve.
Routing Protocols and Packet Forwarding Short Notes for GATE CS
Routing Protocols and Packet Forwarding short notes for GATE CS: 2 study cards covering concepts, formulas, shortcuts and exam traps, plus solved practice questions.
[ ]LS Core: Flood LSPs → Build global graph → Run Dijkstra.
[ ]Dijkstra Rule: Always pick the node with the minimum D(v) not yet in N′, then update its neighbors.
[ ]Protocol Mapping: RIP = DV (Hop count, max 15). OSPF = LS (Bandwidth cost, hierarchical).
[ ]Complexity: LS has higher message overhead (O(N⋅E)) but faster, more robust convergence than DV.
Routing Protocols and Packet Forwarding: Solved Questions with Step-by-Step Explanations (10 Problems)
Question 1 · Computer NetworksMCQ
Consider the Bellman-Ford equation dx(y)=minv(c(x,v)+dv(y)). If node x has exactly 4 direct neighbors, what is the minimum number of terms that must be evaluated in the min function to compute the least cost path to a destination y?
A.
4
B.
5
C.
3
D.
1
Correct Answer:
A
Step-by-Step Solution
Key idea: The Bellman-Ford equation evaluates the minimum cost over the set of all direct neighbors v of node x.
Step 1: Identify the number of direct neighbors of node x, which is explicitly given as 4.
Step 2: The min function iterates over the set of direct neighbors v. It does not include node x itself, as a node is not its own neighbor.
Step 3: Therefore, exactly 4 terms must be evaluated, one for each of the 4 neighbors.
Answer: A
Question 2 · Computer NetworksMCQ
In the Bellman-Ford equation dx(y)=minv{c(x,v)+dv(y)}, router x evaluates paths to destination y through its neighbors. If neighbor v1 reports dv1(y)=8 with c(x,v1)=3, and neighbor v2 reports dv2(y)=5 with c(x,v2)=5, what is the minimum computed cost dx(y)?
A.
10
B.
11
C.
8
D.
5
Correct Answer:
A
Step-by-Step Solution
Key idea: The Bellman-Ford equation requires computing the sum of the local link cost and the neighbor's reported cost for each neighbor, then selecting the minimum.
Step 1: Calculate the path cost via v1: c(x,v1)+dv1(y)=3+8=11.
Step 2: Calculate the path cost via v2: c(x,v2)+dv2(y)=5+5=10.
Step 3: Apply the min function to the computed values: min(11,10)=10.
Answer: A
Question 3 · Computer NetworksMCQ
Consider a network with source node S and three other nodes A, B, C. The link costs are: c(S,A)=1, c(S,B)=6, c(S,C)=3, c(A,B)=2, c(A,C)=5, c(B,C)=1. Using Dijkstra's algorithm starting from S, what is the correct order in which nodes are added to the set N′ (after S)?
A.
A, B, C
B.
A, C, B
C.
C, A, B
D.
B, A, C
Correct Answer:
B
Step-by-Step Solution
Key idea: Dijkstra's algorithm always adds the node with minimum D(v) not yet in N′.
Step 1: Initialize N′={S}. Set D(A)=1, D(B)=6, D(C)=3.
Step 2: Find minimum D(v) outside N′. D(A)=1 is minimum. Add A to N′. Now N′={S,A}.
Step 3: Update neighbors of A:
D(B)=min(6,D(A)+c(A,B))=min(6,1+2)=3
D(C)=min(3,D(A)+c(A,C))=min(3,1+5)=3
Step 4: Find minimum D(v) outside N′. Both D(B)=3 and D(C)=3. Choose C (or B — tie-breaking). Add C to N′. Now N′={S,A,C}.
Step 5: Update neighbors of C:
D(B)=min(3,D(C)+c(C,B))=min(3,3+1)=3 (no change)
Step 6: Add B to N′. Now N′={S,A,C,B}.
Order: A, C, B
Answer: A, C, B
Question 4 · Computer NetworksMCQ
Which of the following statements is TRUE regarding the comparison between Distance-Vector and Link-State routing protocols?
A.
Distance-Vector routing requires every router to have complete knowledge of the network topology
B.
Link-State routing converges faster than Distance-Vector routing
C.
Distance-Vector routing is immune to the count-to-infinity problem
D.
Link-State routing uses the Bellman-Ford equation for path computation
Correct Answer:
B
Step-by-Step Solution
Key idea: Compare the fundamental characteristics of DV and LS routing.
FALSE. DV routers only know about their neighbors and learn iteratively. LS requires complete knowledge.
Step 2: Analyze option B: "Link-State converges faster than Distance-Vector"
TRUE. LS has global knowledge and computes paths independently, leading to faster convergence. DV suffers from slow convergence due to count-to-infinity.
Step 3: Analyze option C: "Distance-Vector is immune to count-to-infinity"
FALSE. Count-to-infinity is a fundamental problem in DV routing.
FALSE. LS uses Dijkstra's algorithm. DV uses Bellman-Ford.
Answer: Link-State routing converges faster than Distance-Vector routing
Question 5 · Computer NetworksNAT
In a Distance-Vector routing network, router x has four direct neighbors v1,v2,v3,v4. The direct link costs from x to these neighbors are c(x,v1)=3, c(x,v2)=5, c(x,v3)=∞, and c(x,v4)=2. The neighbors report their least costs to destination y as dv1(y)=4, dv2(y)=1, dv3(y)=3, and dv4(y)=6. Using the Bellman-Ford equation, what is the new least cost dx(y) computed by router x?
Correct Answer:
6.00
Step-by-Step Solution
Key idea: This is a direct application of the Bellman-Ford equation: dx(y)=minv{c(x,v)+dv(y)}.
Step 1: Compute the cost via each neighbor:
Via v1: c(x,v1)+dv1(y)=3+4=7
Via v2: c(x,v2)+dv2(y)=5+1=6
Via v3: c(x,v3)+dv3(y)=∞+3=∞
Via v4: c(x,v4)+dv4(y)=2+6=8
Step 2: Find the minimum:
dx(y)=min{7,6,∞,8}=6
Answer: 6.00
Note: The path via v2 gives the least cost of 6, even though v4 has a cheaper direct link (c=2). The total cost matters, not just the first hop.
Question 6 · Computer NetworksMCQ
In the step-by-step packet forwarding algorithm, which of the following statements is TRUE regarding the default route 0.0.0.0 / 0?
A.
It is evaluated first and always wins
B.
It is only used if no other entries match the destination IP
C.
It has a prefix length of 32, making it the most specific
D.
It overrides any matching specific prefix
Correct Answer:
B
Step-by-Step Solution
Insight: The default route 0.0.0.0 / 0 has a prefix length of 0, making it the least specific match possible.
Exam route: It only wins if no other entry matches, because any specific match will have N>0.
Learning route:
The default route is defined as 0.0.0.0 / 0.
Its prefix length is 0, which is the minimum possible value.
The Longest Prefix Match rule dictates that the entry with the largest N wins.
Therefore, any specific match (where N>0) will override the default route. It is only used as a fallback when no specific entries match.
Answer: It is only used if no other entries match the destination IP.
Question 7 · Computer NetworksMCQ
A forwarding table entry is defined as 10.0.0.0/12. Which of the following destination IP addresses is IMPOSSIBLE to match this entry?
A.
10.0.0.1
B.
10.15.255.254
C.
10.16.0.0
D.
10.1.100.50
Correct Answer:
C
Step-by-Step Solution
Key idea: This is a boundary case question, recognizable because it asks for an IMPOSSIBLE match, testing your understanding of subnet boundaries.
Step 1: Analyze the entry 10.0.0.0/12. A /12 mask means the first 12 bits are fixed. The first 8 bits are the first octet (10). The remaining 4 bits come from the second octet.
Step 2: Determine the valid range for the second octet. The prefix's second octet is 0 (binary 00000000). The first 4 bits must be 0000. This means the second octet can range from 00000000 (0) to 00001111 (15).
Step 3: Evaluate each option:
10.0.0.1: Second octet is 0. Valid.
10.15.255.254: Second octet is 15. Valid.
10.16.0.0: Second octet is 16 (binary 00010000). First 4 bits are 0001. Invalid.
10.1.100.50: Second octet is 1. Valid.
Step 4: Identify the impossible match. 10.16.0.0 falls outside the 0-15 range.
Answer: Option C.
Question 8 · Computer NetworksMCQ
A router's forwarding table contains the entry 172.16.0.0/20. If a packet arrives with destination IP 172.16.15.255, the router performs a bitwise AND between the IP and the subnet mask. What is the decimal value of the third octet of the resulting network prefix?
A.
15
B.
0
C.
240
D.
16
Correct Answer:
B
Step-by-Step Solution
Key idea: The network prefix is found by performing a bitwise AND between the destination IP and the subnet mask.
Step 1: Determine the subnet mask for /20. A /20 mask means the first 20 bits are 1s. In dotted decimal, this is 255.255.240.0.
Step 2: Identify the relevant octets. The third octet of the IP is 15. The third octet of the mask is 240.
Step 3: Perform the bitwise AND on the third octet.
15 in binary: $00001111$
240 in binary: $11110000$
AND result: $00000000$, which is 0 in decimal.
Answer: B
Question 9 · Computer NetworksMCQ
Match the following routing concepts with their correct descriptions:
List I (Concept)
P: Split Horizon
Q: Poison Reverse
R: Count-to-Infinity
S: Distance-Vector
List II (Description)
1: A router advertises a route back to the neighbor it learned it from, but with infinite cost.
2: Bad news travels slowly, causing routers to incrementally increase their cost to a destination.
3: A router does not advertise a route back to the neighbor from which it learned that route.
4: Each router maintains a table of best known distances and periodically sends it to neighbors.
A.
P-3, Q-1, R-2, S-4
B.
P-1, Q-3, R-4, S-2
C.
P-3, Q-2, R-1, S-4
D.
P-4, Q-1, R-2, S-3
Correct Answer:
A
Step-by-Step Solution
Key idea: Distance-Vector routing uses specific techniques to mitigate the count-to-infinity problem caused by slow convergence.
Step 1: Match S (Distance-Vector). It is defined by routers maintaining a table of distances and sending it to neighbors. This matches 4.
Step 2: Match R (Count-to-Infinity). This is the problem where bad news travels slowly and costs increment to infinity. This matches 2.
Step 3: Differentiate P (Split Horizon) and Q (Poison Reverse).
Split Horizon: Do not advertise the route back to the source. Matches 3.
Poison Reverse: Advertise it back, but with infinite cost. Matches 1.
Step 4: Combine the matches: P-3, Q-1, R-2, S-4.
Answer: A
Question 10 · Computer NetworksMCQ
The Distance-Vector routing algorithm fundamentally relies on a specific recursive equation to update its routing table based on neighbor information. What is the name of this equation?
A.
Bellman-Ford equation
B.
Dijkstra's equation
C.
Floyd-Warshall equation
D.
Kruskal's equation
Correct Answer:
A
Step-by-Step Solution
Key idea: Distance-Vector routing is mathematically founded on the Bellman-Ford equation.
Step 1: Identify the core mechanism of Distance-Vector routing, which is updating routing tables iteratively based on information received from directly connected neighbors.
Step 2: Recall the mathematical foundation of this update rule. It is the Bellman-Ford equation, which calculates the least cost path recursively.
Step 3: Evaluate the options. Dijkstra's is for Link-State routing, Floyd-Warshall is for centralized all-pairs shortest path, and Kruskal's is for minimum spanning trees.