IP Connectivity // Lesson 02

Forwarding Decisions.

Determine how a router chooses a route using longest prefix match, administrative distance and protocol metric.

Longest prefixADMetricRecursive lookupCEF
01 // Mental model

Start with the big picture.

The most specific matching prefix wins before route source or metric is considered.

CCNA focus: Always apply the hierarchy in order: longest prefix, then administrative distance for competing sources, then the routing protocol's metric.
02 // Building blocks

Know what each part does.

01

Longest prefix match

The most specific matching prefix wins before route source or metric is considered.

02

Administrative distance

If identical prefixes come from different sources, the lower trusted distance wins.

03

Metric

If the same protocol offers identical prefixes, its metric selects the best path.

04

Resolution

The router resolves the next hop to an exit interface and Layer 2 adjacency before forwarding.

03 // Compare and recognise

Read the clues.

ItemWhat to remember
/32 versus /24A matching /32 host route wins because it is more specific.
Static versus OSPFFor the same prefix, default static AD 1 beats OSPF AD 110.
Two OSPF pathsThe lower OSPF cost wins; equal costs can be installed together.
No specific matchA default route is used if present; otherwise the packet is dropped.
04 // Decision walkthrough

Decision walkthrough.

Packet destination: 10.20.30.42
Known routes:
10.0.0.0/8 via R2
10.20.0.0/16 via R3
10.20.30.0/24 via R4
0.0.0.0/0 via ISP

Selected route: 10.20.30.0/24 via R4

Read the example from top to bottom, then verify the resulting state. Configuration is only complete when the output matches the intended design.

05 // Exam and troubleshooting

Turn facts into a method.

  • A matching /32 host route wins because it is more specific.
  • For the same prefix, default static AD 1 beats OSPF AD 110.
  • The lower OSPF cost wins; equal costs can be installed together.
  • A default route is used if present; otherwise the packet is dropped.
Exam checkpoint: Always apply the hierarchy in order: longest prefix, then administrative distance for competing sources, then the routing protocol's metric.
06 // Check yourself

Forwarding Decisions quiz.

1. Which route wins for 10.20.30.42 when /8, /16 and /24 all match?

2. When is administrative distance compared?

3. What happens if no route, including a default, matches?

4. What does a lower routing metric generally mean?

5. Does a lower AD make a /8 beat a matching /24?

Score: 0 / 5