ITNuvoAkademiya
Academy homePackagesPlaylistsToolsSubnet calculatorSearchGlossary
CiscoCCNA · CCNA: networking fundamentals1. Introduction2. Network Fundamentals3. Network Access4. IP Connectivity5. IP Services6. IPv67. Security Fundamentals8. AutomationCCNP: Enterprise networks · coming soon
LinuxLinux: system administrator üçün · Linux for system administrators1. Getting to know Linux2. Working with text3. Users and permissions4. Processes and packages5. Inside the system6. Monitoring and logs7. NetworkingRed Hat Enterprise Linux · Red Hat Enterprise Linux: from beginner to advanced1. Getting started2. Packages3. Users and permissions4. SELinux5. Services6. Storage7. Networking8. Building services9. Boot and recovery10. DevOps11. Security and monitoring
FortinetFortiGate Administrator · FortiGate Administrator: from first login to ZTNA1. Getting to know FortiGate2. Routing, policy and NAT3. Security profiles4. Users and logs5. Resilience, SD-WAN and automation6. VDOM7. VPN and ZTNA8. Proxy9. DMZ
MonitoringZabbix · Zabbix: from installation to alerts1. Introduction2. Installation and the database3. Basics: groups, templates, users4. Connecting devices5. Alerts, Grafana and the API
VirtualizationProxmox VE · coming soonVMware ESXi · coming soon
My account / Sign in
AZENRU
← itnuvo.com

Default routes and the most specific match (longest match)

Lesson 4.47 minIntermediateNovember 4, 2026

Sign in to read this lesson

A router connected to an ISP doesn't need every Internet network in its routing table: a default route (ip route 0.0.0.0 0.0.0.0 next-hop) matches all networks. Packets the router doesn't know where to deliver are thrown over to the ISP. A router always picks the most specific match (the longest prefix) in its routing table: for 192.168.1.140, the /25 wins over the /16 and /24 entries. The downside of static routes: in a network with many routers you have to write many routes, and there is no backup when a link fails.

What you will learn

  • Default route: ip route 0.0.0.0 0.0.0.0 1.2.3.1. The first 0.0.0.0 = all networks, the second 0.0.0.0 = all subnet masks, 1.2.3.1 = the next hop (the ISP router).
  • A default route matches every network: packets the router doesn't know where to deliver go to the ISP. There is no need to put every Internet network in the routing table.
  • A router always uses the most specific match: when several entries match, the longest prefix wins.
  • Example: destination 192.168.1.140 → /16, /24 and /25 all match, 192.168.1.128 /25 is chosen → 10.3.3.2.
  • The downside of static routes: in a network with many routers you have to configure many routes, and there is no backup: when a link fails you have to edit the routes by hand. Such a network suits dynamic routing better.

The lesson has 5 key points, an explanation and 5 questions. It opens with a package.