0

I have 2 PCs running CentOS 7 and they're both connected to a wireless repeater/AP. I have statically set both the IP addresses of the 2 PCs, and they are able to ping each other via IP. I have also manually set the hostname of each pc, and each PC is also able to ping itself via hostname. However, they are not able to ping each other by hostname.

I have set the DNS server to be the same as the default gateway, which is the router IP address. Is this correct? If not, what should I do?

Thanks!

1 Answers1

0

You will also need to propagate your hostnames + IP to your local DNS. By default it will not be able to resolve hostnames without, as it is most likely only some kind of a proxy for your provider's DNS. As I cannot say, waht you are running as router, I'd recommend to check manual how to do it.

Also you could put your hosts to the hosts-file (Windows should be something like c:\windows\system32\drivers\etc\hosts). Wikipedia is having a article about. However, this would need to update the hosts file on every system trying to connect via hostname.

Anoter way could be to use some pseudo static approach: Chenge the configuration of the router's DHCP it a way, hosts getting same IP on ever DHCP-Request. This can be done by pinning MAC-Adresse... but also need some lookup on manual.

frlan
  • 746