ip-route-list
displays entries from the kernel routing tables
TLDR
SYNOPSIS
ip route { list | show } [[to] [root | match | exact] PREFIX] [table TABLE] [vrf NAME] [proto RTPROTO] [type TYPE] [scope SCOPE] [dev DEV] [via PREFIX] [src PREFIX]
DESCRIPTION
ip route list displays entries from the kernel routing tables. The main table contains user-configured routes, while the local table contains routes for local addresses automatically maintained by the kernel.Without a command, ip route defaults to list; show is a synonym. Routes show the destination network, gateway or interface, and various attributes like metrics, source preference, and protocol that added the route.
PARAMETERS
to [root | match | exact] PREFIX
Select destinations: root lists prefixes not shorter than PREFIX, match those not longer than PREFIX (covering routes), exact (default) only that prefix. Without a prefix, the whole table is listedtable TABLE
Routing table: main (254), local (255), all (0), or custom name/numberdev DEVICE
Show routes for specific device onlyscope SCOPE
Filter by scope: global, link, hostvrf NAME
Show routes of the table bound to a VRFcached, cloned
Show cloned/cached routes (equivalent to table cache)via PREFIX
Only routes whose next hop matches PREFIXsrc PREFIX
Only routes with a preferred source address in PREFIXtype TYPE
Route type: unicast, local, broadcast, multicast, etc.proto PROTOCOL
Filter by routing protocol: kernel, boot, static, dhcp, ra, bgp, etc.
INSTALL
CAVEATS
The IPv4 routing cache was removed in Linux 3.6, so cached only shows IPv6 exception routes on modern kernels. Very large routing tables may produce extensive output. Multiple tables exist for policy routing setups.
HISTORY
ip route list is part of iproute2 and replaces the older route command. It provides comprehensive access to Linux's advanced routing features including multiple tables and policy routing.
SEE ALSO
ip(8), ip-route(8), ip-route-add(8), ip-rule(8)
