List *all* IP routes to a destination in the Linux routing table

Navin

ip route get 2607:f8b0:4005:804::200e will show me the best (longest prefix) route to google.com, but it does not show all routes that can take me there.

Right now I am using ip -6 route show | grep 2607:f8b0:. This prints the right routes, but it also prints every other route in that /32.

There has got to be a better way.

aldem

There is an easy way to list all routes matchig prefix on linux :

ip -6 route list match 2607:f8b0:4005:804::200e table all

This will list all possible routes to specified target (including default, if no more specific is found) in all tables. Obviously, this works for IPv4 too.

PS: I know that my answer is a bit too late, and most likely you have figured this on your own already, but nevertheless - whoever hits this question may find it helpful :)

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Two lines with the same ip destination in routing table

From Dev

Linux - How to delete routing table all at once?

From Dev

ip routing table basics

From Dev

iptables routing incoming IP to another destination IP question

From Dev

MVC Routing match all routes except resources

From Dev

Understanding basic IP routing in linux

From Dev

IP addresses not found in routing table

From Dev

Is it possible to change order of routes in routing table when using attribute routing?

From Dev

List all registered routes in Vertx

From Dev

Application specific routing table in linux

From Dev

linux ip routing: 2 default gateways

From Dev

linux ip routing with multiple uplinks SINGLE interface

From Dev

routing table, ip address for outgoing packet

From Dev

nodejs routing: all routes with authentication except first page

From Dev

Using attribute routing on a controller is forcing me to manage all routes

From Dev

Send IP packet from Linux Kernel without destination mac address

From Dev

Rails.application.routes list all routes and determine controller

From Dev

Rails.application.routes list all routes and determine controller

From Dev

A SQL query that will list all the routes, a coordinate falls or closest routes to the coordinate

From Dev

Why does a routing rule directing to a local network interface accept more than one destination IP addreses?

From Dev

List all rails routes with http method associated

From Dev

How to programmatically list all devise routes

From Dev

List all routes with group in php slim 3

From Dev

How to get all latitudes and longitudes from source place to destination place from different routes

From Dev

Routing all traffic over VPN on Ubuntu Linux

From Dev

wrt54g routing table / ip table

From Dev

Not understanding the meaning of Genmask in linux routing table

From Dev

Where is routing table stored internally in the Linux kernel?

From Dev

Linux won't respect routing table

Related Related

  1. 1

    Two lines with the same ip destination in routing table

  2. 2

    Linux - How to delete routing table all at once?

  3. 3

    ip routing table basics

  4. 4

    iptables routing incoming IP to another destination IP question

  5. 5

    MVC Routing match all routes except resources

  6. 6

    Understanding basic IP routing in linux

  7. 7

    IP addresses not found in routing table

  8. 8

    Is it possible to change order of routes in routing table when using attribute routing?

  9. 9

    List all registered routes in Vertx

  10. 10

    Application specific routing table in linux

  11. 11

    linux ip routing: 2 default gateways

  12. 12

    linux ip routing with multiple uplinks SINGLE interface

  13. 13

    routing table, ip address for outgoing packet

  14. 14

    nodejs routing: all routes with authentication except first page

  15. 15

    Using attribute routing on a controller is forcing me to manage all routes

  16. 16

    Send IP packet from Linux Kernel without destination mac address

  17. 17

    Rails.application.routes list all routes and determine controller

  18. 18

    Rails.application.routes list all routes and determine controller

  19. 19

    A SQL query that will list all the routes, a coordinate falls or closest routes to the coordinate

  20. 20

    Why does a routing rule directing to a local network interface accept more than one destination IP addreses?

  21. 21

    List all rails routes with http method associated

  22. 22

    How to programmatically list all devise routes

  23. 23

    List all routes with group in php slim 3

  24. 24

    How to get all latitudes and longitudes from source place to destination place from different routes

  25. 25

    Routing all traffic over VPN on Ubuntu Linux

  26. 26

    wrt54g routing table / ip table

  27. 27

    Not understanding the meaning of Genmask in linux routing table

  28. 28

    Where is routing table stored internally in the Linux kernel?

  29. 29

    Linux won't respect routing table

HotTag

Archive