Longest Prefix Match
Routing
Overview
Routing compares destination membership against route prefixes and chooses the matching route with the most network bits. A /24 match outranks /16 and /0 regardless of the default route being shorter to configure. Preference only resolves appropriate equal-prefix candidates.
Protocol stages
- 1Destination
- 2Matching prefixes
- 3Longest prefix
- 4Next hop
Interactive exercise
Knowledge check
Routes: 0.0.0.0/0, 10.0.0.0/8, 10.1.0.0/16. Destination 10.1.2.3 uses which?
Educational model — not real hardware, traffic or official certification.