4

I have created two subinterfaces on eth0 :

  • eth0:0 with IP 192.168.10.1/24
  • eth0:1 with IP 192.168.11.1/24

Configured /etc/dhcp/dhcpd.conf like that:

option domain-name-server 194.204.159.1;

subnet 192.168.10.0 netmask 255.255.255.0 {
   option routers 192.168.10.1;
   option subnet-mask 255.255.255.0;
   range 192.168.10.10 192.168.10.100;
}

subnet 192.168.11.0 netmask 255.255.255.0 {
   option routers 192.168.11.1;
   option subnet-mask 255.255.255.0;
   range 192.168.11.10 192.168.11.100;
}

But when I try to start DHCP server I'm getting:

No subnet declaration for eth0:0 (no IPv4 addresses).
 ** Ignoring requests on eth0: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 eth0:0 is attached. **

No subnet declaration for eth0:1 (no IPv4 addresses).
 ** Ignoring requests on eth0: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 eth0:1 is attached. **

Config in /etc/default/isc-dhcp-server:

INTERFACES="eth0:0 eth0:1"

What is wrong with that?

0

DHCP server provides IP addresses to other machines in the network, but it needs the interface it uses to connect to the other machines to already have a static address. It will not work unless the interfaces it should use are already configured when it starts up.

Now, that does not mean that the other interfaces on your machine could not be obtaining their IP address from some other DHCP server, but it cannot autoassign itself an IP address.

So, what does /etc/network/interfaces say? How about ifconfig?

0

Try using INTERFACES="eth0.0 eth0.1", and the same int etc/network/interfaces.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.