Setting DNS server in Linux

Hello everyone,

recently I replaced my DSL modem with a router. After replacement I noticed, that my Internet connection (Firefox/Thunderbird) became very slowly - I needed more than 10 seconds to open a page. Firefox was showing "Looking up " message all the time.

My first idea was to check the DNS server. In the /etc/resolv.conf file I could see that my router is acting as DNS server:

I checked options to replace that address with the the DNS servers of my provider (Hansenet/Alice, Germany) and found following solution:
1) copy file /etc/dhcp3/dhclient.conf into dhclient.conf.original - to make a backup copy of the file;
2) open dhclient.conf with any editor and make following changes:

* uncomment line "prepend domain-name-servers..." and enter there - comma-separated - IP adresses of the desired DNS servers;
* in the line "request subnet-mask,broadcast-address..." remove part "domain-name-servers" - in this way you prevent DHC client from retrieving the DNS name from the router.

After restarting the networking (/etc/init.d/networking restart) and bringing up your interface you must get you Internet connection at normal speed.

Any comments are welcome!


P.S. Important to notice, that I DO NOT use resolvconf-package.