Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Mar 2012 00:49:04 -0800
From:      Juli Mallett <jmallett@FreeBSD.org>
To:        hiren panchasara <hiren.panchasara@gmail.com>
Cc:        "freebsd-net@freebsd.org" <freebsd-net@freebsd.org>, Damien Fleuriot <ml@my.gd>
Subject:   Re: Network Interface configuration
Message-ID:  <CACVs6=9JLuXmHe9Ciwg-RgLUcu0hWTwzEnr4eE16wX2KynEmiA@mail.gmail.com>
In-Reply-To: <CALCpEUHrtQxLdiCtGN27jASgokpUTbSOU2dZAVYLxk81B1wPrQ@mail.gmail.com>
References:  <CALCpEUFCjOvy4WdALpE_vzxk8sfypxwgg=L01iNorXrN=dCwrA@mail.gmail.com> <63821C69-16E5-4483-8307-69DCF2865E99@my.gd> <CALCpEUHrtQxLdiCtGN27jASgokpUTbSOU2dZAVYLxk81B1wPrQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Mar 7, 2012 at 00:21, hiren panchasara
<hiren.panchasara@gmail.com> wrote:
> On Wed, Mar 7, 2012 at 12:08 AM, Damien Fleuriot <ml@my.gd> wrote:
>> 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 ;)
>>
>
> Thanks Damien.
>
> I looked at the man page. I did "ifconfig" on my box and found an interface
> named fwe0. I do not see any entry for that in any /etc/rc.conf or
> /etc/defaults/rc.conf
>
> Where is that coming from?
>
> Am I missing anything?

Interfaces are created based on what is present in the kernel and what
hardware is present on your system.  The configuration of those
interfaces (e.g. associated IP addresses, media options, etc.) is done
at runtime by scripts in /etc.  Those scripts use rc.conf to determine
how to configure the interfaces.  So if you do:

ifconfig_bge0="inet 192.168.0.1/24"

Then your bge0 interface will be configured with those settings on
boot (or when you do /etc/rc.d/netif restart).  If there is no bge0
interface on your system, however, because the hardware is not present
or the driver is not in your kernel (or loaded as a module), then
nothing will happen.  That interface will not be created.

You can create some kinds of interfaces dynamically, and you can
rename interfaces, but those things are probably a distraction from
what you want and excessively confusing.  In general, interfaces do
not come from the configuration files like rc.conf, however the way
that those interfaces are set up on boot is configured by files like
rc.conf.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACVs6=9JLuXmHe9Ciwg-RgLUcu0hWTwzEnr4eE16wX2KynEmiA>