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.
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.
Comments