We propose an efficient scheme called CoReS (Configuration and Registration Scheme) that integrates address assignment and service location for ad hoc networks prevalent in pervasive computing environments. CoReS exploits node heterogeneity such that more capable and stable nodes serve others. CoReS allocates addresses to individual nodes locally, but employs global allocation states to handle network merge situations. In addition, CoReS exploits the positive features of distributed directory services to perform service location in a centralized manner resulting in minimal communication overheads. We analyze the characteristics of CoReS architecture, evaluate its performance and compare with other schemes. Through the evaluation and comparison, we demonstrate that the integrated CoReS system exhibits high efficiency and cross-layer optimization.