0

Is there a way that I can configure dhcpd to create a separate dhcpd.lease for each subnet?

i.e:

subnet 192.168.0.0 - \var\lib\dhcp\dhcpd.168.0.0.lease

subnet 192.168.1.0 - \var\lib\dhcp\dhcpd.168.1.0.lease

subnet 192.168.2.0 - \var\lib\dhcp\dhcpd.168.2.0.lease

2
  • What problem are you actually trying to solve? If your solution involves parsing lease files you should re-think it. Commented Oct 20, 2017 at 8:59
  • At this moment all of the leases from devices in multiple subnets are stored in one lease file (\var\lib\dhcp\dhcpd.lease). I want to configure the dhcp server so that it creates a seperate lease for each subnet. Is that possible? Commented Oct 20, 2017 at 9:11

1 Answer 1

0

You shouldn't need to do that.

The leases file is an internal database of dhcpd. There is no reason for you to look at it.

If you want to know which host is at which IP address, then look at dynamic DNS; that's what it's for.

If you want to know which IP addresses are active, then... also look at dynamic DNS, and try using dig axfr <your.domain>?

If you want to clean it up, then don't -- dhcpd will do that all by itself from time to time.

If you want to do something else, then clarify what exactly it is you want to do. I'm sure there is a better solution to do that which does not require separate lease files.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.