From nobody Wed Nov 03 23:01:02 2021 X-Original-To: freebsd-net@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7AD21183090C for ; Wed, 3 Nov 2021 23:01:03 +0000 (UTC) (envelope-from mike@mail.karels.net) Received: from mail.karels.net (mail.karels.net [216.160.39.52]) by mx1.freebsd.org (Postfix) with ESMTP id 4Hl2Lk3dc2z3LS2 for ; Wed, 3 Nov 2021 23:01:02 +0000 (UTC) (envelope-from mike@mail.karels.net) Received: from mail.karels.net (localhost [127.0.0.1]) by mail.karels.net (8.16.1/8.16.1) with ESMTPS id 1A3N12dG075695 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Wed, 3 Nov 2021 18:01:02 -0500 (CDT) (envelope-from mike@mail.karels.net) Received: (from mike@localhost) by mail.karels.net (8.16.1/8.16.1/Submit) id 1A3N121R075694; Wed, 3 Nov 2021 18:01:02 -0500 (CDT) (envelope-from mike) Message-Id: <202111032301.1A3N121R075694@mail.karels.net> To: freebsd-net@freebsd.org From: Mike Karels Reply-to: mike@karels.net Subject: netmask for loopback interfaces List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <75692.1635980462.1@mail.karels.net> Date: Wed, 03 Nov 2021 18:01:02 -0500 X-Rspamd-Queue-Id: 4Hl2Lk3dc2z3LS2 X-Spamd-Bar: ++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of mike@mail.karels.net has no SPF policy when checking 216.160.39.52) smtp.mailfrom=mike@mail.karels.net X-Spamd-Result: default: False [2.68 / 15.00]; HAS_REPLYTO(0.00)[mike@karels.net]; ARC_NA(0.00)[]; FREEFALL_USER(0.00)[mike]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; REPLYTO_ADDR_EQ_FROM(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-net@freebsd.org]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_SPAM_MEDIUM(1.00)[1.000]; TO_DN_NONE(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; NEURAL_HAM_SHORT(-0.62)[-0.620]; NEURAL_SPAM_LONG(1.00)[1.000]; DMARC_NA(0.00)[karels.net]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[mike@karels.net,mike@mail.karels.net]; RCVD_NO_TLS_LAST(0.10)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:209, ipnet:216.160.36.0/22, country:US]; FROM_NEQ_ENVFROM(0.00)[mike@karels.net,mike@mail.karels.net] X-ThisMailContainsUnwantedMimeParts: N I have a pending change to stop using class A/B/C netmasks when setting an interface address without an explicit mask, and instead to use a default mask (24 bits). A question has arisen as to what the default mask should be for loopback interfaces. The standard 127.0.0.1 is added with an 8 bit mask currently, but additions without a mask would default to 24 bits. There is no warning for missing masks for loopback in the current code. I'm not convinced that the mask has any meaning here; only a host route to the assigned address is created. Does anyone know of any meaning or use of the mask on a loopback address? Thanks, Mike