0

I have a 4 port wifi router at home. Everything on the network is connected through that.

I have 5 machines on the network. One of them is a fresh Debian 8 (Jessie).

On all of the devices except the Debian one I can ping other devices by hostname. On the Debian one I cannot. I can ping by IP but when I try by hostname it says "unknown host".

user@debian:~$ ping comp1
ping: unknown host comp1

user@debian:~$ ping 192.168.1.100
PING 192.168.1.100 (192.168.1.100) 56(84) byes of data.
64 bytes from 192.168.1.100: icmp_seq=1 ttl=64 time=1.24 ms
64 bytes from 192.168.1.100: icmp_seq=2 ttl=64 time=1.04 ms
64 bytes from 192.168.1.100: icmp_seq=3 ttl=64 time=0.965 ms
...

I can't figure out how to fix it. Any ideas?

This is my /etc/hostname, /etc/hosts, and /etc/resolv.conf

nacho@desk:~$ cat /etc/hostname
debian

nacho@desk:~$ cat /etc/hosts
127.0.0.1   localhost
127.0.1.1   debian
127.0.0.1   debian

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

nacho@desk:~$ cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 192.168.1.1
nameserver 127.0.0.1
nameserver 127.0.1.1
3
  • 1
    Use avahi and libnss-mdns. Those hostname aren't real hostnames (dns), they communicate with avahi protocol. en.wikipedia.org/wiki/Avahi_(software) Commented Aug 27, 2016 at 15:09
  • 1
    Are the other hosts windows servers. If so they are may be using WINS to resolve names.
    – BillThor
    Commented Aug 27, 2016 at 19:07
  • Thanks guys! Got it to work by using a custom firmware on my router. Commented Aug 27, 2016 at 19:22

2 Answers 2

1

Are the other hosts windows servers. If so they are may be using WINS to resolve names. Installing winbind and add wins to the /etc/nsswitch.conf file line for hosts should resolve the issue.

2
  • Thanks! Got it to work by using a custom firmware on my router. Commented Aug 27, 2016 at 19:22
  • 1
    @IMTheNachoMan That will work. You now have dnsmasq returning DNS records for all the clients that connect using DHCP.
    – BillThor
    Commented Aug 27, 2016 at 19:25
0

So I installed OpenWRT on my router (something I was planning on doing anyway) and that seems to have fixed the issue.

You must log in to answer this question.

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