Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Oct 2003 18:03:13 +0200
From:      Jilles Tjoelker <jilles+fbsd-mobile@stack.nl>
To:        John <sephtin@techgodz.com>
Cc:        freebsd-mobile@freebsd.org
Subject:   Re: defaultrouter fails on boot, and reinserted card not getting correct config info...
Message-ID:  <20031017160313.GA98632@stack.nl>
In-Reply-To: <000901c394c0$5f490b00$8122410a@corporate.amfam.com>
References:  <000901c394c0$5f490b00$8122410a@corporate.amfam.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Oct 17, 2003 at 10:07:23AM -0500, John wrote:
> I'm running 5.1 on a laptop. [sephtin@draxa ~]$ uname -a
> FreeBSD draxa.techgodz.com 5.1-RELEASE-p5 FreeBSD 5.1-RELEASE-p5 #1: Mon Oct
> 6 10:35:12 CDT 2003     root@draxa.techgodz.com:/usr/obj/usr/src/sys/draxa
> i386

> I have 2 problems:
> 1) When booting, with a PC-Card (wi0) in, no matter what defaultrouter= is
> set to in /etc/start_if.wi0 it always uses what's in /etc rc.conf.  I don't
> understand!  /etc/start_if.${interface} is sourced in both
> /etc/network.subr, as well as /etc/pccard_ether.

> It is DEFINITELY getting my card's ifconfig_wi0 info from start_if.wi0 (as
> that is the only place I have the ssid, wepmode and wepkey set, and it finds
> them correctly...).  Shouldn't I be able to override the defaultrouter= in
> rc.conf with what's in /etc/start_if.wi0???

The start_if.wi0 script is started from /etc/rc.d/netif, and the
defaultrouter is used in /etc/rc.d/routing. These are run in separate
shells, so you can't set a variable in one and use it in the other. In
4.x your approach will work, as almost everything is run in the same
shell there.

I use 4.8R and DHCP and I had some trouble until I ensured that only
/etc/pccard_ether configured my wi card. It seemed not to like being
reconfigured and I had to fix it up myself later. I added this in
/etc/rc.conf: network_interfaces="lo0 fxp0", and also added a check in
/etc/start_if.wi0 to not set the wep key when already associated. (That
might cause problems if there is an AP with WEP off is nearby, but there
isn't in my environment.)

It still tries IPv6 twice, that doesn't seem to cause problems, although
I haven't tried IPv6 wireless for a long time.

> 2) On my laptop, I have 2 pccards.  One is the dlink wireless (wi0)
> mentioned above, the other is a linksys 10/100.  I NEVER have them in at the
> same time.
> When I boot with the wireless card in (after setting the default route by
> hand... (see problem #1), I remove the card.  I get notification that the
> card has been removed (wi0: detached).  I then re-insert the card, and get a
> notification that the card was inserted(wi0: <card info from
> pccard.conf>..., followed by it's mac addy, chipset, and supported rates.

> When I do an ifconfig, it does NOT contain my info for the card (IP,
> netmask, ssid, wepmode, nor wepkey).  Shouldn't it get this info from
> /etc/start_if.wi0???
> I would think it should get both the ifconfig_wi0 parameters, as well as the
> default router.  It is also strange to note, that even if I have
> defaultrouter= set in rc.conf, it doesn't access it from there... ?

> Google has so far told me how I'm supposed to set up defaultrouter= in my
> rc.conf, but doesn't go into what in the startup scripts is failing.

If you're using 4.x, you should run pccardd. If you're using NEWCARD,
the default on 5.x (recognized by presence of the cbb0 device), you
should run devd instead.  The default /etc/devd.conf should cause
/etc/pccard_ether to be run on inserted network cards.

pccardd on 4.x at least waits for a few seconds after the card has been
inserted before initializing it, so you may need some patience.

-- 
Jilles Tjoelker



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