Команда ping и fping

Содержание:

Использование команды ping в Linux

Вы можете использовать команду ping с IP-адресом или именем хоста/URL.

Предположим, мы пингуем Google. Он отправит ICMP-пакеты размером 56 байтов на google.com.

Вы должны вручную остановить команду ping, иначе она продолжит выполняться. Вы можете использовать  терминала ярлык, чтобы остановить команду ping в Linux, как мы сделали в приведенном выше примере.

Когда вы останавливаете , она представляет вам сводку передачи. Вы можете увидеть статистику, такую как количество переданных ICMP-пакетов, принятых пакетов, потерянных пакетов и т. д.

Теперь, когда вы знаете, как пинговать в Linux, давайте посмотрим на некоторые другие опции команды ping.

Отправить только N количество пакетов

Если вы не хотите, чтобы команда ping выполнялась вечно без остановки вручную, вы можете использовать .

При этом вы можете указать количество пакетов, которые команда ping должна отправить перед автоматической остановкой.

Отправить пинг только на ограниченное время

Помимо установки количества отправляемых пакетов, вы также можете указать, как долго будут отправляться пакеты.

Например, если вы хотите отправлять ping-пакеты всего за 5 секунд, вы можете использовать его следующим образом:

Изменить интервал времени между двумя пингами

По умолчанию ping отправляет пакеты с интервалом в одну секунду. Вы можете изменить этот интервал времени с помощью .

Для отправки ICMP-пакетов с интервалом в 3 секунды вы можете использовать команду Ping, например:

Вы также можете уменьшить временной интервал между пингами.

Однако, если вы попытаетесь уменьшить временной интервал ниже 0,2 секунды (200 мс), вы увидите ошибку:

Не беспокойтесь Вы все еще можете пропинговать с интервалом менее 200 мс. Но для этого нужно использовать пинг с правами root.

DoS-атака с пингом, который также называется Ping of Death.

Одна из самых простых атак DoS – Ping of Death. При такого рода атаках злоумышленник отправляет большое количество запросов ping за очень короткий промежуток времени. Если сервер не настроен должным образом, он потерпит крах при обработке запроса ping, и веб-сайт закроется.

Команда ping имеет встроенную функцию для этого. Это называется , и этого можно достичь с помощью . Вам понадобятся права sudo для запуска этой опции с нулевым интервалом.

Когда вы запустите эту команду, вы увидите, что некоторые точки появляются и исчезают в выходных данных. Каждый ‘.’ обозначает запрос, тогда как ответом является возврат (поэтому точки исчезают).

Этот параметр проверки связи полезен при тестировании нагрузочной способности сервера.

Бонусный совет: отправьте звуковые сигналы

Вы можете отправлять звуковые сигналы с . При этом вы услышите звуковой сигнал для каждого успешного пинга.

Обратите внимание, что не все дистрибутивы Linux настроены на создание звукового сигнала. Мы проверили это на Ubuntu 18.04, и могли слышать звуковой сигнал

Зачем использовать команду «ping» в Linux

Зачем нужна Команда Ping в Linux.

Большинство из нас регулярно посещают одни и те же полезные сайты. Например, я посещаю сайт BBC, чтобы прочитать новости, также я посещаю сайт Sky Sports, чтобы получить новости и результаты футбола. У вас, несомненно, будет свой собственный набор ключевых сайтов, таких как наш.

Представьте, что вы ввели веб-адрес BBC в свой браузер, и страница не загружалась вообще. Причиной этого может быть одна из многих вещей.

Например, у вас может не быть интернет-соединения вообще, даже если вы подключены к вашему маршрутизатору. Иногда у интернет-провайдера есть локализованные проблемы, которые мешают вам использовать Интернет.

Другая причина может заключаться в том, что сайт действительно недоступен по причине каких-то работ на нем, или еще что-то еще в этом направлении.

Какова бы ни была причина, вы можете легко проверить связь между вашим компьютером и другой сетью, используя команду «ping».

Getting Started with fping on Linux Ubuntu Unity 18.04.1 LTS:

Here, we will see in detail about working with fping on Linux Ubuntu.

  • Kindly open the Terminal using the shortcut CTRL + ALT + T.
  • Execute the installation command of fping on Linux Ubuntu.

$   sudo apt-get install fping
Installing fping on Ubuntu

Check the Pinging of an IP or a Website:

If you wish to check whether an IP or a Target is working properly then you can use the following command.

