From owner-freebsd-net@freebsd.org Fri Oct 11 21:43:19 2019 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4FAED132D7B for ; Fri, 11 Oct 2019 21:43:19 +0000 (UTC) (envelope-from roy@marples.name) Received: from relay2.marples.name (relay2.marples.name [IPv6:2a00:da00:1800:80d6::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "relay2.marples.name", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46qhK271BXz449K for ; Fri, 11 Oct 2019 21:43:18 +0000 (UTC) (envelope-from roy@marples.name) Received: from mail.marples.name (cpc115040-bour7-2-0-cust370.15-1.cable.virginm.net [81.108.15.115]) by relay2.marples.name (Postfix) with ESMTPS id 30CD96F7 for ; Fri, 11 Oct 2019 21:43:03 +0000 (UTC) Received: from [10.73.1.30] (unknown [10.73.1.30]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.marples.name (Postfix) with ESMTPSA id AFFC21CD553; Fri, 11 Oct 2019 22:41:23 +0100 (BST) Subject: Re: DHCPv6 client in base To: Hiroki Sato , woodsb02@gmail.com Cc: hrs@freebsd.org, freebsd-net@freebsd.org, driesm.michiels@gmail.com References: <001e01d50b49$176104d0$46230e70$@gmail.com> <20190516.032012.517661495892269813.hrs@allbsd.org> <20191012.044034.19725945241254130.hrs@allbsd.org> From: Roy Marples Message-ID: Date: Fri, 11 Oct 2019 22:43:01 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191012.044034.19725945241254130.hrs@allbsd.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 46qhK271BXz449K X-Spamd-Bar: / X-Spamd-Result: default: False [-0.85 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[marples.name:s=mail]; NEURAL_HAM_MEDIUM(-0.76)[-0.763,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+a:relay2.marples.name:c]; NEURAL_HAM_LONG(-1.00)[-0.995,0]; TAGGED_RCPT(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-net@freebsd.org]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[marples.name:+]; DMARC_POLICY_ALLOW(-0.50)[marples.name,quarantine]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; IP_SCORE(0.40)[asn: 8560(2.03), country: DE(-0.01)]; ASN(0.00)[asn:8560, ipnet:2a00:da00::/32, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; SUSPICIOUS_RECIPS(1.50)[] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Oct 2019 21:43:19 -0000 On 11/10/2019 20:40, Hiroki Sato wrote: > I do not have a strong objection on dhcpcd (I am using it on some of > my FreeBSD boxes actually) but let me explain the reason why I chose > wide-dhcp as the candidate. That is because it is a small, > functional DHCPv6-only implementation. I am planning to rewrite it > to add the missing bits and adjust it for a tighter integration with > kernel, ifconfig, rtsold, rtadvd, and sandboxing with Capsicum. I > feel dhcpcd (or others) is too big for that purpose. How are you measuring that dhcpcd is too big? On my FreeBSD box $ size /usr/sbin/rtsold /sbin/dhclient /usr/local/sbin/dhcp6c /sbin/dhcpcd text data bss dec hex filename 32327 984 3352 36663 0x8f37 /usr/sbin/rtsold 86752 10144 82696 179592 0x2bd88 /sbin/dhclient 145322 1396 11304 158022 0x26946 /usr/local/sbin/dhcp6c 253258 1532 1184 255974 0x3e7e6 /sbin/dhcpcd Taken by itself, yes dhcpcd is larger. But as a whole dhcpcd is quite smaller. 24k of dhcpcd is just a text file with decoding instructions for all DHCP/DHCP6/ND6 RFC's I can find. What's more, dhcpcd can be compiled with things turned on or all, such as DHCP, ARP, etc. It's quite flexable. To demonstrate, the above dhcpcd size is the full fat dhcpcd. Here is it with the stock small config and full IPv6 stack support, which is the equivalent of dhcp6c and rtsold above + the extra goodies you get with dhcpcd. $ size dhcpcd text data bss dec hex filename 176605 1452 1168 179225 0x2bc19 dhcpcd But wait, there's more. Lets see how dhcpcd weighs up as just a DHCP client + the extra dhcpcd goodies? $ size dhcpcd text data bss dec hex filename 144163 1420 1136 146719 0x23d1f dhcpcd I don't consider dhcpcd to be big at all, and would love to know your rationale for calling it so. > > IMHO, the directions of further developments of IPv6 functionality on > FreeBSD, NetBSD (dhcpcd), OpenBSD (slaacd + others), and DragonFly > BSD (dhcpcd) have already been diverged. For RFC 7217 I already have > an in-kernel implementation (not committed yet), and I am also > working on SeND (RFC 3971, not directly related to DHCPv6 though). > My goal is to integrate these small implementations into the base > system and make them possible to work together. So for DHCPv6, I > think an implementation of only DHCPv6 is the best. > > If people want a more feature-rich implementation or the same one on > other systems, they can still use dhcpcd or ISC's dhclient even after > the import. > > Of course this assumes that wide-dhcp works to some degree. If it > does not, importing it to the base system does not make sense. I > have used it in various scenarios for a long time such as RA + O flag > on native IPv6 over Ethernet, DHCPv6-PD over PPPoE/L2TP, and others > which are complex enough, and understand what works and what is > missing (poor DUID format support, for example). The popular way to > use DHCPv6 is IA_PD, and wide-dhcp works well with it. > > So I have a question. What is missing feature in wide-dhcp which you > are concerned about? I know some, but it has most of the basic > functionality of DHCPv6 and I think it is enough as a minimal > implementation for the base system. My primary reason is that it is > just for DHCPv6 as mentioned earlier and I believe it is maintainable > in the base system. I would like to know other people's opinion if > there is something critical. This isn't a question about wide-dhcp specifically, but I feel it's a good question. Do you plan on supporting a multihomed system with hotpluggable interfaces all auto configured? I'm looking at the BUGS section for rtsold and these bugs https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=138547 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=218191 This is one of dhcpcd's killer features and allows me to use my pinebook on the sofa, but hotplug in ethernet to take over so I can compile my sources from NFS over distcc much faster. Roy