Use of network_interfaces in rc.conf

Kevin Oberman kob6558 at gmail.com
Thu Mar 15 23:27:31 UTC 2012


2012/3/14 Eugene Grosbein <egrosbein at rdtc.ru>:
> 15.03.2012 06:33, hiren panchasara пишет:
>
>>     network_interfaces is basically historic rudiment
>>     used in 2.2.x FreeBSD version and alike.
>>
>>     In general, you should not use it in modern version at all.
>>
>>
>> Thanks Eugene.
>>
>> So, the only way to specify boottime configuration (that survives reboots) for an interface in rc.conf is:
>> ifconfig_em0="dhcp" ?
>
> Yes, thats what man rc.conf says.

Minor correction, but the man page says 'ifconfig_em0="DHCP". It may
not be case sensitive, but I have always uded CAPS like the man page
specifies. Also, I usually end up specifying SYNCDHCP to avoid having
something else that requires network starting before the interface is
configured.

Of course, ifconfig_* may have any valid ifconfig argument in it, but
remember the rc.conf is shell, so you must put all of the definition
in a single statement. You can't do:
ifconfig_em0="DHCP"
ifconfig_em0="mediaopt half-duplex"
That will not do DHCP, so hte interface will not come up. Of course,
you can concatinate a second entry to the first using normal sh
syntax.
-- 
R. Kevin Oberman, Network Engineer
E-mail: kob6558 at gmail.com


More information about the freebsd-net mailing list