You are not logged in.

#1 2013-08-12 02:11:09

Kraxxis
Member
Registered: 2013-08-11
Posts: 4

Cannot resolve local network machine addresses by hostname

Hey all.  A bit of forewarning; I'm new to both Linux and Arch, so I apologize if my questions are frustratingly naive. 

My problem, I feel, is embarrassingly simple; from my new Arch install, I can ping other LAN machines via their ip addresses, but I cannot ping them via their hostname from within the new Arch install.

Here is my set up:

Machine A has both a windows install and an arch install.  The windows install can boot the arch install as a virtual box guest.  Alternatively, I can boot into the Arch install with no virtualization.  The problem exists regardless of how I boot this new Arch install.  [Quick Edit: MachineA has a wired connection.]

Machine B has an Arch install that is set up on the network and wirelessly connects to my router.  This install has its hostname set and can be pinged by hostname from MachineA.Windows but not MachineA.Arch.  MachineA.Arch successfully pings MachineB only if it pings by ip address.

My router has dhcp enabled, and I can see all three machines (MachineA.Windows, MachineA.Arch, and MachineB) in the dhcp table (their IP, MAC, and hostname).

I have done no additional network configuration on MachineA.Arch; I've let the default install do its thing. Also, I can ping outside sources from MachineA.Arch by hostname just fine (like google.com).

How can I get MachineA.Arch to ping MachineB by hostname?

Things I've tried:

1. I've tried editing /etc/resolv.conf and adding a line "nameserver 192.168.1.1".  Not only does this appear to have no effect, but this change appears to revert every restart.

Last edited by Kraxxis (2013-08-12 02:13:43)

Offline

#2 2013-08-12 02:42:53

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: Cannot resolve local network machine addresses by hostname

Sounds like your router doesn't register hostnames in DNS, then. Not much you can do about this if you can't change the firmware on your router.

An alternative is to use mDNS/zeroconf via Avahi.

Offline

#3 2013-08-12 02:51:12

Kraxxis
Member
Registered: 2013-08-11
Posts: 4

Re: Cannot resolve local network machine addresses by hostname

Im not sure I understand.

My router shows all of my devices in its DHCP table,  including their hostname, ip address and MAC.

What makes you say its a router issue?

Offline

#4 2013-08-12 02:52:36

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: Cannot resolve local network machine addresses by hostname

Because of your claim that using it for DNS results in a lack of hostname resolution....

Offline

#5 2013-08-12 03:07:06

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,198

Re: Cannot resolve local network machine addresses by hostname

So is the thought that Windows is using something else? I know a Mac might use Avahi, for example. Does that apply to Windows, too?


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#6 2013-08-12 03:42:56

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: Cannot resolve local network machine addresses by hostname

Mac has something called bonjour which is compatible with Avahi. I'm not familiar with how windows does it (NetBIOS? WINS?)

Offline

#7 2013-08-12 03:46:56

Kraxxis
Member
Registered: 2013-08-11
Posts: 4

Re: Cannot resolve local network machine addresses by hostname

Could i install one of these services? WINS? Bonjour?

Offline

#8 2013-08-12 11:53:02

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: Cannot resolve local network machine addresses by hostname

Kraxxis wrote:

Could i install one of these services? WINS? Bonjour?

I'll just leave this here: https://wiki.archlinux.org/index.php/Avahi

Offline

#9 2013-08-12 21:38:56

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,198

Re: Cannot resolve local network machine addresses by hostname

falconindy wrote:

Mac has something called bonjour which is compatible with Avahi. I'm not familiar with how windows does it (NetBIOS? WINS?)

I always thought Macs had it first - but it used to be called rendezvous and I can never remember whether rendezvous became bonjour or bonjour became rendezvous - but I could be completely wrong about this. I thought Apple created it to replace AppleTalk.

Last edited by cfr (2013-08-12 21:39:27)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#10 2013-08-13 03:51:51

Kraxxis
Member
Registered: 2013-08-11
Posts: 4

Re: Cannot resolve local network machine addresses by hostname

I was able to ping from linux machines and resolve by hostnames by setting up Avahi on each.

I did some further research and falconindy is correct, my router does not support a local DNS server.  I find this highly confusing, since all the information can be displayed using the router's webapp.

The only part left unanswered is why my windows machine was able to ping each linux box by hostname. I'm still stumped on that one. I specifically remember having to do an "ipconfig /flushdns" on my windows machine immediately after setting up my linux machine before pinging by hostname worked for windows.

Last edited by Kraxxis (2013-08-13 03:54:15)

Offline

#11 2013-08-13 09:16:22

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: Cannot resolve local network machine addresses by hostname

Your router has all of the data because it has a dhcp server. The fact that it has this does not immediately mean it can serve DNS queries.

Offline

Board footer

Powered by FluxBB