Optimality Principle and Routing Techniques
Optimality Principle and Routing Techniques
If a router R lies on the optimal (shortest) path from router A to router B, then the path from R to B must
also be optimal.
A ---- R ---- B
\ /
\-- C ---/
Here is the perfect 3-mark answer, matching your marking scheme exactly.
[Link] 83/116
11/14/25, 11:11 PM Study strategy for networks
✔ 3 marks covered:
Source-based routing → 1.5 marks
Core-based routing → 1.5 marks
Let me know if you want diagrams for each (useful for 5–6 mark questions).
If a router R lies on the shortest (optimal) path from router A to router B, then the path from R to B is also a
shortest (optimal) path.
Sink trees form the basis for routing tables in distance-vector and link-state routing.
✔ 3 marks covered.
[Link] 84/116
11/14/25, 11:11 PM Study strategy for networks
It happens because routers trust their neighbors’ vectors without checking if the neighbor is using them as
the next hop.
Figure (1 Mark)
A ------- B ------- C
(1) (1)
A ------- B X C
This continues:
A: 5 → 6 → 7 → …
B: 4 → 5 → 6 → …
[Link] 85/116
11/14/25, 11:11 PM Study strategy for networks
Count-to-infinity happens when routers in a distance-vector network incorrectly reinforce each other’s
outdated routes, causing hop counts to grow slowly toward infinity.
If you want, I can also add how split-horizon and poison-reverse fix it for a 5-mark version.
Definition Process of computing the path packets Process of moving a packet from an incoming
should take across the network. interface to the correct outgoing interface.
Function Builds and updates the routing table using Uses the routing table to lookup destination
algorithms (Dijkstra, Bellman-Ford, etc.). and send packet to the next hop.
Scope Global, involves cooperation between Local, happens inside a single router.
routers across the network.
Time-scale Happens infrequently (only when the Happens continuously for every packet.
network topology changes).
Example Router learning new routes via OSPF, BGP. Router forwarding an IP packet to the next
router.
One-line summary:
Routing = deciding the path; Forwarding = sending the packet along that path.
Describe any two techniques for achieving good Quality of Service for
3 marks
Here is a perfect 3-mark answer — two QoS techniques, each crisp and scoring 1.5 marks.
[Link] 86/116
11/14/25, 11:11 PM Study strategy for networks
✔ 3 marks covered:
Two QoS techniques, each clearly explained and directly relevant.
Here is a perfect 3-mark answer — short, crisp, and clearly distinguishes static vs dynamic routing.
Route Creation Routes are manually configured by the Routes are automatically learned and updated
administrator. by routing protocols.
Adaptability Does not adapt to network changes; Adapts automatically to failures, congestion, or
requires manual updates. topology changes.
Overhead No routing overhead; very low CPU and Higher overhead due to exchanging routing
bandwidth usage. updates.
Scalability Not suitable for large networks. Highly scalable; used in medium-to-large
networks.
One-line summary:
Static routing is fixed and manual; dynamic routing is adaptive and automatic.
Here is a perfect 3-mark style answer (1.5 marks each for two methods).
[Link] 87/116
11/14/25, 11:11 PM Study strategy for networks
If you want a 5-mark expanded version, I can give detailed explanations and diagrams.
[Link] 88/116
11/14/25, 11:11 PM Study strategy for networks
In an exam, you can safely use Traffic Shaping and Resource Reservation as valid congestion-control
methods under virtual circuits — the teacher will accept them.
If you want, I can craft a 5-mark or 8-mark “Congestion control in VC Subnets” full answer including these
methods.
Describe two major differences between the warning bit method and
the
Random Early Detection (RED) method for 3 marks
1. How congestion is Router sets a “warning bit” in packet headers Router drops packets randomly early (before queue
signaled when its queue is almost full. Sender detects this is full). Packet loss itself acts as a congestion signal to
bit and slows down. senders.
2. When action is taken Action occurs late, only when congestion is close Action occurs early, before congestion occurs,
to happening (queue nearly full). preventing queue overflow.
3. Drop behavior No packet is dropped unless the queue overflows; Packets are dropped probabilistically based on
it only gives a warning. average queue size to avoid global synchronization.
Summary (1 sentence):
Warning Bit reacts late using explicit congestion notification; RED reacts early using random packet
drops.
Here is a perfect 3-mark answer—short, crisp, and exactly what examiners expect.
[Link] 89/116
11/14/25, 11:11 PM Study strategy for networks
Distributed:
Each router computes routes using local information and exchanges updates with neighbors.
Used by real protocols (RIP, OSPF).
✔ 3 marks covered:
1. Static routing
2. Dynamic routing
3. Centralized vs distributed routing
Here is a perfect 3-mark answer—short, clean, and exactly what examiners expect.
✔ Total = 3 marks:
Definition of flooding
Three applications
[Link] 90/116
11/14/25, 11:11 PM Study strategy for networks
If you want, I can also give the advantages/disadvantages for a 5-mark question.
Compare the features of link state routing with distance vector routing
for 8 marks
Link State Routing any 4 points with explanation- 4 Marks
Distance Vector Routing any 4 points with explanation - 4 marks
3. Fast Convergence
Routers flood LSAs immediately when a link changes, enabling the entire network to update quickly.
This prevents loops and instability.
4. No Count-to-Infinity Problem
Because routers know the full network map, link-state routing does not suffer from routing loops or count-
to-infinity issues like distance vector routing does.
3. Slow Convergence
Updates happen periodically or when tables change.
This leads to slow convergence, especially after failures, and can cause temporary routing loops.
If you want, I can also add a comparison table or a diagram-based version for 10 marks.
[Link] 92/116
11/14/25, 11:11 PM Study strategy for networks
✔ 6-Mark Summary
Datagram Subnet
Connectionless
Independent packet routing
No state stored in routers
Used in IP networks
Here is a perfect 6-mark answer with the exact mark split you asked for.
When a route becomes invalid (e.g., a link fails), routers may incorrectly tell each other that the destination
is still reachable—through each other.
They keep increasing the metric (hop count) one step at a time:
Example:
A — B — C
[Link] 93/116
11/14/25, 11:11 PM Study strategy for networks
Example:
If B learned route to C from A,
→ B will NOT tell A that it can reach C.
Thus incorrect routing info cannot circulate endlessly.
✔ 6-Mark Summary
Count-to-infinity = routers repeatedly increase hop count due to wrong info.
Split Horizon and Poison Reverse are the two main solutions to prevent route looping and limit the
increase to infinity.
If you want, I can add a small diagram for a 7–8 mark version.
Here is a perfect 8-mark answer with clear identification + descriptions of the required scheduling
techniques.
Concept:
Packets are served in the exact order they arrive.
Simple, no prioritization, one queue per interface.
✔ 8-Mark Summary
Technique Purpose QoS Benefit
Priority Queuing Serve high-priority first Low delay for critical traffic, but risk of starvation
WFQ Fair bandwidth distribution with Balanced fairness + controllable QoS for each flow
weights
If you want, I can also add diagrams or expand this into a 10-mark detailed version.
[Link] 95/116
11/14/25, 11:11 PM Study strategy for networks
Good — compute shortest next-hop by adding C→neighbor delay to that neighbor’s advertised vector, then
pick the minimum for each destination.
B: (5, 0, 8, 12, 6, 2)
D: (16,12, 6, 0, 9,10)
E: (7, 6, 3, 9, 0, 4)
To A: via B = 6+5 = 11; via D = 3+16 = 19; via E = 5+7 = 12 → choose B, cost 11.
To B: via B = 6+0 = 6; via D = 3+12 = 15; via E = 5+6 = 11 → choose B, cost 6.
To C: local (self) = 0.
To D: via B = 6+12 = 18; via D = 3+0 = 3; via E = 5+9 = 14 → choose D, cost 3.
To E: via B = 6+6 = 12; via D = 3+9 = 12; via E = 5+0 = 5 → choose E, cost 5.
To F: via B = 6+2 = 8; via D = 3+10 = 13; via E = 5+4 = 9 → choose B, cost 8.
A B 11
B B 6
C — (local) 0
D D 3
E E 5
F B 8
Below is the perfect 6-mark answer with 4-step explanation (4 marks) and a clean diagram (2 marks)—
exactly what examiners expect for “packet routing for mobile hosts.”
[Link] 96/116
11/14/25, 11:11 PM Study strategy for networks
+-----------------------------+
| Correspondent Host |
+---------------+-------------+
|
| Sends packets to home IP
v
+---------+---------+
| Home Agent |
| (in home network) |
+----+--------+-----+
| ^
| |
Tunnels to | | Registration
care-of addr | |
v |
+-------+--------+------+
| Foreign Agent |
| (in visited network) |
+----------+------------+
|
| Delivers packet
v
+-------+-------+
[Link] 97/116
11/14/25, 11:11 PM Study strategy for networks
| Mobile Host |
+---------------+
If you want, I can also prepare the reverse path routing explanation or the triangle routing problem for 5–6
mark questions.
Here is the perfect 8-mark answer with the exact structure you asked for.
In simple terms:
Too much traffic → router buffers fill → delays and losses increase.
These effects make the network unstable and degrade application performance.
[Link] 98/116
11/14/25, 11:11 PM Study strategy for networks
Choke packets
Warning bits
3. Hop-by-Hop Backpressure
A congested router sends a signal to its upstream router, forcing it to reduce its sending rate.
This propagates backward until the source slows down.
Effective in tightly controlled networks with reserved capacity.
5. Load Shedding
Under severe congestion, routers drop low-priority packets first (e.g., using priority or drop policies).
Ensures important traffic gets through even when the network is overloaded.
If you want, I can also give you a diagram-based version for a 10-mark question.
Here is the exact 6-mark answer with the three required steps, each worth 2 marks.
[Link] 99/116
11/14/25, 11:11 PM Study strategy for networks
Purpose:
To know which receivers belong to the multicast group and on which interfaces they are located.
Purpose:
To establish an efficient, loop-free path for delivering multicast packets.
Purpose:
To eliminate unused branches, improving efficiency and reducing traffic.
✔ 6-Mark Summary
1. Group Management → Routers learn group membership via IGMP.
2. Spanning Tree Construction → Build efficient, loop-free multicast delivery paths.
3. Pruning → Remove branches with no receivers to reduce waste.
Below is a perfect 8-mark answer: clear explanation + full working example exactly how examiners expect.
[Link] 100/116
11/14/25, 11:11 PM Study strategy for networks
Distance Vector Routing (DVR) is a dynamic routing algorithm where each router maintains a table (vector)
containing the distance (cost) to every other router and the next hop.
Routers periodically exchange vectors with neighbors and update their tables using the Bellman–Ford
equation:
Dx (y) =
min (c(x, v) + Dv (y))
v∈neighbors
Where:
Dx (y) = cost from router x to destination y
4. Convergence
Routers continue exchanging vectors until no further changes occur (the network converges).
All routers then have shortest-path routes.
Example (4 Marks)
Consider the following network:
A
/ \
1 4
/ \
B---2---C
Link costs:
A–B = 1, A–C = 4, B–C = 2.
Router A:
Dest Cost Next Hop
A 0 -
B 1 B
[Link] 101/116
11/14/25, 11:11 PM Study strategy for networks
C 4 C
Router B:
Dest Cost Next Hop
B 0 -
A 1 A
C 2 C
Router C:
Dest Cost Next Hop
C 0 -
B 2 B
A 4 A
A→B →C =1+2=3<4
C 4 3 B
B →A→C =1+3=4>2
No change.
C →B →A=2+1=3<4
A 4 3 B
[Link] 102/116
11/14/25, 11:11 PM Study strategy for networks
A 0 -
B 1 B
C 3 B
Router B
Dest Cost Next Hop
B 0 -
A 1 A
C 2 C
Router C
Dest Cost Next Hop
C 0 -
B 2 B
A 3 B
Here is a perfect 6-mark answer — three closed-loop congestion control techniques, each explained for 2
marks.
Below are three correct, standard closed-loop techniques, each worth 2 marks.
Key idea: The network explicitly tells the source to slow down.
[Link] 103/116
11/14/25, 11:11 PM Study strategy for networks
Key idea: Router removes packets to relieve pressure and stabilize the network.
Key idea: Avoid congestion by proactively dropping packets before buffers overflow.
✔ 6-Mark Summary
Technique Closed-loop mechanism
Choke Packets Router detects congestion → sends feedback to source to slow down
Below is a perfect 10-mark answer, structured exactly how a university examiner expects:
Explanation of link-state routing (6 marks) + Worked example with Dijkstra (4 marks).
[Link] 104/116
11/14/25, 11:11 PM Study strategy for networks
(1) (4)
A -------- B -------- C
\ |
\ (2) (3) |
\--------- D --------
Link costs:
A–B = 1
A–D = 2
[Link] 105/116
11/14/25, 11:11 PM Study strategy for networks
B–C = 4
D–C = 3
A 0 -
B 1 B
D 2 D
C ∞ -
Table:
A 0 -
B 1 B
D 2 D
C 5 B
A 0 -
B 1 B
C 5 B
[Link] 106/116
11/14/25, 11:11 PM Study strategy for networks
D 2 D
If you want, I can also draw the shortest-path tree or provide a comparison between DVR and LS for exam
revision.
Here is a perfect 4-mark answer—clear, crisp, and exactly what examiners expect.
[Link] 107/116
11/14/25, 11:11 PM Study strategy for networks
If you want, I can also provide examples (e.g., RED, weighted random drop) or diagrams for a 5–6 mark
version.
Here is the perfect 8-mark answer with a clear explanation (4 marks) and a full worked example (4 marks).
3️⃣ Iteratively pick the unvisited node with smallest temporary distance
Add it to the set of permanently visited nodes
Update distances to its neighbors using the rule:
[Link] 108/116
11/14/25, 11:11 PM Study strategy for networks
2
A ------ B
| \ \
5| \1 \3
| \ \
C---- D ---- E
2 4
Link costs:
A–B = 2
A–C = 5
A–D = 1
B–E = 3
D–C = 2
D–E = 4
Step 1: Initialization
Node Distance from A Next hop
A 0 —
B ∞ —
C ∞ —
D ∞ —
E ∞ —
Visited set = { }
Table:
A 0 —
B 2 B
C 5 C
D 1 D
E ∞ —
[Link] 109/116
11/14/25, 11:11 PM Study strategy for networks
Table:
A 0 —
B 2 B
C 3 D
D 1 D
E 5 D
A 0 —
B 2 B
C 3 D
D 1 D
E 5 D
[Link] 110/116
11/14/25, 11:11 PM Study strategy for networks
Example (4 marks):
Step-by-step Dijkstra execution
Final shortest path table
If you want, I can also convert this into a neat diagram-based version for a 10-mark question.
You’re asking why the algorithm didn’t update C’s route to go through B
— in other words:
Option 1: C via D
A→D→C
Cost =
A→D = 1
D→C = 2
Total = 1 + 2 = 3
Option 2: C via B
A→B→C
2
A ------ B
| \ \
5| \1 \3
| \ \
C---- D ---- E
2 4
[Link] 111/116
11/14/25, 11:11 PM Study strategy for networks
A→B→A→D→C
A→B = 2
B→A = 2
A→D = 1
D→C = 2
Total = 7
A → D → C = cost 3 (chosen)
A → C = cost 5 (not chosen)
Here is a perfect 6-mark answer with three QoS techniques, each worth 2 marks as typically expected.
Leaky Bucket
Packets enter a bucket and leak out at a fixed, steady rate.
Smoothens bursty traffic.
[Link] 112/116
11/14/25, 11:11 PM Study strategy for networks
Token Bucket
Tokens accumulate at a fixed rate.
A packet can be sent only if a token is available.
Allows controlled bursts while keeping long-term rate stable.
FIFO (First-In-First-Out)
Simple; no QoS guarantees.
Packets served in arrival order.
Priority Queuing
Traffic categorized into priority classes.
High-priority packets (voice/video) transmitted first.
Low-priority packets may wait longer.
Admission Control
Before accepting new flows, routers check whether necessary resources exist.
If not, the new flow is blocked to protect existing traffic.
Effect: Prevents congestion and maintains predictable performance for ongoing sessions.
✔ 6-Mark Summary
Technique Purpose QoS Benefit
Traffic Shaping Control input rate Smooth traffic, reduce jitter & congestion
Scheduling Decide packet transmission order Fairness, priority handling, real-time support
If you want, I can also provide an 8-mark expanded version or diagram-based explanation.
[Link] 113/116
11/14/25, 11:11 PM Study strategy for networks
Split Horizon
Split Horizon with Poison Reverse
Hold-down timers
These stabilize the network and prevent incorrect routing updates.
[Link] 114/116
11/14/25, 11:11 PM Study strategy for networks
If you want, I can also give a diagram-based explanation or comparison between RIP and OSPF.
Below is the full 8-mark solution, step-by-step, exactly how examiners expect it.
Given:
Network transmission rate = 6 Mbps
Token bucket fill rate = 1 Mbps
Bucket capacity (initial tokens) = 8 megabits
Concept (2 Marks)
In a token bucket:
To send 1 bit, you must spend 1 token.
Tokens arrive at 1 Mbps.
If you transmit at 6 Mbps, you consume tokens faster than they arrive.
8 Mb
Time = = 1.6 seconds
5 Mb/s
If you want, I can also solve a graph-based explanation or what happens after bucket empties.
[Link] 115/116
11/14/25, 11:11 PM Study strategy for networks
[Link] 116/116
11/14/25, 11:12 PM Study strategy for networks
Here is a perfect 6-mark answer with clear, complete explanations of all solutions used to handle duplicate
packets during flooding.
Below are the main solutions (any 3–4 expected for full 6 marks).
4️⃣ Visited Node List / "Don't Send Back" Rule (1.5 Marks)
Routers can store a record of recently seen packets or avoid sending packets back on the link they arrived
from.
[Link] 1/1