Ily*_*lya 28 networking windows routing ip
如何确定为特定 IP 目的地采用的 IP 路由(无需查看“路由打印”并手动确定)?
在 OS X 中有route get 1.2.34,在 Linux 中有/sbin/ip route get 1.2.3.4. Windows 上有类似的东西吗?
Mon*_*nor 53
在 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
Run Code Online (Sandbox Code Playgroud)
小智 12
该pathping命令类似于tracert但包括传出接口。
使用 cygwin,此命令为特定目标(由 指定$HOST)提供传出 IP/接口:
pathping -n -w 1 -h 1 -q 1 $HOST | head -n 4 | tail -n 1 | awk '{print $2}'
Tra*_*Guy 11
是的。打开命令行并输入tracert 1.2.3.4
| 归档时间: |
|
| 查看次数: |
69951 次 |
| 最近记录: |