Re: [dhcwg] recommendation on DHCP6 source port numbers
Bernie Volz <bevolz@gmail.com> Thu, 29 February 2024 10:33 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 EC962C180B4C for <dhcwg@ietfa.amsl.com>; Thu, 29 Feb 2024 02:33:43 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.213
X-Spam-Level:
X-Spam-Status: No, score=-1.213 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_HTML_ONLY=0.1, MIME_HTML_ONLY_MULTI=0.001, MIME_QP_LONG_LINE=0.001, MPART_ALT_DIFF=0.79, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=no 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 4E0QJnIJxHL6 for <dhcwg@ietfa.amsl.com>; Thu, 29 Feb 2024 02:33:39 -0800 (PST)
Received: from mail-vk1-xa2c.google.com (mail-vk1-xa2c.google.com [IPv6:2607:f8b0:4864:20::a2c]) (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 76331C180B4A for <dhcwg@ietf.org>; Thu, 29 Feb 2024 02:33:39 -0800 (PST)
Received: by mail-vk1-xa2c.google.com with SMTP id 71dfb90a1353d-4d3424f38b5so241592e0c.0 for <dhcwg@ietf.org>; Thu, 29 Feb 2024 02:33:39 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709202817; x=1709807617; 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=uYVR8QPpQbgWToyIlYf2m7Mjrarm5RrsoR1+i3C0IaM=; b=ZQheXKOHQyEaGZdTztW8hftNesnwb3SKSJi+OoeqpwsTVLTT7WlYE/oXfIdZ8BG5vP QRdzZoxKMzHRA7fSJ4pmfZAoRXiLE32BYx6mEp3OSU1P7pdERvjgMIwSc0dIiTlTPXIg 05os+43JRj41J+wDn5ya/loaeq4z4184GNMnJaXi2dDNgVR9vo1mANiipG9MzodEd4Aa vHrhmn1LnUovTLsTM//Ho1D8btwuyQsOxYtKAHOyyjTQqk8EurlhJPHccfG5M0inlDB1 dww+IwTei8j+yTXKd9RRPNZsbKSc/nnbMvvFImxZuT9mhikYXS1xyw9u1Q+0WqIuB9mW lrqw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709202817; x=1709807617; 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=uYVR8QPpQbgWToyIlYf2m7Mjrarm5RrsoR1+i3C0IaM=; b=cGsuU6ttYY3b0eR+LDGURwkkm5GxiztJnNzgbpI3SzjHNZQ2ltrXRsv/sNIxDUCVcZ pK4VXGlER4sn7oXHcFOmLO7T0CVFxDsEKq2D2ORXYO0r8LAp5VGnvVwBmWkbfig1eHN/ KC9a67a1awnkytgg/qKB6rlbc6fc3Lg8/x+/1TSmR429VnJcsOWGxigFCwIy8yEIIdi0 l2RYRUfSVPHTxfF0y8jhF9l+/WTGxPMBsQd5043Ts7r8gKUFulk1iH+IBkJNuNCH2vX7 60uzD0gQ+C9NQrebWDY7zwPpg47V5Zk90Z6Dug8BseFXu6Qyqp4Kjztl/I8SqOAu4AUM DdCA==
X-Forwarded-Encrypted: i=1; AJvYcCVm+yEfyz6wigWsGyqrK12vqdeA0vEK4nNufE8y20wLZ9LzW2IqDBp9Sv+/lCgvcW09Dr2YXUf0RNr3ZER4eA==
X-Gm-Message-State: AOJu0YwNjxQ4t0hFppm5sfYlbULJ5f8NLKTgUJejzdSFnwhO+unI+Gy9 a4yAAp3NiyLM8BFhTQbrRi/hufklxYMllstiwAgQxdS65niPxIMx2uztyvHQpA==
X-Google-Smtp-Source: AGHT+IGSoo0LyhH1Cc/Sshs7DrmFcXabA0bYYm0jyJT0OCPQmXN5RYFGRse9bm5daCBkojjTguUZuw==
X-Received: by 2002:a1f:df04:0:b0:4c9:98f8:83cc with SMTP id w4-20020a1fdf04000000b004c998f883ccmr1376361vkg.3.1709202817094; Thu, 29 Feb 2024 02:33:37 -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 i10-20020ac8488a000000b0042c1ce79b4bsm575137qtq.50.2024.02.29.02.33.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 29 Feb 2024 02:33:36 -0800 (PST)
Content-Type: multipart/alternative; boundary="Apple-Mail-C5852D3B-8051-47A4-A7E6-34DC3F613DB6"
Content-Transfer-Encoding: 7bit
From: Bernie Volz <bevolz@gmail.com>
Mime-Version: 1.0 (1.0)
Date: Thu, 29 Feb 2024 05:33:21 -0500
Message-Id: <4A3D8AF6-A89A-4AB2-BACA-71F76378AD3E@gmail.com>
References: <CAKD1Yr3Hwgu+dTxHB-1PQR2Qxz4bxLWP_0-q-MC4MEiM7j-FLw@mail.gmail.com>
Cc: Tomoyuki Sahara <tsahara@iij.ad.jp>, otroan@employees.org, dhcwg@ietf.org
In-Reply-To: <CAKD1Yr3Hwgu+dTxHB-1PQR2Qxz4bxLWP_0-q-MC4MEiM7j-FLw@mail.gmail.com>
To: Lorenzo Colitti <lorenzo@google.com>
X-Mailer: iPad Mail (21D61)
Archived-At: <https://mailarchive.ietf.org/arch/msg/dhcwg/xn9kfc1zXkgSmC1MQjZAc35YyXM>
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 10:33:44 -0000
To interoperaate with both (a) and (b), we should
send request messages from the standard source port number 546/547.
On Feb 29, 2024, at 2:23 AM, Lorenzo Colitti <lorenzo@google.com> wrote:
Isn't b) a violation of the RFC? If a client sends a message from port 12345 to 547, then shouldn't the server send the message to destination port 546, since the RFC says "clients listen for DHCP messages on UDP port 546"?The clarification text should be helpful for new DHCP6 implementers
and network operators who write firewall rules.
But when client/server received a request message from a random port,
which port should they send a response message to? There are two types
of implementations on the market (and on my desk):
(a) returns to 546/547.
(b) returns to the source port of the request message.
(a) follows the text in RFC8415 strictly. (b) follows normal UDP
communication rules. To interoperaate with both (a) and (b), we should
send request messages from the standard source port number 546/547.
That is not obvious and I think it is worth mentioning that in the spec.
Thanks,
Tomoyuki
>Yes, I got it wrong. Been a while since that part of the code was done.
>
>I agree with Lorenzo:
>
> I do think the current text is ambiguous. In practice it allows
> arbitrary source ports, but because this is unusual, implementers might
> assume that the other side is using the same port to send and receive.
> Such an implementation might not interoperate. So if we think the
> behaviour is OK, then we should clarify the text to say that the source
> port is not specified and clients and servers need to be prepared to
> receive messages from arbitrary source ports.
>
>We do allow arbitrary source ports and as there are lots if implementations
>in existence with that behavior, we should just clarify it: "The source
>port is not specified and clients, servers, and relay agents need to be
>prepared to receive messages from arbitrary source ports."
>
>- Bernie
>
> On Feb 28, 2024, at 3:28 AM, Lorenzo Colitti <lorenzo@google.com> wrote:
>
> FWIW the Android client binds to port 546 and does not connect() the
> socket but uses sendto(). So it will send packets from port 546 and it
> will receive any packet to port 546 regardless of the source port used
> by the server. So I guess that happens to be correct.
>
> Having the client send from 12345 -> 547 and the server send from 33333
> -> 546 is sort of unusual - usually each party in a connection will use
> the same source port for sending and receiving - but DHCPv6 is not a
> connected protocol (e.g., some of the messages are multicast and some
> are unicast), so...
>
> I do think the current text is ambiguous. In practice it allows
> arbitrary source ports, but because this is unusual, implementers might
> assume that the other side is using the same port to send and receive.
> Such an implementation might not interoperate. So if we think the
> behaviour is OK, then we should clarify the text to say that the source
> port is not specified and clients and servers need to be prepared to
> receive messages from arbitrary source ports.
>
> On Wed, Feb 28, 2024 at 4:47 PM Ole Troan
> <otroan=40employees.org@dmarc.ietf.org> wrote:
>
> Bernie,
>
> > No. Normal UDP communication rules apply. A client sends traffic
> to a well-known destination port and it is free to select whatever
> port number it likes as the source port. The server’s response is
> sent from that well known port (as source port) and sent to the
> client’s selected port (as destination port). This is normal
> communication and dhcpv6 follows it. That is why nothing is said or
> needs to be said about the client source port.
>
> I’m with Tomoyuki here.
>
> "
> 7.2. UDP Ports
>
> Clients listen for DHCP messages on UDP port 546. Servers and relay
> agents listen for DHCP messages on UDP port 547.
>
> “
>
> Just checked my little scapy based DHCPv6 server and I do:
>
> reply = (Ether(src=self.interface_info.mac, dst=request
> [Ether].src) /
> IPv6(src=self.interface_info.ip6ll, dst=request
> [IPv6].src) /
> UDP(sport=547, dport=546) /
> DHCP6_Reply(trid=trid) /
> DHCP6OptServerId(duid=self.duid) /
> DHCP6OptClientId(duid=clientduid) /
> DHCP6OptIA_NA(iaid=request[DHCP6OptIA_NA].iaid,
> T1=t1, T2=t2,
> ianaopts = DHCP6OptIAAddress
> (addr=ipv6,
>
> preflft=self.preflft,
>
> validlft=self.validlft)
> )
>
> I couldn’t find any text supporting your position Bernie. Although
> I would be fine if that was also the outcome.
> As another implementor I cannot figure out what the correct
> behaviour is from the RFC.
>
> Cheers,
> Ole
>
> > - Bernie Volz
> >
> >> On Feb 26, 2024, at 1:00 AM, Tomoyuki Sahara
> <tsahara=40iij.ad.jp@dmarc.ietf.org> wrote:
> >>
> >> Hi, DHC wg members:
> >>
> >> Can we make recommendations on source port numbers of DHCP6
> messages
> >> in rfc8415bis?
> >>
> >> DHCP6 specification says that DHCP6 clients and servers listen on
> UDP
> >> port 546 and 547 respectively, in RFC8415 section 7.2. It
> implies
> >> that DHCP6 clients MUST send messages to UDP port 547 (server
> port) and
> >> servers MUST send messages to UDP port 546 (client port) to work
> with
> >> their counterpart correctly (though restrictions can be relaxed
> with
> >> RFC8357 for relays).
> >>
> >> But it says nothing about source port numbers. Without any
> >> restrictions, some implementations use ephemeral source port
> >> (e.g. 12345) to send their messages. DHCP6 conversations look
> like:
> >>
> >> 1. client send Solicit fe80::2#49876 -> ff02::1:2#547
> >> 2. server send Advertise fe80::1#547 -> fe80::2#546 (!)
> >> 3. client send Request fe80::2#49877(?) -> ff02::1:2#547
> >> 4. server send Confirm fe80::1#547 -> fe80::2#546
> >>
> >> This behavior is not prohibited by the specification but makes
> >> confusions for DHCP6 implementer and network/firewall operators
> (*1).
> >> Most Internet protocols nowadays assume that servers send
> response
> >> messages from the port number they received on.
> >> (*1 e.g. https://bugzilla.redhat.com/show_bug.cgi?id=952126" rel="noreferrer nofollow" target="_blank">https://bugzilla.redhat.com/show_bug.cgi?id=952126 )
> >>
> >> In my humble opinion, it is too late to require that DHCP6 client
> and
> >> server MUST send messages from the fixed port number (546/547)
> because
> >> there are too many DHCP6 implementations in the wild. But making
> a
> >> recommendation is helpful for new implementations/deployments of
> DHCP6.
> >>
> >> An idea to make such recommendation is adding a text in
> rfc8415bis:
> >>
> >> OLD:
> >> 7.2. UDP Ports
> >> Clients listen for DHCP messages on UDP port 546. Servers
> and
> >> relay agents listen for DHCP messages on UDP port 547.
> >>
> >> NEW:
> >> 7.2. UDP Ports
> >> Clients listen for DHCP messages on UDP port 546. Servers
> and
> >> relay agents listen for DHCP messages on UDP port 547.
> >>
> >> Clients are RECOMMENDED to send DHCP messages from UDP port
> 546.
> >> Servers and relay agents are RECOMMENDED to send DHCP
> messages
> >> from UDP port 547 (unless relay agent includes Relay Source
> Port
> >> Option for DHCP6 [RFC8357]).
> >>
> >> I know WGLC has been concluded but I believe the recommendations
> above
> >> encourage new implementations to use the standard DHCP6 port
> numbers
> >> on UDP source port.
> >>
> >>
> >> Best regards,
> >> Tomoyuki Sahara
> >>
> >>
> >> _______________________________________________
> >> dhcwg mailing list
> >> dhcwg@ietf.org
> >> https://www.ietf.org/mailman/listinfo/dhcwg" rel="noreferrer nofollow" target="_blank">https://www.ietf.org/mailman/listinfo/dhcwg
> >
> > _______________________________________________
> > dhcwg mailing list
> > dhcwg@ietf.org
> > https://www.ietf.org/mailman/listinfo/dhcwg" rel="noreferrer nofollow" target="_blank">https://www.ietf.org/mailman/listinfo/dhcwg
>
> _______________________________________________
> dhcwg mailing list
> dhcwg@ietf.org
> https://www.ietf.org/mailman/listinfo/dhcwg" rel="noreferrer nofollow" target="_blank">https://www.ietf.org/mailman/listinfo/dhcwg
- Re: [dhcwg] recommendation on DHCP6 source port n… Tomoyuki Sahara
- Re: [dhcwg] recommendation on DHCP6 source port n… Bernie Volz
- [dhcwg] recommendation on DHCP6 source port numbe… Tomoyuki Sahara
- Re: [dhcwg] recommendation on DHCP6 source port n… Tomoyuki Sahara
- Re: [dhcwg] recommendation on DHCP6 source port n… Ole Troan
- Re: [dhcwg] recommendation on DHCP6 source port n… Mark Smith
- Re: [dhcwg] recommendation on DHCP6 source port n… Lorenzo Colitti
- Re: [dhcwg] recommendation on DHCP6 source port n… Bernie Volz
- Re: [dhcwg] recommendation on DHCP6 source port n… Tomoyuki Sahara
- Re: [dhcwg] recommendation on DHCP6 source port n… Lorenzo Colitti
- Re: [dhcwg] recommendation on DHCP6 source port n… Tomoyuki Sahara
- Re: [dhcwg] recommendation on DHCP6 source port n… Ole Troan
- Re: [dhcwg] recommendation on DHCP6 source port n… Bernie Volz
- Re: [dhcwg] recommendation on DHCP6 source port n… Ole Trøan
- Re: [dhcwg] recommendation on DHCP6 source port n… Bernie Volz
- Re: [dhcwg] recommendation on DHCP6 source port n… Ole Troan
- Re: [dhcwg] recommendation on DHCP6 source port n… Bernie Volz
- Re: [dhcwg] recommendation on DHCP6 source port n… Ole Troan
- Re: [dhcwg] recommendation on DHCP6 source port n… Bernie Volz
- Re: [dhcwg] recommendation on DHCP6 source port n… Ole Troan
- Re: [dhcwg] recommendation on DHCP6 source port n… David Farmer
- Re: [dhcwg] recommendation on DHCP6 source port n… Robert Nagy
- Re: [dhcwg] recommendation on DHCP6 source port n… Alan DeKok
- Re: [dhcwg] recommendation on DHCP6 source port n… David Farmer
- Re: [dhcwg] recommendation on DHCP6 source port n… Ole Troan
- Re: [dhcwg] recommendation on DHCP6 source port n… David Farmer
- Re: [dhcwg] recommendation on DHCP6 source port n… Ole Trøan
- Re: [dhcwg] recommendation on DHCP6 source port n… David Farmer
- Re: [dhcwg] recommendation on DHCP6 source port n… rob@deepdivenetworklng.com
- Re: [dhcwg] recommendation on DHCP6 source port n… Bernie Volz
- Re: [dhcwg] recommendation on DHCP6 source port n… David Farmer
- Re: [dhcwg] recommendation on DHCP6 source port n… Bernie Volz
- Re: [dhcwg] recommendation on DHCP6 source port n… Ted Lemon
- Re: [dhcwg] recommendation on DHCP6 source port n… rob@deepdivenetworklng.com
- Re: [dhcwg] recommendation on DHCP6 source port n… rob@deepdivenetworklng.com
- Re: [dhcwg] recommendation on DHCP6 source port n… Michael Richardson
- Re: [dhcwg] recommendation on DHCP6 source port n… rob@deepdivenetworklng.com
- Re: [dhcwg] recommendation on DHCP6 source port n… Bernie Volz
- Re: [dhcwg] recommendation on DHCP6 source port n… Robert Nagy
- Re: [dhcwg] recommendation on DHCP6 source port n… Michael Richardson
- Re: [dhcwg] recommendation on DHCP6 source port n… Bernie Volz
- Re: [dhcwg] recommendation on DHCP6 source port n… Ole Troan
- Re: [dhcwg] recommendation on DHCP6 source port n… Bernie Volz
- Re: [dhcwg] recommendation on DHCP6 source port n… Ole Troan