0

I am seeking solutions on how to resolve a host name to a static IP. I am not running a DHCP server so that's why I'm statically addressing IP addresses. I can set the static IP address perfect and everything runs great except when I try to ping myHostName it gives me this error

"Ping request could not find host myHostName. Please check the name and try again.".

A easy fix was to add this line myHostName 192.168.1.22 to the Hosts File in Windows, this obviously isn't doable as I would have to modify every devices Hosts file that's connected to my local network. I can't switch to using DHCP its IP addresses have to be statically assigned.

1
  • 1
    Well, run a DNS server (forwarder) that you can configure and use that in your hosts instead of the current one you are using?
    – Tom Yan
    Commented May 13, 2021 at 5:24

1 Answer 1

0

IP Addresses (DHCP or Static) do not perform DNS resolution functions, so switching to Static will not help here.

I use both Static and Dynamic address on my devices in my own small network.

So you need to add entries to the HOSTS file to devices that you are addressing by name.

Two thoughts:

  1. Keep the need to access a device by name to a minimum (the key devices) so as to minimize the need for HOSTS file entries.

  2. In those situations where you do not already have the entry, you can address by IP Address. This functions exactly the same as addressing by name - the HOSTS file merely relates the two things.

I use HOSTS files myself and in a small network without a Server, HOSTS files work fine.

If you are accessing a main machine for file sharing and mapped drives connection, give that machine a static IP address so that the HOSTS file need not change much or at all.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .