From owner-freebsd-net@FreeBSD.ORG Wed Mar 7 08:49:25 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E1F31106564A for ; Wed, 7 Mar 2012 08:49:25 +0000 (UTC) (envelope-from juli@clockworksquid.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 735AC8FC14 for ; Wed, 7 Mar 2012 08:49:24 +0000 (UTC) Received: by wgbds12 with SMTP id ds12so5159055wgb.31 for ; Wed, 07 Mar 2012 00:49:24 -0800 (PST) Received: by 10.180.104.137 with SMTP id ge9mr2124778wib.20.1331110164182; Wed, 07 Mar 2012 00:49:24 -0800 (PST) MIME-Version: 1.0 Sender: juli@clockworksquid.com Received: by 10.227.209.78 with HTTP; Wed, 7 Mar 2012 00:49:04 -0800 (PST) In-Reply-To: References: <63821C69-16E5-4483-8307-69DCF2865E99@my.gd> From: Juli Mallett Date: Wed, 7 Mar 2012 00:49:04 -0800 X-Google-Sender-Auth: fu-sa8G0LDn0kcj3zd9uHxtHRao Message-ID: To: hiren panchasara Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQmZJOIrePvDcaIAo+LP4ZgNMi058WwFC8awXiNVQZY5s9t54EL0HNPAPIGTUQvV5ojhXdIN Cc: "freebsd-net@freebsd.org" , Damien Fleuriot Subject: Re: Network Interface configuration X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 08:49:26 -0000 On Wed, Mar 7, 2012 at 00:21, hiren panchasara wrote: > On Wed, Mar 7, 2012 at 12:08 AM, Damien Fleuriot 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.