Configure networking outside rc.conf

Giulio Ferro auryn at zirakzigil.org
Wed May 6 13:44:40 UTC 2009


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?

Anyway I'll try to make it fit with what I need.



More information about the freebsd-net mailing list