DNS configuration changes after a while

You have a problem with Salix? Post here and we'll do what we can to help.
Post Reply
ZuLuuuuuu
Posts: 19
Joined: 23. Aug 2010, 15:40

DNS configuration changes after a while

Post 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).
User avatar
gapan
Salix Wizard
Posts: 6366
Joined: 6. Jun 2009, 17:40

Re: DNS configuration changes after a while

Post 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?
Image
Image
ZuLuuuuuu
Posts: 19
Joined: 23. Aug 2010, 15:40

Re: DNS configuration changes after a while

Post 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.
User avatar
gapan
Salix Wizard
Posts: 6366
Joined: 6. Jun 2009, 17:40

Re: DNS configuration changes after a while

Post by gapan »

Seems that you have set up your network to use dhcp for the nameservers.
Image
Image
Shador
Posts: 1295
Joined: 11. Jun 2009, 14:04
Location: Bavaria

Re: DNS configuration changes after a while

Post 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.
Image
ZuLuuuuuu
Posts: 19
Joined: 23. Aug 2010, 15:40

Re: DNS configuration changes after a while

Post 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?
ZuLuuuuuu
Posts: 19
Joined: 23. Aug 2010, 15:40

Re: DNS configuration changes after a while

Post 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.
Shador
Posts: 1295
Joined: 11. Jun 2009, 14:04
Location: Bavaria

Re: DNS configuration changes after a while

Post 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
Image
Post Reply