From owner-freebsd-net@freebsd.org Thu Aug 29 16:53:47 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 EF8E2DB233 for ; Thu, 29 Aug 2019 16:53:47 +0000 (UTC) (envelope-from vit@otcnet.ru) Received: from mail.otcnet.ru (mail.otcnet.ru [194.190.78.3]) by mx1.freebsd.org (Postfix) with ESMTP id 46K7wp6szZz3QST for ; Thu, 29 Aug 2019 16:53:46 +0000 (UTC) (envelope-from vit@otcnet.ru) Received: from Victors-MacBook-Air-2.local (unknown [194.190.78.9]) by mail.otcnet.ru (Postfix) with ESMTPSA id 1A8B56D178 for ; Thu, 29 Aug 2019 19:53:39 +0300 (MSK) Subject: Re: how to down interface at startup To: freebsd-net@freebsd.org References: <8e49d9c0-6950-dcb3-ac62-25a9a1f86c2e@otcnet.ru> <9e135f5f-48c1-44b0-1eea-fe47f7a61fc7@grosbein.net> From: Victor Gamov Organization: OTCnet Message-ID: Date: Thu, 29 Aug 2019 19:53:38 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 46K7wp6szZz3QST X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of vit@otcnet.ru designates 194.190.78.3 as permitted sender) smtp.mailfrom=vit@otcnet.ru X-Spamd-Result: default: False [-6.51 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+a:mail.otcnet.ru]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-net@freebsd.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; HAS_ORG_HEADER(0.00)[]; DMARC_NA(0.00)[otcnet.ru]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.988,0]; IP_SCORE(-3.32)[ip: (-8.75), ipnet: 194.190.78.0/24(-4.38), asn: 50822(-3.50), country: RU(0.01)]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:50822, ipnet:194.190.78.0/24, country:RU]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] 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: Thu, 29 Aug 2019 16:53:48 -0000 When I configure vlans like this ===== cloned_interfaces="${cloned_interfaces} vlan221" ifconfig_vlan221="inet 10.2.2.241/28 vlan 221 vlandev igb0 NOAUTO" ===== then NOAUTO clause has no effect Small patch to allow NOAUTO for any interface: ===cut here=== *** /etc/network.subr.orig Tue Aug 13 19:24:33 2019 --- /etc/network.subr Tue Aug 20 18:54:22 2019 *************** *** 226,232 **** /etc/rc.d/hostapd start $1 _cfg=0 elif [ ${_cfg} -eq 0 ]; then ! ${IFCONFIG_CMD} $1 up fi if dhcpif $1; then --- 226,236 ---- /etc/rc.d/hostapd start $1 _cfg=0 elif [ ${_cfg} -eq 0 ]; then ! if autoif $1; then ! ${IFCONFIG_CMD} $1 up ! else ! ${IFCONFIG_CMD} $1 down ! fi fi if dhcpif $1; then ===/cut here=== On 28/07/2019 18:33, Victor Gamov wrote: > On 28/07/2019 18:08, Eugene Grosbein wrote: >> 28.07.2019 21:50, Victor Gamov wrote: >> >>> I have configuration where bridge interface need to be down at startup. >>> >>> But "ifconfig_bridge2="down" is not working: bridge always up >>> >>> How I can 'down' bridge interface at startup? >> >> If you use rc.conf to configure it, please read rc.conf(5) manual page >> carefully: >> >>          ... Interfaces that the >>                   administrator wishes to store configuration for, but >> not >>                   start at boot should be configured with the "NOAUTO" >> keyword >>                   in their ifconfig_ variables as described >> below. > > Eugene > > Thank you very much! > > I really need be more carefully while reading docs. > > Thanks! -- CU Victor Gamov