1 |
On Sunday 24 April 2011 13:37:03 dhkuhl@×××××××××.net wrote: |
2 |
> I'm trying to get wireless working reliably on my laptop. I have followed |
3 |
> the documentation, but still have a lot of questions . . . especially |
4 |
> since it only seems to work sometimes. |
5 |
> |
6 |
> First, I'm using WPA Supplicant without the gui tools. |
7 |
|
8 |
run wpa_gui from a terminal and a lot of what you're asking below will become |
9 |
self-explanatory. |
10 |
|
11 |
|
12 |
> Second, I'm in NYC and there are a lot of networks I can use around town. |
13 |
> |
14 |
> Third, Is there a way I can control the services I use from the Grub menu? |
15 |
> Since the laptop has a wireless card and an RJ45 jack, I'd like to be able |
16 |
> boot and not use one or the other. Since I know if I'm not physically |
17 |
> connected to a network, there's really no reason to even try eth0. |
18 |
|
19 |
Check /etc/conf.d/rc and in particular: |
20 |
|
21 |
# RC_NET_STRICT_CHECKING allows some flexibility with the 'net' service. |
22 |
# The following values are allowed: |
23 |
# none - The 'net' service is always considered up. |
24 |
# no - This basically means that at least one net.* service besides net.lo |
25 |
# must be up. This can be used by notebook users that have a wifi |
26 |
and |
27 |
# a static nic, and only wants one up at any given time to have the |
28 |
# 'net' service seen as up. |
29 |
# lo - This is the same as the 'no' option, but net.lo is also counted. |
30 |
# This should be useful to people that do not care about any specific |
31 |
# interface being up at boot. |
32 |
# yes - For this ALL network interfaces MUST be up for the 'net' service to |
33 |
# be considered up. |
34 |
|
35 |
RC_NET_STRICT_CHECKING="no" |
36 |
|
37 |
(or you can use "lo") |
38 |
|
39 |
|
40 |
> Forth, The problem. I'm not sure how wpa_supplicant works or how it should |
41 |
> work. The wpa_supplicant man page gives a few examples on how to run it, |
42 |
> but when I look at the process list it seems to be run by another program |
43 |
> called wpa_cli. There's also a shell script in /etc/wpa/supplicant that |
44 |
> looks like it can start or stop it with CONNECT or DISCONNECT. 1) Do I |
45 |
> need to enter networks in wpa_supplicant.conf or does wpa_supplicant scan |
46 |
> for networks and connect to whatever's available? |
47 |
|
48 |
The latter. |
49 |
|
50 |
You can however enter manually in /etc/wpa_supplicant/wpa_supplicant.conf |
51 |
particular parameters (keys and what not) of known networks to which you |
52 |
connect as a matter of preference. |
53 |
|
54 |
|
55 |
> 2) If I have multiple |
56 |
> networks available how does wpa_supplicant choose which to connect to and |
57 |
> can I specify which one I want? |
58 |
|
59 |
It'll connect to: |
60 |
|
61 |
a) Any network you have specified in your |
62 |
/etc/wpa_supplicant/wpa_supplicant.conf according to the preference you have |
63 |
set up therein. |
64 |
|
65 |
b) Any network it finds. |
66 |
|
67 |
c) Any network you select with wpa_cli, or select/enable/disable in wpa_gui. |
68 |
|
69 |
|
70 |
> 3) How should wpa_supplicant be started, |
71 |
> stopped and restarted? What should be used for this: wpa_supplicant, |
72 |
> wpa_cli, or wpa_cli.sh? I don't see anything in /etc/init.d for that, but |
73 |
> it looks like netmount may be doing it. |
74 |
|
75 |
You need to define it in /etc/conf.d/net: |
76 |
|
77 |
modules=( "wpa_supplicant" ) |
78 |
wpa_supplicant_wlan0="-Dwext" |
79 |
|
80 |
(adjust this according to the name of your wireless iface and driver). |
81 |
|
82 |
|
83 |
> 4) The documentation doesn't say |
84 |
> to, but the way I got wireless working is by creating a link net.wlan0 -> |
85 |
> net.lo in the /etc/init.d directory. Is this correct? |
86 |
|
87 |
It depends which documentation you are looking at. I am sure that this is |
88 |
explained in the gentoo Handbook and associated documentation. |
89 |
|
90 |
This is the link you need: |
91 |
|
92 |
lrwxrwxrwx 1 root root 6 Dec 16 14:26 net.wlan0 -> net.lo |
93 |
|
94 |
but you should have also configured /etc/conf.d/net with your desired settings |
95 |
or just defaults will run. |
96 |
|
97 |
|
98 |
> I think that's why |
99 |
> it's starting automatically when I boot too, because I never added it with |
100 |
> rc-update so netmount must be picking it up. |
101 |
|
102 |
|
103 |
> 5) This is the most puzzling |
104 |
> thing. When wpa_supplicant starts even though I get a inet address I |
105 |
> can't always get to the internet. Why does the panel applet says I'm |
106 |
> connected and ifconfig shows an inet address but firefox and ping can't |
107 |
> reach a site like yahoo or google? |
108 |
|
109 |
This could well be a dns server/repeater issue. |
110 |
|
111 |
If you can ping the IP address of google, but not the domain name of it, then |
112 |
the problem is that you do not have access to a DNS repeater. Look in your |
113 |
/etc/resolve.conf to see if there is a line saying: |
114 |
|
115 |
nameserver XXX.XXX.XX.XX |
116 |
|
117 |
if it is absent then you have not connected to a namesever. This is a router |
118 |
issue and it could be controlled by some authentication scheme. A lot of |
119 |
wireless services offered by coffee shops, libraries, etc. may give you an IP |
120 |
address automatically, but then require you use your browser to register with |
121 |
their authentication server (using a passwd that they provide after you pay |
122 |
them for the privilege). |
123 |
|
124 |
Open access points with no encryption and no DNS authentication requirements |
125 |
should allow you to connect seamlessly to the Internet. |
126 |
|
127 |
|
128 |
> 6) For networks where I have a |
129 |
> password, should that go in wpa_supplicant.conf as plain text or should it |
130 |
> be encrypted? |
131 |
|
132 |
This can be a confusing endeavour because some routers will only accept |
133 |
certain characters in a passphrase, so you could be failing to connect due to |
134 |
the peculiarities of the router. The passphrase should be entered as provided |
135 |
by the router owner, then a hex key generated with wpa_passphrase (look at man |
136 |
wpa_passphrase). Then enter the hex key in your wpa_supplicant.conf, or your |
137 |
wpa_gui. |
138 |
|
139 |
HTH for now, ask more as you need it. |
140 |
-- |
141 |
Regards, |
142 |
Mick |