From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QDzKR-0007CS-5E for garchives@archives.gentoo.org; Sun, 24 Apr 2011 13:26:27 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 11E63E051C; Sun, 24 Apr 2011 13:24:58 +0000 (UTC) Received: from wmta3.srv.hcvlny.cv.net (wmta3.srv.hcvlny.cv.net [167.206.10.6]) by pigeon.gentoo.org (Postfix) with ESMTP id D2FC4E051C for ; Sun, 24 Apr 2011 13:24:58 +0000 (UTC) Received: from optonline.net (mstr10_15c.srv.hcvlny.cv.net [10.240.4.69]) by wmta3.srv.hcvlny.cv.net (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) with ESMTP id <0LK5001KYRXLW7YQ@wmta3.srv.hcvlny.cv.net> for gentoo-user@lists.gentoo.org; Sun, 24 Apr 2011 09:24:58 -0400 (EDT) Received: from [10.240.3.201] (Forwarded-For: 68.175.118.209, [10.240.3.201]) by mstr15.srv.hcvlny.cv.net (mshttpd); Sun, 24 Apr 2011 13:24:57 +0000 (GMT) Date: Sun, 24 Apr 2011 13:24:57 +0000 (GMT) From: dhkuhl@optonline.net Subject: Re: [gentoo-user] WPA Supplicant In-reply-to: <201104241413.19743.michaelkintzios@gmail.com> To: gentoo-user@lists.gentoo.org Cc: gentoo-user@lists.gentoo.org Message-id: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-version: 1.0 X-Mailer: Sun Java(tm) System Messenger Express 6.2-9.20 (built Jul 15 2010) Content-type: multipart/alternative; boundary="Boundary_(ID_BvJYi8MfMEMVSpdrlfg7Yg)" Content-language: en X-Accept-Language: en Priority: normal References: <201104241413.19743.michaelkintzios@gmail.com> X-Archives-Salt: X-Archives-Hash: 0b83d0c78bade0afd9cd0bc43b2a5ff4 This is a multi-part message in MIME format. --Boundary_(ID_BvJYi8MfMEMVSpdrlfg7Yg) Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT Content-disposition: inline ----- Original Message ----- From: Mick Date: Sunday, April 24, 2011 9:14 am Subject: Re: [gentoo-user] WPA Supplicant To: gentoo-user@lists.gentoo.org > On Sunday 24 April 2011 13:37:03 dhkuhl@optonline.net wrote: > > I'm trying to get wireless working reliably on my laptop. I > have followed > > the documentation, but still have a lot of questions . . . > especially> since it only seems to work sometimes. > > > > First, I'm using WPA Supplicant without the gui tools. > > run wpa_gui from a terminal and a lot of what you're asking > below will become > self-explanatory. > > > > Second, I'm in NYC and there are a lot of networks I can use > around town. > > > > Third, Is there a way I can control the services I use from > the Grub menu? > > Since the laptop has a wireless card and an RJ45 jack, I'd > like to be able > > boot and not use one or the other. Since I know if I'm not > physically> connected to a network, there's really no reason to > even try eth0. > > Check /etc/conf.d/rc and in particular: > > # RC_NET_STRICT_CHECKING allows some flexibility with the 'net' > service.# The following values are allowed: > # none - The 'net' service is always considered up. > # no - This basically means that at least one net.* service > besides net.lo > # must be up. This can be used by notebook users that > have a wifi > and > # a static nic, and only wants one up at any given time > to have the > # 'net' service seen as up. > # lo - This is the same as the 'no' option, but net.lo is > also counted. > # This should be useful to people that do not care > about any specific > # interface being up at boot. > # yes - For this ALL network interfaces MUST be up for the > 'net' service to > # be considered up. > > RC_NET_STRICT_CHECKING="no" > > (or you can use "lo") > > > > Forth, The problem. I'm not sure how wpa_supplicant works or > how it should > > work. The wpa_supplicant man page gives a few examples on how > to run it, > > but when I look at the process list it seems to be run by > another program > > called wpa_cli. There's also a shell script in > /etc/wpa/supplicant that > > looks like it can start or stop it with CONNECT or DISCONNECT. > 1) Do I > > need to enter networks in wpa_supplicant.conf or does > wpa_supplicant scan > > for networks and connect to whatever's available? > > The latter. > > You can however enter manually in > /etc/wpa_supplicant/wpa_supplicant.conf > particular parameters (keys and what not) of known networks to > which you > connect as a matter of preference. > > > > 2) If I have multiple > > networks available how does wpa_supplicant choose which to > connect to and > > can I specify which one I want? > > It'll connect to: > > a) Any network you have specified in your > /etc/wpa_supplicant/wpa_supplicant.conf according to the > preference you have > set up therein. > > b) Any network it finds. > > c) Any network you select with wpa_cli, or select/enable/disable > in wpa_gui. > > > > 3) How should wpa_supplicant be started, > > stopped and restarted? What should be used for this: > wpa_supplicant,> wpa_cli, or wpa_cli.sh? I don't see anything > in /etc/init.d for that, but > > it looks like netmount may be doing it. > > You need to define it in /etc/conf.d/net: > > modules=( "wpa_supplicant" ) > wpa_supplicant_wlan0="-Dwext" > > (adjust this according to the name of your wireless iface and driver). > > > > 4) The documentation doesn't say > > to, but the way I got wireless working is by creating a link > net.wlan0 -> > > net.lo in the /etc/init.d directory. Is this correct? > > It depends which documentation you are looking at. I am sure > that this is > explained in the gentoo Handbook and associated documentation. > > This is the link you need: > > lrwxrwxrwx 1 root root 6 Dec 16 14:26 net.wlan0 -> net.lo > > but you should have also configured /etc/conf.d/net with your > desired settings > or just defaults will run. > > > > I think that's why > > it's starting automatically when I boot too, because I never > added it with > > rc-update so netmount must be picking it up. > > > > 5) This is the most puzzling > > thing. When wpa_supplicant starts even though I get a inet > address I > > can't always get to the internet. Why does the panel applet > says I'm > > connected and ifconfig shows an inet address but firefox and > ping can't > > reach a site like yahoo or google? > > This could well be a dns server/repeater issue. > > If you can ping the IP address of google, but not the domain > name of it, then > the problem is that you do not have access to a DNS repeater. > Look in your > /etc/resolve.conf to see if there is a line saying: > > nameserver XXX.XXX.XX.XX > > if it is absent then you have not connected to a namesever. > This is a router > issue and it could be controlled by some authentication scheme. > A lot of > wireless services offered by coffee shops, libraries, etc. may > give you an IP > address automatically, but then require you use your browser to > register with > their authentication server (using a passwd that they provide > after you pay > them for the privilege). > > Open access points with no encryption and no DNS authentication > requirements > should allow you to connect seamlessly to the Internet. > > > > 6) For networks where I have a > > password, should that go in wpa_supplicant.conf as plain text > or should it > > be encrypted? > > This can be a confusing endeavour because some routers will only > accept > certain characters in a passphrase, so you could be failing to > connect due to > the peculiarities of the router. The passphrase should be > entered as provided > by the router owner, then a hex key generated with > wpa_passphrase (look at man > wpa_passphrase). Then enter the hex key in your > wpa_supplicant.conf, or your > wpa_gui. > > HTH for now, ask more as you need it. > -- > Regards, > Mick > I'll give this stuff a try. I'm sure I'll be back. Thanks. --Boundary_(ID_BvJYi8MfMEMVSpdrlfg7Yg) Content-type: text/html; charset=us-ascii Content-transfer-encoding: quoted-printable Content-disposition: inline =3CDIV=3E=3CBR=3E=3CBR=3E----- Original Message -----=3CBR=3EFrom=3A Mic= k =3CMICHAELKINTZIOS=40GMAIL=2ECOM=3E=3CBR=3EDate=3A Sunday=2C April 24=2C= 2011 9=3A14 am=3CBR=3ESubject=3A Re=3A =5Bgentoo-user=5D WPA=26nbsp=3BS= upplicant=3CBR=3ETo=3A gentoo-user=40lists=2Egentoo=2Eorg=3CBR=3E=3CBR=3E= =26gt=3B On Sunday 24 April 2011 13=3A37=3A03 dhkuhl=40optonline=2Enet w= rote=3A=3CBR=3E=26gt=3B =26gt=3B I=27m trying to get wireless working re= liably on my laptop=2E I =3CBR=3E=26gt=3B have followed=3CBR=3E=26gt=3B = =26gt=3B the documentation=2C but still have a lot of questions =2E =2E = =2E =3CBR=3E=26gt=3B especially=26gt=3B since it only seems to work some= times=2E=3CBR=3E=26gt=3B =26gt=3B =3CBR=3E=26gt=3B =26gt=3B First=2C I=27= m using WPA=26nbsp=3BSupplicant without the gui=26nbsp=3Btools=2E=3CBR=3E= =26gt=3B =3CBR=3E=26gt=3B run wpa=5Fgui=26nbsp=3Bfrom a terminal and a l= ot of what you=27re asking =3CBR=3E=26gt=3B below will become =3CBR=3E=26= gt=3B self-explanatory=2E=3CBR=3E=26gt=3B =3CBR=3E=26gt=3B =3CBR=3E=26gt= =3B =26gt=3B Second=2C I=27m in NYC and there are a lot of networks I ca= n use =3CBR=3E=26gt=3B around town=2E=3CBR=3E=26gt=3B =26gt=3B =3CBR=3E=26= gt=3B =26gt=3B Third=2C Is there a way I can control the services I use = from =3CBR=3E=26gt=3B the Grub menu=3F =3CBR=3E=26gt=3B =26gt=3B Since t= he laptop has a wireless card and an RJ45 jack=2C I=27d =3CBR=3E=26gt=3B= like to be able=3CBR=3E=26gt=3B =26gt=3B boot and not use one or the ot= her=2E Since I know if I=27m not =3CBR=3E=26gt=3B physically=26gt=3B con= nected to a network=2C there=27s really no reason to =3CBR=3E=26gt=3B ev= en try eth0=2E=3CBR=3E=26gt=3B =3CBR=3E=26gt=3B Check /etc/conf=2Ed/rc=26= nbsp=3Band in particular=3A=3CBR=3E=26gt=3B =3CBR=3E=26gt=3B =23 RC=5FNE= T=5FSTRICT=5FCHECKING allows some flexibility with the =27net=27 =3CBR=3E= =26gt=3B service=2E=23 The following values are allowed=3A=3CBR=3E=26gt=3B= =23 none - The =27net=27 service is always considered up=2E=3CBR=3E=26g= t=3B =23 no - This basically means that at least one net=2E* service =3C= BR=3E=26gt=3B besides net=2Elo=3CBR=3E=26gt=3B =23 must be up=2E This ca= n be used by notebook users that =3CBR=3E=26gt=3B have a wifi =3CBR=3E=26= gt=3B and=3CBR=3E=26gt=3B =23 a static nic=2C and only wants one up at a= ny given time =3CBR=3E=26gt=3B to have the=3CBR=3E=26gt=3B =23 =27net=27= service seen as up=2E=3CBR=3E=26gt=3B =23 lo - This is the same as the = =27no=27 option=2C but net=2Elo is =3CBR=3E=26gt=3B also counted=2E=3CBR= =3E=26gt=3B =23 This should be useful to people that do not care =3CBR=3E= =26gt=3B about any specific=3CBR=3E=26gt=3B =23 interface being up at bo= ot=2E=3CBR=3E=26gt=3B =23 yes - For this ALL network interfaces MUST be = up for the =3CBR=3E=26gt=3B =27net=27 service to=3CBR=3E=26gt=3B =23 be = considered up=2E=3CBR=3E=26gt=3B =3CBR=3E=26gt=3B RC=5FNET=5FSTRICT=5FCH= ECKING=3D=22no=22=3CBR=3E=26gt=3B =3CBR=3E=26gt=3B (or you can use =22lo= =22)=3CBR=3E=26gt=3B =3CBR=3E=26gt=3B =3CBR=3E=26gt=3B =26gt=3B Forth=2C= The problem=2E I=27m not sure how wpa=5Fsupplicant works or =3CBR=3E=26= gt=3B how it should=3CBR=3E=26gt=3B =26gt=3B work=2E The wpa=5Fsupplican= t man page gives a few examples on how =3CBR=3E=26gt=3B to run it=2C=3CB= R=3E=26gt=3B =26gt=3B but when I look at the process list it seems to be= run by =3CBR=3E=26gt=3B another program=3CBR=3E=26gt=3B =26gt=3B called= wpa=5Fcli=2E There=27s also a shell script in =3CBR=3E=26gt=3B /etc/wpa= /supplicant that=3CBR=3E=26gt=3B =26gt=3B looks like it can start or sto= p it with CONNECT or DISCONNECT=2E =3CBR=3E=26gt=3B 1) Do I=3CBR=3E=26gt= =3B =26gt=3B need to enter networks in wpa=5Fsupplicant=2Econf or does =3C= BR=3E=26gt=3B wpa=5Fsupplicant scan=3CBR=3E=26gt=3B =26gt=3B for network= s and connect to whatever=27s available=3F =3CBR=3E=26gt=3B =3CBR=3E=26g= t=3B The latter=2E=3CBR=3E=26gt=3B =3CBR=3E=26gt=3B You can however ente= r manually in =3CBR=3E=26gt=3B /etc/wpa=5Fsupplicant/wpa=5Fsupplicant=2E= conf =3CBR=3E=26gt=3B particular parameters (keys and what not) of known= networks to =3CBR=3E=26gt=3B which you =3CBR=3E=26gt=3B connect as a ma= tter of preference=2E=3CBR=3E=26gt=3B =3CBR=3E=26gt=3B =3CBR=3E=26gt=3B = =26gt=3B 2) If I have multiple=3CBR=3E=26gt=3B =26gt=3B networks availab= le how does wpa=5Fsupplicant choose which to =3CBR=3E=26gt=3B connect to= and=3CBR=3E=26gt=3B =26gt=3B can I specify which one I want=3F =3CBR=3E= =26gt=3B =3CBR=3E=26gt=3B It=27ll connect to=3A=3CBR=3E=26gt=3B =3CBR=3E= =26gt=3B a) Any network you have specified in your =3CBR=3E=26gt=3B /etc= /wpa=5Fsupplicant/wpa=5Fsupplicant=2Econf according to the =3CBR=3E=26gt= =3B preference you have =3CBR=3E=26gt=3B set up therein=2E=3CBR=3E=26gt=3B= =3CBR=3E=26gt=3B b) Any network it finds=2E=3CBR=3E=26gt=3B =3CBR=3E=26= gt=3B c) Any network you select with wpa=5Fcli=2C or select/enable/disab= le =3CBR=3E=26gt=3B in wpa=5Fgui=2E=3CBR=3E=26gt=3B =3CBR=3E=26gt=3B =3C= BR=3E=26gt=3B =26gt=3B 3) How should wpa=5Fsupplicant be started=2C=3CBR= =3E=26gt=3B =26gt=3B stopped and restarted=3F What should be used for th= is=3A =3CBR=3E=26gt=3B wpa=5Fsupplicant=2C=26gt=3B wpa=5Fcli=2C or wpa=5F= cli=2Esh=3F I don=27t see anything =3CBR=3E=26gt=3B in /etc/init=2Ed for= that=2C but=3CBR=3E=26gt=3B =26gt=3B it looks like netmount may be doin= g it=2E =3CBR=3E=26gt=3B =3CBR=3E=26gt=3B You need to define it in /etc/= conf=2Ed/net=3A=3CBR=3E=26gt=3B =3CBR=3E=26gt=3B modules=3D( =22wpa=5Fsu= pplicant=22 )=3CBR=3E=26gt=3B wpa=5Fsupplicant=5Fwlan0=3D=22-Dwext=22 =3C= BR=3E=26gt=3B =3CBR=3E=26gt=3B (adjust this according to the name of you= r wireless iface and driver)=2E=3CBR=3E=26gt=3B =3CBR=3E=26gt=3B =3CBR=3E= =26gt=3B =26gt=3B 4) The documentation doesn=27t say=3CBR=3E=26gt=3B =26= gt=3B to=2C but the way I got wireless working is by creating a link =3C= BR=3E=26gt=3B net=2Ewlan0 -=26gt=3B=3CBR=3E=26gt=3B =26gt=3B net=2Elo in= the /etc/init=2Ed directory=2E Is this correct=3F =3CBR=3E=26gt=3B =3CB= R=3E=26gt=3B It depends which documentation you are looking at=2E I am s= ure =3CBR=3E=26gt=3B that this is =3CBR=3E=26gt=3B explained in the gent= oo Handbook and associated documentation=2E=3CBR=3E=26gt=3B =3CBR=3E=26g= t=3B This is the link you need=3A=3CBR=3E=26gt=3B =3CBR=3E=26gt=3B lrwxr= wxrwx 1 root root 6 Dec 16 14=3A26 net=2Ewlan0 -=26gt=3B net=2Elo=3CBR=3E= =26gt=3B =3CBR=3E=26gt=3B but you should have also configured /etc/conf=2E= d/net with your =3CBR=3E=26gt=3B desired settings =3CBR=3E=26gt=3B or ju= st defaults will run=2E=3CBR=3E=26gt=3B =3CBR=3E=26gt=3B =3CBR=3E=26gt=3B= =26gt=3B I think that=27s why=3CBR=3E=26gt=3B =26gt=3B it=27s starting = automatically when I boot too=2C because I never =3CBR=3E=26gt=3B added = it with=3CBR=3E=26gt=3B =26gt=3B rc-update so netmount must be picking i= t up=2E =3CBR=3E=26gt=3B =3CBR=3E=26gt=3B =3CBR=3E=26gt=3B =26gt=3B 5) T= his is the most puzzling=3CBR=3E=26gt=3B =26gt=3B thing=2E When wpa=5Fsu= pplicant starts even though I get a inet =3CBR=3E=26gt=3B address I=3CBR= =3E=26gt=3B =26gt=3B can=27t always get to the internet=2E Why does the = panel applet =3CBR=3E=26gt=3B says I=27m=3CBR=3E=26gt=3B =26gt=3B connec= ted and ifconfig shows an inet address but firefox and =3CBR=3E=26gt=3B = ping can=27t=3CBR=3E=26gt=3B =26gt=3B reach a site like yahoo or google=3F= =3CBR=3E=26gt=3B =3CBR=3E=26gt=3B This could well be a dns server/repea= ter issue=2E=3CBR=3E=26gt=3B =3CBR=3E=26gt=3B If you can ping the IP add= ress of google=2C but not the domain =3CBR=3E=26gt=3B name of it=2C then= =3CBR=3E=26gt=3B the problem is that you do not have access to a DNS re= peater=2E =3CBR=3E=26gt=3B Look in your =3CBR=3E=26gt=3B /etc/resolve=2E= conf to see if there is a line saying=3A=3CBR=3E=26gt=3B =3CBR=3E=26gt=3B= nameserver XXX=2EXXX=2EXX=2EXX=3CBR=3E=26gt=3B =3CBR=3E=26gt=3B if it i= s absent then you have not connected to a namesever=2E =3CBR=3E=26gt=3B = This is a router =3CBR=3E=26gt=3B issue and it could be controlled by so= me authentication scheme=2E =3CBR=3E=26gt=3B A lot of =3CBR=3E=26gt=3B w= ireless services offered by coffee shops=2C libraries=2C etc=2E may =3CB= R=3E=26gt=3B give you an IP =3CBR=3E=26gt=3B address automatically=2C bu= t then require you use your browser to =3CBR=3E=26gt=3B register with =3C= BR=3E=26gt=3B their authentication server (using a passwd that they prov= ide =3CBR=3E=26gt=3B after you pay =3CBR=3E=26gt=3B them for the privile= ge)=2E=3CBR=3E=26gt=3B =3CBR=3E=26gt=3B Open access points with no encry= ption and no DNS authentication =3CBR=3E=26gt=3B requirements =3CBR=3E=26= gt=3B should allow you to connect seamlessly to the Internet=2E=3CBR=3E=26= gt=3B =3CBR=3E=26gt=3B =3CBR=3E=26gt=3B =26gt=3B 6) For networks where I= have a=3CBR=3E=26gt=3B =26gt=3B password=2C should that go in wpa=5Fsup= plicant=2Econf as plain text =3CBR=3E=26gt=3B or should it=3CBR=3E=26gt=3B= =26gt=3B be encrypted=3F=3CBR=3E=26gt=3B =3CBR=3E=26gt=3B This can be a= confusing endeavour because some routers will only =3CBR=3E=26gt=3B acc= ept =3CBR=3E=26gt=3B certain characters in a passphrase=2C so you could = be failing to =3CBR=3E=26gt=3B connect due to =3CBR=3E=26gt=3B the pecul= iarities of the router=2E The passphrase should be =3CBR=3E=26gt=3B ente= red as provided =3CBR=3E=26gt=3B by the router owner=2C then a hex key g= enerated with =3CBR=3E=26gt=3B wpa=5Fpassphrase (look at man =3CBR=3E=26= gt=3B wpa=5Fpassphrase)=2E Then enter the hex key in your =3CBR=3E=26gt=3B= wpa=5Fsupplicant=2Econf=2C or your =3CBR=3E=26gt=3B wpa=5Fgui=2E=3CBR=3E= =26gt=3B =3CBR=3E=26gt=3B HTH for now=2C ask more as you need it=2E=3CBR= =3E=26gt=3B -- =3CBR=3E=26gt=3B Regards=2C=3CBR=3E=26gt=3B Mick=3CBR=3E=26= gt=3B =3C/DIV=3E =3CDIV=3E=26nbsp=3B=3C/DIV=3E =3CDIV=3EI=27ll give this stuff a try=2E=26nbsp=3B I=27m sure I=27ll be = back=2E=26nbsp=3B Thanks=2E=3C/DIV=3E =3CDIV=3E=26nbsp=3B=3C/DIV=3E --Boundary_(ID_BvJYi8MfMEMVSpdrlfg7Yg)--