Unable to resolve names of network computers
I've just installed Fedora 20 on a physical machine (a new laptop) for the first time. I'm used to working with Linux on a bunch of virtual machines, but now that I've got it running on physical hardware I'm experiencing some issues.
I'm able to ping my Fedora 20 laptop from my Windows 7 gaming PC, but only using the .local suffix. So:
Pinging from my Linux laptop to my Windows Desktop:
[robin@HOME-LAPTOP ~]$ ping HOME-DESKTOP
ping: unknown host HOME-DESKTOP
[robin@HOME-LAPTOP ~]$ ping 192.168.0.166
PING 192.168.0.166 (192.168.0.166) 56(84) bytes of data.
64 bytes from 192.168.0.166 (192.168.0.166): icmp_seq=1 ttl=64 time=0.031 ms
64 bytes from 192.168.0.166 (192.168.0.166): icmp_seq=2 ttl=64 time=0.020 ms
64 bytes from 192.168.0.166 (192.168.0.166): icmp_seq=3 ttl=64 time=0.021 ms
Pinging from my Windows Desktop to my Linux Laptop:
C:\Data>ping HOME-LAPTOP
Ping request could not find host HOME-LAPTOP. Please check the name and try again.
C:\Data>ping HOME-LAPTOP.local
Pinging HOME-LAPTOP.local [192.168.0.166] with 32 bytes of data:
Reply from 192.168.0.166: bytes=32 time=3ms TTL=126
Reply from 192.168.0.166: bytes=32 time=3ms TTL=126
Reply from 192.168.0.166: bytes=32 time=3ms TTL=126
Reply from 192.168.0.166: bytes=32 time=4ms TTL=126
Ping statistics for 192.168.0.166:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 3ms, Maximum = 4ms, Average = 3ms
Here is the output of the hostname, domainname and dnsdomainname commands on the Linux laptop
[robin@HOME-LAPTOP ~]$ hostname
HOME-LAPTOP.localdomain
[robin@HOME-LAPTOP ~]$ domainname
(nothing)
[robin@HOME-LAPTOP ~]$ dnsdomainname
localdomain
My hostfile is configured as follows:
127.0.0.1 HOME-LAPTOP HOME-LAPTOP.localdomain localhost localhost.localdomain
::1 HOME-LAPTOP HOME-LAPTOP.localdomain localhost localhost.localdomain
My /etc/resolv.conf only has entries for the two DNS servers provided by my ISP.
- I don't understand where the .local suffix is coming from. Where is this defined, and is it possible to change this?
- I don't understand why my Windows machine can resolve the hostname of my linux laptop, but not the other way around.
EDIT (Extra info): The environment I'm testing this is in is a very, very simple home setup with router provided by ISP, not domain, no DNS server of my own etc. This is a bare-bones network environment.
Does your Linux installation have "avahi" installed? My default installation of Fedora 20 (which included Gnome Desktop) installed avahi as a dependency, which opens a hole in the firewall (UDP 5353) and responds to my hostname with the ".local" suffix.
This is something that's tripped me up before in the past. I seem to always work through the issue, but never document it, so I keep having to reinvent the wheel each time. I'd like to help you identify what's going on here and document for my own benefit...
:) John