什么是ping ping命令使用方法详解
3、ping同网段计算机的ip: ping一台同网段计算机的ip,不通则表明网络线路出现故障;若网络中还包含有路由器,则应先ping路由器在本网段端口的ip,不通则此段线路有问题;通则再ping路由器在目标计算机所在网段的端口ip,不通则是路由出现故障;通则再ping目的机ip地址。 4、ping网址: 若要检测一个带dns服务的网络,在上一步ping通了目标计算机的ip地址后,仍无法连接到该机,则可ping该机的网络名,比如ping www.sina.com.cn,正常情况下会出现该网址所指向的ip,这表明本机的dns设置正确而且dns服务器工作正常,反之就可能是其中之一出现 了故障;同样也可通过ping计算机名检测wins解析的故障(wins是将计算机名解析到ip地址的服务)。 利用ping命令判定网络故障 1. ping本机ip 例如本机ip地址为:169.254.190.92。则执行命令ping 169.254.190.92。如果网卡安装配置没有问题,则应有类似下列显示: c:\documents and settings\administrator>ping 169.254.190.92 pinging 169.254.190.92 with 32 bytes of data: reply from 169.254.190.92: bytes=32 time<1ms ttl=128 reply from 169.254.190.92: bytes=32 time<1ms ttl=128 reply from 169.254.190.92: bytes=32 time<1ms ttl=128 reply from 169.254.190.92: bytes=32 time<1ms ttl=128 ping 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 = 0ms 如果在ms-dos方式下执行此命令显示内容为:request timed out,则表明网卡安装或配置有问题。将网线断开再次执行此命令,如果显示正常,则说明本机使用的ip地址可能与另一台正在使用的机器ip地址重复了。如 果仍然不正常,则表明本机网卡安装或配置有问题,需继续检查相关网络配置。 2. ping网关ip 假定网关ip为:59.52.177.115,则执行命令ping 59.52.177.115。在ms-dos方式下执行此命令,如果显示类似以下信息: c:\documents and settings\administrator>ping 59.52.177.115 pinging 59.52.177.115 with 32 bytes of data: reply from 59.52.177.115: bytes=32 time<1ms ttl=128 reply from 59.52.177.115: bytes=32 time<1ms ttl=128 reply from 59.52.177.115: bytes=32 time<1ms ttl=128 reply from 59.52.177.115: bytes=32 time<1ms ttl=128 ping statistics for 59.52.177.115: packets: sent = 4, received = 4, lost = 0 (0% loss), approximate round |