Date: Mon, 7 Apr 2003 14:55:20 -0400 From: Scott Lambert <lambert@lambertfam.org> To: freebsd-mobile@freebsd.org Subject: Re: The right way to do DHCP with wi/ed? Message-ID: <20030407185520.GA86072@laptop.lambertfam.org> In-Reply-To: <3E91393A.7398.A009B14@localhost> References: <3E91393A.7398.A009B14@localhost>
next in thread | previous in thread | raw e-mail | index | archive | help
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 stop_if.wi0: #!/bin/sh /bin/kill `cat /var/run/dhclient.wi0.pid` Sometimes, it seems that I need to uncomment the #'d lines in start_if.wi0 in order to get dhclient to work properly. I created stop_if.wi0 after dhclient started consuming all CPU when I removed the card. This also allows me to change locations fairly easily by adding a case statement to start_if.xxx so I can manually run it with an argument telling it where I am and how to deal with the network there. Be sure to use: pccardd_flags="-z" # Additional flags for pccardd. in rc.conf. It is now the default. -- Scott Lambert KC5MLE Unix SysAdmin lambert@lambertfam.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030407185520.GA86072>