# dhcp limit lease per interface



## spring_64 (Jan 12, 2019)

Hi,
I have two question about DHCP. In cisco routers I notice that we have two commands:


```
R1(config)#ip dhcp limit lease per interface ?
  <1-65535>  Number of dhcp lease per interface
 
R1(config)#interface f0/0
R1(config-if)#ip dhcp limit lease ?
  <1-65535>  Number of dhcp lease per interface
```

I think the command number one is global for all interfaces and the other one is for particular interface.

In dhcpd.conf, which commands for implementation of these rules?


----------



## Phishfry (Jan 12, 2019)

> *Client Classing*
> It is possible to specify a limit on the total number of clients within a particular class or subclass that may hold leases at one time


https://www.isc.org/wp-content/uploads/2017/08/dhcp41conf.html#CLIENT CLASSING


----------



## Phishfry (Jan 12, 2019)

For something simpler couldn't you just limit the *'range'* directive of IP's to suit your interface? In this case I limit it to 12 leases.
This will means there are only 12 IP's for it to give out for that interface. Hence limiting leases per interface.

```
}
#CPE subnet
interface em1;
subnet 192.168.224.0 netmask 255.255.224.0 {
authoritative;
option routers 192.168.224.1;
range 192.168.225.1 192.168.225.12;
optiion domain-name-server 8.8.8.8;
default-lease-time 3600;
max-lease-time 7200;
allow unknown-clients;
}
```


----------

