Wifi help please -- switching networks; Yast vs. hosts file
Hey All,
Intro:
HP Laptop w/ Netgear wg511T pcmcia wireless card
Suse 9.2 Pro
Wireless is up and running fine. However, two problems have been bugging me.
1) I generally use my computer at home. Sometimes I need to use it on the road and hook up to a public wifi hotspot. Getting my card a DHCP address from any public spot has been a real pain in the butt. I've tried using Kwifimanager but it doesn't seem to do the trick.
Here's some background:
I set up the card using Yast. Took 2 minutes. All default settings except the ESSID and the ASCII password. Everything worked.
When I go to a public wifi, I try to scan the network using
iwlist ath0 scan
I can see some stuff. So I enter the new ESSID and mode and key and whatever else comes up on the scan like so
iwconfig ath0 essid "someNetworkName"
iwconfig ath0 mode Managed
iwconfig ath0 key off
then I make sure the ath0 interface is up:
ifup ath0
then if i don't see an IP, I run
dhcpcd -t 10 -d ath0
and usually I get a long wait and then
"no IP address yet... backgrounding"
tried ifdown eth0 to knock down my wired nic, no luck
it never can get a DHCP address. it can see the AP and get the mac address, but no IP.
The one time I did get it to work, I changed my settings in Yast for ESSID and authentication. I committed the changes in Yast, no luck. I rebooted the machine and YES, an IP address.
What am I missing here? What might have happened on the reboot that I wasn't doing before?
FYI, the pcmcia card is set to 'hotplugged'
the wired nic is set to 'ifplugd"
2) Whenever I run Yast and change anything on my network cards, Yast decides to overwrite my /etc/hosts file with some old version of my hosts file. I have a bunch of apache host info there so every time Yast does this I have to copy back my backup version of the hosts file to get my virtual hosts up again. Does anyone know how I can keep Yast from overwriting my hosts file every time it does any network operations?
I'd love to be able to do all this stuff w/o Yast as I see Yast as a blessing and a curse. It seems helpful sometimes, but more often than not it's doing stuff I don't know about and can't figure out how to keep it from changing things I don't want changed.
Any help is much appreciated.
-Russell
|