Network Interface configuration

Damien Fleuriot ml at my.gd
Wed Mar 7 08:09:23 UTC 2012



On 7 Mar 2012, at 08:10, hiren panchasara <hiren.panchasara at gmail.com> wrote:

> Do we store network interfaces configuration information in any file that
> survives reboots? (as Linux does it in /etc/network/interfaces)
> 
> Only thing I could find was when an interface needs address from DHCP,
> rc.conf says ifconfig_em0="DHCP".
> 
> I know getifaddrs() can get you list of interfaces but I wanted to know if
> there is any such file.
> 
> Thanks,
> Hiren
> _______________________________________________
> 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"


In /etc/rc.conf

See the man page for rc.conf for a more detailed use.
See the small example bellow:

ifconfig_re0="inet 192.168.0.30/24 up"
defaultrouter="192.168.0.254"

These are the very basics ;)



More information about the freebsd-net mailing list