Desired behaviour of "ifconfig -alias"

Freddie Cash fcash at ocis.net
Tue Feb 13 17:44:28 UTC 2007


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 at 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 at ocis.net


More information about the freebsd-stable mailing list