Syntaxes: $   fping IP Address     ||     $ fping Website

Example: $   fping  172.24.31.30     ||     $   fping tecrobust.com

Once you execute the above command the output will be as mentioned in the following images. 

Pinging Multiple IP Address at a single instant:

It is possible to check for multiple IP addresses and all you have to do is to separate them with spaces. Kindly check out the below example.

Syntax: $   fping ipaddress1 ipaddress2

Example: $   fping 172.24.31.30 168.25.37.1

Checking for Multiple Address

Displaying Targets using IP address than DNS:

Suppose when you are checking a target and if you wish the status of the target using its IP address instead of DNS, then you can follow this method.

Syntax: $   fping -A Target_name

Example: $   fping -A tecrobust.com

Display Targets with IP Address

Reading a list of targets from a file using fping:

  • This is one of the very interesting advantages of fping over normal ping. We have explained the steps in the detail below.
  • Create a text file(say fping.txt) with the targets(IP address) and save it on the Desktop.

Check targets of a file

Open Terminal and execute the following command.

$   fping < fping.txt

Note: You need to replace the fping.txt with your filename

Display the Complete fping statistics of target/targets:

If you wish to know about the complete information of how many packets sent and how much time it took for fping then kindly follow the below command.

Syntax: $   fping -s target_name

Example: $   fping -s tecrobust.com

Checking Targets through a range:

If you want to check a number of targets through a range then this command can be used on the terminal.

Syntax: $   fping -s -g IPaddress range -r 1

Example: $   fping -s -g 172.150.34.32 172.150.34.40 -r 1

Check targets over a range

Displaying the Time taken by the Return Packets:

Once the fping send packets to the targets, it will take some time to get signals from the return packets and it is possible to check how much time the return signals took.

Syntax: $   fping -e target_name

Example: $   fping -e tecrobust.com

Elapsed Time information

Print the Help options of fping on the Terminal:

Help option of fping provides a number of information on fping and the commands that can be used.

$   fping -h
fping help center

Get to know the fping version:

To get to know the current fping version that is currently installed, the following command has to be used.

$   fping -v
Display the installed fping version

Tcp Output Format

The standard TCP output format is the following:

len=46 ip=192.168.1.1 flags=RA DF seq=0 ttl=255 id=0 win=0 rtt=0.4 ms

len is the size, in bytes, of the data captured from the data link layer excluding the data link header size. This may not match the IP datagram size
due to low level transport layer padding.

ip is the source ip address.

flags are the TCP flags, R for RESET, S for SYN, A for ACK, F for FIN, P for PUSH, U for URGENT, X for not standard 0x40, Y for not standard 0x80.

If the reply contains DF the IP header has the don’t fragment bit set.

seq is the sequence number of the packet, obtained using the source port for TCP/UDP packets, the sequence field for ICMP packets.

id is the IP ID field.

win is the TCP window size.

rtt is the round trip time in milliseconds.

If you run hping using the -V command line switch it will display additional information about the packet, example:

len=46 ip=192.168.1.1 flags=RA DF seq=0 ttl=255 id=0 win=0 rtt=0.4 ms tos=0 iplen=40 seq=0 ack=1223672061 sum=e61d urp=0

tos is the type of service field of the IP header.

iplen is the IP total len field.

seq and ack are the sequence and acknowledge 32bit numbers in the TCP header.

sum is the TCP header checksum value.

urp is the TCP urgent pointer value.

11 ответов

18

Вы можете использовать Paping , межплатформенное тестирование TCP-порта, эмулируя функциональность ping (port ping)

(см. также Github , поскольку code.google.com был обесценен)

297

Порты представляют собой концепцию UDP и TCP . Сообщения Ping технически называются и , которые являются частью ICMP . ICMP, TCP и UDP — «братья и сестры»; они не основаны друг на друге, а три отдельных протокола, которые работают поверх IP.

Поэтому вы не можете порт. Что вы можете сделать, использует сканер портов, например .

Вы также можете использовать , как предложено в одном из других ответов (он выдаст ошибку, если порт закрыт или отфильтрован).

76

Я использую Telnet , так как он встроен в множество платформ без дополнительных загрузок.

Просто используйте команду telnet для подключения к порту, который вы хотите протестировать. Если вы получите сообщение ниже или сообщение от самой службы, то порт жив.

