You are not logged in.
Original title: DNS resolution with netctl fails after resuming from sleep on a laptop
I'm having an issue resolving hostnames (e.g. bbs.archlinux.org) from my laptop.
/etc/netctl/myprofile
Description='my netctl profile'
Connection=wireless
Interface=wls1
IP=dhcp
DHCPClient=dhclient
Security=wpa
ESSID=MyEssid
Key=KeyForEssid
After starting that profile (sudo netctl start myprofile), a resolv.conf is generated. (I removed
the /etc/resolv.conf file before starting the profile, below is what it created)
/etc/resolv.conf
# Generated by resolvconf
nameserver 8.8.8.8
nameserver 8.8.4.4
Note that the nameservers are automatically set to `8.8.8.8` and `8.8.4.4` from my wireless router.
ping
I first pinged `8.8.8.8` which worked, and then pinged `bbs.archlinux.org` which failed.
host (from dnsutils package)
Following the Network Debugging page, I used the `host` tool which worked:
$ host bbs.archlinux.org 8.8.8.8
. . .
bbs.archlinux.org is an alias for alderaan.archlinux.org.
alderaan.archlinux.org has adderss 78.46.78.247
. . .
Which just left me scratching my head.
This problem arose when I used the "sleep" functionality on my laptop. I've never used it before and wanted
to see if it worked. When I woke it up a few hours later, it could no longer resolve hostnames. This was
three days ago. I'll be bringing it into my office tomorrow to rule out if it is my home network or not.
The only thing I removed from the netctl profile (/etc/netctl/myprofile) when debugging this was the
line `ForceConnect=yes` because the man page said I shouldn't be using that. Besides that, this netctl
configuration was working fine just a few days ago and still is, minus the fact that it does not resolve
hostnames.
Could there be some lingering configuration file or lock in place that the sleep functionality messed with?
I am able to connect to this wireless network on my Andriod phone, and on a wired desktop which is also
running Arch. They use the same DNS nameservers 8.8.8.8 and 8.8.4.4.
- - - -
Thanks for any nudges that can help me solve the issue. I thought I'd ask here before checking if a more
bloated network manager could solve this issue.
For some reason, this solved my problem:
Disconnect from wireless: sudo netctl stop-all
Connect to wired connection.
Enter this until it connects: ping 8.8.8.8
Then, ping www.google.com worked.
Remove wired connection, reconnect to wireless, and it works.
I don't know why this worked. I've tried several things over the weekend but didn't think to connect it to a wired connection.
I'll mark the thread as [SOLVED] tomorrow - I can't seem to edit the title of the post myself at this moment.
Last edited by tsenior (2014-05-07 11:20:10)
Offline
did it change the contents of resolv.conf?
Offline
did it change the contents of resolv.conf?
No it didn't. When I have time I'll try to see if I can reproduce the problem.
Offline