2

sorry if this question was already answered somewhere, but I couldn't find the relevant answer anywhere.

  • I have local network of 1 Win10 machine 2 Raspberry Pies (Raspbian) and a Mac.
  • I can ping the Pies from windows and mac using their hostname: raspberrypi01.local and raspberrypi02.local (Bonjour is installed on windows)
  • I can ping the Windows and Mac machine from the Pies using mypc.local mymac.local
  • Pies also successfully ping each other using hostnames.
  • I've installed a VM on the Windows machine running Ubuntu.
  • I have 'avahi-daemon' installed and running on the Ubuntu VM and the Pies.
  • I can ping my Pies via their IP address from the Ubuntu VM but I get 'ping: unknown host' response when I try to ping raspberrypi.local

What am I missing? Thanks!

  • I'm having this problem too at the rpi2b which one do you got? if its the same one I think it might be their Ethernet ports being a problem for ubuntu – patrick Aug 1 '16 at 10:03
  • I have the pi2 as well – yurikleb Aug 1 '16 at 10:06
  • try the solution I just posted :) – patrick Aug 1 '16 at 10:08
1

You can try this

There are many ways to fix this. You could

  • Add an entry to your /etc/hosts file with your pi's static-ip and hostname
  • Add a static reservation to your dhcp server and add a record to your local dns server (If your router supports it)
  • Run a service like NIS, Avahi or Samba on your pi. The choice depends on the OS you are pinging from.
  • Windows clients will benefit from installing Samba.
  • OS/X clients will benefit from Avahi or Samba.
  • Linux clients will probably benefit from NIS or Samba depending on what is installed. I guess the Ubuntu computers use samba to advertise their hostnames.

problem was something in the NAT adapter, upon switching to bridge it all worked fine

source: https://raspberrypi.stackexchange.com/questions/7640/raspberry-pi-not-reachable-via-its-hostname-in-lan

| improve this answer | |
  • Hey Patrick, thanks for the quick response! I already have Avahi up and running on all the Pies and Ubuntu. – yurikleb Aug 1 '16 at 10:12
  • try this? •Add an entry to your /etc/hosts file with your pi's static-ip and hostname – patrick Aug 1 '16 at 10:14
  • Hey Patrick, thanks for the quick response! I already have Avahi up and running on all the Pies and Ubuntu. And the pies are pingable using hostnames from the windows machine and also succesfully ping each other using hostnames. The only machine that cant resolve the pi hostname is Ubuntu VM. I really don't want to be using static IPs if possible as in the future ill be adding several more pies to the sytem thanks! – yurikleb Aug 1 '16 at 10:18
  • odd suggestion but try pinging the hostname in all CAPS and.. are both rpi's called the same? – patrick Aug 1 '16 at 10:23
  • also I saw this •Linux clients will probably benefit from NIS or Samba depending on what is installed. I guess the Ubuntu computers use samba to advertise their hostnames. try samba? – patrick Aug 1 '16 at 10:26
2

Problem solved with @Patrick's help! In the VM Network Adapter settings I had to change from "NAT" to "Bridged Adapter"

thank you!

| improve this answer | |
  • besure to tick the checkbox thingy underneath the arrows :P so the answer is accepted – patrick Aug 1 '16 at 11:24
  • also that reminds me, if you want to check out some simple programs I wrote for the rpi2b ON the rpi2b check out my github :) github.com/ppigmans – patrick Aug 1 '16 at 11:26

Your Answer

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

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