From owner-freebsd-net@freebsd.org Sun Feb 28 10:22:48 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 11749566E21 for ; Sun, 28 Feb 2021 10:22:48 +0000 (UTC) (envelope-from freebsd@grem.de) 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 4DpKGH3bN1z3PR0 for ; Sun, 28 Feb 2021 10:22:47 +0000 (UTC) (envelope-from freebsd@grem.de) Received: by mailman.nyi.freebsd.org (Postfix) id 7B203566F11; Sun, 28 Feb 2021 10:22:47 +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 79B9456705E for ; Sun, 28 Feb 2021 10:22:47 +0000 (UTC) (envelope-from freebsd@grem.de) Received: from mail.evolve.de (mail.evolve.de [213.239.217.29]) (using TLSv1.3 with cipher TLS_CHACHA20_POLY1305_SHA256 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA512 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail.evolve.de", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DpKGH1Rh5z3Pw9 for ; Sun, 28 Feb 2021 10:22:46 +0000 (UTC) (envelope-from freebsd@grem.de) Received: by mail.evolve.de (OpenSMTPD) with ESMTP id be265412; Sun, 28 Feb 2021 10:22:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=grem.de; h=date:from:to:cc :subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=20180501; bh=e4IU2sLy QFwTq+UZ0HVQoZDVzYM=; b=fO4IGATBnYxt4b6S5fwNKwvIIdRM76xLb6TlUdl7 Fwf2k30RhsDkdCGyWfraKM855qGXyyDPvOvZIsLeW0Tz7se8W31zOdxj92bCOEAB qtDKmMxMoiPn0tqVtMgyiC+r5iUIoDnq55jTPphuVYFE/WQkacWoywt2X90buqJ5 CKPndGwvdGWaeDBFnEiGnRDHqjXT4ccH7LWTdLMCm3vSz+G2JGwie8dK++suj27n 2EblFp9eSx4ncDYH2Wn233wNLSHItK2ehcoGq8APeQR+sqMyJvbegaPz7vWaePQW Vp5vTizTkkQIGLj9vHk45DNUpzsEXb/w2nnvu3abiw1aug== DomainKey-Signature: a=rsa-sha1; c=nofws; d=grem.de; h=date:from:to:cc :subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; q=dns; s=20180501; b=Fh Dn4CnxnEMZQytd7bTb0cRU+L8YTIddjBB+ufsKGVgLx1vXoKIbZ5DswnjHljq8F2 EfgHx1w3Mdt48fROea0ImiDnxBV0AbSlHglTpzZMQgBhPxtokjNQCnyWKJR/k7qf oaRqGGWLRF0sQZOFsHDi0DPVqBq+x0Ti3ppNXI5YBoO8/AN2Y9q9VLSImJqiOlgh PiHOBPjwC7eOaWTMIuqXLLKHOHjypFlvNErswADez0S3kjnRuDBrrk/y7fKTym/A STE56X9bVh6mzLIOeMPf/jEeCxc0q3hKY3HupB5PDgfrGhq1W6AKWUmlGtkGwh+9 q3JZ9BV3DW/gLKgSEjwA== Received: by mail.evolve.de (OpenSMTPD) with ESMTPSA id 21966ee3 (TLSv1.3:AEAD-CHACHA20-POLY1305-SHA256:256:NO); Sun, 28 Feb 2021 10:22:37 +0000 (UTC) Date: Sun, 28 Feb 2021 11:21:37 +0100 From: Michael Gmelin To: "Bjoern A. Zeeb" Cc: "Doug Hardie" , net@FreeBSD.org Subject: Re: accept_rtadv Message-ID: <20210228112137.24f02c13@bsd64.grem.de> In-Reply-To: <5DDF778D-4F17-46E8-9B63-81FF9B362639@lists.zabbadoz.net> References: <5DDF778D-4F17-46E8-9B63-81F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0k/Fn6IO4AAAAASUVORK5CYII= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4DpKGH1Rh5z3Pw9 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: Sun, 28 Feb 2021 10:22:48 -0000 On Sat, 27 Feb 2021 21:45:16 +0000 "Bjoern A. Zeeb" wrote: > On 27 Feb 2021, at 20:34, Doug Hardie wrote: >=20 > > =EF=BB=BF =20 > >> On Feb 27, 2021, at 11:06, Michael Gmelin wrote: > >> =EF=BB=BF > >> > >> =20 > >>> On 27. Feb 2021, at 19:40, Doug Hardie wrote: > >>> =EF=BB=BF =20 > >>>> On 27 February 2021, at 10:34, Michael Gmelin =20 > >>>> wrote: > >>>> > >>>> > >>>> =20 > >>>>> On 27. Feb 2021, at 19:21, Doug Hardie wrote: > >>>>> > >>>>> =EF=BB=BF =20 > >>>>>>> On 27 February 2021, at 04:37, Michael Gmelin > >>>>>>> wrote: > >>>>>>> > >>>>>>> > >>>>>>> =20 > >>>>>>>> On 27. Feb 2021, at 08:21, Doug Hardie > >>>>>>>> wrote: =20 > >>>>>>> > >>>>>>> =EF=BB=BFFrom 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=3D"inet6 accept_rtadv" > >>>>>>> rtsold_enable=3D"YES" > >>>>>>> > >>>>>>> This does not work. I have in rc.conf: > >>>>>>> > >>>>>>> ifconfig_bge0_ipv6=3D"inet6 accept_rtadv" > >>>>>>> ifconfig_ue0_ipv6=3D"inet6 accept_rtadv" > >>>>>>> ifconfig_ue1_ipv6=3D"inet6 accept_rtadv" > >>>>>>> > >>>>>>> On all three interfaces, ifconfig shows: > >>>>>>> nd6 options=3D21 > >>>>>>> > >>>>>>> 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=3D23 > >>>>>>> > >>>>>>> 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. =20 > >>>>>> > >>>>>> 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=3D"up" > >>>>>> etc. =20 > >>>>> > >>>>> ### IPv6 Setup ### =20 > >>>> > >>>> Well, here you set "ifconfig_bge0_ipv6" to one value > >>>> =20 > >>>>> ifconfig_bge0_ipv6=3D"inet6 accept_rtadv" =20 > >>>> > >>>> And there you overwrite it with a new value > >>>> =20 > >>>>> ifconfig_bge0_ipv6=3D"inet6 fec2::210 prefixlen 64" =20 > >>>> > >>>> 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=E2=80=99t= =20 > >>>> tried it myself), like in > >>>> > >>>> ifconfig_bge0_ipv6=3D"inet6 fec2::210 prefixlen 64 accept_rtadv" > >>>> > >>>> -m > >>>> =20 > >>>>> > >>>>> ipv6_static_routes=3D"lan1 lan2" > >>>>> ipv6_route_lan1=3D"fec1:: -prefixlen 64 fec2::205" > >>>>> ipv6_route_lan2=3D"fec2:: -prefixlen 64 fec2::205" > >>>>> > >>>>> That is all associated with IPv6. IPv4 is configured and used. > >>>>> > >>>>> -- Doug =20 > >>> > >>> You are supposed to be able to sent multiple IP addresses on an=20 > >>> interface and that generally works. From the handbook, I get > >>> that the "ifconfig_rl0_ipv6=3D"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.=20 > >> > >> rc.conf is key value in general, the format is > >> > >> key=3Dvalue1 > >> > >> If you write further done in the file > >> > >> key=3Ddifferentvalue > >> > >> 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=20 > >> one ifconfig__ipv6 line to set flags etc and then use=20 > >> ifconfig__aliases to set ip addresses. > >> > >> Something like > >> > >> ifconfig_bge0_ipv6=3D"inet6 accept_rtadv" > >> ifconfig_bge0_aliases=3D"inet6 fec2::210 prefixlen 64" > >> > >> (I haven=E2=80=99t tried this, as I=E2=80=99m afk and typed it on the = phone,=20 > >> which is a bit of a pita, and from the top of my head,so you would=20 > >> have to try/verify yourself). > >> > >> -m =20 > > > > Ahh. The handbook is needing a note about that. There should be=20 > > something similar to what was done for IPv4 where it shows adding=20 > > additional addresses using: > > > > Ifconfig_bge0_alias0 ... > > Ifconfig_bge0_alias1 ... > > > > That would be very helpful. Thanks for the explinations. =20 >=20 >=20 > aliases are address family independent; you write =3D=E2=80=9Cinet=20 > 192.0.2.17/24=E2=80=9D or =3D=E2=80=9Cinet6 2001:db8::2:17/64=E2=80=9D a= s you wish. Yes, typical example: ifconfig_em0_name=3D"public" ifconfig_public=3D"up" ifconfig_public_ipv6=3D"up" ifconfig_public_aliases=3D"inet 1.2.3.4/32 inet6 2b01:3e1:123:2001::2/64" -m --=20 Michael Gmelin