Configure networking outside rc.conf

Eric W. Bates ericx at ericx.net
Thu May 7 13:35:27 UTC 2009


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 at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"


-- 
Eric W. Bates
ericx at vineyard.net


More information about the freebsd-net mailing list