From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HTML_MESSAGE,MAILING_LIST_MULTI,NUMERIC_HTTP_ADDR autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 15973 invoked from network); 7 May 2022 23:54:44 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 7 May 2022 23:54:44 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id 3C75B9CF3E; Sun, 8 May 2022 09:54:42 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 380A09CEEF; Sun, 8 May 2022 09:52:22 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=bsdimp-com.20210112.gappssmtp.com header.i=@bsdimp-com.20210112.gappssmtp.com header.b="zc7Uhl+I"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id 438E89CEEF; Sun, 8 May 2022 09:50:05 +1000 (AEST) Received: from mail-vs1-f48.google.com (mail-vs1-f48.google.com [209.85.217.48]) by minnie.tuhs.org (Postfix) with ESMTPS id D57039CEEE for ; Sun, 8 May 2022 09:49:59 +1000 (AEST) Received: by mail-vs1-f48.google.com with SMTP id e10so10634297vsr.1 for ; Sat, 07 May 2022 16:49:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Yyi1XYuVY83+cL0oTSYQnSWDjjR23nvAdW1Xl3ngy+w=; b=zc7Uhl+I+g8Ewm2Cf0XnmB9ZSTceEaVz11F3/E6PiN8PvY0WgPjMhlGeaW/KiI0v9b WbTwj0br7wGYgGhjgxtXjaKN2IkTfMB7SaoCNm6wyEG3swe+Qg4/a6ABqcNhTp3HZ88h qlediWGYhPCq+cd4DEDT4/bxGIfNNKpEOOujsfMWBUBK/rnyThDJEhQSkFk6Fn4SsCiR 4KQGskR4my++jOajbkAIv3XgaolegPOm1/ghBsZlLWtfGQMUbqNjVKGGDqpZ2RuWndwD k68fCGAZEF/WiIhC0jmti2Q7XWftET5Boeo8ubVVpfs9r7SFQx1NM3S1GSouFxaL/mv6 gATA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Yyi1XYuVY83+cL0oTSYQnSWDjjR23nvAdW1Xl3ngy+w=; b=TwJExvqFGWxv3jUbxX6DNRjxXlxr4+gbTlV1ZGxWF/FyuPlJWzloW5GjixTqibN6zY EP5wTsM1T6M7HWfwu/zuR7kHvR9CBsVn2c8Ig9qyMtcb/g2SMbldRfNuTU8dLWQ4AWUO qFjQqAUqL08WjTeCM+dspeNNlMBKU+h4Lryr1yiSig5jHf9ParZhuCvHfGHAiXyziIlY EHxZRGrXDsJI/upmJAR/VebRXtvQsY9O+qCnESudmHKvMl7t80MlgwSaR/LHvE0/nAQ5 9uqkhAQPtuVQZ5mPvE35yar4y24SrOxEkN5kXBqV1K0XX/2jeoKYERTz1BM20VlSj3ub Yrkg== X-Gm-Message-State: AOAM530YFKy9ttZdL0G0/EqWn/7XnpJvBfvTnE1axQe8mYuAb0HCwqFz xfDdWDK5BU7sxumIbAkFqo3ujxqZimF8/I9Ci7Mjaw== X-Google-Smtp-Source: ABdhPJyxUBak/XHbEkdnDYJ/38gSc+31vwRSrMjaejMc7qj+BOtCeQ7ETOb8DO0Ocr24b8Cq2mwqGh1MZD5UzAkPJD4= X-Received: by 2002:a67:dd19:0:b0:32d:25dd:e07c with SMTP id y25-20020a67dd19000000b0032d25dde07cmr5279425vsj.42.1651967398673; Sat, 07 May 2022 16:49:58 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Warner Losh Date: Sat, 7 May 2022 17:49:46 -0600 Message-ID: To: Bakul Shah Content-Type: multipart/alternative; boundary="000000000000fa900405de74a190" Subject: Re: [TUHS] conventions around zero padding in ip4 X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: TUHS main list Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" --000000000000fa900405de74a190 Content-Type: text/plain; charset="UTF-8" On Sat, May 7, 2022, 5:19 PM Bakul Shah wrote: > On May 7, 2022, at 12:14 PM, Warner Losh 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. > We just know the dotted quad world. In the early days of sparse addresses and crappy name service (or out of date host files) these shortcuts were a lifesaver. Warner > --000000000000fa900405de74a190 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Sat, May 7, 2022, 5:19 PM Bakul Shah <bakul@iitbombay.org> wrote:
On May 7, 2022, at 12:14 PM, Warner Losh <<= a href=3D"mailto:imp@bsdimp.com" target=3D"_blank" rel=3D"noreferrer">imp@b= sdimp.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 =3D=3D 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 =3D=3D 10000= 00)
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! P= rob. 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.


We just know t= he dotted quad world. In the early days of sparse addresses and crappy name= service (or out of date host files) these shortcuts were a lifesaver.

Warner=C2=A0
--000000000000fa900405de74a190--