4

I am specifically referring to the "Domain name" prompt that appears during system setup. I understand that the value entered on this prompt is inserted into /etc/resolv.conf as the following.

search mydomain.local
domain mydomain.local

This answer leads me to believe that two debian systems (let's say deb1 and deb2) on the same unmanaged network (let's say connected to a network switch or hub) would be able to search for each others hostnames and be able to ping each other. Although when I install two debian virtual machines, with identical settings, although different hostnames, no communication is possible from deb2 whether through pinging deb1 or deb1.mydomain.local (or vice-versa). I also have no communication through IPv6 link-local, which I am under the impression should be completely auto-configured.

Is there something wrong with the setup I have, or is this type of communication not possible through an unmanaged setup?

  • Depends on how you've virtualized them and how you've connected them. As an example, the default network type in VirtualBox is NAT and there is no connectivity to other machines on hte NAT network. You could use Internal Only or Host Only or Bridged and they'd be able to communicate – ivanivan Jan 24 '18 at 22:18
4

What a search domain does it is provides a domain name that is appended to name resolution queries that contain less dots (a .) in them than whatever the ndots option is set to in /etc/resolv.conf (default is 1). (resolv.conf man page, see search section.)

This means that if my resolv.conf specifies search corp.org and I have a host mailsvr.corp.org that I wish to connect to I can use the hostname mailsvr for my connections because corp.org is automatically appended to any hostnames with less than one ..

As to why you cannot communicate between your two boxes despite the IPv6 auto-configuration, if your virtual machines are not configured to resolve the hostname of the other to an IPv6 address through DNS or mapping in your /etc/hosts file then they do not know where to send packets. So if deb1 is ::10, deb2 does not know this. If you try ping deb1 from deb2 you will receive the error Unknown host deb1. You can add a line to deb2's /etc/hosts file with the address of deb1 mapped to its hostname, e.g. ::10 deb1. The same thing will need to be done on deb1 with deb2's address mapped to it's IP address in so that deb1 knows what address deb2 has too.

  • This is exactly what I'm looking for. Thank you. Though, if I were to ignore the DNS part of this, and ping -6 ::10 from deb2 would that still work through IPv6 auto-configuration? – Hidden14 Jan 24 '18 at 22:18
  • @Hidden14 Yes, pinging directly by IP address will work without any need to futz with the hosts file. – Thegs Jan 24 '18 at 22:22
  • @Hidden14 I'm sorry, I forgot to add that I was assuming the virtual networking was configured in a manner that allows the machines to communicate with each other. I don't know much about that so if they can't communicate by IP directly, it may be worth further research and/or opening another question on the topic. – Thegs Jan 24 '18 at 22:31
  • I understand. Thanks. I have the vm's communicating. The IPv6 issue was a misuse of the command ping6 command instead of the comms itself. Link local works great. – Hidden14 Jan 24 '18 at 22:58

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.