2.1 Explain characteristics of routing technologies
Route Selection
📘CompTIA Network+ (N10-009)
Prefix Length in Route Selection
Prefix length is a critical concept in networking that helps routers determine the most specific route to send traffic. It’s closely tied to subnetting and IP addressing.
1. What is Prefix Length?
- The prefix length tells you how many bits of an IP address are used to identify the network portion.
- It’s written in CIDR (Classless Inter-Domain Routing) notation, for example:
192.168.1.0/24/24is the prefix length
- The bigger the number, the more specific the network:
/24→ 255.255.255.0 → 256 addresses/28→ 255.255.255.240 → 16 addresses
Key Idea:
- The network with the longest prefix (most bits in the network portion) is the most specific route.
- Routers use this to make routing decisions when multiple routes exist to the same destination.
2. Why Prefix Length Matters in Route Selection
When a router receives traffic, it looks at its routing table to decide where to send the packet. If there are multiple matching routes, the router chooses:
- The route with the longest prefix length (most specific)
- If the prefix lengths are equal, the router may use administrative distance to decide
Example Routing Table:
| Destination | Prefix | Next Hop |
|---|---|---|
| 192.168.1.0/24 | /24 | Router A |
| 192.168.1.0/16 | /16 | Router B |
- Traffic for
192.168.1.50→ matches both routes - Which route is used?
/24is more specific than/16, so Router A is chosen.
Tip for the exam: Longest prefix = most specific = preferred route.
3. How Prefix Length Works with Subnets
- Prefix length defines the size of the subnet.
- A smaller prefix length → bigger subnet → more IP addresses
- A larger prefix length → smaller subnet → fewer IP addresses, more specific routing
Example:
| Network | Prefix Length | Number of IPs | Specificity |
|---|---|---|---|
| 10.0.0.0/8 | /8 | 16,777,216 | Low |
| 10.1.0.0/16 | /16 | 65,536 | Medium |
| 10.1.1.0/24 | /24 | 256 | High |
Routing Decision:
- Packet for
10.1.1.25→ sent to/24route, because it’s the most specific.
4. How This Appears in IT Environments
- Internal Networks:
- Large company networks often have multiple subnets. Routers use prefix length to make sure traffic goes to the correct department or VLAN.
- Internet Routing:
- ISPs advertise networks with different prefix lengths.
- Routers always prefer the longest prefix match to direct traffic accurately.
- Firewall & ACL Rules:
- When applying rules, network admins often use prefix lengths to target specific subnets.
- VPNs:
- When multiple VPN routes exist, routers use prefix length to decide which VPN tunnel to send traffic through.
5. Key Points to Remember for the Exam
- Prefix length = number of network bits in the IP address.
- Longest prefix match is always preferred for route selection.
- Smaller subnets (larger prefix lengths) = more specific route.
- If multiple routes have the same prefix length, routers fall back on administrative distance.
- Found in routing tables, used in both IPv4 and IPv6 networks.
6. Quick Memory Trick
- Think: “More bits = more specific = preferred route”
- Example:
/28 > /24 > /16 > /8when deciding which route to take.
✅ Exam Tip:
On CompTIA Network+, you may get a routing table and a destination IP. Your task will be to identify which route the router will choose, and the rule is always: longest prefix match wins.
