FIG. 2 is a block diagram illustrating a system for improving client subnet efficiency by equivalence class aggregation, according to some example embodiments. As shown in the figure, an ISP 210 can aggregate clients 220 into equivalence classes 1, 2, 3, 4, 5, and 6 based on some predetermined criteria provided by the ISP 210. For example, the aggregations can be performed based on Classless Inter-Domain Routing (CIDR) blocks, a geographical area, a network topology, an organization, a quality of service, and specific subscriber IDs. When a DNS query is received from a client, it can be determined, based on these criteria which equivalence class the client belongs to. For example, the client can be determined to belong to an equivalency class based a client identifier. In the figure, the client belongs to equivalence class 4. The DNS query is then resolved according to resolution rules associated with the class. The equivalence class can be represented by a representative CIDR block 240. The representative CIDR block can be part the client subnet data added to the DNS query if a recursive server associated with the ISP 210 needs to query authority 250.
The resolution of the DNS query may include searching a cache 230 associated with class 4 for an answer corresponding to the DNS query. If the answer is found in cache 230, the answer is served back to the client. If, on the other hand, the answer is not found in cache 230, the recursive server can query authority 250. The recursive server associated with ISP 210 may add client subnet data associated with the equivalence class to the query. The client subnet data may be provided using a client subnet option associated with EDNS0.