常听同学说计算机中有一个”ping"命令的,不知道是什么?哪位大虾给小弟解释一下,谢谢了!

来源:百度知道 编辑:UC知道 时间:2024/05/27 19:40:33

使用 ping可以测试计算机名和计算机的 ip 地址,验证与远程计算机的连接,通过将 icmp 回显数据包发送到计算机并侦听回显回复数据包来验证与一台或多台远程计算机的连接,该命令只有在安装了 tcp/ip 协议后才可以使用。 现在打开你的ms-dos(开始→程序→ms-dos),用win2000的朋友打开cmd.exe(这是win2000下的ms-dos,开始→程序→附件→"命令提示符" 或 开始→搜索文件或文件夹→"填入cmd.exe",找到后双击运行就可以了。) 下面我们来看看他的命令:

ping [-t] [-a] [-n count] [-l length] [-f] [-i ttl] [-v tos] [-r count] [-s count] [[-j computer-list] | [-k computer-list]] [-w timeout] destination-list

参数

-t

ping 指定的计算机直到中断。ctrl+c停止

-a

将地址解析为计算机名。例:c:\>ping -a 127.0.0.1

pinging china-hacker [127.0.0.1] with 32 bytes of data:(china-hacker就是他的计算机名)

reply from 127.0.0.1: bytes=32 time<10ms ttl=128reply from 127.0.0.1: bytes=32 time<10ms ttl=128reply from 127.0.0.1: bytes=32 time<10ms ttl=128reply from 127.0.0.1: bytes=32 time<10ms ttl=128

ping statistics for 127.0.0.1:packets: sent = 4, received = 4, lost = 0 (0% loss),approximate round trip times in