From owner-freebsd-net@freebsd.org Sat Feb 27 21:45:30 2021 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 9F9AB554B70 for ; Sat, 27 Feb 2021 21:45:30 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 4Dp0SV2t7Xz4QmR for ; Sat, 27 Feb 2021 21:45:30 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: by mailman.nyi.freebsd.org (Postfix) id 62A1E5547EA; Sat, 27 Feb 2021 21:45:30 +0000 (UTC) Delivered-To: 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 6268C554CFA for ; Sat, 27 Feb 2021 21:45:30 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:13b:39f::9f:25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dp0SV1Rqsz3wXd for ; Sat, 27 Feb 2021 21:45:29 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 82DCB8D4A314; Sat, 27 Feb 2021 21:45:20 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id CF54FE70861; Sat, 27 Feb 2021 21:45:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id DCFw6nrQ1wqT; Sat, 27 Feb 2021 21:45:17 +0000 (UTC) Received: from [127.0.0.1] (unknown [IPv6:fde9:577b:c1a9:4902:5ce3:abc3:517c:e785]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 258B8E70860; Sat, 27 Feb 2021 21:45:16 +0000 (UTC) From: "Bjoern A. Zeeb" To: "Doug Hardie" Cc: net@FreeBSD.org Subject: Re: accept_rtadv Date: Sat, 27 Feb 2021 21:45:16 +0000 X-Mailer: MailMate (2.0BETAr6151) Message-ID: <5DDF778D-4F17-46E8-9B63-81FF9B362639@lists.zabbadoz.net> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4Dp0SV1Rqsz3wXd X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Feb 2021 21:45:30 -0000 On 27 Feb 2021, at 20:34, Doug Hardie wrote: >  >> On Feb 27, 2021, at 11:06, Michael Gmelin wrote: >>  >> >> >>> On 27. Feb 2021, at 19:40, Doug Hardie wrote: >>>  >>>> On 27 February 2021, at 10:34, Michael Gmelin >>>> wrote: >>>> >>>> >>>> >>>>> On 27. Feb 2021, at 19:21, Doug Hardie wrote: >>>>> >>>>>  >>>>>>> On 27 February 2021, at 04:37, Michael Gmelin >>>>>>> wrote: >>>>>>> >>>>>>> >>>>>>> >>>>>>>> On 27. Feb 2021, at 08:21, Doug Hardie wrote: >>>>>>> >>>>>>> From the Handbook: >>>>>>> >>>>>>> 32.9.2. Configuring IPv6 >>>>>>> To configure a FreeBSD system as an IPv6 client, add these two >>>>>>> lines to rc.conf: >>>>>>> >>>>>>> ifconfig_rl0_ipv6="inet6 accept_rtadv" >>>>>>> rtsold_enable="YES" >>>>>>> >>>>>>> This does not work. I have in rc.conf: >>>>>>> >>>>>>> ifconfig_bge0_ipv6="inet6 accept_rtadv" >>>>>>> ifconfig_ue0_ipv6="inet6 accept_rtadv" >>>>>>> ifconfig_ue1_ipv6="inet6 accept_rtadv" >>>>>>> >>>>>>> On all three interfaces, ifconfig shows: >>>>>>> nd6 options=21 >>>>>>> >>>>>>> ACCEPT_RTADV is not listed and sure enough router advertisements >>>>>>> are ignored. I have to manually enter: >>>>>>> ifconfig bge0 ipv6 accept_rtadv >>>>>>> for each interface. Then ifconfig shows: >>>>>>> >>>>>>> nd6 options=23 >>>>>>> >>>>>>> and the interface now accepts router advertisements. This is a >>>>>>> bug, but I don't kn >>>>>>> ow if it's in the code or the handbook. >>>>>> >>>>>> I just tried here on 12.2-p4 with em0 and it worked as expected. >>>>>> I do have ipv4 configured on that interface too though. >>>>>> >>>>>> Do you have anything else in your rc.conf (especially any other >>>>>> ifconfig lines)? >>>>>> >>>>>> If not, could you try adding >>>>>> >>>>>> ifconfig_bge0="up" >>>>>> etc. >>>>> >>>>> ### IPv6 Setup ### >>>> >>>> Well, here you set "ifconfig_bge0_ipv6" to one value >>>> >>>>> ifconfig_bge0_ipv6="inet6 accept_rtadv" >>>> >>>> And there you overwrite it with a new value >>>> >>>>> ifconfig_bge0_ipv6="inet6 fec2::210 prefixlen 64" >>>> >>>> Therefore, the first line has no effect at all. >>>> >>>> You can double check this by calling >>>> >>>> sysrc ifconfig_bge0_ipv6 >>>> >>>> Setting all things in one config setting might work (haven’t >>>> tried it myself), like in >>>> >>>> ifconfig_bge0_ipv6="inet6 fec2::210 prefixlen 64 accept_rtadv" >>>> >>>> -m >>>> >>>>> >>>>> ipv6_static_routes="lan1 lan2" >>>>> ipv6_route_lan1="fec1:: -prefixlen 64 fec2::205" >>>>> ipv6_route_lan2="fec2:: -prefixlen 64 fec2::205" >>>>> >>>>> That is all associated with IPv6. IPv4 is configured and used. >>>>> >>>>> -- Doug >>> >>> You are supposed to be able to sent multiple IP addresses on an >>> interface and that generally works. From the handbook, I get that >>> the "ifconfig_rl0_ipv6="inet6 accept_rtadv" line causes the default >>> link-local addresses to be configured and should set accept_rtadv. >>> The other lines should just add additional IP addresses. Logically, >>> adding the accept_rtadv in each seems a bit much. Although, that is >>> the way it worked in FreeBSD 9. That was documented in the handbook >>> at that time. Adding additional IP addresses should not clear any >>> of the interface flags unless included in the command. >>> >> >> rc.conf is key value in general, the format is >> >> key=value1 >> >> If you write further done in the file >> >> key=differentvalue >> >> the value of key will be "differentvalue", like the first line never >> existed. (This is unrelated to IPv6 or router advertisements, just >> the basic principle of rc.conf). >> >> One way I used to configure things like that in the past was using >> one ifconfig__ipv6 line to set flags etc and then use >> ifconfig__aliases to set ip addresses. >> >> Something like >> >> ifconfig_bge0_ipv6="inet6 accept_rtadv" >> ifconfig_bge0_aliases="inet6 fec2::210 prefixlen 64" >> >> (I haven’t tried this, as I’m afk and typed it on the phone, >> which is a bit of a pita, and from the top of my head,so you would >> have to try/verify yourself). >> >> -m > > Ahh. The handbook is needing a note about that. There should be > something similar to what was done for IPv4 where it shows adding > additional addresses using: > > Ifconfig_bge0_alias0 ... > Ifconfig_bge0_alias1 ... > > That would be very helpful. Thanks for the explinations. aliases are address family independent; you write =“inet 192.0.2.17/24” or =“inet6 2001:db8::2:17/64” as you wish. /bz