Routing and resource discovery Peer-to-peer networks generally implement some form of virtual overlay network on top of the physical network topology, where the nodes in the overlay form a subset of the nodes in the physical network. Data is still exchanged directly over the underlying TCP/IP network, but at the application layer peers can communicate with each other directly, via the logical overlay links (each of which corresponds to a path through the underlying physical network). Overlays are used for indexing and peer discovery, and make the P2P system independent from the physical network topology. Based on how the nodes are linked to each other within the overlay network, and how resources are indexed and located, we can classify networks as unstructured or structured (or as a hybrid between the two).
roUtiNG aNd reSourCe disCoVerY Peer-To-peer netWOrks geneRaLLY ImplEment somE Form Of VIrtUaL overlay NetwoRk on toP of tHe phySiCAL NeTWork toPoLogy, where the Nodes In the oVerlAy Form a sUbsEt of the NOdes in thE physical netWork. dAta is stilL exChangeD dirEcTLy oVer the underlying TCp/ip nEtWOrk, bUt at The applicATion layer PeeRS caN CommunICaTe with EAch Other directLy, vIa the logical OvERlay LINks (each Of which CorrEsponds to A pATh throUGh the underLyIng phySIcAl nETwoRk). Overlays ARe usEd foR indexing aNd pEer disCoVery, anD makE THe p2p System indEpEndenT froM The physicAl NeTwOrk ToPolOgy. basED ON hOw tHe NoDes are linked to EAcH oTHer wiTHIn the Overlay nEtWoRK, And How resOurceS Are iNdExed aNd locATeD, we CAn claSsIfy nEtworKS AS UnstRUCTURed oR StructUReD (or as A HYbrid betwEen THE tWo).