On Windows, how to determine route for IP destination?
How can I determine the IP route taken for a specific IP destination (without looking at "route print" and figuring it out manually)?
In OS X there's route get 1.2.34
and in Linux there's /sbin/ip route get 1.2.3.4
. Is there anything like that on Windows?
Solution 1:
Yep. Open a command line and type tracert 1.2.3.4
Solution 2:
In Powershell:
Find-NetRoute -RemoteIPAddress "10.0.0.34" | Select-Object ifIndex,DestinationPrefix,NextHop,RouteMetric -Last 1
ifIndex DestinationPrefix NextHop RouteMetric
------- ----------------- ------- -----------
49 10.0.0.0/24 10.64.130.4 0