As the ping command translates the addresses?

Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
As the ping command translates the addresses?
Why ping 127.127.327 the answer comes from It is clear that a transfer of the values in a different octet, but would not see that it was clearly described.
by | 7 views

2 Answers

0 like 0 dislike
127.127.327 is one of the acceptable forms of IPv4 addresses. the number after the last dot may be more than one byte if less than three points.
in principle, you can even 2139029831 to ping, the effect is the same.
can still have fun with ping 0177.127.1.71.
0 like 0 dislike
Description of the algorithm is in the documentation for the function inet_ntoa, used by the ping command.

The address supplied in cp can have one of the following forms:



Parts a and b specify the first two bytes of the binary address. Part c is interpreted as a 16-bit value that defines the rightmost two bytes of the binary address. This notation is suitable for specifying (outmoded rated) Class B network addresses.

Ie 327 is treated as a two-byte integer. The bit representation, this number looks like this:
0000 0001 0100 0111
And further it is divided into two octets - 0000 0100 0001 and 0111, which, respectively, will be 1 and 71.

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
3 answers
0 like 0 dislike
2 answers
0 like 0 dislike
7 answers
asked May 22, 2019 by Cyberuser
110,608 questions
257,186 answers
35,648 users