Telegram- 👇 😉
-
. WIKIMERIONET
Merion Mertics , ,

CRM

15 PING

PING PONG

10

Linux, . PING .

. Linux.

PING!

PING?

ping . , :

  • ;
  • IP , ,
  • bash
  • .

, .


PING?

Ping : .

IP-, . , .

, , .

, , .

, .

:

ping [options] [destination]

:

  • -c: .
  • -s: .
  • -v: .
  • -w: .
  • -i: , .

PING -?

. , .

, PING . , Ping -.

, , Ping . , Ping, curl. VPN, IP.


Ping IPv6

, PING, IP 4. , IPv6, .

Linux IPv6 2.2, Linux .

:

$ ping -6 2001:4860:4860::8888

ping6. ping.

IPv4, c , , i .


Ping

. , Ping , telnet, Linux.

:

telnet [host] [port]
telnet google.com 80

Ping

ping , . , , . .

. ccze.

ping [host] | xargs -n1 -i bash -c 'echo `date +%F\ %T`" {}"' | ccze
ccze

, .


Ping

Ping . ping b , 255. :

ping -b -c 4 192.168.1.255
-b

, , ICMP , .


PING?

, Linux Ping . , - . CTRL+C.

.


. , 10, .

ping -c 10 [host]

PING?

Unix- , Linux

/usr/bin/

, . Linux, :

/usr/sbin/

ls:

$ ls /usr/bin | grep ping
grep ping

, ping

/usr/bin/

, which:

$ which ping

:

/usr/bin/ping

PING

, PING, . - .

:

ping -c 4 [host]

ping -c 4 192.168.1.1

, . , :

rtt min/avg/max/mdev

. 6,798.

, .


MTU

MTU (Maximum Transmission Unit) , .

, , MTU. Ethernet MTU 1500 .

MTU Ping, , . , :

ping: local error: Message too long

:

ping -M do -s [initial_value] [host]
MTU

, . 1472 .

1472

, , .

MTU , . .


Ping 2- OSI ( arping)

ping IP- . , ping OSI.

, Linux arping. , ping, OSI.

:

$ sudo arping [Ip_address]
$ sudo arping [Ip_address]
$ sudo arping 192.168.1.1

- :

arping

, MAC , .

, Debian .


Ping

, ping IP . , ping Linux DNS .

, ping, IP , IP . , , IP . :

$ ping google.com

Ping (traceroute)

ping . , , .

tracert (Windows) traceroute ping. , .

traceroute ICMP , Ping. traceroute, ping TTL . . TTL , . IP . . , TTL . , . :

traceroute [hostname/IPaddres]
traceroute

ping

, ping. ping bash . , ping:

#! /bin/bash

ping -c 1 [host]

If [ $? -eq 0]; then

    #Your_command_here

Fi

ping

, ICMP 56 . . . ping s . :

ping -s [packet_size] hostname/IP

100 , :

ping -s 100 192.168.1.1
-s

ping

, ping . , , . ping root-:

$ su

$ echo "1" > /proc/sys/net/ipv4/icmp_echo_ignore_all

ICMP . ,

/etc/sysctl.conf

:

$ nano /etc/sysctl.conf
net.ipv4.icmp_echo_ignore_all=1
sysctl.conf

, :

$ sysctl -p
sysctl -p

, ping Linux. Ping . , , .