Page 1 of 1

Help Request - Resolving Hostname on Home DNS Network

Posted: 4. Jan 2016, 23:19
by PDXPat
Hello. I could use help troubleshooting an issue I have with unresolved hostname on my network.

The gist of my setup is Windows 7 running Virtualbox. Within Virtualbox I have an Ubuntu VM configured using the same steps as a physical box. The physical box resolves the hostname within the home network DNS. The VM does not. Below are some of the configuration aspects of the machines and systems. The problem also exists with a CentOS 7 VM with similar system settings.

Thanks.

PDXPat

Host Operating System: Windows 7
Guest Operating System: Ubuntu 14.04.3 LTS
Virtualbox: 5.0.10
Network Adapter 1: Bridged Adapter
Network Adapter 1 Promiscuous Mode: Allow All

/etc/hosts
  • 127.0.0.1 localhost
    127.0.1.1 UBUNTU-SERVER-VM

    # The following lines are desirable for IPv6 capable hosts
    ::1 localhost ip6-localhost ip6-loopback
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
/etc/network/interfaces
  • # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).

    # The loopback network interface
    auto lo
    iface lo inet loopback

    # The primary network interface
    auto eth0
    iface eth0 inet static

    address 192.168.1.190
    netmask 255.255.255.0
    network 192.168.1.0
    broadcast 192.168.1.255
    gateway 192.168.1.1
    dns-nameservers 8.8.8.8 8.8.4.4
Output from ip a
  • 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
    valid_lft forever preferred_lft forever
    2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:7a:99:88 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.190/24 brd 192.168.1.255 scope global eth0
    valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:fe7a:9988/64 scope link
    valid_lft forever preferred_lft forever
    3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 08:00:27:3c:60:ee brd ff:ff:ff:ff:ff:ff
Output from hostname
  • UBUNTU-SERVER-VM
Output from Windows 7 DOS CMD Line
  • c:\>ping UBUNTU-SERVER-VM
    Ping request could not find host UBUNTU-SERVER-VM. Please check the name and try
    again.

    c:\>

Re: Help Request - Resolving Hostname on Home DNS Network

Posted: 5. Jan 2016, 00:20
by Perryg
/etc/hosts

127.0.0.1 localhost
127.0.1.1 UBUNTU-SERVER-VM

Should say:
  • /etc/hosts

    127.0.0.1 localhost
    192.168.1.190 UBUNTU-SERVER-VM
But since you do not have a DNS server running you will need that in the hosts file on any machine that you need to access the guest using a friendly name URL.

Re: Help Request - Resolving Hostname on Home DNS Network

Posted: 5. Jan 2016, 06:07
by PDXPat
Thanks Perryg. The DNS Server I am running is through my ASUS router. I did make your recommended change. However, I am getting the same result on my home network on various OSes (Mac and Windows). The hostname for the Ubuntu Server on Physical Hardware is getting picked-up somehow where the Virtual device is not.

Re: Help Request - Resolving Hostname on Home DNS Network

Posted: 5. Jan 2016, 15:00
by Perryg
If you are in fact running a DNS server then you do not need nor do you want these entries in the hosts file. They will override any setting/s that you have in the DNS server. If as you say you are running a DNS server then one must assume it is not configured properly.

Question,
1) can you access this guest using the IP address from the other PCs?
2) are you using DHCP or static addressing?

Re: Help Request - Resolving Hostname on Home DNS Network

Posted: 5. Jan 2016, 15:47
by socratis
PDXPat wrote:The DNS Server I am running is through my ASUS router
Are you sure that your ASUS router is running a DNS server and not a DHCP server? Or DNS server "through" your ASUS Server? Because a couple of posts back you mentioned that you had 8.8.8.8 and 8.8.4.4 setup as DNS servers (in your VM at least).
PDXPat wrote: I am getting the same result on my home network on various OSes (Mac and Windows)
Are you sure you're not talking about NetBIOS over TCP here?
PDXPat wrote:The hostname for the Ubuntu Server on Physical Hardware is getting picked-up somehow where the Virtual device is not.
I'm not sure I quite understand this part. I thought that the Ubuntu was the VM. Can you explain this a little bit more?

Re: Help Request - Resolving Hostname on Home DNS Network

Posted: 5. Jan 2016, 19:36
by PDXPat
Perryg and Scoratis, thank you for your responses.

@Perryg

1. Yes. I can access the guest VM using the IP address from both Windows and MacOS. For example, in Windows Explorer I can access an NTFS file share on the guest VM by entering \\192.168.1.190\FOLDERNAME.

However, the guest VM fails to show up in the list of Network devices through both Windows Explorer on Windows and File Explorer on MacOS.

2. Yes. I should have been more specific. The ASUS Wireless Router is a DHCP server. Within the ASUS router I have associated the guest VM Mac Address with a static IP.

@socratis

1. You are correct. The ASUS wireless router is running as a DHCP server. My bad.

2. My apologies as I do not understand NetBIOS or TCP. What I attempted to say is that the results of the guest VM are identical between both Windows and MacOS clients.

3. Sorry for not being more clear. There are 2 devices. One is a Physical Device running Ubuntu 14.1. The other is a Virtual Machine running the same install of Ubuntu 14.1.
There are two separate machines.
The first Physical Machine shows up on the network by the correct hostname (UBUNTU-SERVER).
The second Virtual Machine only shows up on the network through the IP address and not the hostname.