I’ve noticed that Linux and *BSD systems allow user to skip octets when using dot-decimal notation.
Here are some examples:
$ ping 10.1
PING 10.1 (10.0.0.1) 56(84) bytes of data.
$ ping 10.15.1
PING 10.15.1 (10.15.0.1) 56(84) bytes of data.
Note that this isn’t limited to the ping command.
I’ve found document defining textual representations of IPv4, but it doesn’t seem to cover that feature: Textual Representation of IPv4 and IPv6 Addresses.
Is there any other document defining this behavior? Is there a specific name for this behavior?
See inet_aton()
man page.
The last part is the numerical value representing the contents of the remaining bits in the address, i.e., a 24-bit y
in x.y
, and a 16-bit z
in x.y.z
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With