Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.raspberry-pi > #9515

Re: resolv.conf problem

From David <wibble@btintenet.com>
Newsgroups comp.sys.raspberry-pi
Subject Re: resolv.conf problem
Date 2015-08-29 18:33 +0000
Message-ID <d4ec7rFsgo1U29@mid.individual.net> (permalink)
References <ujZo2ABWt01VFwhY@ku.gro.lloiff> <d3p1vmFk0ffU12@mid.individual.net> <402dDfRr831VFwzp@ku.gro.lloiff>

Show all headers | View raw


On Fri, 21 Aug 2015 20:42:35 +0100, Adrian wrote:

> In message <d3p1vmFk0ffU12@mid.individual.net>, ray carter
> <ray@zianet.com> writes
>>On Fri, 21 Aug 2015 17:01:26 +0100, Adrian wrote:
>>
>>> I'm having "fun" with a Pi 2 when it is using WiFi rather than
>>> Ethernet.
>>>
>>>
>>> On Ethernet, it appears to boot up, and pick up the time server OK,
>>> but on WiFi, it doesn't.  Doing some digging around on line, the
>>> suggestions seem to centre on making sure that the /etc/resolv.conf
>>> file has name servers in it.
>>>
>>> I've edited the file to put in a number of entries (cut and paste from
>>> a Pi B+), and the Pi 2 picks up the time server, and away we go.  As
>>> soon as I reboot, we are back to the same problem.  It seems that
>>> either the shutdown or the boot operation empties the file and puts :
>>>
>>> # Generated by resolvconf
>>>
>>> in the file instead, which is starting to get annoying.
>>>
>>> Strangely, the Pi 2 has a /etc/resolv.conf and a /etc/resolvconf.conf
>>> file, whereas the B+ only has the former.  Should I get rid of the
>>> latter file ?
>>>
>>> Both machines are running raspbian.
>>>
>>> Adrian
>>
>>Does this help:
>>
>>http://unix.stackexchange.com/questions/216774/keep-losing-resolv-conf-
>>configurations
> 
> Thanks, sort of.
> 
> ps -A | grep -i dhc
> 
> gives me different answers on different machines.  The Pi B+ (which is
> OK and on Ethernet) gives dhclient, whereas the Pi 2 (WiFi, not OK), has
> dhcpcd.
> 
> The /etc/resolv.conf file is a real file, not a link to another file.
> 
> The article refers to  /etc/resolvconf/resolv.conf.d/head and
> /etc/resolvconf/resolv.conf.d/tail.  I don't have either of those files.
> 
> Adrian

Noted that you have already solved the problem.

The article seems to give two routes:

"With resolvconf, if you want entries to be present only when a particular 
interface is active, add a dns-nameservers line to the corresponding 
stanza in /etc/network/interfaces."

Which is what I think you have done.

"With resolvconf, if you want entries to be present all the time, add them 
to /etc/resolvconf/resolv.conf.d/head or /etc/resolvconf/resolv.conf.d/
tail, depending on whether you want them to be first or last."

I note that these files are not present.
I think that all you need to do is create one or the other and they will 
be picked up.

I still don't quite understand why, if you are connecting to the same 
local router using either Ethernet or WiFi and using the router as your 
DHCP server in both cases, why you are not being given the same DNS Server 
configuration.

If it was a lack of name servers then you wouldn't be able to resolve 
anything - there should be nothing special about resolving the name of a 
time server as opposed to a web site or mail server.

It might be worth comparing the information in /etc/network/interfaces to 
see if there is something strange about your WiFi configuration as opposed 
to your Ethernet configuration.

Cheers

Dave R



-- 
Windows 8.1 on PCSpecialist box

Back to comp.sys.raspberry-pi | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

resolv.conf problem Adrian <bulleid@ku.gro.lioff> - 2015-08-21 17:01 +0100
  Re: resolv.conf problem Rob Morley <nospam@ntlworld.com> - 2015-08-21 17:12 +0100
    Re: resolv.conf problem Adrian <bulleid@ku.gro.lioff> - 2015-08-21 20:42 +0100
      Re: resolv.conf problem Roger Bell_West <roger+csrp201508@nospam.firedrake.org> - 2015-08-21 20:42 +0000
        Re: resolv.conf problem Adrian <bulleid@ku.gro.lioff> - 2015-08-21 22:32 +0100
  Re: resolv.conf problem ray carter <ray@zianet.com> - 2015-08-21 16:29 +0000
    Re: resolv.conf problem Adrian <bulleid@ku.gro.lioff> - 2015-08-21 20:42 +0100
      Re: resolv.conf problem Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2015-08-21 22:19 -0700
        Re: resolv.conf problem Adrian <bulleid@ku.gro.lioff> - 2015-08-22 20:42 +0100
          Re: resolv.conf problem Torfinn Ingolfsen <tingo@home.no> - 2015-08-23 20:57 +0200
            Re: resolv.conf problem Adrian <bulleid@ku.gro.lioff> - 2015-08-23 22:49 +0100
              Re: resolv.conf problem Morten Reistad <first@last.name.invalid> - 2015-08-24 10:42 +0200
                Re: resolv.conf problem "A. Dumas" <alexandre@dumas.fr.invalid> - 2015-08-24 11:12 +0200
                Re: resolv.conf problem Morten Reistad <first@last.name.invalid> - 2015-08-24 11:19 +0200
            Re: resolv.conf problem DisneyWizard the Fantasmic! <wiz@FANTASMIC!disneywizard.com> - 2015-08-23 20:25 -0700
              Re: resolv.conf problem Kees Theunissen <theuniss@rijnh.nl> - 2015-08-27 04:49 +0200
                Re: resolv.conf problem Adrian <bulleid@ku.gro.lioff> - 2015-08-27 20:35 +0100
                Re: resolv.conf problem "A. Dumas" <alexandre@dumas.fr.invalid> - 2015-08-28 09:16 +0200
                Re: resolv.conf problem Dave Higton <dave@davehigton.me.uk> - 2015-08-28 20:48 +0100
      Re: resolv.conf problem David <wibble@btintenet.com> - 2015-08-29 18:33 +0000
  Re: resolv.conf problem ray carter <ray@zianet.com> - 2015-08-21 16:34 +0000

csiph-web