1. In a wireless ad hoc network comprising a plurality of nodes, a method comprising the steps of: at a first primary node: receiving a domain name service (DNS) query from a node; determining whether the query can be resolved based on cached information; and if the DNS query can be resolved based on cached information, sending a response to the node; otherwise, sending the DNS query outside the ad hoc network for resolution.