Если вы знаете последовательность команд для службы, к которой вы подключаетесь, вы можете ввести команду ( HTTP /FTP GET ) и наблюдать за ответом и выходом в терминале. Это очень полезно для тестирования самой службы, поскольку она покажет вам информацию об ошибках, отправленную клиенту, например, ошибки HTTP 500.

Если вы получили сообщение о том, что соединение было отклонено, порт закрыт.

39

Да, используйте HPing , чтобы сделать это:

Обратите внимание, что для создания необработанных IP-пакетов необходимы привилегии root (или возможности SELinux), как и ping (что, скорее всего, является suid в вашей системе). 37

37

Вы можете использовать netcat для подключения к определенному порту, чтобы узнать, получаете ли вы соединение. Флаг -v увеличит количество подробностей, чтобы показать, открыт ли порт или закрыт. Флаг -z приведет к выходу netcat после его соединения. Затем вы можете использовать коды выхода через $? чтобы узнать, установлено ли соединение или нет.

Кроме того, вы можете использовать mtr с флагом -T для tcp и -P, чтобы указать порт. Это сделает что-то похожее на трассировку поверх TCP, а не только ICMP. Однако это может быть чрезмерным.

sigh Мне нужно отредактировать, чтобы добавить этот бит, поскольку мы не можем помещать код в комментарии. Knoppix может делать что-то другое с его версией netcat, но это то, что я получаю от Linux Mint

15

Вы также можете использовать (часть ):

5

Вы можете сделать это в Åhhell с Python как не очень короткий один лайнер:

2

Вы пытаетесь проверить связь или получить ответ от порта 80 на этом узле? попытается установить связь с определенным хостом через ICMP, который не имеет ничего общего с портами.

Вместо этого попробуйте http://nmap.org/ проверить информацию о порте и тестовую связь:

2

Я добавляю инструмент здесь:

2

Это просто с

примеры:

Для получения дополнительной информации см. это:

введите в командной строке следующее:

http://www.cyberciti.biz/networking/nmap- команда-примеры-учебники /
http://www.tecmint.com/nmap-command-examples/

2

Просто для справки, хотел поделиться сообщением Vivek Gite:

Он перечисляет различные способы, некоторые из которых уже размещены здесь. Но самое удивительное для меня было не более, чем :

Или супер простая версия: просто посмотрим на результат следующего шаблона команды:

Полезно при работе со случайными контейнерами докеров.

Альтернативы и дополнения к traceroute


Полученная с помощью tracemap графическая карта трассировки пути на корневые серверы DNS с хоста, расположенного в Киеве

  • tracepath — похожая на traceroute программа, но может строить асимметричные трассы и имеет некоторые другие отличия.
  • mtr — Интерактивная программа, способная постоянно выводить обновлённую статистику по трассе.
  • tracemap — программа, позволяющая выполнять трассировку пути на несколько хостов сразу и представить полученные данные в виде графической карты.
  • tcptraceroute (tracetcp) — аналогичная traceroute программа, но предназначена для диагностики TCP соединений; вместо UDP-пакетов использует TCP-пакеты открытия соединения (|) с указанным сервисом (по умолчанию — web-сервер, порт 80) интересующего хоста; в результате получаем информацию о времени прохождения данного вида TCP-пакетов через маршрутизаторы и информацию о доступности сервиса на интересующем хосте, либо, в случае проблем с доставкой пакетов — видим, в каком месте трассы они возникли.

What is iptables?

Iptables a command line firewall utility that allows or blocks traffic based on the policy chain use. Iptables follows the packet based approach for traffic monitoring. When a program tries to establish a connection with your system, iptables looks up for a rule to match from a pre-defined list. If it fails to match a rule, it restores to the default action and prevents access to the new connection.

The iptables package filter was first written by Rust Seller and is a product of the Netfilter Core Team. It is written in the C language and was first released in 1998. The company keeps releasing stable versions every now and then that can be downloaded from the following repository:

Company website: www.netfilter.org

To learn more about iptables and how to use it, follow the official documentation at:

How to Use the Ping Command #

The syntax for the ping command is as follows:

To better illustrate, how the ping command works let’s ping :

The output will look something like this:

The command resolves the domain name into an IP address and starts sending ICMP packages to the destination IP. If the destination IP is reachable it will respond back and the ping command prints a line that includes the following fields:

  • The number of data bytes. The default is 56, which translates into 64 ICMP data bytes — .
  • The IP address of the destination — .
  • The ICMP sequence number for each packet. .
  • The Time to Live. — — How does TTL work? .
  • The ping time, measured in milliseconds which is the round trip time for the packet to reach the host, and the response to return to the sender. — .

