1

Here's my problem: I made a fresh installation of Raspbian Jessie on my Pi 3. After choosing my hostname in the initial raspi-config (and setting up a lighttpd web server), I could ping my Pi from other devices on the local network with ping hostname and I could display my website from the network with http://hostname. This is exactly what I wanted!

However, I then proceeded to configure the wlan connection (in /etc/wpa_supplicant/wpa_supplicant.conf), which worked in the sense that it does connect to my wifi. However, since then it no longer responds to hostname but only to ping hostname.lan (and http://hostname.lan).

My research has led me to find that, in /etc/resolv.conf, there is a line that says domain lan but any changes I make to that are automatically reverted back and the program/service that 'supposedly' generates this file (resolveconf) is by default not installed with Raspbian, and I couldn't figure out what generates this file instead.

What do I need to do to get rid of that 'lan' suffix and just be able to access my Pi with hostname, like I could before I fiddled with wlan?

  • Frankly this is a lot of uninformed speculation on your part. Most of the name resolution has NOTHING to do with the Pi, but whatever you are using to access it. Raspbian runs avahi by default, which is a Zero-conf and responds to hostname.local – Milliways Jul 6 '17 at 0:29
  • @Milliways Of course it's speculation. But a lot? I mean, come on. Most of my post is just stating what I did so you have all the information. Anyway, my being uninformed is the reason why I post here in the first place. All I'm saying is that my Pi does not respond to hostname.local, only hostname.lan. And it just so happens that /etc/resolv.conf has a line that says domain lan. Coincidence? Maybe. Best way for me to know is providing that information with my question. – user2877959 Jul 7 '17 at 6:42
  • My possibly exaggerated comment referred to your speculation about causes. You did NOT say "my Pi does not respond to hostname.local" resolv.conf is populated by DHCP (or other software), mine contains domain iiNet, which comes from the router, but still responds to hostname.local. The fact remains that your name resolution problem is almost certainly external to the Pi. – Milliways Jul 7 '17 at 6:57
  • To be fair, I did say "my Pi responds only to hostname.lan". The "only" in that sentence implies exclusivity, i.e. that the Pi does not respond to anything else. hotname.local is something else. So essentially it would be my router that is pushing that 'lan' domain to my Pi? If I were to connect the Pi on another network and reboot it, resolv.conf would be different. In any case, I don't like hostname.local any better than hostname.lan. I would just like it to respond to hostname. When I look in my router, I see my Pi displayed as hostname, yet it does not respond to that. – user2877959 Jul 7 '17 at 11:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.