别名networking接口和isc dhcp服务器

现在我已经在这个问题上磕了很长时间了。 网上有很多关于这个和类似问题的讨论,但是没有一个解决scheme似乎对我有用。

我有一个有两个以太网networking接口的Debian服务器。 其中一个连接到互联网,另一个连接到我的局域网。

LANnetworking是10.11.100.0(networking掩码255.255.255.0)。

我们有一些使用networking10.4.1.0(networking掩码255.255.255.0)的定制硬件,我们不能改变这一点。 但是我们需要10.11.100.0上的所有主机能够连接到10.4.1.0上的设备。 所以我为LANnetworking接口添加了一个别名,以便Debian服务器充当10.11.100.0到10.4.1.0之间的网关。

但是,然后DHCP服务器停止工作。

日志说:

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

我以前有另一个服务器,也运行Debian,但与旧的dhcp3服务器,它没有任何问题的工作。 我已经尝试了所有我能想到的在dhcpd.conf等,我也比较旧的服务器的工作configuration。

dhcp服务器只需要处理10.11.100.0的设备。

任何提示?

这里是所有相关的configuration文件:

在/ etc /默认/ ISC-DHCP服务器

 INTERFACES="eth1" 

的/ etc /networking/接口

(我把eth0忽略了,连接到互联网,因为这没有问题。)

 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; } 

我试图添加共享networking等,但没有设法得到这个工作。 无论如何我都会得到相同的错误信息

为您的10.4.1.0/24networking创build一个空的声明。

 subnet 10.4.1.0 netmask 255.255.255.0 { } 

而不要使用这个废弃的别名废话多个地址。 你不需要它,只是混淆了事情。 像这样设置你的接口文件。 如果使用ip addr查看,则会导致相同的有效configuration。 和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