Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Aug 2019 19:53:38 +0300
From:      Victor Gamov <vit@otcnet.ru>
To:        freebsd-net@freebsd.org
Subject:   Re: how to down interface at startup
Message-ID:  <b54e7484-e5c6-6d63-83c8-55c986c863b7@otcnet.ru>
In-Reply-To: <ed0c1201-a61d-6993-d5cb-aca503f48078@otcnet.ru>
References:  <8e49d9c0-6950-dcb3-ac62-25a9a1f86c2e@otcnet.ru> <9e135f5f-48c1-44b0-1eea-fe47f7a61fc7@grosbein.net> <ed0c1201-a61d-6993-d5cb-aca503f48078@otcnet.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
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_<interface> variables as described 
>> below.
> 
> Eugene
> 
> Thank you very much!
> 
> I really need be more carefully while reading docs.
> 
> Thanks!


--
CU
Victor Gamov



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b54e7484-e5c6-6d63-83c8-55c986c863b7>