By default, the interval between sending a new packet is one second.

The command will continue to send ICMP packages to the Destination IP address until it receives an interrupt. To stop the command, just hit the key combination.

Once the command stops, it displays a statistic, including the percentage of packet loss. The packet loss means the data was dropped somewhere in the network, indicating an issue within the network. If there is a packet loss, you can use the command to identify where the packet loss occurs.

If does not return a reply, it means that the network communication is not established. When this happens, it doesn’t always mean that the destination IP is not active. Some hosts may have a firewall that is blocking the ICMP traffic or set to not respond to ping requests.

On success, the command exits with code . Otherwise, it will exit with code or . This can be useful when using the utility in a shell script.

In the following sections, we’ll go over the most commonly used command options.

Пример

Если осуществляется диагностика сети в запросах скорости соединения, в первую очередь происходит оценка эхо-запроса Ping, который определяет целостность и качество соединения на предмет запроса потери пакетов отражённого сигнала от источника соединения. В данном случае, если ответ запроса приходит с минимальным количеством пакетов, к примеру около 30 или менее, то в данном случае настройка сетевого оборудования нестабильна и имеет брешь в системе безопасности. Таким образом, стоит придать значение политике IP безопасности, Брандмауэру, групповой политике и настройкам сетевых адаптеров, настроек маршрутизатора. Не стоит путать Ping — определяющий целостность и качество связи, с транспортными протоколами связи TCP и UDP — определяющих передачу и скорость передачи данных!

Полное отсутствие ICMP-ответов может также означать, что удалённый узел (или какой-либо из промежуточных маршрутизаторов) блокирует ICMP Echo-Reply или игнорирует ICMP Echo-Request.

Так как для отправки ICMP-пакетов требуется создавать raw-сокеты, для выполнения программы ping в UNIX-системах необходимы права суперпользователя. Чтобы обычные пользователи могли использовать ping, в правах доступа файла /bin/ping устанавливают SUID-бит.

DEFT

  • Первый релиз: 2005 год
  • Основан на: Ubuntu
  • Платформы: x86
  • Графическая оболочка: LXDE

Родина DEFT — солнечная Италия, и он щедро, как пицца сыром, посыпан разнообразными инструментами для разведки и взлома. При этом они не примотаны к дистрибутиву синей изолентой, а вполне гармонично встроены в него. Все вместе напоминает интересный и полезный в жизни швейцарский нож.

Разработан DEFT на платформе Lubuntu и снабжен удобным графическим интерфейсом. В продукт входит набор профильных утилит, начиная с антивирусов, систем поиска информации в кеше браузера, сетевых сканеров и других полезностей и заканчивая инструментами, которые необходимы при поиске скрытой информации на диске.

Используя эту ОС, не составит труда получить доступ к стертым, зашифрованным или поврежденным данным на различных видах физических носителей.

Основной инструментарий прячется в разделе DEFT, который, в свою очередь, находится в некотором подобии меню «Пуск».

Изначально этот дистрибутив был предназначен для нужд сетевой полиции и специалистов по реагированию на инциденты в области ИБ, поэтому еще одна сильная сторона DEFT — это конкурентная разведка, в том числе анализ взаимосвязей аккаунтов соцсетей.

Есть даже интересная утилита для обнаружения геолокации заданного аккаунта LinkedIn или Twitter. Я не смог проверить, насколько эффективно это работает в данный момент, но с определением принадлежности аккаунта к стране и городу она справляется.

В отличие от Kali Linux или Tsurugi, в DEFT защита от дурака встроена. Без должной подготовки почти ни один инструмент попросту не запустить, а без глубокого понимания работы защитных механизмов тут вообще делать нечего.

Буквально каждое приложение или опция требует прав root, так что не спеши сразу запускать все подряд или создавать непривилегированного пользователя.

Также я обнаружил «подарочек»: несколько репозиториев, откуда DEFT берет обновы, закрыты ключами. Пару дней я рылся по форумам, пока не нашел, откуда запросить данные, да и сами ключи тоже нашлись.

В итоге эта система хороша для форензики и расследования инцидентов, в особенности если есть физический доступ к носителям информации — будь то диск, флешка или смартфон (хакера, начальника, сотрудника, конкурента, жены, любовницы, ее бати — нужное подчеркнуть).

