[Freeipa-users] What is the next free IP address for a DNS record
Simo Sorce
simo at redhat.com
Thu Mar 9 13:07:31 UTC 2017
On Thu, 2017-03-09 at 13:33 +0100, Kees Bakker wrote:
> On 09-03-17 13:26, Tomas Krizek wrote:
> > On 03/09/2017 01:19 PM, Kees Bakker wrote:
> > > On 09-03-17 12:08, Martin Basti wrote:
> > > > 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 A records only translate the hostnames to IPv4 addresses. DNS
> > does
> > not assign the addresses. That's something DHCP would do. If you do
> > not
> > use DHCP and assign the IP addresses statically, the network
> > administrator would be the person responsible for assigning you a
> > free
> > IP address.
> >
>
> Yes, I'm talking about static addresses. Is it really such a strange
> question to
> ask for static IP addresses?
>
> The network administrator, that would be me.
Would it be sufficient to you to have a command line tool to run
against LDAP top list all existing IP addresses and sort them ?
If so this is what I use (assuming a realm called example.com):
ldapsearch -Y GSSAPI -s one -b "idnsname=example.com.,cn=dns,dc=example,dc=com" aRecord 2>/dev/null |grep "^aRecord" |sort
Note: You need to be logged in (kinit'ed) with a user that has rights
to see the DNS tree.
HTH,
Simo.
More information about the Freeipa-users
mailing list