HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

ip route list — Display subcommand for IP Routing table management. More information: <https://manned.org/ip-route>.

Submitted by: @import:tldr-pages··
0
Viewed 0 times
tablecommandcliroutingforip route listdisplaysubcommand
linux

Problem

How to use the ip route list command: Display subcommand for IP Routing table management. More information: <https://manned.org/ip-route>.

Solution

ip route list — Display subcommand for IP Routing table management. More information: <https://manned.org/ip-route>.

Display the main routing table:
ip {{[r|route]}} {{[l|list]}}


Display the main routing table (same as first example):
ip {{[r|route]}} {{[l|list]}} {{[t|table]}} {{main|254}}


Display the local routing table:
ip {{[r|route]}} {{[l|list]}} {{[t|table]}} {{local|255}}


Display all routing tables:
ip {{[r|route]}} {{[l|list]}} {{[t|table]}} {{all|unspec|0}}


List routes from a given device only:
ip {{[r|route]}} {{[l|list]}} dev {{ethX}}


List routes within a given scope:
ip {{[r|route]}} {{[l|list]}} {{[s|scope]}} link


Display the routing cache:
ip {{[r|route]}} {{[l|list]}} {{[c|cache]}}


Display only IPv6 or IPv4 routes:
ip {{-6|-4}} {{[r|route]}}

Code Snippets

Display the `main` routing table

ip {{[r|route]}} {{[l|list]}}

Display the main routing table (same as first example)

ip {{[r|route]}} {{[l|list]}} {{[t|table]}} {{main|254}}

Display the local routing table

ip {{[r|route]}} {{[l|list]}} {{[t|table]}} {{local|255}}

Display all routing tables

ip {{[r|route]}} {{[l|list]}} {{[t|table]}} {{all|unspec|0}}

List routes from a given device only

ip {{[r|route]}} {{[l|list]}} dev {{ethX}}

Context

tldr-pages: linux/ip route list

Revisions (0)

No revisions yet.