Продолжение доступно только участникам

Материалы из последних выпусков становятся доступны по отдельности только через два месяца после публикации. Чтобы продолжить чтение, необходимо стать участником сообщества «Xakep.ru».

Присоединяйся к сообществу «Xakep.ru»!

Членство в сообществе в течение указанного срока откроет тебе доступ ко ВСЕМ материалам «Хакера», увеличит личную накопительную скидку и позволит накапливать профессиональный рейтинг Xakep Score!
Подробнее

Я уже участник «Xakep.ru»

Base Options

-h —help

Show an help screen on standard output, so you can pipe to less.
-v —version
Show version information and API used to access to data link layer, linux sock packet or libpcap.
-c —count count
Stop after sending (and receiving) count response packets. After last packet was send hping3 wait COUNTREACHED_TIMEOUT seconds target host replies.
You are able to tune COUNTREACHED_TIMEOUT editing hping3.h
-i —interval
Wait the specified number of seconds or micro seconds between sending each packet. —interval X set wait to X seconds, —interval uX set wait
to X micro seconds. The default is to wait one second between each packet. Using hping3 to transfer files tune this option is really important in order to
increase transfer rate. Even using hping3 to perform idle/spoofing scanning you should tune this option, see HPING3-HOWTO for more information.
—fast

Alias for -i u10000. Hping will send 10 packets for second.

—faster

Alias for -i u1. Faster then —fast 😉 (but not as fast as your computer can send packets due to the signal-driven design).

—flood

Sent packets as fast as possible, without taking care to show incoming replies. This is ways faster than to specify the -i u0 option.

-n —numeric

Numeric output only, No attempt will be made to lookup symbolic names for host addresses.

-q —quiet

Quiet output. Nothing is displayed except the summary lines at startup time and when finished.

-I —interface interface name

By default on linux and BSD systems hping3 uses default routing interface. In other systems or when there is no default route hping3 uses the first
non-loopback interface. However you are able to force hping3 to use the interface you need using this option. Note: you don’t need to specify the whole name,
for example -I et will match eth0 ethernet0 myet1 et cetera. If no interfaces match hping3 will try to use lo.

-V —verbose

Enable verbose output. TCP replies will be shown as follows:

len=46 ip=192.168.1.1 flags=RA DF seq=0 ttl=255 id=0 win=0 rtt=0.4 ms tos=0 iplen=40 seq=0 ack=1380893504 sum=2010 urp=0

-D —debug

Enable debug mode, it’s useful when you experience some problem with hping3. When debug mode is enabled you will get more information about interface
detection, data link layer access, interface settings, options parsing, fragmentation, HCMP protocol
and other stuff.

-z —bind

Bind CTRL+Z to time to live (TTL) so you will able to increment/decrement ttl of outgoing packets pressing CTRL+Z once or twice.

-Z —unbind

Unbind CTRL+Z so you will able to stop hping3.

—beep

Beep for every matching received packet (but not for ICMP errors).

How to Block/Allow ping from iptables?

You can install iptables through the Linux command line by running the following command in your Terminal:

$ sudo apt-get install iptables

You can open the Terminal application either through the system application launcher search or by using the Ctrl+Alt+T shortcut.

In order to verify the installation and check the version number, you can use the following command:

$ iptables --version

Block Ping

As mentioned above, the iptables firewall is based on some set of rules. You can add the following rule in order to block pings to and from the server. The command will print an error message when you run the ping command:Advertisement

$ sudo iptables -A INPUT -p icmp --icmp-type echo-request -j REJECT

Example:

Or else, you can add the following rules in order to block ping without printing an error message:

$ sudo iptables -A INPUT -p icmp --icmp-type echo-request -j DROP
$ sudo iptables -A OUTPUT -p icmp --icmp-type echo-reply -j DROP

The -A command option of the iptables command stands for ‘Add’, so any rule that shall get added starts with ‘sudo iptables -A ….‘.

Allow Ping

The following command lets you list all the rules added to your iptables:

$ sudo iptables -L

If any of the rules is blocking ping (in our case ICMP is rejected), you can simply remove that rule as follows:

$ sudo iptables -D INPUT -p icmp --icmp-type echo-request -j REJECT

The -D command switch is used to delete the rule.

You can delete all custom rules added to your iptables Firewall with the following command:

$ sudo iptables -F

