Routing policy rules decide whether packets follow the normal routing table or are redirected to another lookup path before a route is chosen. Listing those rules is the quickest way to confirm why a host with multiple uplinks, source-based routing, or marked traffic is not following the expected route.
The ip rule show command reads the routing policy database managed by iproute2. Rules are evaluated by priority, where lower numbers are processed first, and a default Linux system normally shows the built-in local, main, and default lookups.
An unexpected rule above main can override an otherwise correct route table, so rule inspection usually needs to be paired with route-table inspection. If a custom rule points to a numbered or named table, check that table before changing live networking.
$ ip rule show 0: from all lookup local 32766: from all lookup main 32767: from all lookup default
Lower numbers are evaluated first, so priority 0 runs before 32766 and 32767.
A default host usually shows only local, main, and default. Extra selectors such as from 192.0.2.10, fwmark, or iif usually indicate custom policy routing.
$ ip -details rule show 0: from all lookup local proto kernel 32766: from all lookup main proto kernel 32767: from all lookup default proto kernel
The detailed form can expose metadata such as proto kernel and helps confirm how a rule was inserted.
A correct selector with the wrong priority can still lose to a broader rule that is evaluated earlier.