Autor |
Nachricht |
|
Titel: setting dns
Verfasst am: 02.06.2006, 00:34 Uhr
|
|
Anmeldung: 18. Jun 2005
Beiträge: 13
Wohnort: Toronto, Ontario, Canada
|
|
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. |
|
|
|
|
 |
|
Titel: RE: setting dns
Verfasst am: 02.06.2006, 14:25 Uhr
|
|
Anmeldung: 12. Mar 2004
Beiträge: 275
Wohnort: Paris-France
|
|
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... |
|
|
|
|
 |
|
Titel: RE: setting dns
Verfasst am: 02.06.2006, 16:33 Uhr
|
|
Anmeldung: 06. Jul 2004
Beiträge: 124
|
|
@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. |
|
|
|
|
 |
|
Titel: RE: setting dns
Verfasst am: 02.06.2006, 22:27 Uhr
|
|
Anmeldung: 18. Jun 2005
Beiträge: 13
Wohnort: Toronto, Ontario, Canada
|
|
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. |
|
|
|
|
 |
|
Titel: Re: RE: setting dns
Verfasst am: 03.06.2006, 12:40 Uhr
|
|
Anmeldung: 12. Mar 2004
Beiträge: 275
Wohnort: Paris-France
|
|
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. |
|
|
|
|
 |
|