响应因特网端口ping命令_如何使用Ping命令识别基本的Internet问题

news/2024/7/1 2:36:55

响应因特网端口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, Mike Muuss, actually named the program after the “ping” sound 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 ”Internet Control Message Protocol Echo Request” as part of its underlying software design.

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

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.com
PING google.com (216.58.196.46): 56 data bytes
64 bytes from 216.58.196.46: icmp\_seq=0 ttl=55 time=6.396 ms
64 bytes from 216.58.196.46: icmp\_seq=1 ttl=55 time=6.368 ms
64 bytes from 216.58.196.46: icmp\_seq=2 ttl=55 time=26.773 ms
64 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 loss
round-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.com
Pinging google.com [216.58.196.46] with 32 bytes of data:
Reply from 216.58.196.46: bytes=32 time=6ms TTL=128
Reply from 216.58.196.46: bytes=32 time=15ms TTL=128
Reply from 216.58.196.46: bytes=32 time=6ms TTL=128
Reply from 216.58.196.46: bytes=32 time=6ms TTL=128
Ping 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.com
ping: cannot resolve google.com: Unknown host
MacBook-Pro:~ ajm$

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

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

PING google.com (216.58.196.46): 56 data bytes
Request timeout for icmp\_seq 0
Request timeout for icmp\_seq 1
Request 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 bytes
64 bytes from 216.58.196.206: icmp\_seq=0 ttl=57 time=273.655 ms
64 bytes from 216.58.196.206: icmp\_seq=1 ttl=57 time=808.546 ms
64 bytes from 216.58.196.206: icmp\_seq=2 ttl=57 time=179.613 ms
Request timeout for icmp\_seq 3
Request timeout for icmp\_seq 4
64 bytes from 216.58.196.206: icmp\_seq=5 ttl=57 time=374.612 ms
Request timeout for icmp\_seq 6
ping: sendto: No route to host
Request timeout for icmp\_seq 7
ping: sendto: No route to host
Request 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 How To Open Command Prompt. 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),以进一步确定网络问题。

翻译自: https://www.freecodecamp.org/news/how-to-identify-basic-internet-problems-with-ping/

响应因特网端口ping命令


http://lihuaxi.xjx100.cn/news/237334.html

相关文章

java中Array和ArrayList区别

2019独角兽企业重金招聘Python工程师标准>>> 1)精辟阐述: 可以将 ArrayList想象成一种“会自动扩增容量的Array”。 2)Array([]):最高效;但是其容量固定且无法动态改变; …

终于,「最近邻搜索」有通用方法了

作者:Kevin Hartnett 编译:Bing 如果你打算开一家咖啡馆,你一定想知道:“附近最近的一家咖啡馆在哪?”了解这些信息有助于应对商业竞争。 这种现象是计算机科学中广泛研究的问题,称为“最近邻搜索”。它的问…

DOM---文档对象模型(Document Object Model)的基本使用

一、DOM简介  文档对象模型(Document Object Model,简称DOM),是W3C组织推荐的处理可扩展置标语言的标准编程接口。它是一种与平台和语言无关的应用程序接口(API),它可以动态地访问程序和脚本,更新其内容、结构和www文档的风格(目…

区块链密码学

链客,专为开发者而生,有问必答! 此文章来自区块链技术社区,未经允许拒绝转载。 区块链密码学11 一 、概念 主要介绍非对称加密的一些概念。 公钥、私钥:均可加密或解密。私钥用来解密和签名,给自己用的…

想要学好Go语言的必须知道的一个小技巧

2019独角兽企业重金招聘Python工程师标准>>> 由于我转Go语言比较早,很多认识我的,转Go或学习Go的同学遇到问题,经常会过来问我,然后,我发现。 除了学习Go语言可以看那些资料,这个问题以外&#…

服务器云ide_语言服务器协议如何影响IDE的未来

服务器云ideThe release of Visual Studio Code single-handedly impacted the developer ecosystem in such a way that theres no going back now. Its open source, free, and most importantly, a super powerful tool. Visual Studio Code的发布以一种无可匹敌的方式对开发…

商品秒杀,防并发解决思路

我们在做电商项目的时候,经常会遇到抢购秒杀的问题&#xff0c;综合来说主要是两个问题 一&#xff0c;高并发情况下对数据库产生的压力 二&#xff0c;如何避免超卖(库存< 0)的情况。 针对这两个问题来谈下解决思路 一,缓解数据库压力 用 缓存就可以解决 例如redis,memecac…

在CentOS7上部署Apache Mesos

概述 Apache Mesos是一款基于多资源&#xff08;内存、磁盘、CPU、端口等&#xff09;调度的开源集群管理套件&#xff0c;能使容错和分布式系统更加容易。 工作原理 Apache Mesos采用了Master/Slave结构来简化设计&#xff0c;将Master做得尽可能轻量级&#xff0c;仅保存了各…