Aliased network interfaces and isc dhcp server

Posted by Jonatan on Server Fault See other posts from Server Fault or by Jonatan
Published on 2013-11-05T21:26:30Z Indexed on 2013/11/05 21:55 UTC
Read the original article Hit count: 326

Filed under:
|
|
|

I have been banging my head on this for a long time now. There are many discussions on the net about this and similar problems, but none of the solutions seems to work for me.

I have a Debian server with two ethernet network interfaces. One of them is connected to internet, while the other is connected to my LAN.

The LAN network is 10.11.100.0 (netmask 255.255.255.0).

We have some custom hardware that use network 10.4.1.0 (netmask 255.255.255.0) and we can't change that. But we need all hosts on 10.11.100.0 to be able to connect to devices on 10.4.1.0. So I added an alias for the LAN network interface so that the Debian server acts as a gateway between 10.11.100.0 and 10.4.1.0.

But then the dhcp server stopped working.

The log says:

No subnet declaration for eth1:0 (no IPv4 addresses).
 ** Ignoring requests on eth1:0.  If this is not what
    you want, please write a subnet declaration
    in your dhcpd.conf file for the network segment
    to which interface eth1:1 is attached. **

No subnet declaration for eth1:1 (no IPv4 addresses).
 ** Ignoring requests on eth1:1.  If this is not what
    you want, please write a subnet declaration
    in your dhcpd.conf file for the network segment
    to which interface eth1:1 is attached. **

I had another server before, also running Debian but with the older dhcp3 server, and it worked without any problems. I've tried everything I can think of in dhcpd.conf etc, and I've also compared with the working configuration in the old server.

The dhcp server need only handle devices on 10.11.100.0.

Any hints?

Here's all relevant config files:

/etc/default/isc-dhcp-server

INTERFACES="eth1"

/etc/network/interfaces

(I've left out eth0, that connects to the Internet, since there is no problem with that.)

auto eth1:0
iface eth1:0 inet static
    address 10.11.100.202
    netmask 255.255.255.0

auto eth1:1
iface eth1:1 inet static
    address 10.4.1.248
    netmask 255.255.255.0

/etc/dhcp/dhcpd.conf

ddns-update-style none;
option domain-name "???.com";
option domain-name-servers ?.?.?.?;

default-lease-time 86400;
max-lease-time 604800;

authorative;

subnet 10.11.100.0 netmask 255.255.255.0 {
    option subnet-mask 255.255.255.0;
    pool {
        range 10.11.100.50 10.11.100.99;
    }
    option routers 10.11.100.102;
}

I have tried to add shared-network etc, but didn't manage to get that to work. I get the same error message no matter what...

© Server Fault or respective owner

Related posts about debian

Related posts about dhcp