Peer-to-peer (P2P) systems account for more than half of Internet traffic today, and an increasing number of user applications, e.g., Bittorrent, eDonkey, Joost, Skype, GoogleTalk, and P2P-TV, rely on P2P methodology. P2P systems build overlays at the application layer, independently of Internet routing and ISP topologies. This leads to measurement traffic overhead and routing inefficiencies for P2P users. While P2P applications spur broadband access, they also take customers away from traditional telephones and pose significant traffic engineering challenges for ISPs, thus putting them in a dilemma! Some ISPs have resorted to impeding P2P traffic by bandwidth shaping, though unsuccessfully. Meanwhile, some P2P applications attempt to measure the network latency to potential neighbours, e.g., by ping measurements, to choose high-performance network paths. However, such measures have not addressed the routing conflict between ISPs and P2P systems. Our measurement study and visualization-based analysis finds that the overlay topology of P2P systems is not correlated with the Internet AS topology, and that a larger number of overlay peerings cross AS boundaries multiple times. In this thesis, we propose a simple, general and unique solution that enables ISPs and P2P systems to collaborate with each other. We propose that an ISP hosts a server, which we call the oracle, that helps P2P users choose “good” neighbours. The P2P user sends the list of its potential neighbours to the oracle, which ranks this list of IP addresses based on a number of factors, that an ISP decides individually. For example, the ISP can prefer peers within its network, to prevent traffic from leaving its network. Further, it can choose better bandwidth or lesser delay nodes, or those that are geographically closer (same city, same PoP) within its network. The oracle returns this sorted list to the P2P user, who can then benefit from the knowledge of the ISP and connect to a neighbour recommended by the oracle. This will not only reduce costs and ease routing for ISPs, but will also provide improved performance for P2P users in the sense of higher bandwidth and lesser delay. In this way, ISPs and P2P systems can cooperate so that both of them benefit. We have conducted a comprehensive analysis of this proposal using graph experiments, testbed implementation, Planetlab deployment, and packet-level simulations on various models of P2P systems. The graph results show that P2P users, on consulting the oracle, are able to keep most of their peerings within the ISP boundaries, without any adverse effects on the overlay graph structural properties. A theoretical analysis of the congestion caused by shorter network paths of P2P links reveals that the congestion in the network is close to the theoretical optimum, while almost all the overlay peerings are formed in accordance with the ISP policies. Through testbed implementation and Planetlab deployment, we show that the ISP-P2P collaboration scheme is feasible with real P2P systems. The experiment results also show that the scalability of P2P systems improve considerably, and there is no adverse effect on the query search phase of the P2P networks. The P2P users are able to locate all available content from nodes at shorter network distances. Using extensive packet-level simulations, we verify the above results with the Gnutella P2P protocol under churn. We quantify the performance improvements for ISPs and P2P users, using metrics like intra-AS content exchange and content download times. We simulate multiple ISP and P2P topologies, as well as a range of user behaviour characteristics, namely, churn, content availability and query patterns, using different mathematical distributions. This enables us to study the effects of realistic, best-case, and adverse scenarios on end-user performance. We show that the benefits of our proposed ISP-P2P collaboration scheme hold across a range of user behaviour scenarios and ISP/P2P topologies. The ISPs are able to save costs by keeping a large amount of traffic within their network, perform better traffic engineering, and provide better service to customers. The P2P users benefit from faster content downloads, increased locality of query responses, and improvement in P2P scalability through reduction in overhead traffic. We extend the ISP-P2P collaboration concept to propose collaboration between multiple-ISPs by exchanging summaries of network information through the respective oracle servers. This will enable P2P and other applications to get estimates of the path properties to potential neighbours/servers both within and outside their ISPs. Using simulation results with very large topologies, we show the benefits of multiple-ISP collaboration by comparing its performance with a bandwidth-based neighbour selection scheme in P2P systems. We also show how this concept can be leveraged to build a global coordinate system, and discuss how it differs from existing coordinate systems. Lastly, we examine the viability of using the oracle service to reduce pollution in P2P file-sharing systems while preserving network locality.