Hey all. Bit of a possibly simple DHCP issue with my Ubuntu 10.04 Server (VMWare Guest). When I sudo dhclient eth0 it sends out plenty of DHCPDISCOVERs but doesn't get any DHCPOFFERs back from the router. Ping commands at this stage show connect: Network is unreachable.

Breakdown of the situation and troubleshooting I have already tried is below:

Previously: Ubuntu 8.04 Server was working perfectly with no modifications to package maintainer configs except aliasing in /etc/modprobe.d/aliases to disable IPv6.

Network topology: VMWare Guest using a network bridge to share the host's adapter. Host computer (XP Pro SP3) has a DHCP-assigned address (bound to a MAC address in the router config, as is the virtual machine as well). Another PC on the network is Xubuntu 10.04 Desktop. Others are XP Pro SP3/Vista Premium SP2. No issues with DHCP on any of these, they are all set up for full autoconfig. All computers connected via the same switch to a Draytek Vigor2820n.

Note: There is a DHCP issue with the Xubuntu 10.04 Desktop, which was temporarily solved by rm /etc/dhcp3/dhclient.conf, even though the .conf was the package maintainer's version. It's still broken, actually, nslookup works but firefox doesn't.

What I can do: Ping IPs on the network if I set VMWare's Network Adapter setting to NAT (our network is 192.168.1.* and the NAT is 192.168.0.*; I could ping on both networks). The hostname doesn't appear in the router config though, and if you attempt to access the IP in e.g Firefox it seems to find something but times out (running Apache on the server so I was trying to access that). I can access the VM by hostname from its host computer in this state.

Troubleshooting steps so far:

  • Installed winbind and added wins entry to /etc/nsswitch.conf on the hosts line
  • Blacklisted ipv6 in /etc/modprobe.d/blacklist.conf, aliased net-pf-10 to off, ipv6 to off in /etc/modprobe.d/aliases, set net.ipv6.conf.all.disable_ipv6=1 in /etc/sysctl.conf and rebooted. (interestingly, just now the VM didn't boot at all. smbd was terminating at startup because I had auto eth0 inet6 dhcp in /etc/network/interfaces)
  • Configured eth0 in /etc/network/interfaces with a static address/netmask/broadcast/gateway (similar to NAT, this allows me to ping by IP but it still doesn't register its hostname on the network. Interestingly enough, I can again access the VM by hostname from its host computer)
  • Changed /etc/dhcp3/dhclient.conf to send host-name "ubuntu" (that's the computer name) and request everything possible from the DHCP server (default config has it in there but it's commented out). I have since deleted dhclient.conf.
  • Set nameserver (the router) in /etc/resolv.conf (Not registering properly with the router means I can't ask it to resolve DNS queries. I think this is purely a side effect, though it may be indicative of a different issue).

I can provide output of any any all commands/files on either the server or my desktop (Xubuntu 10.04). Current settings for dhclient (no file), network/interfaces (auto eth0, iface eth0 inet dhcp), resolv.conf (nameserver and nsswitch (hosts: files mdns4_minimal wins [NOTFOUND=return] dns mdns4) are sensible, unless we can find a way to resolve hostnames without WINS once DHCP is working.

Output: ifconfig

eth0      Link encap:Ethernet  HWaddr <MACADDR>
          inet addr:  Bcast:  Mask:
          RX packets:65027 errors:0 dropped:0 overruns:0 frame:0
          TX packets:19745 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:5230093 (5.2 MB)  TX bytes:2854793 (2.8 MB)
          Interrupt:18 Base address:0x1400 

lo        Link encap:Local Loopback  
          inet addr:  Mask:
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:136 errors:0 dropped:0 overruns:0 frame:0
          TX packets:136 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:12688 (12.6 KB)  TX bytes:12688 (12.6 KB)

To explain the acquired IP, right now I'm running it in "Host-only" mode just so that I can mount shares from the host computer to run processes which need to run in our business. If I set it to Bridged the output is the same minus the inet addr/bcast/netmask.

Output: dhclient (v3.1.3)

Listening on LPF/eth0/<MACADDR>
Sending on LPF/eth0/<MACADDR>
Sending on Socket/fallback
DHCPDISCOVER on eth0 to interval 5
DHCPDISCOVER on eth0 to interval 6
DHCPDISCOVER on eth0 to interval 12
DHCPDISCOVER on eth0 to interval 18
DHCPDISCOVER on eth0 to interval 10
DHCPDISCOVER on eth0 to interval 9
DHCPDISCOVER on eth0 to interval 1
No DHCPOFFERS received.
No working leases in persistent database - sleeping.

(I have also tried sending to with the same result)

Thx in advance. Spent 3 days on this already so a different perspective is definitely welcome.

Also recently installed a fresh Ubuntu 10.04 Server on the latest VMWare Player. Same issue out of the box. I'm in the process of setting up a VirtualBox VM, it's taking a while since I have to compile the Open Source Edition and so I need VC++ Express. I'll let people know how that goes.

I'm stupid. The DHCP issue was resolved by disabling the firewall on the host. There's still a problem resolving DNS queries though.

2 Answers 2


Disabling packet filtering on the host firewall allowed DNS queries to resolve properly. I still have trouble accessing the HTTP services beyond the login page of our intranet but that would be a different issue I imagine.


Does your VM allow you to Dynamically register it's name with a DNS server? I've tried everything with 10.04.01 / VM to get it to register with our DNS servers and nothing has worked. 8.04 LTS is fine (after tweaking the dhclient.conf)

  • Ubuntu Server's dhclient sends the hostname as one of the things it does when it registers with the DHCP server. The DHCP server should update DNS hostnames if it's the one being queried, and particularly if it renews a DHCP lease it should notify its (internal, external) DNS server of the updated information. The respective dhclient.conf command is send host-name "myhostname";
    – user41758
    Jul 29, 2010 at 0:27
  • Another way to get your hostname registered on a Windows DHCP Server would be to install the samba suite, particularly nmbd. An excerpt from the nmbd man page: nmbd is a server that understands and can reply to NetBIOS over IP name service requests. nmbd will listen for such requests, and if its own NetBIOS name is specified it will respond with the IP of the host it is running on. Its "own NetBIOS name" is by default the primary DNS name of the host it is running on, but this can be overridden by the netbios name in smb.conf. Thus nmbd will reply to broadcast queries for its own name(s).
    – user41758
    Jul 29, 2010 at 0:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy