1

This question is an exact duplicate of:

I'm trying to ping my Pi by hostname from a windows machine on the same eth0 network. I've done the following two commands:

sudo apt-get install samba

sudo apt-get install avahi-daemon

However I still can't ping my pi by host name. I'm getting back: Ping request could not find host <hostname>. Please check the name and try again.. I CAN however ping my windows machine by hostname from the pi, just not vice versa.

Another interesting bit of info, when I type host <hostname> I get the response: ;; connection timmd out; no servers could be reached

What's goin' on here?

marked as duplicate by Steve Robillard, Ghanima Jul 20 '17 at 18:06

This question was marked as an exact duplicate of an existing question.

  • Why did you start a new question which is essentially a duplicate of your existing question? – Steve Robillard Jul 20 '17 at 15:48
  • NOTE there is no need to install avahi-daemon on a standard Raspbian; the functionality is included. – Milliways Jul 21 '17 at 0:13
0

Most Linux distros, including Debian and Debian derived (including Raspbian) do not broadcast hostnames by default. I'm assuming this is what you are trying to use ahavi-daemon for. I am not familiar with it, personally, but attached are solutions I have used.

Possible Solutions

I am unsure of your technical skills, so please forgive me if what I say is too complicated or seems condescending.

  • Consider setting up a DNS server for your home network. Pi 2/3 (unsure about 1) and many modern routers are capable of doing this. Long story short, you have one host on your network remember who the other hosts are, and their IP addresses so when you try to connect to a host by name, you would connect to the DNS server which would resolve the name to an IP and connect you through. This is how the modern internet works (When you type "google.ca" into your web browser, your browser checks with DNS servers around you, to find out where the IP of the servers are [actually likely a server pool, but that's further down the rabbit hole than we care to go for now])
  • If your network is small enough that setting up a DNS server is more effort than it is worth, consider editing the system's "hosts" file, and adding an entry. When you attempt to resolve a name to an IP, before even checking with a DNS server, most systems will check the host file first, so you can manually map IP's this way. However, this only works outbound, meaning that you would have to do it on each individual host on your network. Since you are trying to ping your Pi from Windows, you'll want to edit the Windows hosts file. The one on Raspbian looks different, but you can find it at /etc/hosts.
  • Thanks for the suggestions but neither are solutions for my case. I'm in a workplace environment where I have 0 access to any network modifications. DNS services are out of my control and similarly for assigning a static IP. Thanks for the thoughts though! : ) – Capn Jack Jul 20 '17 at 16:21

Not the answer you're looking for? Browse other questions tagged or ask your own question.