2

I have two virtual machines:

  1. Debian (Router) with one Bridged Adapter and three Internal Network adapters
  2. Ubuntu with one Internal Network adapter

I installed on Debian DHCP server, I'd like Ubuntu machine to get IP address from the DHCP server that is installed on Debian. But it is not working.

My configuration files:

Debian

/etc/network/interfaces

#   The loopback network interface auto lo
iface lo inet loopback

#   The primary network interface allow-hotplug eth0
iface eth0 inet dhcp

#   servers
auto eth1
iface eth1 inet
static address 192.168.1.1
netmask 255.255.255.0

#   administration auto eth2

iface eth2 inet
static address 192.168.2.1
netmask 255.255.255.0

#   hotel guests
auto eth3
iface eth3 inet
static address 192.168.3.1 
netmask 255.255.255.0

And /etc/dhcp/dhcpd.conf

subnet 192.168.3.0 netmask 255.255.255.0 {
   eth3;
   range 192.168.3.2 192.168.3.254;
   option routers 192.168.3.1;
   option domain-name-servers 192.168.1.2;
}

restart dhcp and networking - no error

Ubuntu machine:

/etc/network/interfaces

auto lo 
iface lo inet loopback

auto eth1
iface eth1 inet dhcp

next, service networking restart I get this message:

enter image description here

IP address is not assigned. Why? Give more information?

1
  • any ideas guys?
    – lukassz
    Dec 27, 2015 at 16:08

1 Answer 1

1

How do you know that the NIC eth3 is attached to the same internal network as your Ubuntu Guest? Because of problems in NIC naming, you might very well have that eth3 is attached to a different internal network than your Ubuntu VM.

One way to solve this is to have your DHCP server listening on all internal interfaces, then the Ubuntu VM would probably get a DHCP offer.

Another solution is to specify, for the 4 adapters of the Debian VM, four different hardware implementations, then write appropriate udev rules to attach them to the appropriate names, eth1, eth2, eth3.

6
  • Ok, thanks for answer. How to put DHCP server to listen on all internal interfaces?
    – lukassz
    Jan 5, 2016 at 9:40
  • @lukassz Which DHCP server are you using? Dnsmasq? Isc-dhcp-server? Jan 5, 2016 at 9:43
  • Isc-dhcp-server
    – lukassz
    Jan 5, 2016 at 9:53
  • @lukassz Then modify the file /etc/default/isc-dhcp-server to contain a line like INTERFACES="eth1 eth2 ...". Jan 5, 2016 at 10:06
  • I do not mind it at this on eth1, eth2 (debian machine) addresses are set static?
    – lukassz
    Jan 5, 2016 at 10:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .