博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
响应因特网端口ping命令_如何使用Ping命令识别基本的Internet问题
阅读量:2521 次
发布时间:2019-05-11

本文共 8233 字,大约阅读时间需要 27 分钟。

响应因特网端口ping命令

Next time you call your help desk, do you want to wow them with your networking knowledge? Using a command called “ping”, built right into your existing Mac, Windows, or Linux computer, will help identify basic connection problems.

下次致电服务台时,您是否想通过网络知识让他们赞叹? 使用内置在现有Mac,Windows或Linux计算机中的名为“ ping”的命令,将有助于识别基本的连接问题。

Okay, this might not be enough to “wow” your fellow team members, however they will appreciate that you started the debug process. And please remember that your Support personnel are debug specialists, so follow their instructions when they step you through the troubleshooting sequence.

好的,这可能不足以使团队成员“赞叹”,但是他们将感谢您开始调试过程。 并且请记住,您的支持人员是调试专家,因此在逐步完成故障排除过程时,请遵循其说明。

TL; DR: (TL;DR:)

You can use the ping command built into your Mac OS X, Windows, or Linux computer to identify basic network connectivity issues. This can help you solve the problem and/or gain valuable debug information as a first step before calling support.

您可以使用Mac OS X,Windows或Linux计算机中内置的ping命令来确定基本的网络连接问题。 在致电支持部门之前,这可以帮助您解决问题和/或获得有价值的调试信息。

Read below for details on how to launch a command line window and run ping from your Mac OS X or Windows machine.

请阅读以下内容,详细了解如何从Mac OS X或Windows计算机启动命令行窗口并运行ping

ping命令: (The ping command:)

The ping command is a simple way to verify that another computer can receive information from you. The original author, , actually that a submarine sends to detect objects in the water. If an echo of the ping comes back, it means that there is something out there. In fact, ping uses the ”” as part of its underlying software design.

ping命令是一种验证另一台计算机可以从您那里接收信息的简单方法。 最初的作者实际上是用潜水艇发出来是潜水艇发送来检测水中物体的。 如果ping的回声再次出现,则意味着那里有东西。 实际上, ping使用“ ”作为其基础软件设计的一部分。

In its simplest form, the ping command provides two valuable pieces of information, whether the message was echoed back (64 bytes from…) and how long it takes to receive the message back (e.g., time=6.396 ms).

ping命令以其最简单的形式提供了两条有价值的信息,即是否回显了该消息( 64 bytes from…返回64 bytes from… )以及接收该消息所花费的time=6.396 ms (例如time=6.396 ms )。

Depending on what type of computer you are using, you may even get a summary containing minimum, maximum, average, and more.

根据所用计算机的类型,您甚至可能会获得一个包含最小值,最大值,平均值等的摘要。

The response time is shown in “ms”, or millisecond, which is 1/1000th of a second. A response time of 10ms or less is pretty fast, however values are often in the 100ms range. At much above 200ms you’ll probably notice that you have a sluggish connection.

响应时间以“ ms”或毫秒为单位,即1/1000秒。 10ms或更短的响应时间非常快,但是值通常在100ms范围内。 在200ms以上,您可能会注意到连接缓慢。

一切顺利时: (When all is well:)

This is what my ping response looks like on my Mac OS X computer when everything is working normally here in Malaysia:

当在马来西亚的一切正常运行时,这是我的Mac OS X计算机上ping响应的样子:

MacBook-Pro:~ ajm$ ping Google.comPING google.com (216.58.196.46): 56 data bytes64 bytes from 216.58.196.46: icmp\_seq=0 ttl=55 time=6.396 ms64 bytes from 216.58.196.46: icmp\_seq=1 ttl=55 time=6.368 ms64 bytes from 216.58.196.46: icmp\_seq=2 ttl=55 time=26.773 ms64 bytes from 216.58.196.46: icmp\_seq=3 ttl=55 time=6.984 ms^C--- google.com ping statistics ---4 packets transmitted, 4 packets received, 0.0% packet lossround-trip min/avg/max/stddev = 6.368/11.630/26.773/8.746 ms

This is what my ping response looks like on a Windows computer when everything is working well:

当一切正常时,这是我在Windows计算机上的ping响应:

C:\Users\BJM>ping Google.comPinging google.com [216.58.196.46] with 32 bytes of data:Reply from 216.58.196.46: bytes=32 time=6ms TTL=128Reply from 216.58.196.46: bytes=32 time=15ms TTL=128Reply from 216.58.196.46: bytes=32 time=6ms TTL=128Reply from 216.58.196.46: bytes=32 time=6ms TTL=128Ping statistics for 216.58.196.46:    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds:    Minimum = 6ms, Maximum = 15ms, Average = 8ms

You can see from these examples that the connection is pretty good with average response times under 10ms.

从这些示例中您可以看到,连接非常好,平均响应时间不到10ms。

当出现问题时(三个示例): (When something is wrong (three examples):)

So what would happen if I could not connect to Google.com? For example #1, I simulate a broken network connection to my Mac by unplugging my router from the wall, and re-run the command. The first thing I notice is that it takes a lot longer for the command to respond:

那么,如果我无法连接到Google.com ,会发生什么? 例如,#1,我通过从墙上拔下路由器来模拟与Mac的断开的网络连接,然后重新运行命令。 的第一件事我注意到的是,它需要大量的更长的命令作出回应:

MacBook-Pro:~ ajm$ ping google.comping: cannot resolve google.com: Unknown hostMacBook-Pro:~ ajm$

