Dea*_*ean 13 networking windows ping
嘿,我一直在解决带有 2 个 NIC 的服务器和带有有线和无线网卡的笔记本电脑上的网络问题。如何强制从特定适配器发送 PING 和 TELNET?我知道这是窗户的问题。关闭其中一个适配器不是一种选择,我总是通过其中一个适配器进行连接。必须有一些命令行选项来优先选择一个适配器而不是另一个。
谢谢
KCo*_*eau 17
使用 -S 开关可能更容易,它允许您指定源 IP 地址(有关更多信息,请参阅 ping /?)。
您可以做的另一件事是更改绑定顺序,这符合您的“优先选择一个适配器而不是另一个”的选项。尽管它因 Windows 操作系统而异,但与此示例的位置相似:对于 Windows 7,您右键单击“网络”,然后单击“属性”。然后单击“更改适配器设置”。然后单击菜单高级>高级设置并将您希望优先的连接移至顶部。
从 Windows 7(版本 6.1 Build 7601:Service Pack 1)ping /?
Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS]
[-r count] [-s count] [[-j host-list] | [-k host-list]]
[-w timeout] [-R] [-S srcaddr] [-4] [-6] target_name
Options:
-t Ping the specified host until stopped.
To see statistics and continue - type Control-Break;
To stop - type Control-C.
-a Resolve addresses to hostnames.
-n count Number of echo requests to send.
-l size Send buffer size.
-f Set Don't Fragment flag in packet (IPv4-only).
-i TTL Time To Live.
-v TOS Type Of Service (IPv4-only. This setting has been deprecated
and has no effect on the type of service field in the IP Header).
-r count Record route for count hops (IPv4-only).
-s count Timestamp for count hops (IPv4-only).
-j host-list Loose source route along host-list (IPv4-only).
-k host-list Strict source route along host-list (IPv4-only).
-w timeout Timeout in milliseconds to wait for each reply.
-R Use routing header to test reverse route also (IPv6-only).
-S srcaddr Source address to use.
-4 Force using IPv4.
-6 Force using IPv6.
Run Code Online (Sandbox Code Playgroud)
Microsoft TechNet Ping 文档说明它只能用于 IPV6(不正确) 适用于:Windows Server 2003、Windows Vista、Windows XP、Windows Server 2008、Windows 7、Windows Server 2003 R2、Windows Server 2008 R2、Windows Server 2000 , Windows Server 2012, Windows 8
Microsoft TechNet - 使用 Ping 命令(Windows 7 和 Server 2008 R2)(也缺少 -S srcaddr)
小智 5
选择的适配器基于路由表。您可以通过运行“route print”或“netstat -r”来检查路由表。每个条目将有一个指标来指示路由的权重 - 较低的数字是首选。您可以使用“route”命令操作路由表。路线 /?详情。
您可以设置静态路由:
route add (destination subnet) MASK (destination subnet mask) (gateway) IF (interface)
Run Code Online (Sandbox Code Playgroud)
有关更多信息,请查看Microsoft 的文档route
| 归档时间: |
|
| 查看次数: |
103007 次 |
| 最近记录: |