Routing Fundamentals
Understand how routers choose paths using static routes, dynamic protocols, metrics, and NAT.
- Certification
- CompTIA Network+
- Recommended study time
- 6h 35m
- Status
- Not started
Recommended study time
About 6h 35m in total, measured from the material on this page. At your session length of 45 minutes that is 9 sittings.
- Read the lesson22 min
About 2,799 words at a careful technical reading pace.
- Second pass with notes13 min
Re-read the harder parts and write your own notes.
- Recall from memory12 min
2 written recall questions.
- Practice decision12 min
One applied decision with feedback.
- Teach it back20 min
Write the topic in your own words.
- Real-world scenario15 min
Read the situation and justify your decision in writing.
- Hands-on practice3h 20m
Labs, commands and configuration until you can do it unaided.
- Spaced review1h 40m
4 short review sessions spread over the following weeks.
Learning objectives
- Read a routing table and predict the chosen path for a destination.
- Compare static routing with dynamic protocols and their trade-offs.
- Explain NAT behaviour and its effect on inbound connectivity.
Start here
About 8 minutes of reading, in 10 short parts.
Routing is the process that lets networks that would otherwise be isolated islands actually reach each other. A router's decision about where to send a packet next is entirely deterministic, based on a routing table it either built by hand or learned automatically. Understanding routing turns 'the network is slow' into a specific, provable statement about a specific path.
Where you meet it: A remote office reports it can reach some internal servers but not others, and an engineer reads the router's routing table to find a missing or incorrect route rather than guessing.
The lesson, part by part
Open one part at a time. Each part stands on its own, so you can stop and come back.
A router is like a signpost at a junction that only knows the next turn to take, not the whole journey. Every router along a path makes its own local decision about which direction gets a packet closer to its destination, and the packet hops from signpost to signpost until it arrives.
Static routing is like giving someone a hand-written list of turns for specific destinations, which works fine until something changes and the list becomes wrong. Dynamic routing is like signposts that talk to each other and automatically update themselves when a road closes, at the cost of needing more setup and trust between them.
Key ideas
If you remember nothing else from this topic, remember these.
- A router forwards packets between different networks by consulting its routing table for the most specific matching entry, a principle known as longest prefix match.
- Static routes are manually configured and predictable but do not adapt automatically to link failures, while dynamic routing protocols exchange information to adjust automatically.
- Distance-vector protocols like RIP share entire routing tables with neighbours and select paths mainly by hop count, while link-state protocols like OSPF build a full topology map and select paths by cost.
- The default route, written as 0.0.0.0/0, is the catch-all entry used when no more specific route matches a destination.
- Administrative distance is used to choose between routes learned from different sources when multiple protocols report a route to the same destination, with a lower value being preferred.
- A routing loop or a missing return route often produces symptoms that look like a firewall block, so route tables must be checked as part of connectivity troubleshooting.
Diagnosing a one-way connectivity failure using route output
A worked example, step by step.
A branch office router can ping a data centre server, but the data centre cannot reply-appearing traffic never returns, and users report the connection times out.
- 01Confirm the outbound pathRun traceroute 10.50.0.20 from the branch router and see it exit successfully through the WAN link to the data centre, arriving at the destination hop.
- 02Check the branch routing tableRun show ip route on the branch router and confirm a route for 10.50.0.0/24 exists via the WAN interface, so outbound traffic is correctly directed.
- 03Check the data centre routing tableRun show ip route on the data centre router and find no entry at all for the branch's subnet 192.168.30.0/24, meaning return traffic has nowhere to go and is silently dropped.
- 04Interpret the findingRecognize this as a missing return route rather than a firewall block, since the outbound leg succeeds cleanly.
- 05Add the missing static routeConfigure ip route 192.168.30.0 255.255.255.0 10.50.0.1 on the data centre router, pointing back toward the branch.
- 06Verify propagationIf dynamic routing is in use instead, confirm the branch subnet is being advertised into OSPF or the appropriate routing process rather than only relying on a static entry.
- 07Retest connectivityPing from the data centre server to a branch workstation and confirm a reply is now received.
- 08Confirm from the user sideHave branch users retest their original application and confirm the session completes successfully in both directions.
Outcome: The issue was a missing return route at the data centre, not a firewall rule, found by comparing routing tables on both ends rather than assuming a security block.
Routing concepts and protocol comparison
Worth keeping at hand while you work.
- Longest prefix match
- The router chooses the most specific matching route, a /24 over a /16 for the same destination
- Default route (0.0.0.0/0)
- Catch-all route used when no specific match exists
- Static route
- Manually configured, predictable, does not adapt to failures automatically
- Dynamic route
- Learned and adjusted automatically via a routing protocol
- RIP
- Distance-vector protocol, selects paths by hop count, max 15 hops
- OSPF
- Link-state protocol, selects paths by cost, uses full topology awareness
- BGP
- Path-vector protocol used between autonomous systems on the internet
- EIGRP
- Advanced distance-vector protocol using metrics beyond simple hop count
- Administrative distance
- Trustworthiness ranking used to prefer between routes from different sources; lower is preferred
- Convergence
- The time it takes all routers to agree on the current topology after a change
- NAT
- Translates private addresses to public ones, often performed at the routing edge
- show ip route
- Command used to inspect a router's current routing table
Common misunderstandings
What most beginners get wrong here.
A router only needs a route to the destination to guarantee two-way communication.
Both directions of traffic need a valid route on their respective routers; a missing return route breaks communication even though the outbound path works.
Dynamic routing protocols are always better than static routes.
Static routes are often preferred for simple, stable, or small networks because they are predictable and have no protocol overhead; dynamic routing suits complex or frequently changing topologies.
RIP and OSPF choose paths the same way, just with different names.
RIP chooses purely by hop count regardless of link speed, while OSPF chooses by cost, which typically reflects bandwidth, so OSPF often picks a faster path RIP would ignore.
The default route is used for every packet regardless of more specific routes.
The default route is only used when no more specific route matches, due to the longest prefix match rule.
Administrative distance and metric are the same value.
Administrative distance ranks the trustworthiness of the source protocol, while metric measures the cost within a single protocol's own path selection.
Exam traps
How the question writers try to catch you out.
- Network+ scenario questions often describe one-directional failures and expect you to check routes on both ends, not assume a firewall issue.
- Expect questions asking which route is chosen when both a /24 and a /16 match the same destination, testing longest prefix match.
- Distance-vector versus link-state classification questions frequently list RIP, EIGRP, OSPF, and BGP and ask you to categorize them correctly.
- Administrative distance questions test recall of default preference ordering, such as a directly connected route being preferred over both static and dynamic routes.
- Traceroute output interpretation questions expect you to identify the hop where packets stop progressing, indicating where the path is broken.
Check yourself
Answer in your head first, then reveal. This is not scored.
Why might traffic reach a destination but replies never return?
What rule determines which route is used when multiple routes could match a destination?
What is the key difference between RIP and OSPF in path selection?
When is a default route used?
What command shows a router's current set of known routes?
What does administrative distance determine?
Quick reference
A condensed summary of the lesson above, for revision.
What It Is
A router forwards packets by matching the destination against its routing table, preferring the longest matching prefix, then administrative distance, then metric. Routes come from directly connected interfaces, static configuration, or dynamic protocols such as OSPF, EIGRP, and BGP. NAT rewrites addresses, commonly translating many private hosts to one public address.
Why It Matters
Asymmetric paths, missing return routes, and NAT surprises cause outages that look like application faults. Routing knowledge is also the bridge to cloud networking, where route tables are explicit configuration objects.
How It Works
- Each packet is matched against the table independently, hop by hop.
- Dynamic protocols exchange reachability information and recompute on topology change.
- NAT devices keep a translation table mapping internal sessions to external ports.
Where You See It
- Branch routers, firewalls, VPN gateways, cloud route tables, and internet edge design.
Key Terms
- Longest prefix match
- The most specific matching route wins.
- Administrative distance
- Trustworthiness ranking between route sources.
- Metric
- A protocol's cost value used to compare paths.
- Default route
- 0.0.0.0/0, used when no more specific route matches.
- PAT
- Port address translation, mapping many hosts to one public IP by port.
Examples
- A /32 host route is preferred over a /24 covering the same address because it is more specific.
- Inbound connections to a NATed host require an explicit port forward or reverse proxy.
Common Problems
- Missing return route
- Overlapping or shadowed routes
- Asymmetric routing through a stateful firewall
- Broken port forwarding
How It Fails
- A stateful firewall drops asymmetric return traffic even though both paths exist.
- A more specific incorrect route silently overrides the intended default path.
- Losing dynamic adjacency can black-hole traffic until a timer expires.
How to Troubleshoot
- Check the route table on both ends, not just the source.
- Use traceroute in both directions where possible.
- Confirm NAT and firewall state for the specific session, not just the network path.
Practical Knowledge
- Document static routes with a reason; unexplained routes outlive their authors.
- Prefer summarised, hierarchical addressing to keep routing tables small and stable.
Exam Coverage
- Routing tables and path selection
- Static versus dynamic routing
- NAT, PAT, and port forwarding
Interview Questions
- Explain longest prefix match with an example.
- Why can asymmetric routing break a firewalled connection?
Watch and read
Verified official and reputable sources for this topic. Links open in a new tab.
Lesson notes and bookmark
Notes and bookmarks for this lesson, saved with everything else you have marked.
No notes on this item yet.
Learning progress
0% across six evidence areas. Reading alone does not change progress.
Prerequisites
Next steps
- 01Print a routing table and identify the route that would carry traffic to 8.8.8.8.
- 02Trace a path with traceroute and interpret each hop.