Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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...

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Create an empty declaration for your 10.4.1.0/24 network.

subnet 10.4.1.0 netmask 255.255.255.0 {
}

And don't use that deprecated alias nonsense for multiple addresses. You don't need it, and it just confuses things. Setup your interfaces file like this. This results in the same effective configuration if you look at it using ip addr. and ip route.

auto eth1

iface eth1 inet static
    address 10.11.100.202
    netmask 255.255.255.0

iface eth1 inet static
    address 10.4.1.248
    netmask 255.255.255.0
share|improve this answer
    
fantastic, thanks! i had no idea you could add multiple addresses without aliasing. –  Jonatan Nov 6 '13 at 7:39

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.