The big picture
When you studied IPv4 you used a routing table to choose a next hop. This lecture explains where those instructions come from, how routers send packets using them, and what happens when the network changes. It moves from one router’s table to networks of routers that cooperate.
Read in order: Routing Forwarding and Convergence → Distance Vector Routing and Failure Recovery → Link State Routing and Dijkstra → Hierarchical Routing and Route Redistribution. The explanations below also stand alone. Examples labeled as added are teaching examples, not reproductions of source diagrams.
Source and map
Alessio Sacco, Politecnico di Torino, Forwarding and Routing Algorithms, based on a previous version by Fulvio Risso. Local source: 04-Routing.pdf, 146 PDF pages. 04 follows the filename, not a verified lecture date. References here use PDF page order; printed slide numbers differ because slides are omitted. The source PDF and figures remain local; these notes are original study explanations.
| PDF pages | Topic |
|---|---|
| 2–17 | Network-layer roles, routing versus forwarding, RIB/FIB, destination, label and source forwarding |
| 18–45 | Routing objectives, metrics, transient failures, multipath and multiple address families |
| 46–63 | Static, random, flooding, centralized, isolated and distributed approaches |
| 64–95 | Distance vector, convergence, count to infinity, safeguards, DUAL and path vector |
| 96–125 | Link state, flooding, shortest paths, shared networks, comparison with DV |
| 126–146 | Hierarchical routing, domains, route redistribution, metrics and administrative distance |
1. Forwarding is the action; routing provides the directions
An end system is the source or destination of a transfer. An intermediate system, usually a router, forwards traffic between networks. The network layer provides internetwork delivery; IP’s usual service is connectionless and best effort, as explained in IPv4 Datagram Service and Forwarding.
Routing finds destinations and selects directions according to a criterion. Forwarding uses local instructions for each arriving packet. A RIB holds routing information; a FIB organizes selected forwarding information for fast use. Implementations differ. In the source example, 30.3.3.0/24 is reached via neighbor 20.2.2.3; packets retain their final IP destination, while the local frame is addressed to that neighbor’s MAC. A default route matches remaining traffic. Routing Forwarding and Convergence
Three forwarding ideas appear in the slides: use the packet’s destination and a local lookup, swap a label at each hop, or carry path instructions in the packet. MPLS applies label switching to groups of packets; a label does not by itself guarantee bandwidth or require per-application-connection setup. Source routing shifts path selection toward the sender; operational implementations differ from a literal complete path.
2. What makes a route good?
A metric describes what the algorithm tries to optimize. Hop count counts links or routers under a protocol’s rules; other metrics reflect configured cost or other criteria. With link costs 1 + 1 on A–B–C and 5 on A–C, the two-link path costs 2 and is preferred under additive cost. Changing the metric can change the result. Metrics from different protocols may not be comparable.
A useful routing system should find consistent paths, adapt to failures, and use reasonable resources. Dynamic load-based measurements can make traffic repeatedly shift between routes, producing instability. Different routers need compatible decisions; otherwise packets may circulate.
When a failure occurs, information needs time to travel. During this transient, a black hole can drop packets and a routing loop can repeatedly forward them until TTL or Hop Limit expires. Convergence is the move toward a stable consistent state. A new route, a failed route and a changed cost can have different effects; not every transient drops traffic. Routing Forwarding and Convergence
Multiple equal-cost paths can share traffic. ECMP often chooses a path by hashing flow fields, helping keep a flow in order. Different flows may still be unevenly distributed; exact behavior depends on the implementation. Sending consecutive packets down paths of different delays can reorder them.
3. Different ways to discover directions
A connected route is typically installed for an active attached network. A static route is configured rather than learned from a routing protocol. A floating static route has a less-preferred source priority and may serve as a backup when the preferred route disappears. A small network with a single upstream connection can often use a default route, but the upstream must also know how to return traffic to that network. IPv4 Static Routing Paths and ARP
Dynamic methods adapt to changing information. In a centralized approach a controller calculates or distributes instructions; in distributed routing routers exchange information and make decisions. In isolated approaches decisions use local observations. A hot-potato queue-based forwarding example sends traffic toward a less congested outgoing interface; this differs from the inter-domain nearest-exit use of the same phrase.
A random walk selects an outgoing direction randomly; it is simple but can take a long route or fail within a limited lifetime. Flooding copies traffic onto multiple links, increasing reachability at the cost of duplicates and traffic. A hop limit bounds lifetime; duplicate detection can reduce repeated forwarding at the cost of memory and bookkeeping. Controlled flooding also distributes link-state information, not ordinary user packets indiscriminately. Backward learning learns a direction toward a source from where its traffic arrived; it does not automatically prove a current optimal forward path.
The slides also contrast routing multiple address families with a shared protocol process versus separate processes, sometimes called “ships in the night.” Sharing hardware does not mean IPv4 and IPv6 necessarily use the same route information.
4. Distance vector: ask the neighbors
Each router advertises known destination costs to neighbors. A receiver adds its cost to the neighbor, compares alternatives and records a next hop. Example: if B reaches network N at cost 2 and A reaches B at cost 1, A’s candidate through B costs 3. Routers need not know the full map. Updates propagate over time. Distance Vector Routing and Failure Recovery
The risk is that a neighbor’s seemingly independent answer may actually depend on the router asking. After a failure, two routers can feed stale information back to each other, increasing the apparent cost step by step: count to infinity. This can create a temporary forwarding loop. A finite infinity bounds the process but restricts usable metric range.
Split horizon suppresses an advertisement back toward where a route was learned; poisoned reverse explicitly reports it unreachable in that direction. Route poisoning announces a failed route as unreachable; hold-down restricts some updates for a time. These reduce particular failure modes but do not magically eliminate all loops, especially in larger meshes. Triggered updates can speed notification, not make every router update simultaneously.
DUAL adds feasibility conditions and coordinated recovery for loop-free route selection, at additional complexity. Path-vector routing carries path information to help detect loops. BGP uses AS paths and policy, not simply shortest-distance routing.
5. Link state: build a map
Routers discover neighbors, describe their own links and costs, and distribute those descriptions within a domain. Each router builds a link-state database and calculates routes with itself as the starting point. It knows more topology than basic distance vector, but requires database, flooding, adjacency and calculation machinery. Link State Routing and Dijkstra
Added example: A–B costs 1, B–C costs 2, and A–C costs 4. Starting at A, Dijkstra first chooses B at cost 1. It then discovers C through B at cost 3, improving on the direct cost 4. A’s next hop for C is B. Each router calculates its own shortest-path tree from its own perspective. This is a shortest-path tree, not necessarily a minimum spanning tree.
On a shared LAN, a protocol can use a representative or pseudonode to limit adjacency and flooding overhead; that control-plane representation does not require all data traffic to cross the representative. New adjacencies need database synchronization. During a change, flooding and computation take time, so temporary loops remain possible.
DV and link state can produce the same best paths when they use equivalent topology, metrics and policy. Their actual convergence and overhead depend on the protocol and deployment; the source’s broad comparisons are teaching generalizations, not guarantees.
6. Hierarchy: keep large networks manageable
A routing domain or area groups routers under a routing process. A domain can know its internal topology while seeing external destinations through border routers rather than learning every external link. Summarization can group suitable prefixes but is separate from hierarchy and may attract traffic for unused space. Hierarchical Routing and Route Redistribution
The slides illustrate selecting the closest exit to another domain. This can reduce the local part of a journey while producing a longer total path. Real exit selection can also depend on policy and route attributes. Paths can be asymmetric, and a partition may make a route unusable despite a physical connection through another domain if transit is not permitted.
Redistribution transfers selected route information between routing processes. It must account for incompatible metrics, filters and potential feedback. An advertised destination does not disclose the full original topology. A route learned in one unit, such as hop count, cannot simply be interpreted as a delay.
Administrative distance is a platform-specific local preference between competing route sources for the same prefix; the metric normally compares routes within the relevant source or protocol. Longest-prefix matching is the separate later forwarding choice between installed matching prefixes. The numeric table in the slides is a source-specific Cisco example, not a universal protocol property.
Review without a quiz
- First identify the destination and distinguish the final IP address from the immediate next hop.
- Separate how a route is learned from how a packet is forwarded using it.
- For a failure, trace which router learns what, when; stale information explains loops and black holes.
- For DV, add link cost to a neighbor’s advertised cost. For link state, construct the map, then calculate paths from the current router.
- For hierarchy, distinguish the path inside a domain, the selected exit, and the information actually shared across the boundary.
Related
Internet Architecture and Technologies · Lecture 01 - IPv4 Addressing and Routing · Exercise 01d - IP Static Routing · IPv4 Routing Tables and Longest Prefix Matching