Re: The right way to do DHCP with wi/ed?

"Dan Langille" <[email protected]>
Newsgroups gmane.os.freebsd.devel.mobile
Message-ID <3E91BF43.25196.C0C3731@localhost>
On 7 Apr 2003 at 14:55, Scott Lambert wrote:

> On Mon, Apr 07, 2003 at 08:39:22AM -0400, Dan Langille wrote:
> > What is the correct way to do DHCP with wi0?  I've been trying
> > various methods, but the only solution I've found is to do this:  
> > 
> > /etc/rc.conf:
> > ifconfig_wi0="DHCP"
> > pccard_enable="YES"
> > dhcp_program=/tmp/foo
> > 
> > /tmp/foo:
> > ( /sbin/dhclient -d $* & ) > /tmp/foo.out 2>&1
> > 
> > If I don't use /tmp/foo, dhclient hangs.  So far, the dicussion on
> > the ISC DHCP client list hasn't found a solution.  The lease is
> > granted, but wi0 never gets an IP addresses.  If interested, the
> > thread is at http://marc.theaimsgroup.com/?t=104950219300003&r=1&w=2
> 
> I use the {start|stop}_if.* files for my wi0 setup, my fxp0 too.
> 
> start_if.wi0:
> #!/bin/sh
> #/sbin/ifconfig wi0 up
> /sbin/ifconfig wi0 wepkey 0xXXXXXXXXXXXXXXXXXXXXXXXXXX wepmode on
> #echo "sleeping 15 seconds to allow time to associate..." #sleep 15
> dhclient -pf /var/run/dhclient.wi0.pid wi0

Thank you.  This is quite helpful.

I see my "sleeping 15s ..." message... twice.  The first occurs just 
after "wi0: Lucent Firmware: Station 8.10.0".  The second occurs just 
after "Doing initial network setup: hostname ipmon ipfilter."

Back to the original problem: wi0 doesn't get an IP address.  
dhclient is running.  /var/dbh/dhclient.leases has the expected 
values (I deleted it before rebooting).

> stop_if.wi0:
> #!/bin/sh
> /bin/kill `cat /var/run/dhclient.wi0.pid`

I have similar.  However, If I remove the card, dhclient is not 
killed but wi0 disappears from the ifconfig output.  If the card is 
then inserted, I don't see the "sleeping 15s" message.
And ifconfig still doesn't show a wi0 interface.

This is what I see:

[root@laptop:~] # wi0: timeout in wi_seek to fc80/0; last status ffff
wi0: timeout in wi_seek to fc80/0; last status ffff
wi0: detached
pccard: card removed, slot 0
Apr  7 17:57:56 laptop /kernel: stray irq 3
Apr  7 17:57:56 laptop dhclient: send_packet: No route to host
Apr  7 17:57:56 laptop dhclient: receive_packet failed on wi0: No 
route to host

In fact, unless wi0 is inserted before booting, I can't get it to 
work.

Possible clues: During the boot process, the "ifconfig wi0" 
information appears on the screen but without an IP address, and with 
the wrong channel (and "status: no carrier").  The SSID, wep info 
etc, are all there.

Clues please?
-- 
Dan Langille : http://www.langille.org/

_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-mobile
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.