kanotix.com

Networking - setting dns

pampelmoose - 02.06.2006, 00:34 Uhr
Titel: setting dns
Is there a way to set the dns server (in /etc/resolv.conf) manually, while still using DHCP? When I use "netcardconfig", if the "use DHCP" option is selected, then the DNS address is received automatically from the DHCP server.

My problem is a slight quirk in my router : for some reason it gives the router's own address as the DNS address (even though I have inputted my ISP's DNS address in the router's settings). As a result, sometimes I am unable to resolve website addresses. So when I boot up, DHCP on my computer gets the DNS address from the router, and it's not my ISP's DNS address.

In Windows, it is possible to set a specific DNS address, while stlll using DHCP. Is the same sort of thing possible in Linux?

Of course I can change the "/etc/resolv.conf" file manually. But that gets re-written every time I boot up. And "netcardconfig" does not seem to have a "manual override" option for the DNS adress, when using DHCP.
Gowator - 02.06.2006, 14:25 Uhr
Titel: RE: setting dns
I have to admit finding this a pain myself. In the end I just set the IP and gw manually

However in /etc/dhcp3/dhclient.conf you can edit the
request line to not ask or assign DNS server info

Code:
request subnet-mask, broadcast-address, time-offset, routers,
        domain-name, domain-name-servers, host-name,


and secondly under the lease directives is an option
option domain-name-servers 127.0.0.1;

where you can add your ISP's DNS server...
wannek - 02.06.2006, 16:33 Uhr
Titel: RE: setting dns
@pampelmoose
Well, i wonder, why You think, the router's behaviour is wrong?
Your computer should connect to the web *through* the router and *not* connect directly, right? So the router's address for DNS in Your computer is correct. If the router is not able to find website-addresses, the router is broken somehow.
pampelmoose - 02.06.2006, 22:27 Uhr
Titel: RE: setting dns
Thanks for the tip, Gowator. [Actually, I just used static address setting, and that seems to work.]

And you certainly are right, Wannek, this definitely is a problem with the router.
Gowator - 03.06.2006, 12:40 Uhr
Titel: Re: RE: setting dns
wannek hat folgendes geschrieben::
@pampelmoose
Well, i wonder, why You think, the router's behaviour is wrong?
Your computer should connect to the web *through* the router and *not* connect directly, right? So the router's address for DNS in Your computer is correct. If the router is not able to find website-addresses, the router is broken somehow.

Not really the router might be set to export the DNS via DHCP .. this is down to the DHCP server settings on the router.

So the router itself might be able to resolve the DNS but its not forwarding the information to its dhcp clients.
Alle Zeiten sind GMT + 1 Stunde
PNphpBB2 © 2003-2007