Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 07 May 2009 09:16:41 -0400
From:      "Eric W. Bates" <ericx@ericx.net>
To:        Giulio Ferro <auryn@zirakzigil.org>, freebsd-net@freebsd.org
Subject:   Re: Configure networking outside rc.conf
Message-ID:  <4A02DF39.7040902@ericx.net>
In-Reply-To: <4A01943F.6000400@zirakzigil.org>
References:  <4A00BE6C.5030800@zirakzigil.org>	<20090505225425.GA49013@hal.rescomp.berkeley.edu> <4A01943F.6000400@zirakzigil.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Giulio Ferro wrote:
> Chris Cowart wrote:
>> Assuming the NICs are displayed by ifconfig -a or inserted into
>> cloned_interfaces in /etc/rc.conf, you can create the following scripts:
>>
>> /etc/start_if.vlan100
>> /etc/stop_if.vlan100
>>
>> Where start_if.vlan100 is sourced by the netif start and stop_if.vlan100
>> is sourced by the netif stop.
>>
>> For example:
>>
>> | ccowart dev-aux etc $ cat /etc/start_if.vlan81
>> | ifconfig vlan81 vlan 81 vlandev em0
>> | ifconfig vlan81 inet 10.81.1.1/16
>>
>> I don't know that two files per interface is any cleaner than a really
>> long /etc/rc.conf (I usually prefer the latter, but I generally am not
>> dealing with more than 20-40 lines at most).
>>
>>   
> Thanks for the reply.
> What should be normally put in the stop_if.<iface> file? Do the "stop"
> files make sense?

You might, for example, have a dhcp server dedicated to that interface
which you wanted to start/stop as the interface goes up/down.

> Anyway I'll try to make it fit with what I need.
> 
> _______________________________________________
> freebsd-net@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"


-- 
Eric W. Bates
ericx@vineyard.net



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A02DF39.7040902>