0

For a small business, I setup a small server running Ubuntu 14.04 that provides DHCP and other services. I use the isc-dhcp-server package. It currently serves 240 possible addresses, but now we have run out of addresses (everyone has a PC, cellphone, and laptop at their desk).

My configuration is simple (from /etc/dhcp/dhcpd.conf):

option domain-name "foobar.com";
option domain-name-servers 172.19.2.10;
option routers 172.19.2.1;
subnet 172.19.2.0 netmask 255.255.255.0 {
    range 172.19.2.11 172.19.2.251;
}

I'd like to add another set of addresses ranging from 172.19.3.11 to 172.19.3.251, which can still access systems on the 172.19.2 subnet.

I tried adding this:

# extend the range by another 240 addresses
subnet 172.19.3.0 netmask 255.255.254.0 {
       range 172.19.3.11 172.19.3.251;
}

and changing the netmask for the first subnet declaration to this:

subnet 172.19.2.0 netmask 255.255.254.0

However, when I restart isc-dhcp-server (using service isc-dhcp-server restart), I get an error.

So, two questions: 1) is the syntax correct in dhcpd.conf to extend the served network by another 240 addresses? 2) do I have to change the netmask of the DHCP server itself to 255.255.254.0 (its current address is 172.19.2.10 with netmask of 255.255.255.0)?

Thank you!

2

You need just one subnet:

option domain-name "foobar.com";
option domain-name-servers 172.19.2.10;
option routers 172.19.2.1;
subnet 172.19.2.0 netmask 255.255.254.0 {
    range 172.19.2.10 172.19.2.250;
    range 172.19.3.10 172.19.3.250;
}

And all devices on the network which use static IPs (especially your DHCP server) must have their netmask changed to 255.255.254.0 in their network configuration.

  • Thank you. I tried this yesterday. I changed the netmask of my DHCP/DNS system's 'em1' network interface (whose address is 172.19.2.10) to 255.255.254.0 using ifconfig(8), and also changed the netmask of four internal servers. But I then had a problem where client systems no longer had internet access. I could not ping www.google.com or find any non cached web page addresses. The network router, which is at address 172.19.2.1, has a netmask of 255.255.255.0. Would this have to change as well? I'm thinking that responses cannot get back to the requesting client from the router? – Harry Hendo Dec 12 '16 at 15:04
  • I said very clearly that all devices on the network must have their netmask changed. – fkraiem Dec 12 '16 at 19:31

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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