Re: [dhcwg] recommendation on DHCP6 source port numbers

Bernie Volz <bevolz@gmail.com> Thu, 29 February 2024 14:56 UTC

Return-Path: <bevolz@gmail.com>
X-Original-To: dhcwg@ietfa.amsl.com
Delivered-To: dhcwg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 88BA6C14F6B2 for <dhcwg@ietfa.amsl.com>; Thu, 29 Feb 2024 06:56:41 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.106
X-Spam-Level:
X-Spam-Status: No, score=-7.106 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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, MIME_QP_LONG_LINE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 eB1f_IWNbL_w for <dhcwg@ietfa.amsl.com>; Thu, 29 Feb 2024 06:56:41 -0800 (PST)
Received: from mail-qk1-x72c.google.com (mail-qk1-x72c.google.com [IPv6:2607:f8b0:4864:20::72c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 119CDC14F698 for <dhcwg@ietf.org>; Thu, 29 Feb 2024 06:56:41 -0800 (PST)
Received: by mail-qk1-x72c.google.com with SMTP id af79cd13be357-787a8430006so66434885a.3 for <dhcwg@ietf.org>; Thu, 29 Feb 2024 06:56:40 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709218599; x=1709823399; darn=ietf.org; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:from:to:cc:subject:date:message-id :reply-to; bh=d2jWkl9rp6BZBRYCNZ6gKQHe4rE8rw9UshCMm4D0UAg=; b=Z4y2KOvkttuOSlkvOn042/qATq87Vvh+uOhqBYgcRmU3JPNAXx9UrHwrgRBD88ml1p n/IbzhevCpSGTHVQcqC87y98RK/DLD6eiGshWsOoRxTWSq9NiDxEFf5RUZiPYhDvcVgn YPwLHmPpT9Myrr9jBnuPwe+/PUNwH776aT3Z3L6HSyi0tVDMmvudA+KLKdSs0icMtG1z PuHa/hyLoradEnPoaj6OAqCCO7LfIoImq67vvZSVa5hFmQgDLF/CMQKIHYVQ+emPasNB wVQptHXR4Bvq53pecZf9UU+2BVbPzQNcZVp8efPguGFuuOcjsCzGkfnabAphvp+MvMiQ lYEA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709218599; x=1709823399; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=d2jWkl9rp6BZBRYCNZ6gKQHe4rE8rw9UshCMm4D0UAg=; b=F8jZPctLojsNTFdMie5AdAeyedeRW34PEpbbnJq8Y2nSTsRUfQyBflxxUNaxzrS/fN XVFYAGonHei7gVLlw9+9oUofKyZiXUX33vmHa0jsa3VtKpxvG9KWEXj9UoZb6XVVDuoy 0JPoOgg2kCS3dTrtFV1fp5H8ZwgBKsrCg2TdPBkc62ZQ2cZ9pRY6irgGK65Kn371TL/C Cf5c0zB8Y9twfCtS7TKHU00HYRrrYsQWrlBOJM4vxpUHB7vo0ct26sW5VPdMJ/3zkd5d kPK2y9q7COBAXCzxAIlu0UVibivZQ3MUqiQ5vtX5YapqCPKMGiU85n91Eg9W7ZlwKXMu e16Q==
X-Forwarded-Encrypted: i=1; AJvYcCVioLrtxGHYgxoeC9hy1Rb1+2UrZWwBqXCEQA6OTWpxFjktXNdFBAM+IfhnmeqFF2cP/N7mFMuf89SmvvKFbw==
X-Gm-Message-State: AOJu0YxIk20sGK8oW8bIyoWqUlKnMuZ1tShFLt8lvB98DrVKCBT6xvmy QIKLNvDmhe7u+3YOVGaHvDbP8sMpKO9iDcB6dlRyAYN0G0lY5SPadTRxU1Ycjw==
X-Google-Smtp-Source: AGHT+IHas+Lej5/laGSsErX6v7GNfFL5RgSj8KrJHaZhmqENSR/tZF3dAEkzK6bs406q3rHR4uhCXw==
X-Received: by 2002:a05:620a:4691:b0:787:5f7b:d97a with SMTP id bq17-20020a05620a469100b007875f7bd97amr2750579qkb.66.1709218599315; Thu, 29 Feb 2024 06:56:39 -0800 (PST)
Received: from smtpclient.apple (d-69-161-122-95.nh.cpe.atlanticbb.net. [69.161.122.95]) by smtp.gmail.com with ESMTPSA id bl1-20020a05620a1a8100b00785d893a692sm746663qkb.27.2024.02.29.06.56.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 29 Feb 2024 06:56:38 -0800 (PST)
Content-Type: multipart/alternative; boundary="Apple-Mail-650CC075-3FD3-4AF9-A007-F8E0B4E1404E"
Content-Transfer-Encoding: 7bit
From: Bernie Volz <bevolz@gmail.com>
Mime-Version: 1.0 (1.0)
Date: Thu, 29 Feb 2024 09:56:24 -0500
Message-Id: <3B626E8E-A4CE-43C5-ABA7-C483434DD88E@gmail.com>
References: <57E318FA-0DC5-4C57-9470-EA75435DF57F@employees.org>
Cc: Lorenzo Colitti <lorenzo@google.com>, Tomoyuki Sahara <tsahara@iij.ad.jp>, dhcwg@ietf.org
In-Reply-To: <57E318FA-0DC5-4C57-9470-EA75435DF57F@employees.org>
To: Ole Trøan <otroan@employees.org>
X-Mailer: iPad Mail (21D61)
Archived-At: <https://mailarchive.ietf.org/arch/msg/dhcwg/lu7IT8VNOIpkAJt56gd7GN8GOiE>
Subject: Re: [dhcwg] recommendation on DHCP6 source port numbers
X-BeenThere: dhcwg@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: Dynamic Host Configuration <dhcwg.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dhcwg>, <mailto:dhcwg-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/dhcwg/>
List-Post: <mailto:dhcwg@ietf.org>
List-Help: <mailto:dhcwg-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dhcwg>, <mailto:dhcwg-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 29 Feb 2024 14:56:41 -0000

This text seems a bit off. If the server always sends to the client port, its source port doesn’t matter.

I think this original text was because normal UDP communication could then happen and may have been because of limits in the APIs available at the time?

This is unnecessary today.

If you follow the rules, all is ok with whatever source ports are used:

     Clients listen for DHCP messages on UDP port 546.  Servers and
     relay agents listen for DHCP messages on UDP port 547.

I don’t know if the word “listen” in this is what causes confusion? Maybe it should just be:

     Clients receive DHCP messages on UDP (destination) port 546.  Servers and
     relay agents receive DHCP messages on UDP (destination) port 547.

But maybe even that is still confusing to some.

- Bernie

> On Feb 29, 2024, at 9:16 AM, Ole Trøan <otroan@employees.org> wrote:
> 
> 
> Guess we haven’t departed too far from bootp. 
> Which seems to make a case for the client using the reserved port number also as the source port. 
> 
> Rfc951:
>   The UDP header contains source and destination port numbers.  The
>    BOOTP protocol uses two reserved port numbers, 'BOOTP client' (68)
>    and 'BOOTP server' (67).  The client sends requests using 'BOOTP
>    server' as the destination port; this is usually a broadcast.  The
>    server sends replies using 'BOOTP client' as the destination port;
>    depending on the kernel or driver facilities in the server, this may
>    or may not be a broadcast (this is explained further in the section
>    titled 'Chicken/Egg issues' below).  The reason TWO reserved ports
>    are used, is to avoid 'waking up' and scheduling the BOOTP server
>    daemons, when a bootreply must be broadcast to a client.  Since the
>    server and other hosts won't be listening on the 'BOOTP client' port,
>    any such incoming broadcasts will be filtered out at the kernel
>    level.  We could not simply allow the client to pick a 'random' port
>    number for the UDP source port field; since the server reply may be
>    broadcast, a randomly chosen port number could confuse other hosts
>    that happened to be listening on that port.
> 
> O. 
>