config dns server
hello, I'm using debian 5 and I'm trying to configure the dns server for my machine.
I've already set static IP for my machine then tried to set up the dns server. But either i tried by GUI or by command-line all the ips of dns server disappeared each time i reboot the system can anybody tell me how to fix the dns server for my machine using command-line? I tried with the file /etc/resolv.conf but it just works before i reboot. after that, everthing is removed! |
Quote:
Add the line: Code:
prepend domain-name-servers dns-server1,dns-server2; cheers, jdk |
thanks, but if dhcp is not used, I set static IP instead. It doesn't seem to work =.=
|
guys,
why in some debian machines, the dns server is set static, which will not change each time I reboot the machine. the /etc/resolve.conf has nothing but the nameserver defined but in my debian machine, dns servers are lost each time of rebooting. i notice there's comment like "DON'T EDIT THIS FILE BY HAND... WILL BE OVERWRITTEN" in /etc/resolve.conf => is it something like dns setting is still automatic, not manual? what's fucked up with my machine? I'm fed up with having to re-configure the dns server each time turn on the machine in order to have internet connection. Give me hands, plz!!! thanks! |
Sounds like you are still running dhcp.
Please post the contents of /etc/network/interfaces |
Quote:
Quote:
|
I know that dhclient-script overwrites resolv.conf each time that it is run. Thought maybe you still had a dhcp statement in your "interfaces" file.
My "interfaces" file is essentially the same as yours except that "auto eth0" comes before the static configuration statements. I don't know if that makes a difference. Code:
# This file describes the network interfaces available on your system |
I don't think you need both auto eth0 and allow-hot-plug eth0 that's redundant imho..
Other than that, nothing jumps out at me.. I commented out allow-hotplug eth0 and replaced it with auto eth0 so without question the interface always comes up. I would use allow-hotplug if I had a PCMCIA or USB network interface that may or may not be present. I can't say that is what is causing your issue though, since it does appear to be configured as a static IP Quote:
|
awww, i comment out both allow-hot-plug and auto eth0 yet another auto eth0 appears right when I restart the network... thing still doesn't work =.=
|
appears ? you mean the interfaces file is being altered automatically ?
is network-manager installed ? if so rip out that piece of junk.. it's probably fighting you, and making changes willy nilly to your network configs. aptitude purge network-manager then see what happens. |
I thought this problem (random DHCP client problems) was solved years ago, but maybe its making a comeback? It used to be (by used to be I'm talking about Debian Woody and Sarge, v3.0 and v3.1) that if you ever used DHCP to get addresses, DHCP client would still run, even after you set the machine to use static addresses. You have at least a DHCP client installed to have received a DHCP address. Try removing that with apt-get/aptitude/dpkg or whatever you use to install/uninstall packages. I believe the current DHCP client package is dhcp3-client, which is what I'm suggesting you remove. See what you have installed with the command:
Code:
dpkg --list |grep dhcp JimBass |
All times are GMT -5. The time now is 02:30 AM. |