Or, for example #2, depending on exactly how the connection is failing:

或者,例如,#2,具体取决于连接失败的方式:

PING google.com (216.58.196.46): 56 data bytesRequest timeout for icmp\_seq 0Request timeout for icmp\_seq 1Request timeout for icmp\_seq 2^C

And sometimes, if I have a particularly flaky connection, I’ll see a mixture of these messages. For example #3, I can simulate this by connecting my Mac computer to a public Wi-Fi connection that is across the street:

有时,如果我的连接特别不稳定,我会看到这些消息的混合体。 例如#3,我可以通过将Mac计算机连接到马路对面的公共Wi-Fi连接来模拟此情况:

PING google.com (216.58.196.206): 56 data bytes64 bytes from 216.58.196.206: icmp\_seq=0 ttl=57 time=273.655 ms64 bytes from 216.58.196.206: icmp\_seq=1 ttl=57 time=808.546 ms64 bytes from 216.58.196.206: icmp\_seq=2 ttl=57 time=179.613 msRequest timeout for icmp\_seq 3Request timeout for icmp\_seq 464 bytes from 216.58.196.206: icmp\_seq=5 ttl=57 time=374.612 msRequest timeout for icmp\_seq 6ping: sendto: No route to hostRequest timeout for icmp\_seq 7ping: sendto: No route to hostRequest timeout for icmp\_seq 8^C

In the first test, ping told me that my machine could not even find the Internet address (IP 216.58.196.46) for Google.com. In the second test, my computer remembered Google’s IP address, but could not actually reach the Google servers (Request timeout). In the third test, sendto: No route to host means that the network device knows where the Google servers are, but something along the digital pathway is broken.

在第一个测试中, ping告诉我,我的机器甚至无法找到Google.com的Internet地址(IP 216.58.196.46 )。 在第二项测试中,我的计算机记住了Google的IP地址,但实际上无法访问Google服务器( Request timeout )。 在第三个测试中, sendto: No route to host意味着网络设备知道Google服务器在哪里,但是数字路径上的东西却坏了。

Mac用户:如何运行ping命令: (Mac Users: How to run the ping command:)

On a Mac, you typically run ping from the terminal command line. To start the terminal, click the OS X Spotlight magnifying glass icon in the upper right of the desktop:

在Mac上,通常是从终端命令行运行ping 。 要启动终端,请单击桌面右上方的OS X Spotlight放大镜图标:

When the search window appears, type “terminal”, highlight “Terminal – Utilities”, and double-click (or hit

出现搜索窗口时,键入“ terminal”,突出显示“ Terminal – Utilities”,然后双击(或点击

return

返回

):

):

That will launch the terminal command window, and you can enter the command ping Google.com shown in my examples:

这将启动终端命令窗口,您可以输入示例中显示的ping Google.com命令:

Important Mac Tip : The ping command will run forever if you don’t tell it to stop. To do that, press the

重要的Mac提示 :如果不告诉ping命令停止运行,则ping命令将永远运行。 为此,请按

control

control

key (lower right on keyboard) and the

键(键盘右下方)和

c

c

key. That will interrupt the test with a Control-C (^C) and give back command line control. For Windows user, the command will stop by itself after a few iterations.

键。 这将用Control-C( ^C )中断测试并返回命令行控制。 对于Windows用户,该命令将在几次迭代后自行停止。

Windows用户:如何运行ping命令: (Windows Users: How to run the ping command:)

Opening the Command Prompt differs between Windows versions 10, 8.1, 8, and 7; here’s a great guide at . On a Windows 7 machine, for example, click on the lower left Windows “Start” icon, and select “Command Prompt” and double-click (or hit

Windows 10、8.1、8和7版本之间打开命令提示符有所不同; 这是的绝佳指南。 例如,在Windows 7计算机上,单击左下方的Windows“开始”图标,然后选择“命令提示符”,然后双击(或单击

enter

enter

):

):

This will launch the command window, and you can enter the command ping Google.com shown in the examples:

这将启动命令窗口,您可以输入命令ping Google.com示例中显示的ping Google.com

Now that you know how to use the ping command, you can do basic troubleshooting of your network connection. With a little bit of creativity, you can work with your local IT support person or knowledge of your network topology and IP address (e.g., ping the router, ping your ISP) to further identify network issues.

既然您知道如何使用ping命令,就可以对网络连接进行基本的故障排除。 随着创意一点点,你可以用你的本地IT支持人员或您的网络拓扑结构和IP地址(例如,知识工作ping路由器ping你的ISP),以进一步确定网络问题。

翻译自:

响应因特网端口ping命令

转载地址:http://hfuzd.baihongyu.com/

你可能感兴趣的文章
Python hashlib and hmac
查看>>
Fitnesse Page 简单使用
查看>>
C#.net 创建XML
查看>>
1057 数零壹
查看>>
隐马尔科夫模型(上)
查看>>
asp.net mvc FluentValidation 的使用
查看>>
java JvM
查看>>
HDU 1009 Just a Hook
查看>>
python基础之数据类型
查看>>
CSS居中初探
查看>>
element-ui table 点击分页table滚动到顶部
查看>>
UVa 1585 Score 得分 题解
查看>>
洛谷 P2197 nim游戏
查看>>
Linux中对为本去重
查看>>
layui下拉框数据过万渲染渲染问题解决方案
查看>>
有序列表和无序列表
查看>>
Bootstrap文档
查看>>
【翻译】在Ext JS集成第三方库
查看>>
中华优秀传统文化教育的有效渗透
查看>>
计算机基础篇-01
查看>>