From owner-freebsd-mobile@FreeBSD.ORG Fri Oct 17 09:03:16 2003 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 50B4716A4B3 for ; Fri, 17 Oct 2003 09:03:16 -0700 (PDT) Received: from hexagon.stack.nl (hexagon.stack.nl [131.155.140.144]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4A73743FDD for ; Fri, 17 Oct 2003 09:03:15 -0700 (PDT) (envelope-from jilles@stack.nl) Received: from toad.stack.nl (zen.stack.nl [2001:610:1108:5010::130]) by hexagon.stack.nl (Postfix) with ESMTP id 4D30B1C12; Fri, 17 Oct 2003 18:03:14 +0200 (CEST) Received: by toad.stack.nl (Postfix, from userid 1677) id 1DEFA94; Fri, 17 Oct 2003 18:03:14 +0200 (CEST) Date: Fri, 17 Oct 2003 18:03:13 +0200 From: Jilles Tjoelker To: John Message-ID: <20031017160313.GA98632@stack.nl> References: <000901c394c0$5f490b00$8122410a@corporate.amfam.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000901c394c0$5f490b00$8122410a@corporate.amfam.com> User-Agent: Mutt/1.5.4i cc: freebsd-mobile@freebsd.org Subject: Re: defaultrouter fails on boot, and reinserted card not getting correct config info... X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Oct 2003 16:03:16 -0000 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: 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