1

I have a DNS issue. I set up a Samba share inside my LAN (at my house) on Ubuntu machine with hostname einstein. When I execute ping einstein from a Windows OS (Windows 10), to make sure that einstein is known to my computer, I receive the following output:

> ping einstein

Pinging einstein.uwaterloo.ca [129.97.47.170] with 32 bytes of data:

So, I changed the einstein hostname to turing (changing the /etc/hostname, /etc/hosts, and smb.conf files) and received the following output:

> ping turing

Pinging turing.cs.uwaterloo.ca [129.97.186.70] with 32 bytes of data:

At this point, I should mention that I am a student of the University of Waterloo (uwaterloo.ca) and that I use the Cisco Anywhere Connect client to access University resources remote from campus. So, thinking this may be a DNS caching issue, I flushed my DNS cache (ipconfig /flushdns a few times) and restarted my Windows computer (a few times) to no avail.

What is happening?

  • I misunderstood your question. Going by conversations below, your problem is that cs.uwaterloo.ca is being added to your searches, and you do not want that since both your Windows and your Samba machines are on your personal LAN that is not at UWaterloo. – Law29 Feb 24 '16 at 5:50
  • That's exactly right. – fuzzybear3965 Feb 24 '16 at 16:04
3

Check your DNS Suffix Search List by typing ipconfig /all.

Your computer adds the DNS Suffix to any requests if you don't reference the FQDN. This would explain why your computer is adding ".cs.uwaterloo.ca" and "uwaterloo.ca" to your pings.

Furthermore, it is possible that your school's DNS server has a wildcard record which will resolve any requested yet non-existent name to a specific IP address. Many times this is for the purpose of showing users a "search page" when they enter an unknown website. For example, if I try to browse to http://www.googletypo.com/ instead of getting a "Page not found", I would get a search page which might help point me in the right direction.

In order to get around this, you can add an entry in your Windows 10 computer's "hosts" file. This is located at %systemroot%\system32\drivers\etc\hosts. Any entries added to this file will override whatever your computer might get from its DNS server.

Edit

You can also get around this by referencing the hostname with a trailing dot ('.') to tell your client to treat the name as an FQDN. So, ping einstein..

|improve this answer|||||
  • 1
    ipconfig /all contains in its output DNS Suffix Search List. . . . . . : uwaterloo.ca home – fuzzybear3965 Feb 23 '16 at 18:57
  • 1
    I don't think they have a wildcard record in place. Note that the IP addresses given in my original question are different for the two servers. I just had bad luck with both of my chosen hostnames. Now, the machine is called lovelace. I pinged lovelace before configuring my Ubuntu machine and discovered that there is no route to any server on campus with that name. – fuzzybear3965 Feb 23 '16 at 19:06
  • That makes sense. Glad you were able to arrive at that conclusion. I'm not surprised that a college uses those names already! – Patrick Feb 23 '16 at 19:09
  • Patrick, I discovered from here that I can append a dot to the hostname of the Ubuntu machine's hostname and that ping resolves just fine within my LAN. Do you know the mechanism for why this works? – fuzzybear3965 Feb 23 '16 at 19:13
  • This is because technically the '.' (dot) at the end refers to the root. This basically tells your client that the FQDN is exactly what you are referencing. Otherwise, without the trailing dot, the client assumes that it should attempt to complete it to an FQDN. – Patrick Feb 23 '16 at 19:25
0

As you say, you have a DNS problem. Your Windows 10 machine is consulting the DNS to find out the IP for your turing and einstein machines. When you change the files in /etc, you are not changing the DNS, you are only changing the hostname that your machine thinks it has. The DNS is a distributed database, and you should contact your network administrators if you want to change something in it.

|improve this answer|||||
  • But, if I flushed the DNS cache on my Windows 10 machine, then why would my Windows 10 machine resolve a hostname to a hostname under a different domain? My Windows 10 machine shouldn't "know" that uwaterloo.ca exists. I made sure that the Cisco Anywhere Connect client wasn't running (Task Manager and taskbar). – fuzzybear3965 Feb 23 '16 at 18:24
  • You are just flushing your local DNS resolver cache. The DNS server you are querying has probably not been updated to reflect the changes you made on your Samba host. You can use nslookup to test DNS resolution and see which server you are querying. You may also want to try it with a FQDN instead of just the hostname. – learley Feb 23 '16 at 18:29
  • @learley, it seems that the real answer is given by understand how a Windows machine structures FQDN from hostnames. Like Patrck said, this is a result of the Cisco Anywhere Connect client setting up an entry in my DNS suffix search list. – fuzzybear3965 Feb 23 '16 at 19:05

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.