From owner-freebsd-stable@freebsd.org Fri Aug 7 14:53:14 2015 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 476D19B5F24 for ; Fri, 7 Aug 2015 14:53:14 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0258FC27 for ; Fri, 7 Aug 2015 14:53:14 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1ZNj15-000HRH-OG; Fri, 07 Aug 2015 17:53:03 +0300 Date: Fri, 7 Aug 2015 17:53:03 +0300 From: Slawa Olhovchenkov To: "Andrey V. Elsukov" Cc: Marcelo Gondim , FreeBSD Stable Mailing List Subject: Re: Routing stops working when we create a new vlan Message-ID: <20150807145303.GD24698@zxy.spb.ru> References: <55C3E641.9060305@bsdinfo.com.br> <55C4AFC8.9030302@yandex.ru> <55C4C0BB.5070204@bsdinfo.com.br> <55C4C1CF.5070505@yandex.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55C4C1CF.5070505@yandex.ru> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Aug 2015 14:53:14 -0000 On Fri, Aug 07, 2015 at 05:33:51PM +0300, Andrey V. Elsukov wrote: > On 07.08.2015 17:29, Marcelo Gondim wrote: > > On 07-08-2015 10:16, Andrey V. Elsukov wrote: > >> On 07.08.2015 01:57, Marcelo Gondim wrote: > >>> For all work again I need to restart the router. > >>> I don't know if I could correctly explain the problem. > >> Do you have gateway_enable="YES" in your /etc/rc.conf? > >> > > I have net.inet.ip.forwarding=1 but when I create a new vlan, the system > > is changing to: net.inet.ip.forwarding=0. Why? > > AFAIR, devd starts some scripts and if you don't have > gateway_enable="YES" net.inet.ip.forwarding will be reset to zero. And > since devd doesn't restart sysctl.conf you lose your gateway. I think this is incorrect behavior. > The right way to configure router - use gateway_enable="YES" in rc.conf. Changing gateway_enable in rc.conf don't have immediatly effect. Changing gateway_enable and plug interface do unexpectedly effect. Why forwarding controlling not only by /etc/rc.d/routing but also by /etc/rc.d/netif?