I recently noticed that when I run ping raspberrypi it resloves to an IP that is not part of my name but when I run ping raspberrypi.local I get the raspberrypi in my LAN.

I am wondering if there is a way to not have to type the .local and have it resolve to the external IP. I ask this question because I remember being able to execute ssh user@raspberrypi it would resolve to the Pi on my LAN but now I have to use the .local. Maybe I am imagining things but if this is possible I think it would definitely be convenient.

  • This is a configuration of your router (local search domain name) , not the raspberrypi. If you switched from DHCP to a static IP computer you may have lost that configuration that auto-adds the .local domain
    – crasic
    Nov 9 '17 at 1:17

The short answer is that this depends on your home router. Most home routers now provide a domain name service in addition to the standard routing. They can vary in how they implement this and how configurable they are in providing the service. The router that I currently have at home does not append anything to the device name. In contrast, I've worked with routers at friend's houses that do not provide domain name service at all, and then you always have to use IP address to access machines on the LAN.

In terms of what IP address you have, that is almost surely assigned by your router. That will differ than the public IP address for your house as viewed to the outside world. That's the basics of what it means to have a home network. If you're not clear on that, I suggest doing some more reading or asking a new question. (Maybe superuser would be more appropriate than this site in that case.)

  • it is odd because I can refer to one of my computers as its hostname without the local but cant when refering to the pi
    – yasgur99
    Nov 9 '17 at 1:18
  • You'll have to give us more information about your set-up to get anything else. I can only guess based on what I have now. Also do consider that superuser.com might net you better answers since this does not appear to have anything specific to do with the Pi as you're describing it now.
    – Brick
    Nov 9 '17 at 1:20
  • I just noticed that the DNS entry in the router had been deleted; problem solved!
    – yasgur99
    Nov 9 '17 at 1:20

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