This is an old relic from the days of classful IPv4 networks.
When you had no subnetting, just exactly one class-B network with 2 octets for the host address, in some cases it would have been convenient to just use a linear numbering 0-65535 (0000h-FFFFh) for all your hosts, instead of two separate numbers. (At least that's what I assume the reason was.)
So the BSD networking software would accept x.y.(z*256+t)
as alternative way of writing class-B addresses, in addition to the usual x.y.z.t
. For example the address 128.42.1.6 could be written as "128.42.262" instead.
The same also worked for class-A addresses as x.(y*65536+z*256+t)
– for example, the address 10.1.33.27 could be written as "10.74011".
(As a side note, for some reason it would also accept the numbers in octal and hex. Actually it gets clearer if you write the above examples in hex: 10.1.33.27 is "0xA.0x1.0x21.0x1B", and 10.74011 is "0xA.0x1211B".)
This survived in many systems which faithfully reproduced the same IP address parsing code, including Windows or Linux (and only recently purged from OpenBSD).
This Super User post describes it in more detail: https://superuser.com/revisions/486904/3