On 09.03.2017 13:19, Kees Bakker wrote:
> On 09-03-17 12:08, Martin Basti wrote:
>> Comments inline
>> On 09.03.2017 11:12, Kees Bakker wrote:
>>> Hey,
>>> Is there an easy way to find out what the next free IP address is when 
>>> adding a new
>>> DNS A record? The web interface sorts the records alphabetically on "Record 
>>> name",
>>> even in-arpa zones. For the latter it would be more convenient to sort 
>>> numerically.
>> No, it depends on your system. FreeIPA is not an authoritative source of
>> IP addresses, this is job for DHCP server or any network management system.
> DHCP, no.
> "any network management system", that would be the DNS service in our FreeIPA.
DNS is not suitable to be a source of unused IP addresses, that's work
for DHCP, DNS has no information about network ranges.
FreeIPA works in different way, you are responsible for creating and
provisioning a host, assigning an IP address and then enroll the host to
FreeIPA (IP address should be automatically updated in DNS). FreeIPA is
so far from being a network management system.

>> I don't think that we should sort numerically as DNS names works with
>> bytes, so ASCII sorting is better. Nothing prevents you to use
>> non-numeric domain with PTR RR type.
> In this case I was referring to the reverse DNS records in the in-arpa
> zones. The Record Name for these zones are alway numeric, aren't they?

>>> Anyway, what methods are there to know what IP address to use when adding a 
>>> new
>>> DNS record? Did I overlook something?
>> Usually when you are adding a new A record, you know for which host it
>> belongs, so you should use the IP address of the host.
> I'm not talking about an existing host. I want to add a _new_ host
> with a _new_ DNS A record. There is no IP address yet. And that's exactly
> my problem. What IP address to pick? FreeIPA/DNS is my authority, so to speak.
> But there is no simple method to find the next free IP address.
> In the "old days" we had a straightforward bind configuration. I'd had to edit
> two files, one for the domain zone and one for the in-arpa zone. But now the
> DNS server gets its zone information from FreeIPA (through LDAP).
You can use AXFR from DNS to get all records from zone, sort it and
check free IP addresses.
But there is no standard tool for that in DNS. You have to create your
own script
>>> BTW. Right now I'm dumping the JSON with
>>>   ipa -vv dnsrecord-find mydomain --sizelimit=99999 --all --structured  
>>> 2>&1 >/dev/null
>>> and a Python script to make a list sorted on ip address.
>> Martin

Attachment: signature.asc
Description: OpenPGP digital signature

Manage your subscription for the Freeipa-users mailing list:
Go to http://freeipa.org for more info on the project

Reply via email to