Patent ID: 7103679

Claim:
A method in a data processing system for identifying subnet address ranges for subnets being used in a network, comprising: determining a plurality of addresses of hosts in the network; accessing a binary tree, the binary tree having a root node having no parents, parent nodes including the root node each having a pair of child nodes, and leaf nodes having no child nodes, such that the root node represents the entire range of addresses available in the network, such that each child node in a pair of child nodes represents a distinct half of the range represented by the parent node of the pair of child nodes, and such that each leaf node represents a single network address that is within the address ranges represented by all of the ancestors of the leaf node, each determined host address being represented by a leaf node; traversing the binary tree in preorder to identify candidate nodes such that both child nodes of each candidate node have one or more descendant leaf nodes representing a determined host address; testing the address range represented by each visited candidate node to determine whether the address range is a subnet address range for a subnet being used in the network; if testing indicates that a visited candidate node represents an address range that is a subnet address range for a subnet being used in a network, identifying the visited candidate node as a subnet node; and skipping, in the traversal, any candidate nodes that are descendants of an identified subnet node.