Home/Blog/CCNA & Routing
9 min readReviewed

Routing basics: how packets find their destination

How routers use prefix length, administrative distance and metrics when selecting routes and forwarding packets.

What you will take away

Knowledge you can put to work.

  • Read routing tables by prefix, route source and next hop
  • Understand longest-prefix match and administrative distance
  • Check forward and return paths separately

A router forwards using the most specific matching destination prefix. Route source, administrative distance and metrics select competing routes to the same prefix; working communication also requires a return path.

A router connects IP networks

Switches connect devices within a Layer-2 network; routers connect different IP networks and separate broadcast domains. A client sends destinations outside its local prefix to its default gateway. The routing table identifies destination networks and their next hops.

Connected routes come from active interfaces. Static routes are configured administratively. Dynamic protocols such as OSPF, EIGRP and BGP exchange reachability information. Static routing is straightforward for small networks and creates no routing-protocol traffic, but scales poorly and does not itself provide automatic failover. Dynamic routing can reroute after failures and support larger networks at the cost of configuration complexity, CPU and bandwidth.

The most specific matching entry wins

Longest-prefix match chooses the greatest matching prefix length for the packet's destination. A matching /24 beats a default /0 regardless of display order. When multiple sources offer the same prefix, administrative distance and the protocol's metric help select the route.

A simplified Cisco routing table can be viewed with show ip route. C means connected, S static, O OSPF and S* a static candidate default. Bracketed values in the examples show administrative distance and metric.

  • C 192.168.1.0/24 is directly connected, GigabitEthernet0/0
  • S 10.0.0.0/8 [1/0] via 192.168.1.254
  • O 172.16.0.0/16 [110/2] via 192.168.1.2
  • S* 0.0.0.0/0 [1/0] via 203.0.113.1

Resolve the next hop and outgoing interface

A route is usable only if the next hop is reachable. Recursive resolution associates it with a directly reachable outgoing path; without that basis a route may not be installed or usable even if its destination prefix is correct. Ethernet then uses ARP or Neighbor Discovery to resolve the Layer-2 address.

A default route is a fallback for otherwise unmatched destinations, not a replacement for a complete routing design. Summaries reduce table size but must not draw unintended networks toward the wrong path.

Reachability needs a return path

Check source, destination, selected route, next hop and the route back. An echo request may arrive while its reply has a missing or different path. Stateful firewalls are particularly sensitive to asymmetric routing.

Traceroute exposes visible Layer-3 hops, but devices do not all respond the same way. Combine the routing table, CEF or forwarding entries, ACL counters and captures for a fuller picture.

Practical checklist

  1. 01

    Record exact source, destination and expected prefix.

  2. 02

    Trace longest-prefix match in the routing table.

  3. 03

    Check next-hop reachability and outgoing interface state.

  4. 04

    Investigate return routes and asymmetric paths.

  5. 05

    Analyse ACLs, NAT and firewalls separately after confirming routing.

Frequently asked questions

Why is the route with the lowest metric not chosen?

The most specific prefix comes first. Administrative distance and metrics compare competing paths to the same prefix, with metrics interpreted within their routing protocol.

What does a default route do?

It handles destinations without a more specific matching entry, usually by pointing to an upstream or internet gateway.

From reading to action

How Bissolux can help

Turn the checks in this guide into a practical plan. Tell us about your systems and requirements so we can agree the work, responsibilities and scope.

Infrastructure diagram connecting workstations, network, servers and separate backupAdvertisement · Bissolux
Illustrative service preview
Bissolux · our offerA system that fits

IT infrastructure

Plan network, server and cloud capacity, access and ongoing responsibilities around your actual workloads.

Illustrative planning workspace with system documentationAdvertisement · Bissolux
Illustrative working environment
Bissolux · our offerClarity for your IT

IT planning and architecture

Review dependencies, requirements and operating costs before choosing the next implementation step.