Find the answer to your Linux question:
Results 1 to 8 of 8
Hi, Most of the time I rebooting, my resolv.conf is getting updated by resolvconf program, so the network connection cannot be reached. I followed this : Debian User Forums • ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie imranka's Avatar
    Join Date
    Dec 2007
    Location
    Kolkata
    Posts
    181

    DNS resetting after each reboot - Debian Lenny


    Hi,

    Most of the time I rebooting, my resolv.conf is getting updated by resolvconf program, so the network connection cannot be reached.

    I followed this :

    Debian User Forums • View topic - Solving DNS problem (dhclient & resolv.conf)

    but the problem still persist.

    Can any body help?
    Imran
    Linux User #467555 | Debian Squeeze | Intel(R) Core(TM)2 Duo CPU 4500 @ 2.20GHz | Gigabyte GA-G41MT-ES2L
    | 2 GB RAM | 320 GB SATA | Kernel: 2.6.32-5-686

  2. #2
    Linux Engineer Segfault's Avatar
    Join Date
    Jun 2008
    Location
    Acadiana
    Posts
    878
    IMO man pages are much better source of information than somebody's hack

    dhclient(8) - Linux man page
    dhclient.conf(5): DHCP client config file - Linux man page

    That said, I do not use DHCP with desktop computers. Static configuration is better, you can access computers by IP addresses and one less program is running.

  3. #3
    Linux Newbie imranka's Avatar
    Join Date
    Dec 2007
    Location
    Kolkata
    Posts
    181
    Hi Segfault,

    Thanks for your reply.

    I have also manually configured my network without dhcp, but don't know how this dhcp service is running at boot time and resetting the resolv.conf file. I followed your second link, and saw,
    Code:
     do-forward-updates  false
    will stop the dhcp service from updating the dns, if I am not wrong. But still the same problem is occurring.

    Can you kindly elaborate on:

    1. How I can stop the dhcp service from running

    or

    2. Even if it runs, how I can stop it from interfaring with the dns setting

    option 2 will be better for me
    Imran
    Linux User #467555 | Debian Squeeze | Intel(R) Core(TM)2 Duo CPU 4500 @ 2.20GHz | Gigabyte GA-G41MT-ES2L
    | 2 GB RAM | 320 GB SATA | Kernel: 2.6.32-5-686

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Engineer Segfault's Avatar
    Join Date
    Jun 2008
    Location
    Acadiana
    Posts
    878
    Code:
    sudo vi /etc/network/interfaces
    You will see something like

    Code:
    iface eth0 inet dhcp
    replace it with static configuration, using 192.168.1.10 as an example

    Code:
    iface eth0 inet static
    address 192.168.1.10
    netmask 255.255.255.0
    network 192.168.1.0
    broadcast 192.168.1.255
    gateway 192.168.1.254
    I'm sure all this information can be seen with man interfaces in your Debian box.

  6. #5
    Linux Engineer Segfault's Avatar
    Join Date
    Jun 2008
    Location
    Acadiana
    Posts
    878
    Debian has excellent documentation, when I was running Debian I never felt the need to ask for help, everything is just here!

  7. #6
    Linux Newbie imranka's Avatar
    Join Date
    Dec 2007
    Location
    Kolkata
    Posts
    181
    Thanks once again. My /etc/network/interface file shows:

    Code:
    # The loopback network interface
    auto lo
    iface lo inet loopback
    address 127.0.0.1
    netmask 255.0.0.0
    
    # The primary network interface
    allow-hotplug eth0
    iface eth0 inet static
    	address 192.168.1.2
    	netmask 255.255.255.0
    	network 192.168.1.0
    	broadcast 192.168.1.255
    	gateway 192.168.1.1
    	# dns-* options are implemented by the resolvconf package, if installed
    	dns-nameservers 192.168.1.1
    And I see, not everytime the resolv.conf is getting reset, but it is happening sometime.
    Imran
    Linux User #467555 | Debian Squeeze | Intel(R) Core(TM)2 Duo CPU 4500 @ 2.20GHz | Gigabyte GA-G41MT-ES2L
    | 2 GB RAM | 320 GB SATA | Kernel: 2.6.32-5-686

  8. #7
    Just Joined! jdkaye's Avatar
    Join Date
    Aug 2010
    Location
    Gorizia, Italy
    Posts
    65
    Hi Imranka,
    I had a similar problem which was that my ISP imposed its own dns server on me which I don't like. I am using dhclient (version 3) and it's conf file is in /etc/dhcp3/dhclient.conf
    I am using a wlan0 (wireless) interface and so I put this in my dhclient.conf file
    Code:
    interface "wlan0" {
        prepend domain-name-servers 169.237.32.1,64.127.100.11;
    }
    The "prepend domain-name-servers" command insures that I use the domain name servers that I want and not the ones the ISP tries to impose. You can adapt this solution to your Debian version which may be running an earlier version of dhclient. In that case the conf file would be in /etc/dhcp instead of /etc/dhcp3
    Cheers,
    jdk

  9. #8
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    Location
    the hills
    Posts
    1,134
    The generation of the resolv.conf file (actually stored at
    /var/run/resolvconf/resolv.conf , to which /etc/resolv.conf is
    to be symlinked) can be controlled by the admin by editing
    /etc/resolvconf/update.d/libc . Different strategies can be
    implemented: e.g., one possible strategy would be to put only the most
    recently provided information into resolv.conf . The current default
    strategy is to put *all* available resolver information into
    resolv.conf, ordered by interface type as follows: lo, eth*, ppp* .
    This strategy will need to be refined, I know, but it works for me
    in its current form.

    The admin can of course disable resolv.conf automagic by deleting the
    /etc/resolv.conf symlink and putting a static file at that location.
    Resolvconf -- a package to manage /etc/resolv.conf

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •