I have 2 networks ( &, and 1 DHCP server.
I need to serve DHCP for 2 networks, but it doesn't work. Second network ( (PC & Notebook) always gets IP from range despite that it has 2 ranges. How I should to configure it?

Router OS: Ubuntu Server 10.04
Client OS: Ubuntu 10.04


  • This should probably be moved to ServerFault.com Jun 19 '10 at 19:08
  • Why do you have two separate subnets? What are you trying to gain by doing this? It isn't clear from your diagram. Does the 'router' have two separate interfaces inside, one for and one for or one interface with both networks? Do you have multiple switches one for each subnet?
    – Zoredache
    Jun 21 '10 at 3:16

Is the DHCP server dual-homed (has an IP address on both networks)? Your DHCP server should have an interface listening on each subnet: one listening to the network and the other listening to the network. The startup for dhcpd should be configured to listen on each interface.

Dhcpd also has the option to create a shared network containing both subnets, but I think this will essentially pool your addresses and you won't be able to control which machines receive addresses for a particular subnet.

  • +1, You can also use a DHCP proxy if the server isn't on the subnet you want to serve, but it's generally not the best idea.
    – Chris S
    Jun 21 '10 at 2:13

The problem with two subnets is, how the dhcp server should decide which one to provide. I would give defined host entries for you computers:

host notebook {
    hardware ethernet 00:AB:CD:EF:GG:GG;
  • 1
    No, the DHCP server will give an address that corresponds with the NIC where the request was received. This applies by extension to DHCP Proxies, using the NIC where the original DHCP Discover was received.
    – Chris S
    Jun 21 '10 at 2:12

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.