題 如何通過cmd獲取網絡中計算機的IPV4地址?


我一直都在使用 tracert 和 ping 命令獲取我的計算機的IPV4地址。 現在我似乎無法這樣做:

C:\>tracert win7x64

Tracing route to WIN7X64 [fe80::f44f:fb88:3026:4ecc%53] over a maximum of 30 hops:

  1    <1 ms    <1 ms    <1 ms  WIN7X64 [fe80::f44f:fb88:3026:4ecc]

Trace complete.

C:\>ping win7x64

Pinging WIN7X64 [fe80::f44f:fb88:3026:4ecc%53] with 32 bytes of data:
Reply from fe80::f44f:fb88:3026:4ecc%53: time<1ms
Reply from fe80::f44f:fb88:3026:4ecc%53: time<1ms
Reply from fe80::f44f:fb88:3026:4ecc%53: time<1ms
Reply from fe80::f44f:fb88:3026:4ecc%53: time<1ms

Ping statistics for fe80::f44f:fb88:3026:4ecc%53:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

是否有一個Windows命令只通過知道它的名稱來獲取網絡中一台計算機的IPV4地址? 謝謝!


6
2017-12-27 14:34


起源




答案:


你可以做 ping -4 win7x64 獲取IPv4 IP地址。

對於traceroute,您可以使用 tracert -4 win7x64

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:
    -4             Force using IPv4.

來自 tracert /?

Usage: tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout]
               [-R] [-S srcaddr] [-4] [-6] target_name
Options:
    -4                 Force using IPv4.

13
2017-12-27 14:39