- Routing vs. forwarding → graph model → static vs. dynamic → table tricks (network-specific, host-specific, default) → forwarding with masks → DV vs. LS → AS, IGP and BGP.
- 8.1 introduction · 8.2 routing algorithms.
- Routing protocol = software that FILLS the routing table (routing) and uses it to pick the output interface (forwarding).
Seen again
🎯 How this can come up · 1 question
Filling and updating routing tables by finding best paths is called:
Correct: Routing.
- The Internet is too big for one algorithm, so routing is hierarchical (inside each AS, then between ASs: slide 34).
- Hosts just send to their default router; only routers need real forwarding tables.
- Router = node, network between two routers = edge, each edge has a cost → weighted graph.
- This A–G graph is reused in every DV and LS example below.
- Cost metric: hops, distance, delay, capacity, reliability, or a mix.
- Best path = minimum TOTAL cost from source to destination.
🎯 How this can come up · 1 question
Which is NOT listed as a possible link cost metric?
Correct: MAC address.
- Static: computed offline and typed in by an admin, can’t react to failures, small networks.
- Dynamic: routers learn from their neighbours and update automatically, at the cost of router complexity.
🎯 How this can come up · 2 questions
Static routing updates automatically when a link fails.
False.
Compare static and dynamic routing.
Static: shortest paths are computed offline and entered manually by the administrator; they change slowly, can’t adapt to failures, and suit small networks. Dynamic: each router learns the network state by talking to its neighbours and fills its own table automatically, adapting to changes, at the cost of more router complexity.
- Routing protocols on neighbouring routers swap updates to keep tables current.
- Three ways to keep the table short or specific: network-specific, host-specific and default routes.
- Host-specific: one row per HOST (A, B, C, D via R1). Network-specific: one row for the whole network N2 → much smaller.
🎯 How this can come up · 1 question
Listing one entry for a whole destination network instead of each host is:
Correct: Network-specific routing.
- Default route 0.0.0.0/0 = “everything else”: here, go to R2 (towards the Internet).
🎯 How this can come up · 1 question
The default route is written as:
Correct: 0.0.0.0/0.
- Forwarding = placing the packet on its route using the forwarding table.
- Destination-address forwarding: look up the destination in the table to find the next hop.
- Try each mask on the destination; the first row that matches wins. /32 = a host-specific row, /0 = default.
- 193.14.5.22 AND /24 = 193.14.5.0 → matches → interface m2 (network specific).
🎯 How this can come up · 1 question
Using the table, a packet for 14.5.6.7 leaves through:
/8 → 14.0.0.0 matches → m1.
- 200.34.12.34 matches nothing → default → m0.
- 192.16.7.1 matches the /32 row exactly → m0 (host specific).
🎯 How this can come up · 1 question
A /32 row in a routing table is a:
Correct: Host-specific route.
- Four attached networks plus a path to the rest of the Internet through 180.70.65.200.
- Rows are sorted from the LONGEST mask (/26) to the shortest (/22), with the default (/0) last. Longest match wins.
- /26 gives .128 (the row wants .192) → no. /25 gives .128 → match → m0.
🎯 How this can come up · 2 questions
Using R1’s table, a packet for 201.4.22.35 leaves through:
/24 → 201.4.22.0 matches.
Using R1’s table, a packet for 201.4.18.7 leaves through:
/22 → 201.4.16.0 matches (16–19).
- No mask matches 25.8.2.10 → default route → next hop 180.70.65.200 through m2.
🎯 How this can come up · 1 question
R1 receives a packet for 25.8.2.10. Walk through the forwarding steps.
Apply /26 → 25.8.2.0 (no match), /25 → 25.8.2.0 (no), /24 → 25.8.2.0 (no), /22 → 25.8.0.0 (no). Nothing matches, so the default row 0.0.0.0/0 is used: send to next hop 180.70.65.200 through interface m2.
- Two shortest-path families: distance vector (Bellman-Ford) and link state (Dijkstra).
🎯 How this can come up · 2 questions
Link-state routing uses which algorithm?
Correct: Dijkstra.
Distance-vector routing is based on:
Correct: Bellman-Ford.
- Each router keeps distances to ALL destinations and sends that whole vector to its NEIGHBOURS, periodically or on change.
- It recalculates when a neighbour’s vector changes or a link goes up/down.
- RIP and EIGRP are distance-vector protocols.
🎯 How this can come up · 1 question
Which is a distance-vector protocol?
Correct: RIP.
- Round 1: only neighbour costs, everything else ∞.
- Bellman-Ford: new cost to X = min(old cost, cost to neighbour + neighbour’s cost to X).
🎯 How this can come up · 2 questions
B–A costs 2 and A’s cost to D is 3. B currently has D at ∞. After A’s update, B’s cost to D is:
min(∞, 2 + 3).
State the Bellman-Ford update rule used in distance-vector routing.
Dx(y) = min over neighbours v of [c(x, v) + Dv(y)]: the cost from x to y is the cheapest of “cost to a neighbour plus that neighbour’s advertised cost to y”, compared with the current value.
- A’s final vector: B 2, C 7, D 3, E 6, F 8, G 9.
🎯 How this can come up · 1 question
In the slide’s graph, the least cost from A to G is:
A–B–E–F–G = 2 + 4 + 2 + 1 = 9.
- Every node ends up with its own least-cost tree.
- LS: measure costs to your neighbours, put them in a packet (LSP), FLOOD it to ALL routers in the area, only on change.
- Every router builds the same map (LSDB) and runs Dijkstra itself. OSPF is link state.
🎯 How this can come up · 2 questions
Which is a link-state protocol?
Correct: OSPF.
In link-state routing, each router sends its link costs to its neighbours only.
False. It floods them to all routers in the area.
- An LSP = “my neighbours and their costs”.
- All routers share the same LSDB (the whole map) but each computes its own tree.
- DV: to neighbours, estimates of everything, periodic, slow to react. LS: to all, exact neighbour costs, on change, fast.
🎯 How this can come up · 2 questions
Compare distance-vector and link-state routing (who receives updates, what is sent, when, and reaction to failure).
Distance vector: sends to neighbours only; sends its estimated cost to every known destination; periodically (e.g. every 30 s); reacts to failures slowly. Link state: floods to all routers in the area; sends the exact cost of its own links to its neighbours; only when something changes; reacts to failures quickly.
Which reacts faster to a link failure?
Correct: Link state.
- AS = networks under ONE administrator, with a unique AS number.
- Inside an AS: intra-AS (interior) routing. Between ASs: inter-AS (exterior).
- Border (gateway) routers run both.
🎯 How this can come up · 1 question
Routing between autonomous systems is called:
Correct: Inter-AS (exterior) routing.
- R1, R4, R5, R6 are border routers: they run interior AND exterior protocols.
- Interior: RIP, EIGRP (distance vector), OSPF (link state). Exterior: BGP (path vector).
🎯 How this can come up · 2 questions
Which protocol routes between autonomous systems?
Correct: BGP.
EIGRP is a:
Correct: Distance-vector interior protocol.
No slides match this filter.
















