dos命令之ping命令大全详解(DOS command ping command Daquan detailed)
- 格式:doc
- 大小:37.00 KB
- 文档页数:12
ping和ipconfig命令详解ping是一个计算机网络工具,用来测试特定主机能否通过IP到达。
ping的运作原理是向目标主机传出一个ICMP echo要求封包,等待接收echo回应封包。
程序会按时间和反应成功的次数,估计失去封包率(丢包率)和封包来回时间(网络时延)。
1983年12月,Mike Muuss写了这个程序,在IP网络出问题时方便找出其根源。
因为这个程序的运作和潜水艇的声纳相似,他便用声纳的声音来为程序取名。
David L. Mills曾提出另一个取名:P acket I nter n et Grouper/Gopher(后者指地鼠)。
1.ping使用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参数-tping 指定的计算机直到中断。
ctrl+c停止-a将地址解析为计算机名。
例:c:\>ping -a 127.0.0.1pinging 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=32time<10ms ttl=128reply from 127.0.0.1: bytes=32 time<10ms ttl=128reply from 127.0.0.1: bytes=32 time<10ms ttl=128ping statistics for 127.0.0.1:packets: sent = 4, received = 4, lost = 0 (0% loss),approximate round trip times in milli-seconds:minimum = 0ms, maximum = 0ms, average = 0ms-n count发送count 指定的echo 数据包数。
cmd ping命令参数
ping命令是一个用于测试主机到目标主机的网络连接的常用命令。
在命令提示符中,可以使用ping命令并加上不同的参数来实现
不同的功能。
以下是一些常见的ping命令参数:
1. -t,持续 ping 直到手动停止,可以用来监测网络连接的稳
定性。
2. -n <次数>,指定要发送的回显请求数。
例如,使用“-n 4”将发送4个回显请求。
3. -l <大小>,设置要发送的缓冲区大小。
可以用来测试网络
对大数据包的处理能力。
4. -f,设置不分段标志,将数据包作为一个整体发送。
可以用
来测试网络对大数据包的处理能力。
5. -a,将地址解析为主机名。
6. -4,强制使用 IPv4 地址。
7. -6,强制使用 IPv6 地址。
这些参数可以帮助用户根据实际需求对网络连接进行测试和监测。
同时,还可以通过“ping /?”命令在命令提示符中获取更多关于ping命令的参数和用法的帮助信息。
希望这些信息能够帮助到你。
1.Ping命令详解首先需要打开DOS命令界面,通过点击开始菜单中的“运行”选项,输“cmd”。
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 指定的计算机直到中断。
-a 将地址解析为计算机名。
-n count 发送 count 指定的 ECHO 数据包数。
默认值为 4。
-l length 发送包含由 length 指定的数据量的 ECHO 数据包。
默认为 32 字节;最大值是65,527。
-f 在数据包中发送"不要分段"标志。
数据包就不会被路由上的网关分段。
-i ttl 将"生存时间"字段设置为 ttl 指定的值。
-v tos 将"服务类型"字段设置为 tos 指定的值。
-r count 在"记录路由"字段中记录传出和返回数据包的路由。
count 可以指定最少 1 台,最多 9 台计算机。
-s count 指定 count 指定的跃点数的时间戳。
-j computer-list 利用 computer-list 指定的计算机列表路由数据包。
连续计算机可以被中间网关分隔(路由稀疏源)IP 允许的最大数量为 9。
-k computer-list 利用 computer-list 指定的计算机列表路由数据包。
连续计算机不能被中间网关分隔(路由严格源)IP 允许的最大数量为 9。
-w timeout 指定超时间隔,单位为毫秒。
destination-list 指定要 ping 的远程计算机。
2怎样使用Ping这命令来测试网络连通呢?连通问题是由许多原因引起的,如本地配置错误、远程主机协议失效等,当然还包括设备等造成的故障。
PingPing是测试网络联接状况以及信息包发送和接收状况非常有用的工具,是网络测试最常用的命令。
Ping向目标主机(地址)发送一个回送请求数据包,要求目标主机收到请求后给予答复,从而判断网络的响应时间和本机是否与目标主机(地址)联通。
如果执行Ping不成功,则可以预测故障出现在以下几个方面:网线故障,网络适配器配置不正确,IP地址不正确。
如果执行Ping成功而网络仍无法使用,那么问题很可能出在网络系统的软件配置方面,Ping成功只能保证本机与目标主机间存在一条连通的物理路径。
命令格式:ping IP地址或主机名[-t][-a][-n count][-l size]参数含义:-t不停地向目标主机发送数据;-a以IP地址格式来显示目标主机的网络地址;-n count指定要Ping多少次,具体次数由count来指定;-l size指定发送到目标主机的数据包的大小。
例如当您的机器不能访问Internet,首先您想确认是否是本地局域网的故障。
假定局域网的代理服务器IP地址为202.168.0.1,您可以使用Ping避免202.168.0.1命令查看本机是否和代理服务器联通。
又如,测试本机的网卡是否正确安装的常用命令是ping127.0.0.1TracertTracert命令用来显示数据包到达目标主机所经过的路径,并显示到达每个节点的时间。
命令功能同Ping类似,但它所获得的信息要比Ping命令详细得多,它把数据包所走的全部路径、节点的IP以及花费的时间都显示出来。
该命令比较适用于大型网络。
命令格式:tracert IP地址或主机名[-d][-h maximumhops][-j host_list][-w timeout]参数含义:-d不解析目标主机的名字;-h maximum_hops指定搜索到目标地址的最大跳跃数;-j host_list按照主机列表中的地址释放源路由;-w timeout指定超时时间间隔,程序默认的时间单位是毫秒。
ping命令详解ping命令是计算机网络中常用的命令之一,用于测试网络连接以及判断网络通信质量。
它通过发送数据包来测量从源主机到目标主机的往返时间,并可以检查数据包是否丢失或延迟。
本文将对ping命令进行详细介绍,包括其原理、用法以及常见问题的排查方法。
一、ping命令的原理在计算机网络中,ping命令利用ICMP(Internet Control Message Protocol,互联网控制消息协议)来发送网络数据包,然后等待目标主机的响应来判断网络的连通性和响应时间。
pong则是相应的包。
通过发送一个ICMP Echo Request包给目标主机,然后等待目标主机返回一个ICMP Echo Reply包,ping命令可以计算往返时间(Round-Trip Time,简称RTT)并统计丢包率。
这些信息可以帮助我们检测网络连接是否正常以及网络速度的快慢。
二、ping命令的用法在Windows系统下,我们可以使用命令提示符(Command Prompt)或者Windows PowerShell来执行ping命令。
在Linux和macOS系统下,则可以使用终端(Terminal)来操作。
下面是ping命令的基本用法:ping [选项] [目标主机]其中,目标主机可以是IP地址或者域名。
常见的选项包括:-c n:指定发送数据包的次数,n是一个正整数;-i n:指定发送数据包的时间间隔,n是一个浮点数,单位是秒;-w n:指定等待目标主机响应的超时时间,n是一个正整数,单位是毫秒;-s n:指定发送数据包的大小,n是一个正整数,单位是字节;-t:持续发送数据包,直到手动停止。
例如,执行ping命令ping 发送数据包并等待响应。
ping命令会显示每个数据包的往返时间以及丢包情况。
通过观察ping命令的输出,我们可以判断网络的连通性和响应速度。
三、常见问题的排查方法1. 目标主机不可达问题当我们执行ping命令时,如果显示“请求超时”或者“目标主机不可达”的错误信息,说明目标主机无法通过网络进行访问。
dos命令详解dos命令大全你还在为不知道dos命令详解而不知所措么?下面来是店铺为大家收集的dos命令详解,欢迎大家阅读:dos命令详解2.dir 盘符:路径文件名字:表示指定目录下是否有这个文件,若盘符:路径与当前盘符:路径相同,可以省略盘符:路径。
例如:dir c:windowssystem32calc.exe 就是表示查看system32目录下是否有该calc.exe文件,如果有就会提示没有则不提示,如果在C盘查找该文件时,加上/s则可以在C盘所有目录下搜索该文件。
3.dir *.exe 或 dir asp.* :支持通配符查看,前者表示查看所有exe 文件,后者表示查看名字为asp任意后缀文件。
文件多建议配合/p。
4./p 参数:表示在dir浏览的时候可以一屏一屏地显示,并且按任意键继续浏览。
5./w :横向显示文件和目录名称,一般分为三排,但不显示文件的创建时间、数量。
其中用中[]括起来的是目录。
6./a :如果直接是/a那么就显示所有属性的文件,包括dir看不到的系统隐藏属性的文件。
下面是/a的子参数,子参数可以多个,例如/ahs就是显示隐藏和系统属性的。
属性开关可以组合使用,但属性之间不能用空格隔开。
中间也可以使用冒号进行表示,例如dir /a:h带子参数:dir /ad 只显示目录dir /ah:只显示隐藏属性的文件(h=hidden 隐藏的)dir /ar 只显示只读属性的文件(r=read) dir /as:只显示系统文件(s=system) dir /aa:只显示存档属性文件(a=archive)dir /a-h 显示非隐藏性的文件 dir /a-s:显示非系统属性的文件dir /a-d 仅显示任意属性文件,不显示文件夹。
dir /a-a :显示没有更改过的存档文件dir /a-r 显示非只读属性的文件。
7./s :表示显示该目录以及该目录下所有子目录中的文件夹和文件。
例如dir /s c:就会显示C盘下所有文件包括windows、system32等C盘全部目录以及目录下子目录下的文件。
常用DOS命令大全及其用法一,ping它是用来检查网络是否通畅或者网络连接速度的命令。
作为一个生活在网络上的管理员或者黑客来说,ping命令是第一个必须掌握的DOS命令,它所利用的原理是这样的:网络上的机器都有唯一确定的IP地址,我们给目标IP地址发送一个数据包,对方就要返回一个同样大小的数据包,根据返回的数据包我们可以确定目标主机的存在,可以初步判断目标主机的操作系统等。
下面就来看看它的一些常用的操作。
先看看帮助吧,在DOS窗口中键入:ping /? 回车,出现如图1。
所示的帮助画面。
在此,我们只掌握一些基本的很有用的参数就可以了(下同)。
-t 表示将不间断向目标IP发送数据包,直到我们强迫其停止。
试想,如果你使用100M的宽带接入,而目标IP是56K的小猫,那么要不了多久,目标IP 就因为承受不了这么多的数据而掉线,呵呵,一次攻击就这么简单的实现了。
-l 定义发送数据包的大小,默认为32字节,我们利用它可以最大定义到65500字节。
结合上面介绍的-t参数一起使用,会有更好的效果哦。
-n 定义向目标IP发送数据包的次数,默认为3次。
如果网络速度比较慢,3次对我们来说也浪费了不少时间,因为现在我们的目的仅仅是判断目标IP是否存在,那么就定义为一次吧。
说明一下,如果-t 参数和-n参数一起使用,ping命令就以放在后面的参数为标准,比如“ping IP -t -n 3”,虽然使用了-t参数,但并不是一直ping下去,而是只ping 3次。
另外,ping命令不一定非得ping IP,也可以直接ping主机域名,这样就可以得到主机的IP。
下面我们举个例子来说明一下具体用法,如图2。
这里time=2表示从发出数据包到接受到返回数据包所用的时间是2秒,从这里可以判断网络连接速度的大小。
从TTL的返回值可以初步判断被ping主机的操作系统,之所以说“初步判断”是因为这个值是可以修改的。
这里TTL=32表示操作系统可能是win98。
dos命令之ping命令大全详解(DOS command ping command Daquandetailed)Ping usage DaquanLet's start with what Ping is about!What is Ping?Ping is a typical network tool. Ping is an executable command that comes with the Windows family, from 98 to the latest 2003 Server version of the computer, with this command line tool. Ping is able to identify certain states of network functionality. The state of these network functions is the basis for routine network fault diagnosis. In particular, Ping is able to identify the binary state of the connection (that is, whether it is connected). The Ping command checks the connection to the remote computer or local computer by sending the ICMP response message to the computer and listening for the return of the response message. For each sending message, the Ping waits at most one second and prints the number of messages sent and received. Compare each receive message and send a message to verify its validity. By default, four response messages are sent, each containing 64 bytes of data. Ping sends a loopback request packet to the target host (address) and requests the target host to receive a reply after receiving the request, so as to determine the response time of the network and whether the machine is connected with the target host (address).Ping commandVerify the connection to the remote computer or local computer. This command is only available when the TCP/IP protocol is installed. (TCP/IP agreement should know to install it, install the system when there is, and if in case deleted, how to do? What else can I do? Reinstall it!! How to install, later on.. Ha ha ~ ~ ~ ~)Ping IP [-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 |parameter-t (check and specify the connection to the computer until the user interrupts. To interrupt, press the shortcut key: CTRL+C)-a (resolves the address to the computer name)-n count (sends a specified number of ECHO messages by count, default to 4)-l length sends the ECHO message containing the data length specified by the length. The default value is 64 bytes and the maximum value is 8192 bytes-f (send non segmented flag) in the package. The packet will not be segmented by the gateway on the route-i TTL (sets the "live time" field to the value specified by ttl. Of which: TTL: represents the number from 1 to 255-v TOS (sets the service type field to the value specified by TOS)-r count routing of messages and return messages in the record routing field. The specified Count value is minimum, can be 1, and the maximum may be 9.)Cases:C:\Documents and Settings\Administrator>ping 169.254.190.92 -r 4Pinging 169.254.190.92 with 32 bytes of data:Reply, from, 169.254.190.92:, bytes=32, time<1ms, TTL=128Route: 169.254.190.92Reply, from, 169.254.190.92:, bytes=32, time<1ms, TTL=128Route: 169.254.190.92Reply, from, 169.254.190.92:, bytes=32, time<1ms, TTL=128Route: 169.254.190.92Reply, from, 169.254.190.92:, bytes=32, time<1ms, TTL=128Route: 169.254.190.92Ping statistics for 169.254.190.92:Packets:, Sent = 4, Received = 4, Lost = 0 (0%, loss),Approximate, round, trip, times, in, milli-seconds:Minimum = 0ms, Maximum = 0ms, Average = 0msDescription of the results (same below)The Ping command has two return results:1, "Request, timed, out." indicates that the response packet returned by the target host has not been received, that is, the network is blocked or the network is in bad condition2, "Reply from X.X.X.X: bytes=32 time<1ms TTL=255" received from the target host X.X.X.X returns a response packet, the packet size is 32Bytes, the response time is less than 1ms TTL 255, this result suggests that between the computer to the target host your normal connection.3, "Destination, host, unreachable" indicates that the target host cannot arrive4, "PING:, transmit, failed, error, code, XXXXX" means the transmission failed. The error code XXXXX-s count (specifies the time stamp for the number of calls specified by the count. The specified Count value is minimum, which can be 1, and the maximum is 4.)Cases:C:\文件和设置\管理员>平169.254.190.92 S 3砰的169.254.190.92与32个字节的数据:回复:从169.254.190.92字节= 32次<< 1ms TTL = 128 时间戳:169.254.190.92:56724750回复:从169.254.190.92字节= 32次<< 1ms TTL = 128 时间戳:169.254.190.92:56725750回复:从169.254.190.92字节= 32次<< 1ms TTL = 128 时间戳:169.254.190.92:56726750回复:从169.254.190.92字节= 32次<< 1ms TTL = 128 时间戳:169.254.190.92:56727766统计169.254.190.92平:包:发送= 4,接收= 4,损失= 0(0%的损失),近似的往返时间以毫秒为单位:最小= 0ms时,最大= 0ms时,平均0msJ计算机列表(经过由计算机列表指定的计算机列表的路由报文。