Abstract-We present a framework to simulate a peer-topeer (P2P) file-sharing network, based on the Discrete Event Systems Specification (DEVS) formalism. Our framework models a file-sharing network as a coupled model, comprising a network model and a large number of peer models. While most available network simulation tools focus on transportlevel dynamics, we provide extensible and reusable models for the file-sharing protocol and for the behavior of peers. These models, implemented using the CD++ toolkit, can readily be used on existing simulators, including parallel and real-time simulators.As a case study, we apply our framework to simulate a P2P web, and show the emergence of an interesting page distribution.