11 Replies Latest reply on Jun 5, 2009 3:58 PM by ElisabethZakes

    Subnet filtering - Top XX Subnets by %

    kbrookov

      Not a SQL guy by any stretch of the imagination, help appreciated.  I saw a filter example for limiting the reports to a /24 "Subnet.CIDR = 24".  Wondering if there is a way to perform a NOT on /30's?  IE  - I want to see everything excpet /30's and maybe /29's - can you run 2 filters?

      Thanks,

        • Re: Subnet filtering - Top XX Subnets by %
          Peter.Cooper

          Hello kbrookov,

          I want to see everything excpet /30's and maybe /29's - can you run 2 filters?

          Try this filter:

          Subnet.CIDR <> 30 AND Subnet.CIDR <> 29

          Let me know if this helps!

          1 of 1 people found this helpful
          • Re: Subnet filtering - Top XX Subnets by %
            smcdonald

            Similar question - how can I do this for Custom Atttributes?
            I've added a bunch of custom attributes like type of network (VPN/Internet/Internal etc) as custom fields for the subnets but can't figure out how to use these filters on the Top 10 page - can you drop me a hint? :)

            Thanks! 

              • Re: Subnet filtering - Top XX Subnets by %
                Peter.Cooper

                The trick is that custom fields are NULL if there has never been a value set.

                When using a custom field to include (based on its value), start with:

                (Subnet.custom.DatabaseColumn IS NOT NULL) AND

                When using a custom field to exclude (based on its value), start with:

                (Subnet.custom.DatabaseColumn IS NULL) OR

                 

                How to filter subnets out of an IPAM TopXX resource

                1. Click IPAM settings > Manage IPAM custom fields > Add
                2. Database Column: 'AvoidTopXX'
                3. Description: 'Set this value to "true" if this subnet should not be in TopXX resources'
                4. Max String Length: 16
                5. Uncheck 'Add to IP addresses'
                6. Save
                7. Locate and edit your 'Top XX Subnets by % IP Address Used' resource
                8. For Filter, enter this:
                  (Subnet.custom.AvoidTopXX IS NULL) OR Subnet.custom.AvoidTopXX NOT LIKE '%true%'
                9. Submit
                10. Any subnet you don't want in this resource, set it's AvoidTopXX field to 'true'

                 

                How to filter subnets into an IPAM TopXX resource

                1. Click IPAM settings > Manage IPAM custom fields > Add
                2. Database Column: 'VPN'
                3. Uncheck 'Add to IP addresses'
                4. Save
                5. Locate and edit your 'Top XX Subnets by % IP Address Used' resource
                6. For Filter, enter this:
                  (Subnet.custom.VPN IS NOT NULL) AND Subnet.custom.VPN LIKE '%_%'
                7. Submit
                8. Any subnet you do want in this resource, set a value for VPN field