I'm using Openldap for IAM, and consider using it also as a configuration management backend.
The rfc2307bis schema has an ipHost class, which allows for ipHostNumber attribute, but not for the network mask. Then, there is ipNetwork class, which has ipNetworkNumber and ipNetmaskNumber attributes. Example:
dn: cn=testnet,dc=netw,dc=example,dc=net
cn: testnet
ipNetworkNumber: 192.168.1.0
ipNetmaskNumber: 255.255.255.128
objectClass: top
objectClass: ipNetwork
dn: cn=host.example.net,dc=netw,dc=example,dc=net
cn: host.example.net
ipHostNumber: 192.168.1.3
macAddress: 08:00:27:aa:bb:cc
objectClass: device
objectClass: ipHost
objectClass: ieee802Device
As all attributes mentioned use dotted-decimal syntax, I wonder, how to construct an LDAP query to efficiently retrieve the value of the network mask for a given host? Or should I just extend the schema?
0 Answers