From owner-freebsd-net@freebsd.org Sat Feb 27 20:41:29 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 1CAB9552776 for ; Sat, 27 Feb 2021 20:41:29 +0000 (UTC) (envelope-from SRS0=l7Lr=H5=lafn.org=bc979@sermon-archive.info) 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 4Dnz2c6Y4Wz3rbF for ; Sat, 27 Feb 2021 20:41:28 +0000 (UTC) (envelope-from SRS0=l7Lr=H5=lafn.org=bc979@sermon-archive.info) Received: by mailman.nyi.freebsd.org (Postfix) id E0AE9552920; Sat, 27 Feb 2021 20:41:28 +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 E06AE5527A1 for ; Sat, 27 Feb 2021 20:41:28 +0000 (UTC) (envelope-from SRS0=l7Lr=H5=lafn.org=bc979@sermon-archive.info) Received: from mail.sermon-archive.info (sermon-archive.info [71.177.216.148]) by mx1.freebsd.org (Postfix) with ESMTP id 4Dnz2b5ZYzz3rhh for ; Sat, 27 Feb 2021 20:41:27 +0000 (UTC) (envelope-from SRS0=l7Lr=H5=lafn.org=bc979@sermon-archive.info) Received: from [172.20.10.7] (unknown [172.58.30.131]) by mail.sermon-archive.info (Postfix) with ESMTPSA id 4DnyvC1tkTz2fjQl for ; Sat, 27 Feb 2021 12:35:03 -0800 (PST) From: Doug Hardie Mime-Version: 1.0 (1.0) Subject: Re: accept_rtadv Message-Id: Date: Sat, 27 Feb 2021 12:34:56 -0800 To: net@FreeBSD.org X-Mailer: iPad Mail (18D52) X-Virus-Scanned: clamav-milter 0.103.0 at mail X-Virus-Status: Clean X-Rspamd-Queue-Id: 4Dnz2b5ZYzz3rhh X-Spamd-Bar: +++++++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of SRS0=l7Lr=H5=lafn.org=bc979@sermon-archive.info designates 71.177.216.148 as permitted sender) smtp.mailfrom=SRS0=l7Lr=H5=lafn.org=bc979@sermon-archive.info X-Spamd-Result: default: False [7.92 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(0.00)[+ip4:71.177.216.148:c]; MV_CASE(0.50)[]; TO_DN_NONE(0.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.984]; FORGED_SENDER(0.30)[bc979@lafn.org,SRS0=l7Lr=H5=lafn.org=bc979@sermon-archive.info]; RCVD_NO_TLS_LAST(0.10)[]; RECEIVED_SPAMHAUS_PBL(0.00)[172.58.30.131:received]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RBL_DBL_DONT_QUERY_IPS(0.00)[71.177.216.148:from]; ASN(0.00)[asn:5650, ipnet:71.177.216.0/23, country:US]; R_DKIM_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[bc979@lafn.org,SRS0=l7Lr=H5=lafn.org=bc979@sermon-archive.info]; ARC_NA(0.00)[]; FAKE_REPLY(1.00)[]; RECEIVED_SPAMHAUS_XBL(5.00)[172.58.30.131:received]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[net@freebsd.org]; DMARC_NA(0.00)[lafn.org: no valid DMARC record]; NEURAL_SPAM_MEDIUM(1.00)[1.000]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[71.177.216.148:from:127.0.2.255]; BAD_REP_POLICIES(0.10)[]; NEURAL_SPAM_LONG(1.00)[1.000]; RCVD_COUNT_TWO(0.00)[2]; GREYLIST(0.00)[pass,body]; MAILMAN_DEST(0.00)[net] X-Spam: Yes Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.34 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 20:41:29 -0000 =EF=BB=BF > On Feb 27, 2021, at 11:06, Michael Gmelin wrote: > =EF=BB=BF >=20 >=20 >> On 27. Feb 2021, at 19:40, Doug Hardie wrote: >> =EF=BB=BF >>> On 27 February 2021, at 10:34, Michael Gmelin wrote: >>>=20 >>>=20 >>>=20 >>>> On 27. Feb 2021, at 19:21, Doug Hardie wrote: >>>>=20 >>>> =EF=BB=BF >>>>>> On 27 February 2021, at 04:37, Michael Gmelin wrote= : >>>>>>=20 >>>>>>=20 >>>>>>=20 >>>>>>> On 27. Feb 2021, at 08:21, Doug Hardie wrote: >>>>>>=20 >>>>>> =EF=BB=BF=46rom the Handbook: >>>>>>=20 >>>>>> 32.9.2. Configuring IPv6 >>>>>> To configure a FreeBSD system as an IPv6 client, add these two lines t= o rc.conf: >>>>>>=20 >>>>>> ifconfig_rl0_ipv6=3D"inet6 accept_rtadv" >>>>>> rtsold_enable=3D"YES" >>>>>>=20 >>>>>> This does not work. I have in rc.conf: >>>>>>=20 >>>>>> ifconfig_bge0_ipv6=3D"inet6 accept_rtadv" >>>>>> ifconfig_ue0_ipv6=3D"inet6 accept_rtadv" >>>>>> ifconfig_ue1_ipv6=3D"inet6 accept_rtadv" >>>>>>=20 >>>>>> On all three interfaces, ifconfig shows: >>>>>> nd6 options=3D21 >>>>>>=20 >>>>>> ACCEPT_RTADV is not listed and sure enough router advertisements are i= gnored. I have to manually enter: >>>>>> ifconfig bge0 ipv6 accept_rtadv >>>>>> for each interface. Then ifconfig shows: >>>>>>=20 >>>>>> nd6 options=3D23 >>>>>>=20 >>>>>> and the interface now accepts router advertisements. This is a bug, b= ut 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 h= ave ipv4 configured on that interface too though. >>>>>=20 >>>>> Do you have anything else in your rc.conf (especially any other ifconf= ig lines)? >>>>>=20 >>>>> If not, could you try adding >>>>>=20 >>>>> 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 >>>=20 >>>> ifconfig_bge0_ipv6=3D"inet6 fec2::210 prefixlen 64" >>>=20 >>> Therefore, the first line has no effect at all. >>>=20 >>> You can double check this by calling >>>=20 >>> sysrc ifconfig_bge0_ipv6 >>>=20 >>> Setting all things in one config setting might work (haven=E2=80=99t tri= ed it myself), like in >>>=20 >>> ifconfig_bge0_ipv6=3D"inet6 fec2::210 prefixlen 64 accept_rtadv" >>>=20 >>> -m >>>=20 >>>>=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" >>>>=20 >>>> That is all associated with IPv6. IPv4 is configured and used. >>>>=20 >>>> -- Doug >>=20 >> You are supposed to be able to sent multiple IP addresses on an interface= and that generally works. =46rom the handbook, I get that the "ifconfig_rl= 0_ipv6=3D"inet6 accept_rtadv" line causes the default link-local addresses t= o be configured and should set accept_rtadv. The other lines should just ad= d 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 do= cumented in the handbook at that time. Adding additional IP addresses shoul= d not clear any of the interface flags unless included in the command. >>=20 >=20 > rc.conf is key value in general, the format is >=20 > key=3Dvalue1 >=20 > If you write further done in the file >=20 > key=3Ddifferentvalue >=20 > the value of key will be "differentvalue", like the first line never exist= ed. (This is unrelated to IPv6 or router advertisements, just the basic prin= ciple of rc.conf). >=20 > One way I used to configure things like that in the past was using one ifc= onfig__ipv6 line to set flags etc and then use ifconfig__aliases to set ip addresses. >=20 > Something like >=20 > ifconfig_bge0_ipv6=3D"inet6 accept_rtadv" > ifconfig_bge0_aliases=3D"inet6 fec2::210 prefixlen 64" >=20 > (I haven=E2=80=99t tried this, as I=E2=80=99m afk and typed it on the phon= e, which is a bit of a pita, and from the top of my head,so you would have t= o try/verify yourself). >=20 > -m Ahh. The handbook is needing a note about that. There should be something s= imilar to what was done for IPv4 where it shows adding additional addresses u= sing: Ifconfig_bge0_alias0 ... Ifconfig_bge0_alias1 ... That would be very helpful. Thanks for the explinations. =E2=80=94 Doug