ping 对方机器IP
如:
C:\>ping 192.168.0.100
Pinging 192.168.0.100 with 32 bytes of data:
Reply from 192.168.0.100: bytes=32 time<10ms TTL=128
Reply from 192.168.0.100: bytes=32 time<10ms TTL=128
Reply from 192.168.0.100: bytes=32 time<10ms TTL=128
Reply from 192.168.0.100: bytes=32 time<10ms TTL=128
Ping statistics for 192.168.0.100:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
表示正常
如
C:\>ping 192.168.0.1
Pinging 192.168.0.1 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Ping statistics for 192.168.0.1:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
表示不通。
ping 127.0.0.1
ping 自己的局域网ip地址
ping 网关、路由器的ip地址
以及ip地址、子网掩码等软故障
然后网线、网卡、交换机、路由器等硬件故障
有两个命令
一是 "ping IP或域名"
二是 "tracert IP或域名"
注意有空格..不含引号~
ping 目标地址
用PING命令。
Ping命令的常用参数选项
·ping IP Ct
连续对IP地址执行Ping命令,直到被用户以Ctrl+C中断。
·ping IP -l 3000
指定Ping命令中的数据长度为3000字节,而不是缺省的32字节。
·ping IP Cn
执行特定次数的Ping命令。
再加一点实用的
ping ***(IP) -n (自行设定次数) > (目的绝对路径及文件名)
这一条是用在统计数据时用的。他可以将PING过程中所有的参数记录成一个文本文档 实例 :如测试PING网关的稳定性
ping 192.168.1.1 -n 500 > c:\a.txt
意思就是:PING 192.168.1.1 500次 记录到C盘根目录的A这个文本文档中。
注意:后缀名一定是。TXT的