1

I have a server on my home network that runs Samba (on Debian). Let's say its hostname is "dragon". It hosts some file shares and a website.

From my Windows 10 laptop, the hostname "dragon" works in some applications and not others. Where it doesn't work, the IP address of the machine does work, so it seems to be purely a DNS problem (the server's ports are reachable).

On my old laptop (which ran Windows 7), this hostname has always worked in all applications with no problem.

I would like this hostname to work in all the applications that it doesn't work in.

WHAT WORKS:

  • In Windows Explorer, browsing to \\dragon\fileshare
  • In Chrome, browsing to http://dragon/ (still works after clearing the Chrome DNS cache)
  • Command line: tracert 192.168.1.### (traces the route and prints "DRAGON" as the hostname)

WHAT DOESN'T WORK:

  • Command line: nslookup dragon ("Non-existent domain")
  • Command line: ping dragon ("Ping request could not find host dragon. Please check the name and try again.")
  • Command line: tracert dragon ("Unable to resolve target system name tiamat.")
  • In Firefox, browsing to http://dragon/ (but the IP address works) ("Hmm. We’re having trouble finding that site.")
  • In PuTTY, connecting to dragon's SSH port (but the IP address works) ("gethostbyname: unknown error")

My laptop and the server are connected to the same home network, where the router is assigning the IP addresses with DHCP. The laptop connects via wifi. The server ("dragon") is connected by ethernet and there's an ethernet switch between the server and the router.

The DNS server is just the home router (a Netgear R6250) at 192.168.1.1. It has no special configuration: I did a factory reset of the router earlier this year. My laptop is using the default configuration for the WiFi connection. The server (dragon) is also configured to use 192.168.1.1 for DNS.

Windows 10 laptop ipconfig /all output:

Windows IP Configuration

   Host Name . . . . . . . . . . . . : DESKTOP-XXXXXX
   Primary Dns Suffix  . . . . . . . :
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No

(unused interfaces snipped)

Wireless LAN adapter Wi-Fi:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Intel(R) Centrino(R) Advanced-N 6205
   Physical Address. . . . . . . . . : 6C-88-14-14-36-58
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::51ae:4d89:9a0e:cc31%9(Preferred)
   IPv4 Address. . . . . . . . . . . : 192.168.1.162(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Lease Obtained. . . . . . . . . . : Thursday, September 13, 2018 6:06:50 PM
   Lease Expires . . . . . . . . . . : Saturday, September 15, 2018 9:04:29 PM
   Default Gateway . . . . . . . . . : 192.168.1.1
   DHCP Server . . . . . . . . . . . : 192.168.1.1
   DHCPv6 IAID . . . . . . . . . . . : 57444372
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-21-EC-4C-AC-3C-97-0E-99-E8-95
   DNS Servers . . . . . . . . . . . : 192.168.1.1
   NetBIOS over Tcpip. . . . . . . . : Enabled

Server (dragon) ifconfig -a output:

eth0      Link encap:Ethernet  HWaddr 20:cf:30:a7:70:83
          inet addr:192.168.1.165  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::22cf:30ff:fea7:7083/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:88828557 errors:19344 dropped:0 overruns:19344 frame:0
          TX packets:486833641 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:37158705673 (34.6 GiB)  TX bytes:718330677855 (668.9 GiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:315497 errors:0 dropped:0 overruns:0 frame:0
          TX packets:315497 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:105956163 (101.0 MiB)  TX bytes:105956163 (101.0 MiB)

wlan0     Link encap:Ethernet  HWaddr 80:1f:02:95:6b:96
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
  • Does "dragon" have a static IP? Is it also providing local DNS? It sounds like reverse lookups(PTR Records) are not setup. And what about the local HOSTS file? – Larryc Sep 14 '18 at 14:45
  • The IP of dragon is assigned by DHCP. I've configured the router to associate a certain IP with its MAC address, though, so its IP address doesn't change. The hosts file on my Windows 10 laptop has no entries. – Nate C-K Sep 14 '18 at 18:14
  • Please edit your question to include the following information: 1) Details about your DNS server, 2) The DNS domain name configured on your laptop [see ipconfig /all] and the Samba server, 3) Are both devices using the same DNS server? 4) Does the DNS server have entries for both devices? – I say Reinstate Monica Sep 15 '18 at 1:16
  • @TwistyImpersonator: I've added DNS info. The DNS server has no entry for either device. I've never needed one in the past, as Samba seems to make the server's hostname available to DNS lookups on the network's Windows machines, although I don't know how that really works. – Nate C-K Sep 15 '18 at 2:56
  • Well, the simplest solution would be to add an entry in the Win10 machine's HOSTS file. If DNS doesn't resolve the name (and it obviously cannot) then we're left to NetBIOS and WINS resolution, which clearly also isn't working for you. – I say Reinstate Monica Sep 15 '18 at 3:31
2

Quick and easy solution: Add an entry to the HOSTS file on your Windows 10 machine.

This will work despite the fact the various name resolution protocols aren't resolving the server's name.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.