Lesson
Lesson 19: Gateways, routing and NAT
Learning goal
After this lesson, you can apply longest-prefix matching, select a next hop and keep NAT separate from the routing decision.
Why this concept matters
A default route is not always chosen. The host selects the most specific matching route and then frames traffic for the next hop.
Select the most specific route, then build a frame for the next hop.
203.0.113.10Make the route decision before translation
- Collect matching routes.
- Choose the longest prefix.
- Identify interface and next hop.
- Apply NAT or policy separately if present.
From local prefix to next hop
A host compares the destination with local prefixes and then applies longest-prefix matching. The default route is used only when no more-specific route matches.
Most specific precedes default
Choose the most-specific route first and treat translation as a separate function.
NAT is separate
Routing chooses a path; translation changes addresses under policy and does not replace routing. The page records no production measurement or learner execution.
Diagnostic exercise
Takeaway and the next lesson
Routing chooses a path; translation changes addresses under policy and does not replace routing.
Quick review
- What does 0.0.0.0/0 mean?
- Which rule selects among matching routes?
- Is NAT encryption?
Show the explained answers
- A default route matching every destination.
- Longest-prefix match, then tie-breaking rules.
- No.

