first question here...

Premise: this started trying to setup a VM for mucking around with some completely unrelated software... since i want to connect to it through ssh, for ease of configuration (and maybe later, let the server in the VM serve some web pages) I set up a bridged network in Virtualbox I can ping fine with the IP address my host from the vm and vice-versa, but i can't resolve the hostnames...

I already set up BIND on my host for caching dns, so if needed i could tweak something on it if it would be useful to solve this.

I actually never really dig into this topic: sometimes i changed the dns configuration or other simple things on the client side, never bothered to really understand how they work on the server side

So I thought that the responsibility of adding the hostnames to its table was a duty of the dns server...

Instead it seems that (correct me if i'm wrong) it's obviously a duty of the dhcp server to communicate to the dns server the hostnames when an ip address is leased

This means that on the client side there seems to be only one possible misconfiguration: the client doesn't communicate to the dhcp server its hostname when getting the ip (and it seems that on modern linux machines it's like this out-of-the-box)

line 16 of my vm's /etc/dhcp3/dhclient.conf:

send host-name "<hostname>";

So, unless i'm wrong, it seems completely a fault of the local dhcp server if I don't get my names resolved...

The problem is: I'm living here, but this isn't actually my house (sharing with other 2 guys), so: i could ask for the router password, but i can't blindly tweak it as my liking.

Even if i could, when i was at my home, i didn't remember much configuration possible for the dhcp server (this one is some netgear wifi router btw)

Afaik, having 2 dhcp servers on the same network could be a bit of a problem (and definitely overkill for a home network and only for resolving the name of the vm... )

In the meanwhile i'll simply add the vm's ip address to my /etc/hosts (i guess that another possible solution could be to install avahi-daemon)

Any suggestion/clarification?


Having more than one DHCP server on the same network can cause unexpected behavior if they are configured differently, and I would avoid that on a home network unless you have a specific use case for it.

In my experience, home routers tend to have a very basic, limited implementation of DNS / DHCP. When it comes to my router, I have found that it doesn't do this at all. Without using NETBIOS / WINS, my router doesn't really support hostnames. As such, I have disabled the DNS and DHCP servers on my router and setup a dedicated DNS / DHCP server on my network.

I realize you may not be able to do this on "your" network. It looks like you already configured your VM guest to submit its name using DHCP. One other possibility is to setup WINs / NETBIOS on your guest so that it broadcasts its hostname to all other machines on the network. This will certainly make its host name resolvable to most machines on the network. It may not be ideal, but it should work.

The only other alternative I can offer is to setup your own DNS / DHCP server and convince your roommates to let you use your server for DNS / DHCP and shut off those services on the router.

  • 1
    I've moved out of that place since 2 years, but thanks nonetheless :) at least now I know that I'm not alone when dealing with such problems... and that routers can have varied and weirdly different behaviour – berdario Aug 28 '13 at 17:20

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.