[TUHS] conventions around zero padding in ip4

Warner Losh imp at bsdimp.com
Sun May 8 05:14:48 AEST 2022


On Sat, May 7, 2022 at 10:23 AM ron minnich <rminnich at gmail.com> wrote:

> IP4 padding came up recently: the ip command interprets 10.2 as
> 10.2.0.0, whereas most things (golang libraries, ping, ...) interpret
> it as 10.0.0.2. The latter interpretation accords with what I learned
> 40y ago.
>

10.2 is ambiguous. In a network context, it means, typically, 10.2.0.0/16
(though your mileage may vary).
In a host context, it means 10.0.0.2. It's this confusion that has lead to
many efforts
to outright kill this notation.


> But, I find myself wondering: where was the first use of the IP4 zero
> padding convention?
>

I know that it was around in the late 80s on TOPS-20 TCP/IP at Stanford,
and in 4.2BSD (4.1c?). It may have also been in use at MIT. It's usage
pre-dates my 1984 joining of the internet...

Warner
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20220507/e1f372e0/attachment.htm>


More information about the TUHS mailing list