1

I'm setting up a simple Linux home server and I want to be able to access it over my LAN using it's hostname. Even after reading through this really informative post I'm still having issues connecting via hostname!

I grabbed the Linux server's MAC address using 'ifconfig -a' and I used it to set up a "DHCP Reservation" in my router's web interface. I also made sure that the IP reservation was outside of the automatic/dynamic DHCP range, to be safe. Now I'm getting a consistent IP address for that machine, so I know the reservation is working correctly, but the other PCs on the network still aren't able to connect via the hostname.

In other words, pinging the IP address that I reserved works fine, but pinging the hostname times out. Am I doing something wrong? I've simply edited the hosts files on a few of our PCs as a temporary solution, but I'd like to get it working on the router level, if possible.

It might also be worth mentioning that we have a simple hardware switch on the network also - although I don't think that should matter, right? The server and the two client machines that I've been testing with are all in the same room (wired behind the switch). [Modem - DHCP Router - Switch - Server/ClientA/ClientB]

2

You need a DNS server

  • Reserving only guarantees that it will get the same ip
  • reserving will not create a DNS record

If having a DNS server and maintaining is out of scope then you can edit you host file on your local machine and add an entry for this host and ip

  • Host file editing is only useful for towers or non mobile computers because then when Outside LAN domain names resolve to private ip. Tho he did mention hostname not domain name. Thought I'd add that – FreeSoftwareServers Feb 24 '16 at 2:49

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.