resolv.conf problem

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
--
To Reply : 
replace "bulleid" with "adrian" - all mail to bulleid is rejected 
 Click to see the full signature
Reply to
Adrian
Loading thread data ...
Maybe you should edit that one instead and see if it gets copied over.
Reply to
Rob Morley
Does this help:
formatting link
configurations
Reply to
ray carter
Or, have a look here:
formatting link
Reply to
ray carter
In message , ray carter writes
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
--
To Reply : 
replace "bulleid" with "adrian" - all mail to bulleid is rejected 
 Click to see the full signature
Reply to
Adrian
In message , Rob Morley writes
Thanks.
I've tried that, and it doesn't get copied over, I still end up with a file with a comment in, and nothing else.
Adrian
--
To Reply : 
replace "bulleid" with "adrian" - all mail to bulleid is rejected 
 Click to see the full signature
Reply to
Adrian
Is your DHCP server actually giving out nameserver addresses correctly? I've had no problems with resolvconf.
You could always put an explicit dns-nameservers directive in your /etc/network/interfaces (in the iface wlan0 stanza). You are using plain /etc/network/interfaces not Network Manager or some such horror, right?
Reply to
Roger Bell_West
In message , Roger Bell_West writes
Pass, sorry I wouldn't know how to check.
I'm using whatever it runs "out of the box".
I've added a directive to the /etc/network/interfaces file, and after rebooting, it is working.
Thanks for your assistance and from the others to reply to this thread.
Adrian
--
To Reply : 
replace "bulleid" with "adrian" - all mail to bulleid is rejected 
 Click to see the full signature
Reply to
Adrian
On the Pi running dhclient you set the DNS servers in /etc/network/interfaces. On the Pi running dhcpcd you set the DNS servers in /etc/dhcpcd.conf. But this is only for static addresses. For DHCP addresses, your router will supply your DHCP address and the DNS server address. In any case you don't edit resolv.conf.
--

Knute Johnson
Reply to
Knute Johnson
In message , Knute Johnson writes
Neither Pi has static addresses set, but the router (same router for both Pis) is set to always allocate the same IP address.
Adrian
--
To Reply : 
replace "bulleid" with "adrian" - all mail to bulleid is rejected 
 Click to see the full signature
Reply to
Adrian
One IP address for each Pi I hope...
--
Torfinn Ingolfsen, 
Norway
Reply to
Torfinn Ingolfsen
In message , Torfinn Ingolfsen writes
Yes.
Adrian
--
To Reply : 
replace "bulleid" with "adrian" - all mail to bulleid is rejected 
 Click to see the full signature
Reply to
Adrian
And do remember that the Ethernet device IP number should be different from the WiFi IP address on each PI. I have configured my router to read the MAC address of both the WiFi and Ethernet on the Pi B+ then assign the WiFi as 192.168.2.4 and the Ethernet as 192.168.2.3. The same with the Pi 2 - WiFi 192.168.2.6 and wired Ethernet responds on 192.168.2.5. By engaging this assignment in my router it allows each Pi portability to a friends network as the RPi still asks to handshake an IP address assignment from DHCP, the Dynamic Host Control Protocol, helping prevent the disaster of two devices with identical IP addresses battling for each other for gibberish I/O, while making direct IP access on the home network consistent over time and easy to remember.
I tend to keep the low bandwidth control channels open constantly on 16Kbps WiFi and open the temporarily wide bandwidth user accounts on the 10/100Kbps, the better to serve movies with. Just because one can log on to each channel with multiple accounts, that doesn't prevent me from simultaneous log-ins to root on the Ethernet wire or log-ins to pi or other user accounts via WiFi, it's just a personal arrangement preference which keeps the differences aligned in my mind because both Ethernet and WiFi are simultaneously active. Keeping the WiFi channel open with a laptop PuTTY login to root which constantly reports the RPi status stream with the top command solved the problem I'd had with the router dropping the WiFi every day. When needed, I'll temporarily open a duplicate PuTTY root session for admin command line tasks also on the WiFi connection, while top is running in a dedicated PuTTY window on the laptop,
I'm just sayin', make sure your Ethernet and WiFi are each being assigned a unique IP address on each RPi.
--
   All ladders in the Temple of the Forbidden Eye have thirteen steps. 
There are thirteen steps to the gallows, firing squad or any execution. 
 Click to see the full signature
Reply to
DisneyWizard the Fantasmic!
If you have an IPv6 infrastructure in place the raspbian rpis will happily connect, even to an V6-only network, and will take the mandatory three ip(v6) addresses from the RA and the localnet MAC.
It also does the right thing in a combined v4 and v6 network. This Just Works, just as with a Mac, or for a Windows v7 or later installation.
A rpi is also a very good platform for being a v6 tunnel client with ra service to the local network.
apt-get install aiccu-sixxs (and maybe the RA)
-- mrr
Reply to
Morten Reistad
Op 24-08-15 om 10:42 schreef Morten Reistad:
Not enabled by default, or did that change? I can't imagine. To enable until the next reboot: "sudo modprobe ipv6". To enable permanently: "sudo nano /etc/modules" and add "ipv6" on a new line.
Reply to
A. Dumas
Indeed.
But once the module is loaded you have v6 connectivity. I just did with a new rpi.
You may have to do a bit of configuration to have a v6-only nameserver, but it is fairly straightforward.
-- mrr
Reply to
Morten Reistad
Can't you keep the WiFi channel open with a cron job on the Rpi that generates some traffic over the wlan0 interface at regular intervals?
Running something like ping -c 1 -I wlan0 your_router_address_or_name >/dev/null 2>&1 should do the job. That would remove the dependency on the laptop keeping the connection open all the time.
But -frankly speaking- why do you need the WiFi connection at all if the Rpi can already be reached over a probably better ethernet connection?
regards,
Kees.
--
Kees Theunissen
Reply to
Kees Theunissen
In message , Kees Theunissen writes
Because the Ethernet connection isn't always reliable.
I've had problems with one of my Pis not coming online when it boots up. Opinions seem to vary as why the Ethernet connection doesn't come up. In the house it is fine, but when it is out in the garden, it is less than evens as to whether or not it work, some days it just won't play. Today I put it on WiFi (with the Ethernet unplugged), so we'll see what that does over the coming weeks.
I've tried setting up a cron job that runs once a minute that sends a single ping to the router, but that won't always wake the Ethernet connection up.
Adrian
--
To Reply : 
replace "bulleid" with "adrian" - all mail to bulleid is rejected 
 Click to see the full signature
Reply to
Adrian
Same problem here with any Pi directly connected to a Fritzbox 760 router oon LAN port 3. Often it's enough to dis/reconnect the ethernet cable to re-establish a connection but sometimes I need to flip the power for a hard reset.
No such problems when connected via a small LAN switch. It has been suggested that noise/grounding might be the cause and the Fritzbox can't cope. It's a shame because the switch is yet another always-on power plug.
Reply to
A. Dumas
x86 boxes sometimes have the LAN fail to start up properly, too. I don't regard anything as being immune in principle.
Noise and grounding are often blamed when nothing can be proved. I've yet to find a case where noise and/or grounding really were the cause, though.
Ethernet is always transformer coupled at both ends, which gives excellent noise immunity and does not place any requirement on earthing.
Dave
Reply to
Dave Higton

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.