Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm writing simple program to configure and monitor DHCP server on my Ubuntu 12.04. What I'm trying to achieve that my physical machine will be DHCP server and my VM (virtual machine) get one lease (and I read that information in leases file).

I use isc-dhcp-server. I turned off network-manager during tests. I use VirtualBox to host VM, network is configured to use bridge adapter. Server starts OK, but when my VM is running I got following messages:

Jun 16 12:15:59 asus dhcpd: DHCPOFFER on 192.168.1.3 to 08:00:27:15:26:a6 (ubuntu) via eth0
Jun 16 12:15:59 asus dhcpd: DHCPDISCOVER from 08:00:27:15:26:a6 (ubuntu) via eth0
Jun 16 12:15:59 asus dhcpd: DHCPOFFER on 192.168.1.3 to 08:00:27:15:26:a6 (ubuntu) via eth0
Jun 16 12:16:12 asus dhcpd: DHCPDISCOVER from 08:00:27:15:26:a6 (ubuntu) via eth0

VM don't get any DHCPOFFERs at all. Any ideas how to solve this problem? Or different way to test DHCP server locally? I appreciate any help. Thanks in advance.

----------------------------

Here's my DHCP server configuration:

/etc/network/interfaces

iface eth0 inet static  
address 192.168.1.2  
netmask 255.255.255.0  
gateway 192.168.1.1  
broadcast 192.168.1.255

/etc/dhcp/dhcpd.conf

ddns-update-style none;
default-lease-time 600;
max-lease-time 7200;

authoritative;
allow booting;
allow bootp;

subnet 192.168.1.0 netmask 255.255.255.0 {
  interface eth0;
  range 192.168.1.3 192.168.1.254;
  option routers 192.168.1.1;
  option subnet-mask 255.255.255.0;
  option broadcast-address 192.168.1.255;
}

/etc/default/isc-dhcp-server

INTERFACES="eth0"
share|improve this question
add comment

1 Answer

Ok, I've found different solution. I use two virtual machines in Internal network. One of them use static IP address and has DHCP server configured. The second VM finds DHCP server and get IP from range.

share|improve this answer
add comment

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.