Within computational Grids, some services (typically software components, e.g., linear algebra libraries) are made available by some servers to some clients. In spite of the growing popularity of such Grids, the service discovery, although efficient in many cases, does not reach several requirements. Among them, the flexibility of the discovery and its efficiency on wide-area dynamic platforms are two major issues. Therefore, it becomes crucial to propose new tools coping with such platforms. Emerging peer-topeer technologies provide algorithms allowing the distribution and the retrieval of data items while addressing the dynamicity of the underlying network. Whereas merging peer-to-peer technology and Grid infrastructures has been widely suggested, very few implementations are available. The contribution of this paper is twofold. First, This work has been supported in part by the ANR project LEGO (ANR-05-CIGC-11).we present the design, the implementation and the experimentation of the first architecture, to our knowledge, extending traditional NetworkEnabled Servers (NES) systems with an unstructured peer-to-peer network. This extension allows to dynamically connect distributed agents thus providing to clients an entry point to servers geographically distributed. Our implementation is based on the Diet middleware and the JXTA toolbox and experimentation have been conducted on a high speed network. Then, we study the service discovery in a pure peer-to-peer environment. We describe a new trie-based approach for the peer-to-peer service discovery service, supporting range queries while providing fault-tolerance and taking into account the topology of the underlying network. We validate this approach both by analysis and simulation.