Re: [v6ops] Our IPv6-only home network and future experiments

Brian Candler <brian@nsrc.org> Fri, 12 April 2024 15:01 UTC

Return-Path: <brian@nsrc.org>
X-Original-To: v6ops@ietfa.amsl.com
Delivered-To: v6ops@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A6792C151534 for <v6ops@ietfa.amsl.com>; Fri, 12 Apr 2024 08:01:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.798
X-Spam-Level:
X-Spam-Status: No, score=-2.798 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=nsrc.org header.b="G83fYzkS"; dkim=pass (2048-bit key) header.d=messagingengine.com header.b="AzwQPRl3"
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YPvHgUPXjMim for <v6ops@ietfa.amsl.com>; Fri, 12 Apr 2024 08:01:49 -0700 (PDT)
Received: from wfhigh8-smtp.messagingengine.com (wfhigh8-smtp.messagingengine.com [64.147.123.159]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 41122C151531 for <v6ops@ietf.org>; Fri, 12 Apr 2024 08:00:41 -0700 (PDT)
Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfhigh.west.internal (Postfix) with ESMTP id 324B11800129; Fri, 12 Apr 2024 11:00:40 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Fri, 12 Apr 2024 11:00:40 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nsrc.org; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1712934039; x=1713020439; bh=0JVfSLxjE+z5Pm/1ISk0xp/yqf1ez9EGeR3q109jm38=; b= G83fYzkSenfxiyOQg9o43h1Tarv3t8X8y/jkdo/gtdE9cAOw7C7nlO9xPBkY+hhc kg6D9bHX2bOz8O/5+t0DLarXUB81rUVGAun7gqblF+sSfbeboyunm0JfAeDuGDNG dM+rrdf7ZgQPz+0LF52Jgp9Z4QQ6eZ0cHXA0QVkyeKJHz8zggG8cMnvXYBCNSVzp k4ScTGT63P27uCFXmaKAKcEAuV1MYSsZaI9JRVAZVFbp1YlTef7NDXMcIsuc8kiM nBDUDBCOLzkJ4Ca5z87T7VPXZq6GXssX8vtFkxbFDRnhlQISyCMgcqFL6Ea6bzOP 85lfuBKMMaKft5p77n2ACg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1712934039; x= 1713020439; bh=0JVfSLxjE+z5Pm/1ISk0xp/yqf1ez9EGeR3q109jm38=; b=A zwQPRl3LQvj1hO+juXLfOexJVc3/LiLdywlrgYqCXU6pBQEbMt/c4ErrjQ2E0LQ+ P3xuFRFwMWN9BgqO4T6aA11nAxF2Y/6gT/2QkT6lRrh0mi4hHuzlUV41O0uFGIvZ 1CfiQL80ord4JXoav+GsjGBImb107aftGh0hyd/dZ6gsRzSI+vlZWSHsJc9oxNvN PKzdE7Y+Q+ho9mMPouezgu3vmxsW8IRGnHAnuR5NqwQcFPoRTSy2jvovnCB2P0KG pnglcwINUkOXh7Cf5pbzOnsskAuxZOaOs7HaA95jmL+OhMV6P3SAy7QCUvsYOjby IUU/sQR7f1AYlkKOr64MA==
X-ME-Sender: <xms:lkwZZpqorbqe2aCSekxp96d7x721NHpRXI3JOPLjzyXn9gFlpHLNhQ> <xme:lkwZZrpBWcM7n1I6h_viqut7lge-vSQTFthjjNpC6WTlu7wbjs9WAXrpW0yFw_Yle Tab_vXPyO1JhbGJ-YM>
X-ME-Received: <xmr:lkwZZmNw5jglURfngdJ9w4_90hmkKfDf6BRrLC5gRH9QMkktEzm-qEZx6lJ8Fik>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudeiuddgkeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtke ertddtvdejnecuhfhrohhmpeeurhhirghnucevrghnughlvghruceosghrihgrnhesnhhs rhgtrdhorhhgqeenucggtffrrghtthgvrhhnpeffveeihfelheevudfgkeevgedvieekue fgtedvueevlefgleejheevheffueehfeenucevlhhushhtvghrufhiiigvpedtnecurfgr rhgrmhepmhgrihhlfhhrohhmpegsrhhirghnsehnshhrtgdrohhrgh
X-ME-Proxy: <xmx:lkwZZk44Pv39BORACytea1a3FIryAcPT1ZGUHIhgcKQqhjNIMd1WQw> <xmx:lkwZZo7RP4KJEdKsdElw05Bs6wDsUJK7u79ZnTmTD08OBexngiulQw> <xmx:lkwZZshpQJ9vpy0RynrXjExfSfzINkX-TZ-nELmKpZzdz6I6zeHPaA> <xmx:lkwZZq5LdBTSTDbqjetxMvIigst3qWo7LGS2g-jxlo5XwMoKRZBkfg> <xmx:l0wZZmlAkfCMPv8LcwCPizCSbFS0EpB51tdUQEN59XwfO_mhXBFAvLsm>
Feedback-ID: i8f09498f:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 12 Apr 2024 11:00:38 -0400 (EDT)
Message-ID: <0ea1d4ca-d00f-4b08-b5d6-16fe18415702@nsrc.org>
Date: Fri, 12 Apr 2024 16:00:37 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: en-GB
To: "Soni \"They/Them\" L." <fakedme+ipv6@gmail.com>, IPv6 Operations <v6ops@ietf.org>
References: <91ee2782-c98a-4ccf-ae8f-71be571420b6@gmail.com>
From: Brian Candler <brian@nsrc.org>
In-Reply-To: <91ee2782-c98a-4ccf-ae8f-71be571420b6@gmail.com>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/v6ops/bRblZLAm153y1dg3f3B9rIdbJI8>
Subject: Re: [v6ops] Our IPv6-only home network and future experiments
X-BeenThere: v6ops@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: v6ops discussion list <v6ops.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/v6ops>, <mailto:v6ops-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/v6ops/>
List-Post: <mailto:v6ops@ietf.org>
List-Help: <mailto:v6ops-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/v6ops>, <mailto:v6ops-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 12 Apr 2024 15:01:53 -0000

On 12/04/2024 15:04, Soni "They/Them" L. wrote:
> If we get CLAT in libc working, then we'll move on to enabling the use 
> of this OS on IPv4-only and dual-stack networks, but again without 
> introducing an IPv4 stack. This can be done by taking IPv4 packets 
> from the wire, without passing through any functionality associated 
> with an IPv4 stack (routing, packet filtering, or connection 
> tracking), and turning them into IPv6 packets, which then go on to get 
> processed by the IPv6 stack. The combination of CLAT in libc and this 
> non-traditional SIIT would allow the OS to be deployed on existing 
> IPv4-only and dual-stack networks, fully implemented without an IPv4 
> stack.

Since you say "CLAT in libc", presumably this is in the context Linux or 
other Unix-like systems. I expect you're already aware of the 
"IPv6-mostly" mechanisms to signal to a client that it should use a CLAT 
(RFC8925 for DHCP option 108, RFC8781 for PREF64 in router advertisements).

If you're thinking about doing this in libc, I presume the plan is to 
map a call to open an IPv4 socket into a call for opening an IPv6 socket 
instead. This isn't an approach I've seen attempted before, and it'll be 
really interesting to see how it pans out. Normally, CLAT requires its 
own IPv6 address to use as the source (to distinguish incoming 464XLAT 
traffic from regular IPv6 traffic). But since each socket effectively 
will have its own CLAT then that may not be necessary, since the kernel 
already keeps track of which ports belong to which sockets.

Potential issues I can see:

1. libc needs to decide whether to use the CLAT in preference to regular 
IPv4 sockets, e.g. by detecting the presence of an active IPv4 stack or 
default route, and/or the presence of DHCP option 108.

2. Every process would have to do discovery of the NAT64 prefix for 
itself, unless this information is published in a system-wide location 
that can be queried (which should include RFC8781 so that no DNS64 is 
required, or spoofing of ipv4only.arpa). It might get tricky if there 
are multiple NAT64 prefixes learned from different interfaces; there is 
a choice to be made.

3. There are some cases where you might want to map IPv6 addresses back 
to IPv4 addresses, e.g. the source address on recvfrom(). That sounds 
doable.

4. What do you do if an application binds a socket to an explicit IPv4 
address like 127.0.0.1? What about an IPv4 wildcard address 0.0.0.0? Do 
you map to ::1 and ::, or do you just fail them?

I note that there are several ways an application which listens for 
incoming connections or binds source address for outgoing connections 
might work:

a. it could open a single socket bound to 0.0.0.0 (legacy IPv4-only 
application)
b. it could open two sockets, one bound to 0.0.0.0 and the other to :: 
(with IPV6_V6ONLY for the latter)
c. it could open a single socket bound to :: with IPV6_V6ONLY disabled

If you fail case (a) then the application may not work at all; but if 
you allow case (a) then case (b) may fail due to conflicting ports.  And 
the default for IPV6_V6ONLY is set system-wide in 
/proc/sys/net/ipv6/bindv6only.

Having said that, accepting incoming traffic for an application that 
opens an IPv4-only socket is probably not a big concern. I'd just wonder 
about an app that binds to 0.0.0.0 before making an outbound connection.

Regards,

Brian.