0

I would like to access machines on my LAN by names. Not with fully qualified names, but with names. Some of machines are Windows, another are Linux. All of them are obtaining IPs over DHCP, some of leases are static.

Is it possible that each machine report it's hostname to the server and that server makes it able to ping this machine by it's hostname?

UPDATE

Actually I am looking for the name of protocol, which is behaving like WINS. This protocol collects machine names and then perform name->address conversion, like DNS, but for Windows world and in LAN.

I need the same, but Microsoft independent. Probably this is dynamic DNS, but I need no distribute names across the globe, only in my LAN.

7
  • 1
    It's possible. What are you using as DHCP and DNS server?
    – Sacha K
    Oct 7, 2014 at 14:27
  • I am using ones built into pfSense
    – Dims
    Oct 7, 2014 at 14:33
  • Static DHCP record probably have DNS records added automaticaly. For machines to ask for a DNS record to be added I don't know, I never used pfSense.
    – Sacha K
    Oct 7, 2014 at 17:57
  • Do you know, which protocol can be used for machines to report their names to server, except WINS? Also it should be microsoft-independent.
    – Dims
    Oct 7, 2014 at 20:42
  • The idea is that the machines report their name to the DHCP server, and the DHCP server creates the corresponding DNS records.
    – Sacha K
    Oct 8, 2014 at 11:44

1 Answer 1

2
+50

Is it possible that each machine report it's hostname to the server and that server makes it able to ping this machine by it's hostname?

Yes, of course it is possible, you just have to set up a server ;-)

In general, if you want to set up a server to do that for you, you should setup the server to provide two services, DHCP and DNS for your LAN, on the same machine. This way, every DHCP request will have to report the machine's name, and the server will keep a table of DHCP clients. Static IPs do not require DHCP, thus they will not be registered on the list of DHCP clients. This is why I alway use Reserved IP addresses rather than static ones: machines with MAC addresses in a separate list are always given, by the DHCP server, the same IP address so that they work like static addresses, except they report their names to the server.

Common programs to do this are widely available (DHCP+BIND, or DNSMasq which does both things). Some consumer routers are already setup to do this job, for instance those running DD-WRT or OpenWRT or TomatoWRT software, but most are not.

An alternative is to use WINS, Microsoft' implementation of NetBIOS Name Service, which exists inside the Samba suite also in *Nix machines, so that all you have to do is to activate it. Or you may use mdns (which Apple calls Bonjour) to do the same thing for *Nix machines. Basically, by activating these programs (programs, not protocols) on the *Nix machines, you will be able to achieve what you wish even without a central server.

5
  • Suppose that I have both DHCP and DNS servers and what you said does not happen. How to fix/debug?
    – Dims
    Nov 12, 2014 at 12:54
  • Also, how to answer the name of server itself?
    – Dims
    Nov 12, 2014 at 13:01
  • @Dims The name of the server itself will be served just like any other name, it does not need any special rule. As for question 1: do you have Macs on your system? Do you have a Linux machine? Nov 12, 2014 at 14:17
  • I have few linuces, few windows and few androids. One iOS and no Macs.
    – Dims
    Nov 12, 2014 at 14:42
  • @Dims Then the easiest thing is to setup a linux machine to act as BIND server, without touching your router which does the DHCP service. I use Debian, and followed this guide, stavrovski.net/blog/…. If you have a different flavor of Linux, for instance CentOS, search Goolge for CentOS bind9. bind9 is the 9th release of the bind software, the de facto standard for DNS. If you have problems, post a new question and I will help you out. Nov 12, 2014 at 15:24

You must log in to answer this question.

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