# How to configure dhcp from 172.16.101.51 to 172.16.104.254 netmask 255.255.252.0?



## Detective (Nov 2, 2009)

```
authoritative;

default-lease-time 3600;
max-lease-time 86400;

ddns-updates on;
ddns-update-style interim;
update-static-leases on;
allow client-updates;

subnet 172.16.0.0 netmask 255.255.252.0 {

  option domain-name "pm1.ktl";
  do-forward-updates true;
  option domain-name-servers 172.16.101.1;
  option routers 172.16.101.1;
  option subnet-mask 255.255.252.0;
  option broadcast-address 172.16.104.255;
  range 172.16.101.51 172.16.104.254; //ERROR IS HERE!!!

include "/etc/namedb/rndc.key";

zone pm1.ktl. {
  primary 127.0.0.1;
  key rndc-key;
}

zone 16.172.in-addr.arpa {
  primary 172.16.101.1;
  key rndc-key;
}
```
Pls show me how to configure it! Thanks!


----------



## DutchDaemon (Nov 2, 2009)

subnet 172.16.0.0 netmask 255.255.252.0 = 
172.16.0.0 - 172.16.3.255

The range (172.16.101.51-172.16.104.254) is *way* out of your subnet declaration. And so are your gateway and broadcast address. I don't think a broadcast address of 172.16.104.255 is even possible, except in a /24 (255.255.255.0) network.


----------



## SirDice (Nov 2, 2009)

101.51 - 104.254 is in two 22 bit subnets. Namely 172.16.100.0/22 and 172.16.104.0/22.


----------



## Detective (Nov 2, 2009)

I solved the problem by this site: http://www.subnetmask.info/
Thank everyone!
The IP range must be 172.16.100.0-172.16.103.254
subnet 172.16.100.0 netmask 255.255.252.0
broadcast address 172.16.103.255


----------



## SirDice (Nov 2, 2009)

sysutils/ipsc


----------



## DutchDaemon (Nov 2, 2009)

net-mgmt/cidr


----------

