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 <gentoo-user+bounces-128852-garchives=archives.gentoo.org@lists.gentoo.org>) id 1R80UV-0007LV-C7 for garchives@archives.gentoo.org; Mon, 26 Sep 2011 02:00:20 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 219AF21C2A6; Mon, 26 Sep 2011 01:59:56 +0000 (UTC) Received: from svr-us4.tirtonadi.com (unknown [69.65.43.212]) by pigeon.gentoo.org (Postfix) with ESMTP id 357B821C0F3 for <gentoo-user@lists.gentoo.org>; Mon, 26 Sep 2011 01:58:10 +0000 (UTC) Received: from mail-fx0-f53.google.com ([209.85.161.53]) by svr-us4.tirtonadi.com with esmtpsa (TLSv1:RC4-SHA:128) (Exim 4.69) (envelope-from <pandu@poluan.info>) id 1R80SP-003Jhq-Q8 for gentoo-user@lists.gentoo.org; Mon, 26 Sep 2011 08:58:10 +0700 Received: by fxh2 with SMTP id 2so6165331fxh.40 for <gentoo-user@lists.gentoo.org>; Sun, 25 Sep 2011 18:58:05 -0700 (PDT) Precedence: bulk List-Post: <mailto:gentoo-user@lists.gentoo.org> List-Help: <mailto:gentoo-user+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-user+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-user+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-user.gentoo.org> X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Received: by 10.223.17.219 with SMTP id t27mr9524892faa.123.1317002285437; Sun, 25 Sep 2011 18:58:05 -0700 (PDT) Received: by 10.223.97.70 with HTTP; Sun, 25 Sep 2011 18:58:05 -0700 (PDT) Received: by 10.223.97.70 with HTTP; Sun, 25 Sep 2011 18:58:05 -0700 (PDT) In-Reply-To: <CAA2qdGV5H5JOk9ii4sPaNCe=mNUDi1izqHYTFyZ2GsD2Q7jczw@mail.gmail.com> References: <CAA2qdGV5H5JOk9ii4sPaNCe=mNUDi1izqHYTFyZ2GsD2Q7jczw@mail.gmail.com> Date: Mon, 26 Sep 2011 08:58:05 +0700 Message-ID: <CAA2qdGUM1CkrpvifJ9rgPnOu4zO80Paj_+tCHW=uwTMcP2ORXw@mail.gmail.com> Subject: Re: [gentoo-user] WPA2 connection configuration? From: Pandu Poluan <pandu@poluan.info> To: gentoo-user@lists.gentoo.org Content-Type: multipart/alternative; boundary=001517440f6664531604adce7db4 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - svr-us4.tirtonadi.com X-AntiAbuse: Original Domain - lists.gentoo.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - poluan.info X-Archives-Salt: X-Archives-Hash: ec7f2a199cbf5abe62b76e5601d9205a --001517440f6664531604adce7db4 Content-Type: text/plain; charset=UTF-8 On Sep 26, 2011 6:37 AM, "Mark Knecht" <markknecht@gmail.com> wrote: > > On Sun, Sep 25, 2011 at 1:59 PM, Florian Philipp <lists@binarywings.net> wrote: > > Am 25.09.2011 22:38, schrieb Mark Knecht: > >> Hi, > >> Can anyone supply an example of correctly setting up wpa_supplicant > >> to connect to a WEP2 home network? > >> > >> If got the modules installed and the hardware telling me it sees > >> all sorts of ESSIDs but so far I cannot figure out how to give it the > >> password correctly. I've been trying to follow this page but it > >> completely eludes me. > >> > >> http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&chap=4 > >> > >> Thanks in advance, > >> Mark > >> > > > > This should be sufficient: > > network={ > > ssid="network_ssid" > > key_mgmt=WPA-PSK > > psk="password" > > } > > > > Hope this helps, > > Florian Philipp > > Thanks Florian. I really appreciate the help. It was enough to get > things working after I realized I have a mind block about routes. This > email is coming to you over wireless so things are alright now, but I > have some confusion about switching between networks: > > Looking here: > > slinky ~ # cat /etc/conf.d/net > config_eth0="192.168.1.55 netmask 255.255.255.0" > routes_eth0="default via 192.168.1.1" > > modules="wpa_supplicant" > > config_wlan0="192.168.1.100 netmask 255.255.255.0" > routes_wlan0="default via 192.168.1.1" > > slinky ~ # > > I specified routes for both eth0 and wlan0 thinking Gentoo would use > the one thats up, but it doesn't. It seems that even when I shut off > eth0 it still tries to use the eth0 route. To get his working I had to > comment out the eth0 route completely. > I suggest using the postup() and predown() facilities instead: http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&chap=5 In postup(), create the default route e.g. ip route add default via $DG_IP dev $IFACE metric $METRIC In predown(), delete the default route. Same command, but 'delete' instead of 'add'. Note: metric comes into play only when eth0 and wlan0 are up simultaneously; the lowest metric wins. > So, is there a way to point the default to 192.168.1.1 and have the > network use the one interface that's up? > Well, the default gateway on eth0 and wlan0 has the same IP. I'm not sure iproute2 can stomach that. > Also, is there a way to have the system use wireless anytime he wired > connector isn't hooked up, of do I manually have to switch to root and > then do > > /etc/init.d/net.eth0 stop > /etc/init.d/net.wlan start > > to switch over? > ifplugd or netplug. Rgds, --001517440f6664531604adce7db4 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <p><br> On Sep 26, 2011 6:37 AM, "Mark Knecht" <<a href=3D"mailto:mark= knecht@gmail.com">markknecht@gmail.com</a>> wrote:<br> ><br> > On Sun, Sep 25, 2011 at 1:59 PM, Florian Philipp <<a href=3D"mailto= :lists@binarywings.net">lists@binarywings.net</a>> wrote:<br> > > Am 25.09.2011 22:38, schrieb Mark Knecht:<br> > >> Hi,<br> > >> =C2=A0 =C2=A0Can anyone supply an example of correctly settin= g up wpa_supplicant<br> > >> to connect to a WEP2 home network?<br> > >><br> > >> =C2=A0 =C2=A0If got the modules installed and the hardware te= lling me it sees<br> > >> all sorts of ESSIDs but so far I cannot figure out how to giv= e it the<br> > >> password correctly. I've been trying to follow this page = but it<br> > >> completely eludes me.<br> > >><br> > >> <a href=3D"http://www.gentoo.org/doc/en/handbook/handbook-x86= .xml?part=3D4&chap=3D4">http://www.gentoo.org/doc/en/handbook/handbook-= x86.xml?part=3D4&chap=3D4</a><br> > >><br> > >> Thanks in advance,<br> > >> Mark<br> > >><br> > ><br> > > This should be sufficient:<br> > > network=3D{<br> > > =C2=A0 =C2=A0 =C2=A0 =C2=A0ssid=3D"network_ssid"<br> > > =C2=A0 =C2=A0 =C2=A0 =C2=A0key_mgmt=3DWPA-PSK<br> > > =C2=A0 =C2=A0 =C2=A0 =C2=A0psk=3D"password"<br> > > }<br> > ><br> > > Hope this helps,<br> > > Florian Philipp<br> ><br> > Thanks Florian. I really appreciate the help. It was enough to get<br> > things working after I realized I have a mind block about routes. This= <br> > email is coming to you over wireless so things are alright now, but I<= br> > have some confusion about switching between networks:<br> ><br> > Looking here:<br> ><br> > slinky ~ # cat /etc/conf.d/net<br> > config_eth0=3D"192.168.1.55 netmask 255.255.255.0"<br> > routes_eth0=3D"default via 192.168.1.1"<br> ><br> > modules=3D"wpa_supplicant"<br> ><br> > config_wlan0=3D"192.168.1.100 netmask 255.255.255.0"<br> > routes_wlan0=3D"default via 192.168.1.1"<br> ><br> > slinky ~ #<br> ><br> > I specified routes for both eth0 and wlan0 thinking Gentoo would use<b= r> > the one thats up, but it doesn't. It seems that even when I shut o= ff<br> > eth0 it still tries to use the eth0 route. To get his working I had to= <br> > comment out the eth0 route completely.<br> ></p> <p>I suggest using the postup() and predown() facilities instead:</p> <p><a href=3D"http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part= =3D4&chap=3D5">http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?p= art=3D4&chap=3D5</a></p> <p>In postup(), create the default route e.g. ip route add default via $DG_= IP dev $IFACE metric $METRIC</p> <p>In predown(), delete the default route. Same command, but 'delete= 9; instead of 'add'.</p> <p>Note: metric comes into play only when eth0 and wlan0 are up simultaneou= sly; the lowest metric wins.</p> <p>> So, is there a way to point the default to 192.168.1.1 and have the= <br> > network use the one interface that's up?<br> ></p> <p>Well, the default gateway on eth0 and wlan0 has the same IP. I'm not= sure iproute2 can stomach that.</p> <p>> Also, is there a way to have the system use wireless anytime he wir= ed<br> > connector isn't hooked up, of do I manually have to switch to root= and<br> > then do<br> ><br> > /etc/init.d/net.eth0 stop<br> > /etc/init.d/net.wlan start<br> ><br> > to switch over?<br> ></p> <p>ifplugd or netplug.</p> <p>Rgds,<br> </p> --001517440f6664531604adce7db4--