The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: ron minnich <rminnich@gmail.com>
To: Warner Losh <imp@bsdimp.com>
Cc: TUHS main list <tuhs@minnie.tuhs.org>
Subject: Re: [TUHS] conventions around zero padding in ip4
Date: Sat, 7 May 2022 12:57:28 -0700	[thread overview]
Message-ID: <CAP6exYJvSroDdbMBmVijfMeUuKY4Z8mf6Om8UWWcR8Mmn67D7A@mail.gmail.com> (raw)
In-Reply-To: <CAP6exYKg2GhW8aSqM0zubLy6BA41SZ6+Eg+JPEF469sF86Nruw@mail.gmail.com>

curiouser and curiouser, at least some Go packages parse it that way:

rminnich@a300:~/go/src/github.com/u-root/u-root/cmds/core/ping$ cpu
-key ~/.ssh/cpu_rsa 192.168.16 date
Sat May  7 12:56:29 PM PDT 2022
rminnich@a300:~/go/src/github.com/u-root/u-root/cmds/core/ping$ cpu
-key ~/.ssh/cpu_rsa 192.168.0.16 date
Sat May  7 12:57:05 PM PDT 2022
rminnich@a300:~/go/src/github.com/u-root/u-root/cmds/core/ping$

[cpu is basically ssh with the plan 9 cpu command baked in, written in Go]

So as a convention, it's been out and about for close to 40 years,
many systems honor it, it seems not many people know of it, and not
everything interprets it the same way. Huh! Well, you learn something
new every day.

I found it a wonderful shorthand when somebody showed it to me, and
it's wired into my fingers at this point. I just assumed everyone else
used it too. I may dig around and try to figure out when Plan 9 picked
it up, that might give me some idea as to provenance.

On Sat, May 7, 2022 at 12:50 PM ron minnich <rminnich@gmail.com> wrote:
>
> here's a simple example:
> rminnich@a300:~/tamago/t9$ ping 127.1
> PING 127.1 (127.0.0.1) 56(84) bytes of data.
> 64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.056 ms
>
> telnet 127.1 22
> Trying 127.0.0.1...
> Connected to 127.1.
>
> All plan 9 programs I try parse 127.1 as 127.0.0.1
>
> I first learned to use this convention in a BSD world, later on sunos.
>
> Interesting, the things you think are a standard, and are actually
> just a convention!
>
> On Sat, May 7, 2022 at 12:15 PM Warner Losh <imp@bsdimp.com> wrote:
> >
> >
> >
> > On Sat, May 7, 2022 at 10:23 AM ron minnich <rminnich@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

  reply	other threads:[~2022-05-07 20:10 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-07 16:14 ron minnich
2022-05-07 16:38 ` Bakul Shah
2022-05-07 16:48 ` Erik E. Fair
2022-05-07 18:49 ` Steffen Nurpmeso
2022-05-07 19:14 ` Warner Losh
2022-05-07 19:50   ` ron minnich
2022-05-07 19:57     ` ron minnich [this message]
2022-05-07 23:19   ` Bakul Shah
2022-05-07 23:49     ` Warner Losh
2022-05-08 10:28     ` Ralph Corderoy
2022-05-08  5:21 ` jason-tuhs
2022-05-08 10:22 ` Ralph Corderoy
2022-05-09 14:08   ` Steffen Nurpmeso
2022-05-10 10:49     ` Ralph Corderoy
2022-05-07 19:43 Noel Chiappa
2022-05-08 14:54 ` Michael Kjörling
2022-05-09 16:14 Noel Chiappa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAP6exYJvSroDdbMBmVijfMeUuKY4Z8mf6Om8UWWcR8Mmn67D7A@mail.gmail.com \
    --to=rminnich@gmail.com \
    --cc=imp@bsdimp.com \
    --cc=tuhs@minnie.tuhs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).