The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Bakul Shah <bakul@iitbombay.org>
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 16:19:53 -0700	[thread overview]
Message-ID: <FA943880-F763-4548-A7AC-0BDB9991E731@iitbombay.org> (raw)
In-Reply-To: <CANCZdfpsFbB7A4+aaiNwc=cCVzu=sLpSx8V7ekka6TGhtYxvLQ@mail.gmail.com>

On May 7, 2022, at 12:14 PM, Warner Losh <imp@bsdimp.com> wrote:
> 
> 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.

On FreeBSD:
ping 10.2 tries to ping 10.0.0.2 and
ping 192.168.300 tries to ping 192.168.1.44 (1*2^8+44 == 300)
ping 10.2.300 tries to ping 10.2.1.44
ping 192.1000000 tries to ping 192.15.66.64 (15*2^15+66*2^8+64 == 1000000)
ping 1000000001 tries to ping 59.154.202.1 (59*2^24+154*2^16+202*2^8+1)
ping 300.300 tries to ping 23.217.138.110 (I haven't worked this out! Prob. a bug)
So the last number is treated as the host number on a given net.
This may have some sense in the classful network world but is
very confusing in the CIDR world.



  parent reply	other threads:[~2022-05-07 23:22 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
2022-05-07 23:19   ` Bakul Shah [this message]
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=FA943880-F763-4548-A7AC-0BDB9991E731@iitbombay.org \
    --to=bakul@iitbombay.org \
    --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).