You are not logged in.

#1 2010-11-30 20:22:40

Hilariousity
Member
Registered: 2009-06-09
Posts: 20

Host Name Lookup Failure

Hello Folks,
I'm having all kinds of problems with my wireless connection on my toshiba laptop unless I set it up manually. My first problem concerns a script I used to use to setup my wireless that always worked on my other laptop but does not work on this laptop. Here is the script:

ifconfig wlan0 up
echo "these wireless networks have been found in your area"
#return networks within scan range
iwlist wlan0 scan | grep ESSID | sed -e "s/.*ESSID:\"\([^\"]*\).*/\1/"
echo -n "Which network would you like to connect too? "
read SSID
#associate with a wireless gateway then obtain an ip
iwconfig wlan0 essid $SSID
dhcpcd wlan0

In another thread on this forum I traced this problem back to a Host Name Lookup Failure. I have been lead to believe that this problem is often caused by there being no information in /etc/resolv.conf . I have tested this theory and have found it to be true. Before I setup my connection manually using ifconfig, iwconfig, and dhcpcd there is no relevant information in /etc/resolv.conf. After I setup my connection using dhcpcd the dns servers I am currently using appear in /etc/resolv.conf. Now if the resolv.conf file is the problem how do I fix it?  My original idea about how to fix this was to change the permissions of resolv.conf so that dhcpcd cannnot modify it everytime I setup the connection. However I don't think this will work because I roam around alot with my laptop and am constantly using different DNS servers. So I would like a more permanent solution

Problem two
In order to try to not have to setup my connection manually everytime I need to use a wireless connection I installed netcfg with wifi-select and setup a couple profiles in /etc/network.d and the first few times I tried to do this it worked. However now whenever I try to do this after I logon I get an error saying "radio is disabled on wlan0 " but I know this not to be true and I have no idea how to fix it? How do I solve this problem?

Offline

#2 2010-11-30 22:07:23

Texas
Member
From: Dallas, Texas
Registered: 2010-09-10
Posts: 131

Re: Host Name Lookup Failure

Hilariousity wrote:

I traced this problem back to a Host Name Lookup Failure.

I get this error on boot up as well, but everything works fine.  I also start wireless from a command line script.

Offline

#3 2010-12-02 04:14:27

pseudonomous
Member
Registered: 2008-04-23
Posts: 349

Re: Host Name Lookup Failure

As for part 1, if each step works when input manually I can think of maybe two things that might cause problems:

1) maybe wlan0 doesn't immediatly associate to the Wireless AP even though the command terminates (it may only send an "association request" to the driver), so maybe dhcpcd times out when trying to acquire a lease, because you aren't really associated yet.  You could add a "sleep 5" (or more seconds) as a hacky-workaround for this.

2) you script doesn't check if dhcpcd is already running on wlan0, "dhcpcd wlan0" will fail if dhcpcd is already running.

Offline

Board footer

Powered by FluxBB