Page 1 of 1
DNS configuration changes after a while
Posted: 19. Aug 2011, 13:39
by ZuLuuuuuu
Hello,
I have a wireless connection whose DNS addresses I changed to use OpenDNS. But after using the internet for a while, I think it stops using those DNS addresses. I need to reconnect to the internet to continue using OpenDNS. I don't have this behavior on Windows or other distributions. What might be the problem?
Note: I checked "Use Static DNS" on connection properties and changed DNS 1 and DNS 2 entries to 208.67.222.222 and 208.67.220.220, respectively. Am I doing it right or should I do something else? (DNS 3 entry is empty).
Re: DNS configuration changes after a while
Posted: 20. Aug 2011, 13:42
by gapan
ZuLuuuuuu wrote:But after using the internet for a while, I think it stops using those DNS addresses.
What makes you
think that? What are the contents of /etc/resolv.conf?
Re: DNS configuration changes after a while
Posted: 21. Aug 2011, 23:30
by ZuLuuuuuu
gapan wrote:ZuLuuuuuu wrote:But after using the internet for a while, I think it stops using those DNS addresses.
What makes you
think that? What are the contents of /etc/resolv.conf?
OpenDNS has a page where you can test whether you are using it or not:
http://www.opendns.com/welcome
When I first connect to internet it welcomes me, but after a while, like less than 1 hour, it starts showing that I don't use OpenDNS.
I looked at the contents of resolv.conf. When I first connect to internet it is:
Code: Select all
nameserver 208.67.222.222
nameserver 208.67.220.220
But after a while it changes to:
Code: Select all
# Generated by dhcpcd from wlan0
# /etc/resolv.conf.head can replace this line
domain local
nameserver 192.168.2.1
# /etc/resolv.conf.tail can replace this line
Although I don't do anything.
Re: DNS configuration changes after a while
Posted: 21. Aug 2011, 23:33
by gapan
Seems that you have set up your network to use dhcp for the nameservers.
Re: DNS configuration changes after a while
Posted: 22. Aug 2011, 00:13
by Shador
I guess the lease acquired by dhcpcd expires and thus dhpcd requests a new one and also reconfigures the interfaces (e.g. updates resolve.conf with dhcp server data). IMO this behaviour of wicd is inappropriate. I a static DNS is specified it should never be overwritten by dhcp. Wicd could call dhcpcd with the -C resolve option, to prevent it from updating the resolve.conf.
Re: DNS configuration changes after a while
Posted: 22. Aug 2011, 07:45
by ZuLuuuuuu
gapan wrote:Seems that you have set up your network to use dhcp for the nameservers.
I am not much of a technical person, I don't know what dhcp is or does. How can I disable it?
Re: DNS configuration changes after a while
Posted: 22. Aug 2011, 07:49
by ZuLuuuuuu
Shador wrote:I guess the lease acquired by dhcpcd expires and thus dhpcd requests a new one and also reconfigures the interfaces (e.g. updates resolve.conf with dhcp server data). IMO this behaviour of wicd is inappropriate. I a static DNS is specified it should never be overwritten by dhcp. Wicd could call dhcpcd with the -C resolve option, to prevent it from updating the resolve.conf.
Ok I found a setting on "Wicd -> Preferences -> External Programs -> DHCP Client". I suppose I need to change it to "Automatic"? I didn't change it to dhcpcd in the first place, though, just to let you know. It probably came with dhcpcd selected.
Re: DNS configuration changes after a while
Posted: 22. Aug 2011, 15:01
by Shador
ZuLuuuuuu wrote:Shador wrote:I guess the lease acquired by dhcpcd expires and thus dhpcd requests a new one and also reconfigures the interfaces (e.g. updates resolve.conf with dhcp server data). IMO this behaviour of wicd is inappropriate. I a static DNS is specified it should never be overwritten by dhcp. Wicd could call dhcpcd with the -C resolve option, to prevent it from updating the resolve.conf.
Ok I found a setting on "Wicd -> Preferences -> External Programs -> DHCP Client". I suppose I need to change it to "Automatic"? I didn't change it to dhcpcd in the first place, though, just to let you know. It probably came with dhcpcd selected.
You don't need to change this setting. A fix could be for you to select a static address for your network in wicd thus preventing the use of dhcp alltogether.
Dhcp is a protocol for automatic interface configuration:
https://secure.wikimedia.org/wikipedia/en/wiki/Dhcp