From owner-freebsd-net@freebsd.org Sun Feb 28 10:47:05 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 88099567600 for ; Sun, 28 Feb 2021 10:47:05 +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 4DpKpK04Flz3QbH for ; Sun, 28 Feb 2021 10:47:05 +0000 (UTC) (envelope-from freebsd@grem.de) Received: by mailman.nyi.freebsd.org (Postfix) id 007945675AC; Sun, 28 Feb 2021 10:47:05 +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 004035675AB for ; Sun, 28 Feb 2021 10:47:05 +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 4DpKpJ58FMz3QsD for ; Sun, 28 Feb 2021 10:47:04 +0000 (UTC) (envelope-from freebsd@grem.de) Received: by mail.evolve.de (OpenSMTPD) with ESMTP id aa5a5003; Sun, 28 Feb 2021 10:47:01 +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=31YmanS0 oOGKlbsD24U/aT3+wAk=; b=DNu1zASyaWN78GuHnh2JwvTHo4QVsKKjie6XoQ01 j/4WQozbYoixEiB4CfMrlEGc4BhMo5yqJpSJU0/pIywaIyRxL671v00QE20OnP8t y6uJHOVyHEhBINIfeFOD2KUlJaqdQuh0D/hVkAStl04l7pQPxluF/rM1TGaeVzp8 bm4EBhJaT7HS9+ef6EXszziqOdrQ5l7tI4rpbK0MUl8nijA97JEnEGqMcbrpVEwA fR0eiNmosmglFDAyZtFMfgE4OYnYU8QGU9CBQmV0vRy2f11dhKfVIG3tl808HCT2 p7X6t93at6UzyC8yCmmN4IA6M6SudsDEWE3XuJTyJAAZIQ== 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=rA IRluabKOb1dSRW9IXFwBt1O0rI/0gXaUJEoXEqxxG4nlqrSQrkzhJNP3ymOpmm5W 3UO4Ff15THS80RL4pjY1D357cFAUomXCNKD1tfemTEOrxc8H7tDacI7BbI1kDyL8 ctdimBIeoc8A7kmVcjQXU4RUQrbeYe3ndXwUwm/WflVMcdRAkpeG+V8eY3dp3X1H SFTNUMgLfMpnL5FdsHxk9qy1/105I/TLUAH8x9x/K5hTXV/uuw+hCY2YgRiwsBt3 w4ZJBn4BlW+MfNv5CQWmvLOd6T755v0iQdZTwsZJUo1Kmf06bUTkF8AgduHoaf6Z Cjs2KA07TfKkZGVtxtWg== Received: by mail.evolve.de (OpenSMTPD) with ESMTPSA id c66548ae (TLSv1.3:AEAD-CHACHA20-POLY1305-SHA256:256:NO); Sun, 28 Feb 2021 10:46:58 +0000 (UTC) Date: Sun, 28 Feb 2021 11:45:59 +0100 From: Michael Gmelin To: Lutz Donnerhacke Cc: Doug Hardie , net@FreeBSD.org Subject: Re: accept_rtadv Message-ID: <20210228114559.3939258a@bsd64.grem.de> In-Reply-To: <20210227220740.GA28592@belenus.iks-jena.de> References: <20210227220740.GA28592@belenus.iks-jena.de> X-Face: $wrgCtfdVw_H9WAY?S&9+/F"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charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4DpKpJ58FMz3QsD 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:47:05 -0000 On Sat, 27 Feb 2021 23:07:40 +0100 Lutz Donnerhacke wrote: > On Sat, Feb 27, 2021 at 12:34:56PM -0800, Doug Hardie wrote: > > 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. > > That's a bad idea. You can't comment out some intermediate line. > > ifconfig_bge0_alias0="inet xxx" > # ifconfig_bge0_alias1="inet yyy" > ifconfig_bge0_alias2="inet zzz" > > will result in applying "xxx" only. Fortunately this is not true anymore since 10.1-RELEASE (r262243): r264243 | dteske | 2014-04-08 00:40:29 +0200 (Tue, 08 Apr 2014) | 10 lines Loosen the processing of *_IF_aliasN vars to be less strict. Previously, the first alias had to be _alias0 and processing stopped at the first non-defined variable (preventing gaps). Allowing gaps gives the administrator the ability to group aliases in an adhoc manner and also lifts the requirement to renumber aliases simply to comment-out an existing one. Aliases are processed in numerical ascending order. Discussed on: -rc MFC after: 1 week So you can happily just comment out lines like in your example above. It seems like the (otherwise great) section on network_interfaces in the rc.conf(5) man page wasn't adapted to reflect this change. > > but this is even worse: > > ifconfig_bge0_aliases=" \ > inet xxx \ > # inet yyy \ > inet zzz \ > " > > It results in an syntax error. > > So I do use: > > ifconfig_bge0_aliases="${ifconfig_bge0_aliases} inet xxx" > # ifconfig_bge0_aliases="${ifconfig_bge0_aliases} inet yyy" > ifconfig_bge0_aliases="${ifconfig_bge0_aliases} inet zzz" > > For _ipv6 it's different, because you need at least one _ipv6. > ifconfig_bge0_ipv6="inet6 xxx" Putting "up" in there is just fine. > ifconfig_bge0_aliases="inet6 yyy" I usually do something like this (as I like to rename interface based on their architectural role in my system): ifconfig_bge0_name="public" ifconfig_public="up" ifconfig_public_ipv6="up" and keep addresses entirely in aliases ifconfig_public_aliases="inet 1.2.3.4/32 inet6 2b01:3e1:123:201::2/64" Cheers, Michael -- Michael Gmelin