Premium apps Part of Signalhouse

Signalhouse Route Lookup & Packet Path Simulator (longest prefix match)

Which route wins? Longest prefix match, distances, ECMP — or a hop-by-hop packet walk.

Routing table

One route per row. Protocol: connected, local, static, blackhole (null route), ospf, rip, eigrp, isis, ebgp or ibgp. Leave distance empty for the default (connected 0, static 1, eBGP 20, OSPF 110, RIP 120, iBGP 200).

Routing table
#PrefixNext hopInterfaceProtocolDistanceMetricDescription
1
2
3
4
5
6
7
More options

Comma-separated, e.g. eth1. Their connected routes disappear and routes through them stop working.

Instead of a table: a topology exported from the Signalhouse Network lab ({ nodes, links }). Then name the start device and the destination below.

bytes

Try an example: Longest prefix match, ECMP, a floating backup and recursive next hops · RFC 4632 rule 2: the child network’s discard route stops a loop · IPv6: connected /64, default route and a more specific static route · Packet walk through the Network lab example “aggregate without a null route” · Packet walk with an asymmetric return path

More about this tool

How it works

Paste a routing table (connected, static, null, OSPF, BGP … routes with next hops, administrative distances and metrics) and destination addresses: the simulator builds the forwarding table like a router — best distance, then metric, equal-cost paths, recursive next hops, interfaces that are down — and explains for every destination which route wins by longest prefix match and why the others lose. With a Signalhouse Network lab topology it walks a packet hop by hop and finds blackholes, forwarding loops, MTU drops and asymmetric return paths.

  • Each route is first checked for usability: its interface must be up, a next hop without an interface must resolve through another route (recursively, at most 8 levels, never through its own prefix) and a distance of 255 means unusable.
  • Per prefix the router installs the usable route with the lowest administrative distance, then the lowest metric; several routes with the same best distance and metric are installed together as equal-cost paths (ECMP). The others stay as backups — a static route with a higher distance is a “floating” backup.
  • A lookup takes the longest installed prefix that contains the destination (RFC 1812, RFC 4632). Connected prefixes are delivered with ARP or Neighbor Discovery, local addresses are received, discard routes drop the packet, no match means ICMP destination unreachable.
  • Default distances follow Cisco IOS (connected 0, static 1, eBGP 20, EIGRP 90, OSPF 110, IS-IS 115, RIP 120, iBGP 200). Other vendors use other defaults — set the distance column to match your platform.
  • Topology mode repeats the lookup on every router of the path, decrements the TTL, resolves the next hop on the egress segment (through switches), checks the MTU (DF set: drop with “fragmentation needed”; IPv6: “Packet Too Big”), detects loops by a second visit of the same router and compares the return path link by link.

A teaching and planning simulation: it does not model policy routing, VRFs, route maps, NAT, ACLs or dynamic protocol timers. The link-state protocol of topology mode is a simplified single-area SPF.

Sources

Part of Signalhouse

  • Signalhouse Website & internet infrastructure inspector

    Inspect DNS, TLS, mail, CDN and routing of all your domains — and see what changed.

    Open Signalhouse

Related tools

How to use the Signalhouse Route Lookup & Packet Path Simulator

Find out which route a router picks for an address, why the others lose, and follow a packet hop by hop through a lab topology.

What it is for

"Why does traffic for this address leave through the wrong interface?" Answering that means applying three rules in the right order: longest prefix match, then administrative distance, then metric. You also have to notice routes that cannot be used at all. This tool applies the rules to a routing table you paste and explains each decision in sentences.

It suits network students, admins checking a change, and anyone reading show ip route output. With a topology exported from the Signalhouse Network lab it walks a packet across several routers and reports loops, blackholes, MTU drops and asymmetric return paths. It simulates forwarding decisions only: no NAT, ACLs, VRFs or policy routing, and no real devices.

Worked example

A branch router has fibre on eth0, an LTE backup on lte0 and the head office behind eth1. The table has the connected networks 198.51.100.0/30, 100.64.0.0/30 and 192.0.2.0/24. It also has a default route via 198.51.100.1 (fibre), a second default via 100.64.0.1 with distance 10 (LTE backup), 10.0.0.0/8 via OSPF with metric 20, and a discard route 10.50.0.0/16 to Null0. To simulate a fibre cut, enter eth0 as down and look up 10.50.3.4, 9.9.9.9 and 10.7.0.1.

  • 10.50.3.4 matches three prefixes. The /16 is the longest, so the packet is discarded by the null route, even though a /8 and the default also match.
  • 9.9.9.9 only matches the default route. The fibre route is "not usable: the next hop 198.51.100.1 is not reachable through any other route", because its connected network went down with eth0. The floating LTE route with distance 10 takes over: next hop 100.64.0.1 on lte0.
  • 10.7.0.1 goes through the OSPF /8 to 192.0.2.1 on eth1.

A warning notes that two routes are not usable.

How to read the result

Lookups gives one line per destination: matched prefix, route type, action (forward, deliver on a connected network, local address, discard, or drop) and next hop, with all equal-cost paths. Each "Why … goes this way" list explains which prefixes contain the address, which is longest, which routes for it lost and why, and whether the next hop was resolved recursively.

Routing table repeats your routes with a status. Installed is the best route; installed (ECMP) is one of several equal routes. Backup lost on distance or metric. Not usable means the interface is down, the next hop cannot be reached or the distance is 255.

In topology mode a hop-by-hop table shows the matched route, egress interface, gateway and TTL at every router, and a second table shows the return path.

Tips and common mistakes

  • Prefix length always comes first. A static /24 beats an OSPF /16, whatever their distances.
  • Leave the distance empty to use the defaults: connected 0, static 1, eBGP 20, OSPF 110, RIP 120, iBGP 200. These are Cisco's values, so enter your vendor's if they differ.
  • A static route with only a next hop is resolved through the table. If that resolution fails, the route quietly disappears, which is why floating backups exist.
  • Rows with protocol "blackhole" or the interface Null0 are discard routes. Use them for aggregates you announce.

FAQ

What is administrative distance?

It is a trust ranking between route sources. It only decides between routes for exactly the same prefix; it never beats a longer prefix.

Does it show load balancing?

Equal routes (same distance and metric) are installed together and listed as ECMP paths. A real router spreads flows over them by hash; the packet walk follows the first one and lists the others.

Why did my route resolve through the default route?

Recursive next hops may resolve through any other route, the default included, but never through the route's own prefix. That matches common router behaviour.

Can it find routing loops?

In topology mode, yes: when a packet reaches the same router twice, the walk stops and names the loop. The lab example "Aggregate without a null route" shows the loop from RFC 4632 section 5.2.

Guide last updated:

For scripts and AI agents

  • JSON API: POST https://signalhouseroutelookup.usefulweb.site/api/v1/calculate (same calculation as this page)
  • Interface description: OpenAPI 3.1 · AI guide: llms.txt
  • MCP server (Streamable HTTP): https://signalhouseroutelookup.usefulweb.site/mcp · tool name signalhouse_route_lookup
Example request
curl -s -X POST https://signalhouseroutelookup.usefulweb.site/api/v1/calculate \
  -H 'content-type: application/json' \
  -d '{…see OpenAPI examples…}'
Feedback · ideas & bug reports welcome