Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to create a local DNS in my VM, so that when it is online, all computers on my network can "see" it. I have Linux (CentOS) installed, as a Hadoop server, on a VM.

Any hints on how to get this working? I know very little about networking, and couldn't find a good tutorial online. The security does not have to be industrial grade, the VM is just for development.

Related to this: How robust are these local DNS solutions? Are they commonly used in real, production systems?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

The two most common protocols in use are:

  • NBNS, NetBIOS name service – used by all versions of Windows, MS-DOS, OS/2, ... Supported by Unixes (incl. Mac OS X) via Samba nmbd.

    Uses UDP broadcasts, which are ineffective on large networks, but are just fine on small ones. NBNS only works over IPv4 due to its reliance on broadcasts. Security? What security?

    To make the VM reachable by NBNS, install Samba and start its nmbd service. (smbd deals with file sharing and is not necessary.) Configuring the workgroup in smb.conf is optional but recommended – plain name resolution will work across workgroups, but less reliably.

    To let the VM reach other hosts, install nss_wins and configure /etc/nsswitch.conf to use the wins service:

    hosts: files dns wins
    
  • mDNS, Multicast DNS (also known as Bonjour) – used by Mac OS X, supported by Windows via "Bonjour Print Services" and Unixes via Avahi.

    Uses multicast UDP, which is better on larger networks (but still doesn't scale well). Again, no security.

    To make the VM reachable by mDNS, install Avahi and start avahi-daemon. Note that all mDNS names by default are in the .local domain (e.g. hadoopbox.local), as opposed to bare NBNS names. (See this page if you already have a DNS domain named .local.)

    To let the VM reach other hosts, install nss_mdns and configure /etc/nsswitch.conf to use mdns and/or mdns_minimal. avahi-daemon must be running as well.

    hosts: files mdns_minimal [NOTFOUND=return] dns mdns wins
    
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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