Wireless keeps asking for password and pops up when LAN (eth0) is available
This is a fresh install of Ubuntu 11.10 and I haven't put this on a laptop before, so this is new to me (wireless with the newer network manager).
It quickly found eth0 and configured. Sweet. I pulled it off and looked for the wireless network, which it found, and I connected to it. Also sweet. The problem appears to be that it wants to connect to the wireless now, even when I have eth0 available. On startup, it connects to eth0, then starts asking over and over again for the wireless password. Not sweet. How do I tell it to ignore wireless when eth0 is available or already connected? |
you can right click on network connection icon in top right side(if gnome)
select edit connections and then click wireles than select wireless listed than click edit if connect automatically is selected uncheck it. And will not try to connect automatically. |
Quote:
Is there no way for it to automatically detect some kind of priority like in windows? IE: If it's plugged in to eth0, use that. If eth0 becomes unavailable, /then/ try to connect to wlan0. If eth0 becomes re-available, disconnect from wlan0 and reconnect to eth0. I spend good portions of the day docking and undocking this laptop at work (going to meetings). When I'm at my desk, the higher speed lan is the way to go (lots of file transfers, svn, etc), but it'd be good to not have to mess with the network settings every time I get up for and sit down from a meeting that I bring my laptop to. Windows did this automatically, so it's obvious the capability can exist, but does it exist in linux? |
I think you missed the point.
If you have your wireless network to not automatically connect to a certain network, it is always available to connect to. If the password is already saved, when you want to connect to it then scroll down network listings & connect. The available networks notification also has a box that says, "do not ask again" |
Quote:
I can set it to not connect automatically. That's all well and good. But what I was hoping to avoid is the results of that ... going in and re-selecting the network I want to be on each time I switch positions. For example: Let's say I set it up to connect automatically to eth0 and not automatically to this particular wireless lan. I start out at my desk. All is well. I leave my desk, and the laptop detects (after some delay) that eth0 is disconnected, so it shows no connection. To connect to my wireless network, I have to go select it from the network manager. I now go and sit back at my desk. eth0 reconnects, but the wireless network is also still attached. I have to tell it explicitly to disconnect. While /both/ are connected, I do not know, and probably have no control over, which network my data is being sent through or requested from when obviously I want to use just the wired network (faster / more stable / more secure). So while I realize the network is "still there" and I can still connect to and disconnect from it, I'd rather not have to make changes to my network settings (even simply connecting and disconnecting by hand) the 5 to 8 times a day I'd have to do it ... each time having to do it twice, once when I leave my desk and once when I return. Especially since any time I might /forget/ to make that wireless connection, even though it's available, it would "fail silently", and I simply wouldn't be receiving my messages or e-mails, some of which are time sensitive. So I'm asking if there's some kind of automatic network switching with priorities that can be set up. Windows does this, though it's not configurable (that I'm aware of) by simply preferring wired over wireless. |
And just to be clear, I don't know that this is a big deal, that's why I was asking.
I can leave both to "connect automatically", and I get mostly the right behavior, except that both networks are fully connected any time I'm docked. |
"except that both networks are fully connected any time I'm docked."
.. and that's a problem? |
Quote:
I don't know how to check whether it's using eth0 or wlan0 for its communication. Using wireless when eth0 is available would be way sub-optimal, so if it semi-randomly bounces between them, that'd not be good. If I'm doing stateless transactions over the network that use information from the originator as a kind of client key, it could break that as well. I don't know what the behavior of having a second network connected looks like, in short. If it /isn't/ an issue, then ... well ... I guess that's that. :) |
Each connection is keyed to the source IP/port and Destination IP/port and so will not vary within that connection. What will happen is that two different connections, say to a smtp server may go through two routes (each on only one route). Mas nix... It doesn't really make a difference how it is delivered to the programs/servers so long as the IP/port setup works as it should. That's what TCP/IP does and it is transparent to the programs. I'm dual hosted here (IPv6/v4) and different servers switch back and forth all the time depending on the hosts/clients. No problem.
|
And, the kernel's routing procedure should select the fastest route to so the best (fastest) connection will be preferred.
|
Quote:
Thanks for the info. Wasn't sure what the best way to set all this up was and it wasn't behaving the way it "seemed to me" like it should have :). |
Proper configuration or some kind of workaround
Hi there!
I myself hardly use network manager at all, so I can't tell if such a feature exists. But from a network administrators view, there are still some options: You could set the metrics for your wireless higher than that of your ethernet device, if this is not standard already. To get that info, you can simply run Code:
route -n Your routing table is the key to tell where your traffic goes. It first checks for all entries that match your target network and then simply chooses the entry with the longest subnet mask. If two of them are equal, the kernel will check which one of them has better metrics and chooses that one. All the time. If you want to double check, you can run Code:
sudo tcpdump -i eth0 You could of cause use scripting too. Just run a script that checks if eth0 is available and disable wlan0 in that case: Code:
#!/bin/bash Okay, I guess testing my script took too long, but anyway, now that it is done, I want to share it anyway. Maybe some day some one stumbles across is and likes it. Regards, Heraton |
Very cool, Heraton.
As you suspected, the metrics for my wireless device are higher than my eth0 device. I actually have 4 entries in this case, but the others are equally partitioned out (metris of 0 [genmask and destination 0.0.0.0 on eth0], 1 [main eth0], 1000, and 2 [wlan0] for the different destination tables). |
All times are GMT -5. The time now is 01:01 AM. |