You have seen how adding and removing rules in the iptables utility allows you to control how the firewall works.

How to block/allow ping using iptables in Ubuntu

Speeding up the PathPing command

As I said earlier, pathping is a bit slow. But you can speed it up by adding some switches to it. By default, pathping will resolve each hostname of every hop it comes across. It will also send 100 queries by default to each host.

So what we can do is disable the hostname resolve and lower the number of queries that pathping does on each hop with the following command:

pathping -q 10 -n -p 100 lazyadmin.nl
Pathping -q 10

With -q switch we set the amount of queries to 10 instead of the default 100. This will speedup the statics that are computed after the trace.

Pathping -n

The -n switch prevents the command from resolving the hostnames. This speeds up the trace route part of the command.

Pathping -p 100

The -p switch lowers the wait time between each ping. By default pathping will wait 250ms, so if you set it 100ms it will 10 pings in a second instead of 4.

Pathping -h 4

Another useful option is the -h switch. With -h you can specify the number of hops you want to test. Let’s say you only want to test if you can reach your ISP, then limiting the number of hops to 4 or 5 will be sufficient.

Pathping -w 500

The last useful switch is -w. When a host is unreachable it takes up to 3 seconds before it tries again. By setting the wait time to 500ms you can speed up the results.

Icmp Related Options

-C —icmptype type

Set icmp type, default is ICMP echo request (implies —icmp).
-K —icmpcode code
Set icmp code, default is 0 (implies —icmp).
—icmp-ipver
Set IP version of IP header contained into ICMP data, default is 4.
—icmp-iphlen
Set IP header length of IP header contained into ICMP data, default is 5 (5 words of 32 bits).
—icmp-iplen
Set IP packet length of IP header contained into ICMP data, default is the real length.
—icmp-ipid
Set IP id of IP header contained into ICMP data, default is random.
—icmp-ipproto
Set IP protocol of IP header contained into ICMP data, default is TCP.
—icmp-cksum
Set ICMP checksum, for default is the valid checksum.
—icmp-ts
Alias for —icmptype 13 (to send ICMP timestamp requests).
—icmp-addr
Alias for —icmptype 17 (to send ICMP address mask requests).

Version 1 — Just Class C

The first attempt runs like this when asked to the subnet — much better. And it completes in a fraction over one second:

$ ./ping1.sh 192.168.1
192.168.1.13
192.168.1.4
192.168.1.8
192.168.1.65
192.168.1.254
192.168.1.88
192.168.1.140
192.168.1.68
192.168.1.87
192.168.1.79
$ 

The code for this script is fairly simple. It does all of those one-second s in the background — creating 254 short-lived background processes, so not an ideal tool on an embedded device, but perfectly reasonable on any modern server. If the is successful, it displays the address which was ed.
Download ping1.sh

#!/bin/bash
prefix=${1:-192.168.1}

for ip in `seq 1 254`
do
  ( ping -c1 -w1 ${prefix}.${ip} > /dev/null 2>&1 && echo ${prefix}.${ip} ) &
done
wait

It loops through numbers 1 to 254, and uses them as the final octet of the IP address.
It defaults to testing the common 192.168.1.0/24 network, but you can pass it any other
Class C network address (with three dotted numbers), such as 10.172.19, or 172.17.10, and
so on.

The brackets around the command: «» mean that the pair of commands are run in a subshell (the means that the only runs if the
succeeded), and the final «&» means that
that subshell is run in the background.

As a result, the whole script runs in a fraction over one second, and each subshell returns
a message if it was successful.

The final call ensures that the script waits for all of its children
to complete before exiting. Otherwise, you would get some responses being displayed to the
terminal after the prompt has been displayed to return control to your interactive session.
This would cause messy output, so the simply ensures that all the work has been
done before exiting.

Как работает команда Ping

Когда вы используете свой телефон, вы набираете номер (или чаще всего в настоящее время выбираете свое имя из адресной книги на своем телефоне), и телефон звонит в конце приемника.

Когда этот человек отвечает на телефон и говорит «привет», вы знаете, что у вас есть связь.

Команда «ping» работает аналогичным образом. Вы указываете IP-адрес, который эквивалентен номеру телефона или веб-адресу (имя, связанное с IP-адресом), а «ping» отправляет запрос на этот адрес.
Когда принимающая сеть получает запрос, она отправит обратно ответ, который в основном говорит «привет».

Время, требуемое для ответа сети, называется задержкой.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *