Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Feb 2007 09:44:18 -0800
From:      Freddie Cash <fcash@ocis.net>
To:        freebsd-stable@freebsd.org
Subject:   Re: Desired behaviour of "ifconfig -alias"
Message-ID:  <200702130944.18871.fcash@ocis.net>
In-Reply-To: <200702130544.58242.joao@matik.com.br>
References:  <20070212163652.GA51709@lor.one-eyed-alien.net> <20070213023753.5a8fdb7c@loki.starkstrom.lan> <200702130544.58242.joao@matik.com.br>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday 13 February 2007 12:44 am, JoaoBR wrote:
> On Monday 12 February 2007 22:37, Joerg Pernfuss wrote:
> > On Mon, 12 Feb 2007 19:18:54 -0300
> >
> > JoaoBR <joao@matik.com.br> wrote:
> > > I believe the problem here is that
> > >
> > > ifconfig_nic="inet IP"
> > > ifconfig_nic="ether MAC"
> > >
> > > does not work on one line and does not work on two either, the
> > > latter overrides and or you get an IP address with original MAC or
> > > you get a new MAC without IP.
> >
> > Yes, you have to put 'ifconfig nic ether MAC' in /etc/start_if.nic
> > for this to work afair. Same approach you need to set WEP etc on a
> > wireless nic if you have ifconfig_nic="DHCP" in your rc.conf.
>
> if I am remembering well dhcp things you can put into dhclient.conf as
>
> interface "nic" {
>  media "ssid SSID nwkey KEY";
>  }
>
> or so to be set before sending the dhcp request.

/etc/wpa_supplicant.conf works much nicer for this.  Put all the wireless 
settings in there (including unencrypted, WEP, or WPA) for as many 
different networks as you want.  Add WPA to the ifconfig line 
in /etc/rc.conf.  Then wpa_supplicant handles scanning for networks, 
associating to the access point, and bringing the interface "up".  Only 
after the interface is "up" will dhclient be run.

-- 
Freddie Cash
fcash@ocis.net



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200702130944.18871.fcash>