Michael Ströder writes:
>Hallvard Breien Furuseth wrote:
>> When we needed to index IP subnet ranges, we defined two single-valued
>> attributes with max and min value stored as single decimal integers.
> 
> Interesting. The Integer value in your case covers the whole address (32 bits
> for IPv4 and 128 bits for IPv6)?

No, I should have said IPv4.  Our IPv6 subnets will hopefully have just a few
simple formats so a client which wants to find the subnet of an address can
just generate one or two possibilities and look it up with equality match.

> What does the whole schema look like?

attributeTypes: ( 1.3.6.1.4.1.2428.10000.971.35854.11.1.40
        NAME 'uioIpAddressRangeStart'
        DESC 'Lowest IP address in an address range, stored as an integer'
        EQUALITY integerMatch
        ORDERING integerOrderingMatch
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
        SINGLE-VALUE )
attributeTypes: ( 1.3.6.1.4.1.2428.10000.971.35854.11.1.41
        NAME 'uioIpAddressRangeEnd'
        DESC 'Highest IP address in an address range, stored as an integer'
        EQUALITY integerMatch
        ORDERING integerOrderingMatch
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
        SINGLE-VALUE )
objectClasses: ( 1.3.6.1.4.1.2428.10000.971.35854.2.106 NAME 'uioIpNetwork'
        DESC 'Information about IP networks'
        AUXILIARY
        MAY ( uioIpAddressRangeStart $ uioIpAddressRangeEnd ) )

-- 
Hallvard

Reply via email to