2

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.

yasgur99
  • 123
  • 1
  • 3

1 Answers1

4

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.)

Brick
  • 1,375
  • 2
  • 14
  • 20