You are not logged in.

#1 2016-01-20 20:51:49

Ae0s
Member
Registered: 2015-08-04
Posts: 2

Can't resolve hostname in local network

Hello,

I got a new router from my ISP and ever since I installed it my pc with arch installed cant resolve hostnames in the local network anymore. Specifically I want to connect to my NAS with a browser or mount a nfs share, neither is possible using the hostname of my NAS, it works with the IP address however.

Here is what happens when I try to ping it:

[stefan@belegost ~]$ ping 10.0.0.11
PING 10.0.0.11 (10.0.0.11) 56(84) bytes of data.
64 bytes from 10.0.0.11: icmp_seq=1 ttl=64 time=0.237 ms
64 bytes from 10.0.0.11: icmp_seq=2 ttl=64 time=0.335 ms
64 bytes from 10.0.0.11: icmp_seq=3 ttl=64 time=0.197 ms
64 bytes from 10.0.0.11: icmp_seq=4 ttl=64 time=0.351 ms
^C
--- 10.0.0.11 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 2997ms
rtt min/avg/max/mdev = 0.197/0.280/0.351/0.064 ms
[stefan@belegost ~]$ ping nargothrond
ping: unknown host nargothrond

My resolv.conf just looked liked this (before I started trying out things):

# Generated by resolvconf
nameserver 10.0.0.138

I've tried using Googles DNS server or add the ones of my ISP directly, but neither worked.

I'm sorry I can't provide more informations, but I don't know if I'm looking in the right spot, since I have no problems with anything outside my LAN, so I'm not even sure this problem is DNS related.

Offline

#2 2016-01-20 20:58:00

paulkerry
Member
From: Sheffield, UK
Registered: 2014-10-02
Posts: 611

Re: Can't resolve hostname in local network

Have you added "nargothrond" and it's IP address to /etc/hosts ?

Last edited by paulkerry (2016-01-20 20:58:43)

Offline

#3 2016-01-20 21:15:56

Ae0s
Member
Registered: 2015-08-04
Posts: 2

Re: Can't resolve hostname in local network

paulkerry wrote:

Have you added "nargothrond" and it's IP address to /etc/hosts ?

Thanks for the reply, adding the NAS to /etc/hosts works, but since the NAS doesn't have a static IP, this would mean I'd have to change /etc/hosts every time it changes it's IP address.

Offline

#4 2016-01-20 21:20:15

paulkerry
Member
From: Sheffield, UK
Registered: 2014-10-02
Posts: 611

Re: Can't resolve hostname in local network

You should login to your router and assign a static address to your NAS using the hardware address of the NAS or set a fixed IP address on the NAS.

Last edited by paulkerry (2016-01-20 21:21:08)

Offline

#5 2016-01-31 20:27:15

paulkerry
Member
From: Sheffield, UK
Registered: 2014-10-02
Posts: 611

Re: Can't resolve hostname in local network

If this is sorted, you should prepend "[SOLVED]" to your first post.

Last edited by paulkerry (2016-01-31 20:29:47)

Offline

#6 2016-02-01 19:37:24

hydracone
Member
Registered: 2015-06-25
Posts: 24

Re: Can't resolve hostname in local network

You could also use avahi and nss-mdns to enable local hostname resolution using MDNS. You wouldn't need to set static IPs that way : https://wiki.archlinux.org/index.php/Av … resolution

Last edited by hydracone (2016-02-01 19:38:21)

Offline

Board footer

Powered by FluxBB