How to set up smartphones and PCs. Informational portal
  • home
  • Interesting
  • What is peer-to-peer transmission. What is desirable to do when exchanging? Differences from the standard network

What is peer-to-peer transmission. What is desirable to do when exchanging? Differences from the standard network

Introduction …………………………………………………………………… ...… 3

Chapter 1. Peer-to-peer networks ………….….….… .. …………………………… ...… ..4

      General concept ………… ............................................ ...................…4

      Peer-to-peer network ... ............................................... .......................... 7

      Peer-to-peer file-sharing network ……………………… ... ……… ..9

Chapter 2. Networks and protocols (for example eDonkey2000) ……………………… ..10

      eDonkey2000 (network) ………. ………………………………… ..… .10

Conclusion ……………………………………………………. ……………… ... 13

References ……………………………………………. ……………… ... 15

Electronic resources ……………………………………………………… ... 16

Introduction

We all somehow share information with the people around us. In the case when we share files using programs like eMule ( eMule), eDonkey(eDonki), and others like them, this kind of exchange is associated with the work of a huge machine, the principles of operation of which, its origins and the ideas on which it is built, we often imagine rather poorly.

The need to have access to a huge amount of information lying on other computers first gave rise to local networks. This helped for a while, but it turned out to be impossible to combine a large number of computers in this way. The ability to access files that someone else might have was very tempting. Therefore, a system was proposed that allows you to receive and transfer files from each computer with which there is a connection and on which there is certain software. Such systems are called p2p or peer-to-peer networks. This phrase can be translated as "equal exchange". This means that you, having some files that may be of interest to someone else, allow those who want to copy them from you, and in return you get the opportunity to get the files you need from those who have them.

Since the Internet is now becoming more and more widespread, the use of peer-to-peer networks is more relevant every day. Indeed, today it is much easier to find the required file (a favorite movie, a new program for your "electronic friend", a song of your favorite star, a book and just any file you are interested in) if you know what peer-to-peer networks are, and you know how to use them.

Chapter 1. Peer-to-peer networks

1.1. General concept

One of the main difficulties in implementing such an exchange was that it was necessary to somehow find those who have what you need. There are two main ways to solve this problem: centralized and distributed servers. In the case of working with a centralized server, each user must register on this server, which will collect information about the user (files available for exchange, user ID, etc.), and then enter this information into its database, according to which it will be in further go search. All files requested by the user will be searched for in the database of the central server, and the links found will be transmitted to the user to establish a direct connection with the computer that has the necessary information. It is on this principle that the popular KaZaa and other peer-to-peer applications work. The described method of exchanging files using one or several central servers is based on the so-called FastTrack protocol, which is commercial, which somewhat negatively affects the development of applications that use it.

When the central server does not exist, the Gnutella protocol is used, which transfers the user's request not to the central server, but directly to other computers on the network. The user is both a client and a server of the peer-to-peer network. Such systems are less demanding in terms of admitting and registering new members and are distinguished by a huge speed of request propagation. The number of interviewed sources is increasing exponentially. An example application that uses this approach is Morpheus.

The undoubted pioneer of peer-to-peer systems was Napster, who fell under the hot hand of copyright defenders. A few months after the appearance of Napster, IMesh saw the light. Unlike Napster, IMesh is still alive today.

After the closure of Napster, peer-to-peer applications began to appear at a monstrous rate and by now there are quite a few of them. Periodically, some die, others are born and reborn. One of the most famous in the world is KaZa, and in Runet there are varieties of eMule and eDonkey.

In fact, the donkey and the mule, as those who use them call them, are in a sense intermediate systems between distributed and centralized systems: there are central servers that process user requests (donkey and mule breeders, respectively), but there are a lot of such servers , which allows, on the one hand, not to overload them, but on the other hand complicates the search somewhat, since updating and receiving information from other servers takes some time.

As in any community, for those who use peer-to-peer networks, there are some rules of conduct and rules of good form. They are simple and obvious, but, unfortunately, not always and not by everyone.

1. After downloading, do not delete the file immediately. While you can, hold it and let others download it. Don't clamp down on your outgoing connection speed unnecessarily. Of course, this is a load on your computer, but other people also want to get something. Share files. If you have something that might be of interest to someone else.

The future of peer-to-peer networks as a whole looks rather bright. The passion of people for sharing (free) is ineradicable. Companies' passion for making money is also ineradicable. It turns out a classic case: the unity and struggle of opposites. There is nothing illegal in the networks themselves. They will continue to build. Time will tell how the fight against the pirate distribution of materials will be conducted.

There is a separate issue of copyright when using peer-to-peer networks. Strictly speaking, the distribution of licensed products in this way violates the copyrights of those who own them, and discussions on this topic have long turned into a constant background on which files are still transmitted and received. From the point of view of copyright defenders, peer-to-peer technologies can be successfully used in projects that do not directly affect their interests and do not compete with paid online services (for example, to create communities of people interested in problems such as finding a cure for cancer). Another interesting possibility of using these technologies is the creation of efficient search engines (the late Jin Kang, in particular, worked on this problem).

The idea of ​​shareware and at the same time legal distribution of completely commercial content also has a right to exist. Perhaps the main argument of the advocates of peer-to-peer exchange is the fact that there is no reliable connection between the quantitative increase in file sharing and the decrease in official income from the sale of content (music on CDs, video on DVD, etc.). From this point of view, the RIAA's data on the fall in industry revenues is explained by the unfavorable general economic situation and the slowness of the media giants in relation to the launch of new products. Moreover, the lion's share of those who listen to MP3 music downloaded on the Internet subsequently buy their favorite albums on CD for the sake of their better quality.

1.2 Peer-to-peer network

Peer-to-peer, decentralized or peer-to-peer (from the English peer-to-peer, P2P - one-on-one, eye-to-eye) networks are computer networks based on the equality of participants. In such networks, there are no dedicated servers, and each peer is both a client and a server. Unlike the client-server architecture, such an organization allows the network to remain operational with any number and any combination of available nodes.

The phrase "peer-to-peer" was first used in 1984 by Parbawell Yohnuhuitsman when developing the IBM Advanced Peer to Peer Networking architecture.

Peer-to-peer network device

For example, there are 12 machines on the network, and any one can contact anyone. As a client (resource consumer), each of these machines can send requests to provide some resources to other machines within the network and receive them. As a server, each machine must process requests from other machines on the network, send what was requested, and perform some supporting and administrative functions.

Any member of this network does not guarantee its presence to anyone on a permanent basis. It can appear and disappear at any time. But when a certain critical size of the network is reached, there comes such a moment that many servers with the same functions exist on the network at the same time.

In addition to pure P2P networks, there are also "hybrid networks" in which there are servers used to coordinate work, search or provide information about existing machines on the network and their status (on-line, off-line, etc.). Hybrid networks combine the speed of centralized networks and the reliability of decentralized networks through hybrid schemes with independent indexing servers that synchronize information among themselves. If one or more servers fail, the network continues to function. Partially decentralized file-sharing networks include, for example, EDonkey, BitTorrent.

Partially decentralized (hybrid) networks

In addition to pure P2P networks, there are so-called hybrid networks, in which there are servers used to coordinate work, search or provide information about existing machines on the network and their status (on-line, off-line, etc.). Hybrid networks combine the speed of centralized networks and the reliability of decentralized networks through hybrid schemes with independent indexing servers that synchronize information among themselves. If one or more servers fail, the network continues to function. Partially decentralized file-sharing networks include, for example, EDonkey, BitTorrent.

1.3 Peer-to-peer file-sharing network

One of the areas of application of peer-to-peer networking technology is file exchange: network users upload any files to a "shared" (English share) folder, files from which are available for download to other clients. Another network user sends a request to find a file. The program searches the network clients for files that match the request, and displays the result. After that, the user can download files from the found sources. Modern file-sharing networks allow you to download one file from several sources at once (this is faster and more reliable). To make sure that this file is the same for all sources, a comparison is made: by file name, by checksums or hashes like MD4, TTH, SHA-1. When a user downloads a file (and after it finishes), other network clients can also download this file from him, as a result of which especially popular files can eventually be available for downloading from hundreds of sources at the same time.

Usually, such networks exchange films and music, which is the age-old headache for video publishing and recording companies, which are very unhappy with this state of affairs. Their problems are added by the fact that it is technically impossible to stop the distribution of a file in a decentralized peer-to-peer network - this will require physically disconnecting from the network all the machines on which this file is located, and there can be very, very many such machines, depending on the popularity of the file. Recently, video publishers and record companies have begun suing individual users of such networks, accusing them of illegally distributing music and videos.

Chapter 2. Networks and Protocols (Exemplified by eDonkey2000)

2.1 eDonkey2000 (network)

eDonkey2000, eDonkey, eD2k - file-sharing network, built on the principle P2P based network protocol applied level MFTP... Common in Runet informal names: "donkey", "donkey".

The network consists of several million clients and several dozen servers interacting with each other. Clients are users who download files and users who have full versions of files, "full sources." Servers allow you to find published files and other users who have these files (in whole or in part). The files themselves do not pass through the server.

Each client is associated with one of the servers on the network. The client tells the server what files it shares. Each server maintains a list of all common client files connected to it. When a client searches for something, it sends a search request to its main server. In response, the server checks all the files it knows and returns to the client a list of files that satisfy its request.

It is possible to search for several servers at once. Such requests and their results are transmitted through the protocol UDP to reduce the load on the channel and the number of connections to servers. This feature is especially useful if a search on the server to which the client is currently connected yields low results.

When a client requests to download a file, the server first collects a list of all known clients that have the requested file. After that, it asks other servers known to it, whether this file has clients connected to them. As soon as it finds other clients with the file, then the server asks each client for different parts of the file. This process continues until the entire file is built.

How it works: Client Z has all the parts of the File (lowercase characters represent parts of the file). Client W, X, and Y want to download a File. Starting with Client X and Client Y, both have different parts of the File, they can not only receive a file from Client Z, but they can also send a file to each other. This allows the file to be distributed much faster without having to use more of the Client Z's bandwidth. Client W can trigger a file download even if the file's source (Client Z) no longer has enough bandwidth to send.

Periodically, the servers communicate with each other for a short time. During this communication session, the server, announcing its existence, sends a list of all other servers known to it. Thus, the servers maintain a list of other active servers. When a client connects to a server, the server can give it a list of servers it knows.

Popular file-sharing networks:

    ED2K she is eDonkey2000- a centralized network, the largest of the existing file-sharing networks. The search is performed by specialized servers connected to each other. Clients independently exchange using the protocol MFTP... Company MetaMachine the developers of the original concept and the first client based on the web interface (Edonkey 2000 v1.4.5) in 2005 stopped supporting this project, but the network continues to function due to a better and more powerful client eMule which uses mechanisms Kademlia to build a decentralized eD2k segment.

BitTorrent (lit. English"Bitstream") - peer-to-peer (P2P a) Cohen's network protocol for cooperative file sharing over the Internet.

No less popular file-sharing network. Files are transferred in parts, each torrent client, receiving (uploading) these parts, at the same time gives (uploads) them to other clients, which reduces the load and dependence on each source client and provides data redundancy. Differs in high speed and centralization. Some BitTorrent clients support DHT and can work without a central server (so-called tracker). Supported by clients BitComet, µTorrent, FreeDownloadManager, etc.

Kad Network - Decentralized Serverless file-sharing network which uses the protocol overlay network Kademlia... Supported in eMule(Kad 2.0), aMule and MLDonkey... When transferring files, client connections occur directly with each other (using standard IP networks). As soon as a connection to the network is established, the client queries other clients to determine if he can freely connect with them. This process is similar to detecting HighID / LowID on servers. If you are free to connect, you are given an ID (high, HighID) and receive an open status in the Kad network. If you cannot connect freely, you get the firewalled status (correspondingly LowID).

Conclusion

The emergence of peer-to-peer networks is associated with three factors.

    The processor on a regular client machine is not very busy. Especially in offices, where machines are used primarily for preparing documents, for typing, etc. The same goes for the vast majority of home computers.

    Many users store collections of files on their computers (texts of articles of a certain subject, art photographs, etc.), which may be of interest to other users. But at the same time, the owners of these collections are not ready to make their computer a full-fledged server in the network due to its insufficient power, the need for round-the-clock work, financial and other reasons.

    A certain part of users would like to more actively participate in the "public life" of the network, not limited to discussing various issues on forums and in chats. They are ready to participate in any useful "common cause".

Peer-to-peer networks are diverse. The main purpose of some is the exchange of music and video files. Others are implementing projects to find a cure for cancer, others are training in breaking known ciphers based on distributed computing, and still others are looking for extraterrestrial civilizations based on data received from radio telescopes.

From a mathematical point of view, a peer-to-peer network can be represented by a graph of an indefinite form: there is no standard network architecture (for example, a star or a ring). Moreover, this graph is dynamic, since individual users join and leave the network at arbitrary times. Any user playing the role of a server can turn into a client at any time for a certain period of time. But it can also be in the position of both the server and the client.

Peer-to-peer research began with the success of systems such as Napster, Gnutella, and Freenet.

Napster is a hybrid system because it uses a centralized index for searches. The Gnutella system is a pure peer-to-peer system. Its architecture is such that each node with low switching speeds can have up to four neighbors, while powerful nodes can have dozens of neighbors. It is clear that the more neighbors, the faster the search can be. But there are the same technical limitations as in multiprocessor computers: it is too expensive to connect everyone to everyone. Connections in the system are not directed (undirected graph). The Gnutella system uses a breadth-first search by looking at all the nodes adjacent to the initiator first. Each node that receives a request propagates it to its neighbors for a maximum of d steps.

The advantage of Breadth First Search is that by scanning a large portion of the web, it increases the likelihood of a query being satisfied. The disadvantage is that the network is overloaded with unnecessary messages.

Most existing systems only support boolean queries. Each file is characterized by its metadata (for example, a set of keywords) and the request is formed as a set of keywords. As a result, the search result can be two-variant: "found", "not found".

Bibliography

Federal Agency for Education

State educational institution of higher

vocational education

Ulyanovsk State University

Inza branch

Course work

on the subject: "Information technology"

on the topic: “Peer-to-peer networks. Concepts and types "

Completed: student

group BUA-07

Introduction ................................................. .................................................. ....... 3

Chapter 1. Peer-to-peer networks ............................................. .................................. 4

1.1 General concept ............................................... ........................................... 4

1.2 Peer-to-peer network ............................................... ..................................... 7

1.3 Peer-to-peer file-sharing network .............................................. ............. 13

Chapter 2. Networks and Protocols ............................................ ............................... 15

2.1 eDonkey2000 (network) . ................................................................................. 15

Search................................................. .................................................. .......... 15

Server-to-server connections ................................................ ........................... 16

2.2 Kad Network ............................................... ............................................. 17

Usage................................................. .............................................. 17

2.3 BitTorrent ................................................ ................................................. eighteen

The principle of the protocol ............................................... .......................... eighteen

General features ................................................ ....................................... 19

Protocols and ports ............................................... ....................................... 19

Metadata file ................................................ .......................................... twenty

Tracker ................................................. .................................................. ......... twenty

Work without a tracker ............................................... ......................................... 21

Super seeding ........................................... ................................... 21

Two mistakes beginner feasts .............................................. .................... 22

Terminology................................................. ............................................... 22

Client programs ............................................... ...................................... 23

Chapter 3. Programs for working with peer-to-peer networks ........................... 26

3.1 Perfect Dark (P2P) ............................................ ........................................ 26

Security................................................. ................................................. 26

Open testing ................................................ ................................. 27

Features of work ................................................ ..................................... 27

3.2 eMule ................................................ .................................................. ...... 28

Chapter 4. History of peer-to-peer networks ............................................ ................ 33

The punishing hand of the law ............................................... .................................. 34

Partisan exchange tactics ............................................... ........................ 34

The king is dead, long live the king! ........................................... .............. 36

Controlled exchange ............................................... .................................... 37

Conclusion................................................. .................................................. .39

List of sources used:.............................................. ................ 41


We all somehow share information with the people around us. In the case when we share files using programs such as eMule, eDonka, KaZ and the like, this kind of exchange is associated with the work of a huge machine, the principles of operation of which, its origins and the ideas on which it is built, we often imagine rather poorly. This gap is intended to fill this article.

The need to have access to a huge amount of information lying on other computers first gave rise to local networks. This helped for a while, but it turned out to be impossible to combine a large number of computers in this way. The ability to access files that someone else might have was very tempting. Therefore, a system was proposed that allows you to receive and transfer files from each computer with which there is a connection and on which there is certain software. Such systems are called p2p or peer-to-peer networks. This phrase can be translated as "equal exchange". This means that you, having some files that may be of interest to someone else, allow those who want to copy them from you, and in return you get the opportunity to get the files you need from those who have them.

Relevance of the topic: Because Currently, the Internet is becoming more and more widespread, the use of peer-to-peer networks is more relevant every day. Indeed, today it is much easier to find the required file (a favorite movie, a new program for your "electronic friend", a song of your favorite star, a book and just any file you are interested in) if you know what peer-to-peer networks are, and you know how to use them.

Tasks: Study the purpose of peer-to-peer networks, types, use of peer-to-peer networks. Find out with the help of what content it is possible to use peer-to-peer networks.


One of the main difficulties in implementing such an exchange was that it was necessary to somehow find those who have what you need. There are two main ways to solve this problem: centralized and distributed servers. In the case of working with a centralized server, each user must register on this server, which will collect information about the user (files available for exchange, user ID, etc.), and then enter this information into its database, according to which it will be in further go search. All files requested by the user will be searched for in the database of the central server, and the links found will be transmitted to the user to establish a direct connection with the computer that has the necessary information. It is on this principle that the popular KaZaa and many other peer-to-peer applications work. The described method of exchanging files using one or several central servers is based on the so-called FastTrack protocol, which is commercial, which somewhat negatively affects the development of applications that use it.

In the second case, when the central server does not exist, the Gnutella protocol is used, which transmits the user's request not to the central server, but directly to other computers on the network. That is, the user himself is both the client and the server of the peer-to-peer network. Such systems are less demanding in terms of admitting and registering new members and are distinguished by a huge speed of request propagation. In fact, the number of interviewed sources is increasing exponentially. An example application that uses this approach is Morpheus.

Despite the fact that the Gnutella protocol is non-commercial, that is, free to use, the comparison of the two protocols does not end in his favor. The FastTrack protocol performs more efficient searches, processes requests more clearly, and is generally more stable. This, however, does not mean at all that Gnutella is doomed to extinction, but the sad experience of the same Morpheus, who first used FastTrack and was one of the leaders among peer-to-peer applications, and then switched to Gnutella and immediately lost its leading position, describes the situation quite well.

The undoubted pioneer of peer-to-peer systems was Napster, who, unfortunately, fell under the hot hand of copyright defenders. A few months after the appearance of Napster, the world saw the light of another newborn in the same family: IMesh (IMesh). Unlike the deceased Napster, IMesh is still alive, although there have been more reports of crashes on the central server lately. Age, you know, is not a joke ...

After the closure of Napster, peer-to-peer applications began to appear at a monstrous rate and by now there are quite a few of them. Periodically, some die, others are born and reborn. One of the most famous in the world is KaZa, and in Runet there are varieties of eMule and eDonkey.

In fact, the donkey and the mule, as those who use them call them, are in a sense intermediate systems between distributed and centralized systems: there are central servers that process user requests (donkey and mule breeders, respectively), but there are a lot of such servers , which allows, on the one hand, not to overload them, but on the other hand complicates the search somewhat, since updating and receiving information from other servers takes some time.

In general, a donkey and a mule have a lot in common, but their comparison is beyond the scope of this article and deserves additional more detailed coverage. This is not to mention the different versions of the donkey and the presence of eMule Plus, which, by the way, is also available in several guises.

As in any other community, among those who use peer-to-peer networks, there are some rules of conduct and rules of good form. They are simple and obvious, but, unfortunately, not always and not by everyone.

1. After downloading, do not delete the file immediately. While you can, hold it and let others download it. Don't clamp down on your outgoing connection speed unnecessarily. Of course, this is a load on your computer, but other people also want to get something. Share files. If you have something that might be of interest to someone else (for example, your credit card number or a collection of photographs of shoe laces), do not keep it in a dark and dusty corner of the disk: put it out for everyone to access and let everyone be surprised how much You had money on your card, and that is, in fact, all the rules. Simple, aren't they?

If you regularly use the Internet, most likely you have heard of the terms peer-to-peer network, decentralized network, or peer-to-peer network, peer-to-peer or its abbreviation P2P network. All of these terms mean the same thing. If you want to know what peer-to-peer is and what it is used for, you must read this article.

What is P2P or Peer-to-Peer Network?

Peer-to-peer, or P2P for short, is a type of computer network that uses a distributed architecture. This means that all computers or devices on the network share the workloads on the network. Computers or devices that are part of a peer-to-peer network are called peers. Each peer-to-peer node, or peer, is equal to other peers. There are no privileged members, nor is there a central administrative unit. Thus, the network is decentralized.

In a way, peer-to-peer networks are socialist networks in the digital world. Each member is equal to the other, and each has the same rights and responsibilities as the others. Peers are both clients and servers at the same time.

In addition, every resource available on the peer-to-peer network is shared by all nodes without the involvement of a central server. Shared resources on a P2P network can be:

  • Processor power
  • Disk space
  • Network bandwidth

What are P2P (peer-to-peer) networks doing?

The main purpose of peer-to-peer networks is to share resources and work together between computers and devices, to provide a specific service or perform a specific task. As mentioned earlier, a decentralized network is used to share all kinds of computing resources, such as computing power, network bandwidth, or disk space. However, the most common use case for peer-to-peer networks is Internet file sharing. Peer-to-peer networks are ideal for file sharing because they allow the computers connected to them to receive and send files at the same time.

Consider a situation: you open your web browser and visit a website where you download a file. In this case, the site acts as a server, and your computer acts as a client that receives the file. You can compare this to a one-way road: the file you download is a car that goes from point A (website) to point B (your computer).

If you download the same file over a peer-to-peer network using the BitTorrent site as a starting point, the download proceeds differently. The file is downloaded to your computer in pieces, which come from many other computers that already have the file on the P2P network. At the same time, the file is also sent (downloaded) from your computer to others who request it. This situation is like a two-way road: the file is like several small cars that arrive at your computer, but are also sent to other users when they request it.

Why are peer-to-peer networks useful?

P2P networks have several features that make them useful:

  • It is difficult to "drop" them, that is, to take them out of working condition. Even if you disconnect one peer, the others continue to work and interact. For the network to stop working, you must close all peers.
  • Peer-to-peer networks are extremely scalable. New peers are easy to add as you don't need to change the configuration on the central server.
  • When it comes to file sharing, the larger the peer-to-peer network, the faster it happens. Having the same file stored on many peers on a decentralized network means that when someone needs to download it, the file is downloaded from many places at the same time.

Why do we need peer-to-peer networks? Legal use of P2P networks

Peer-to-peer networks are needed to connect computers and devices into a single network without the need to configure a server. When building a server, its fall is expensive and difficult to maintain, and people are using cheaper alternatives like P2P. Here are some common use cases for P2P networks:

  • When you connect a Windows device to your home group of computers in your home, you create a peer-to-peer network between them. Homegroup is a small group of computers that are linked together to share disk space and printers. This is one of the most common uses for peer-to-peer technology. Some people might say that homegroups cannot be peer-to-peer because the computers on the network are connected to a router. However, keep in mind that the router has nothing to do with network management. A router does not act as a server, but simply as an interface or link between the local network and the Internet.
  • When you create a network between two computers, you create a peer-to-peer network.
  • Sharing large files over the Internet is often done using a P2P network architecture. For example, some online gaming platforms use a P2P network to download games between users. Blizzard Entertainment distributes Diablo III, StarCraft II and World of Warcraft using P2P. Another major publisher, Wargaming, is doing the same with their games World of Tanks, World of Warships, and World of Warplanes. Others, like Steam or GOG, prefer not to use P2P, but to maintain dedicated servers around the world.
  • Windows 10 updates are delivered both from Microsoft servers and via a P2P network.
  • Many Linux operating systems are distributed via BitTorrent, which use peer-to-peer networks. Examples include Ubuntu, Linux Mint, and Manjaro.
  • Finally, blockchain technology uses peer-to-peer decentralized networks to record information in a distributed ledger on all computers on the network simultaneously. (Read more in the articles “ What is blockchain in simple terms?" and " What is a distributed ledger? »)

Peer-to-peer networks are the cheapest way to distribute content because they use peer-to-peer bandwidth rather than content creator bandwidth.

History of P2P networks

The predecessor to peer-to-peer networks is USENET, which was developed in 1979. It was a system that allowed users to read and post messages / news. It was a network similar to modern online forums, with the difference that USENET did not rely on a central server or administrator. USENET copied the same message / news to all servers found on the network. Likewise, decentralized networks distribute and use all the resources available to them.

The next big milestone in peer-to-peer history was 1999 when Napster was born. Napster was the file-sharing software that people used to distribute and download music. Music distributed with Napster was usually copyrighted and thus illegal to distribute. However, that hasn't stopped people from using it.

Although Napster was the one who brought P2P to the mainstream, the project ultimately failed and was shut down by the authorities due to illegal content distribution.

We can also say with confidence that a new stage in the development of peer-to-peer networks was the formation of the blockchain industry in 2008, along with the emergence of Bitcoin... The use of peer-to-peer decentralized networks is one of the three main building blocks of blockchain technology, along with a shared ledger of records and a consensus mechanism.

Currently, P2P remains one of the most popular technologies for sharing files over the Internet, used both legally and illegally.

Illegal use of peer-to-peer networks

P2P is a controversial technology because it is widely used for piracy. Because of the benefits of this technology, there are many websites on the Internet that offer access to copyrighted content such as movies, music, software or games over P2P networks. While the technology itself is not illegal and has many legal uses that are not related to piracy, the way some people use P2P is illegal.

Therefore, when using a peer-to-peer network, make sure you are not engaging in piracy or other uses that are punishable by law.

A peer-to-peer network, it is also peer-to-peer, it is also decentralized, it is also peer-to-peer ("equal to equal"), it is also P2P, is a computer network without control servers. Well, or almost without them - a hybrid, combining the advantages of different technologies. One way or another, users' computers connect to each other directly and communicate really on an equal footing. However, as always, we will talk about everything in order.

The essence

For comparison, consider the operation of a conventional network, such as the World Wide Web. Websites are hosted on servers. Clients connect to these servers and request published web pages and other files. That is, there must be a computer that hosts this or that resource with a specific domain name tied to a specific IP address.

Now imagine that every computer on the network becomes a kind of server - you can take data from it. But at the same time it remains a client - it requests everything that the user needs. And this or that file does not exist at a specific address, as in the World Wide Web, but for everyone who was not too lazy to make copies. The information is not stored in one place, but is distributed among equal participants.

If a server disconnects or crashes on the World Wide Web, then you cannot go to the site, you will not be able to download anything from there. However, on a peer-to-peer network, what is published has a good chance of being available.

One of the owners of a copy of the file fell offline - we'll take it from the other. Maybe I've already downloaded the third one for myself - then we'll get it from him. And then we ourselves will allow everyone to copy what we have received.

Torrents

Naturally, when it comes to peer-to-peer networks, torrents come to mind. They are mistakenly believed to be centers of trekkers. But these are just repositories of connection parameters.

The user receives the above parameters (in the form of a torrent file), enters the peer-to-peer network - and starts downloading the file piece by piece, no longer interacting with the tracker. Moreover, it simultaneously serves as a server, giving the received pieces to other downloads.

This system has disadvantages. To be able to get a file, someone has to distribute it. That is, the owner of the complete file (not the pieces) must be online. He is called the seeder.

Whoever has downloaded the file completely can immediately become such a "sower". Did not have time? This means that he is still just one of the "peers" (peer), exchanging fragments of the file. And the more participants there are, the faster these pieces are added into a single whole.

If all the owners of the complete file are offline, then no one will download anything, alas.

The torrent technology works without problems in a local network (for example, in a provider's network), without access to the Internet. Of course, if there is something to exchange.

Skype

Yes, Skype is also a peer-to-peer network. However, not in its pure form, since there is still a coordination server.

When a client wants to call someone, the main server issues encryption keys to establish a secure connection. Then, as they say, he washes his hands. Further, the data exchange takes place directly, from computer to computer. (The connected machines are called nodes, from the English "node" - "node".)

In general, one local network is not enough, because the connection stage requires access to the Internet.

The central Skype server also stores customer data. Contact lists, account amounts (to pay for calls to regular phones), usernames and passwords.

On the Skype network, a computer can suddenly, without asking permission or warning, become a supernode - a supernode. And pump other people's data, helping someone to communicate.

However, if your traffic exchange rate is not very high, then you most likely will not face such a fate.

Computing networks

"Why build a huge supercomputer when you can add it from a great many ordinary ones?" - Something like this thought the cunning developers from Sony, launching their game consoles into use. - "Let Sony Playstation peer-to-peer!"

Why peer-to-peer? Because for the usual one you need a server that will very quickly fall into a stupor due to the crazy load. And when using a peer-to-peer structure, each participant processes part of the circulating data, and the load is distributed among all.

Finance

The creator of the Bitcoin payment system acted just as cunningly - he took and founded a peer-to-peer network in which information about transactions is stored by each of the users. This distribution of information guarantees the safety of all data and the operability of the system even after shutting down most of the computers.

However, reliability is purely technological, there are no other guarantees. Everything rests on the enthusiasm of the participants and the favor of online stores that accept payments in the virtual currency Bitcoin.

Another drawback: swelling of database copies with information about transactions. One way or another, but the payment is brought for everything.

Security

The Skype network is safe if you don't accept or run any files from people you don't know. The data is encrypted, so no one can eavesdrop on your conversations, no matter how many computers in the peer-to-peer network they are pumped through.

It is better to connect to torrents when working on UNIX-like operating systems. Mac OS, GNU / Linux, * BSD.

Well, if you use Windows, then at least do not download pirated copies of programs, since all this is probably provided to the infected.

Peer-to-peer networking requires software ports open for incoming connections. Network worms and other infections like this very much, so the antivirus should be good and with fresh databases.

Let's summarize

If no one is sharing the file in torrents, then you can probably find and download it in the usual way from a regular server, via FTP or HTTP. (This is, of course, only about legal downloads.) For example, such alternatives are almost always provided for those wishing to obtain a particular GNU / Linux distribution.

If there is no possibility or desire to use Skype, then you can do, for example, only ICQ (however, there, when transferring files, a direct connection between computers is also established). And participation in the Bitcoin system is completely voluntary.

In general, peer-to-peer networks are convenient and often even very useful, but they are not vital.

They attract freedom-loving people who like decentralization and even some anarchy, but all these advantages are nothing more than an illusion. Why? For one simple reason: each user is completely dependent on the provider. And a completely independent network, its own and not controlled by anyone, can only be organized on a very modest scale.

Previous publications:

What if the corporate website of the company from which you wanted to download the file is closed along with the company, links to file storages turn out to be inoperative, and your friends and acquaintances have no idea what you need? The search engine gives a dull answer - nothing was found, and even a search on foreign sites did not give anything? It's time to plunge into a new slice of the Internet, which has always existed in the mysterious world of hackers, but which you have not yet encountered.

Peer-to-peer networks are a brilliant illustration of the invulnerability of the Internet, which was supposed to work even when half of the country was covered by a massive nuclear strike. These networks are decentralized, so the exchange of information will continue as long as there are at least two computers with an intact communication channel.

Most ordinary users do not face peer-to-peer networks, even working with the Internet for several years. There are two reasons for this: first, working with them is accompanied by apparent complexity (but only apparent). The second is associated with the almost complete lack of control of these networks, with all the ensuing consequences. The content of the networks is not indexed by ordinary search engines and it is very difficult to eliminate a file that even violates someone's rights. You can suppress the activities of one, two, three - at least a dozen members of the network, but the remaining users will be able to provide this information. Like a nuclear strike.

Peer-to-peer, peer-to-peer or decentralized networks (from the English peer-to-peer, P2P - one on one, face to face) are computer networks that do not have dedicated servers. All participants are equal, and each user computer (node, peer) both receives and sends information. This is a very important point - we are used to working with servers on which the files we need are available around the clock, at any time. Because the servers are turned on all the time, no one would even think of turning them off during lunchtime. However, as we already know, in the same file storages - in the case of their free use, we will have a lot of restrictions - download speed, amount of traffic per day, etc.). In peer-to-peer networks, we can provide the contents of our hard drive or a separate folder to everyone, in exchange for the contents of their folders.

The first thought that comes to mind after getting acquainted with P2P networks sounds something like this: if we give each other files, does it mean that I have to be online around the clock? No, this is not entirely true. Let's imagine that you have taken an excellent photograph of your city from a high-rise building. An excellent photo, excellent quality, occupying a size of 20 MB. It is clear that the file is completely unique and there is no other such thing. You put it in a folder accessible to everyone and another user starts downloading it. After the download is complete, it also uploads your photo to all users. As a result, there are already two sources on the web offering your file. The third user who logs on to the network will see that this file is in two places. He will already receive it in parts from two sources at once. As a result, the download speed will double. For the fourth participant, the file will be available from three sources, for the fifth - from four, etc. If this file is in 5-10 sources, then it is clear that if one of the users decides to go to sleep and turn off his computer, then the number of available sources will simply decrease by one. The download speed will decrease slightly, that's all. The ability to download the same file from multiple computers at the same time is a great feature of a peer-to-peer network.

How are files defined? It will not turn out that your file "My favorite city.tiff" (20 MB) coincides with the file of another photographer who also named his work "My favorite city.tiff" and which also takes up exactly 20 MB? Could it be that users downloading this snapshot from two sources at the same time will end up with a non-working hash? No, such situations are excluded. The fact is that when a file is uploaded to the network, it receives a unique hash code, which identifies the given file exactly. Different files with exactly the same names and even sizes will receive different hash codes and will never be confused. However, the same file located on different computers will have the same hash code and will be issued from many sources.

There are many peer-to-peer networks (http://ru.wikipedia.org/wiki/Single-rank_network). Perhaps the largest and most popular are eDonkey and Kademlia. These are partially decentralized or hybrid networks, in which part of the coordination functions are handled by special servers. But the materials are still stored on users' computers. A special program eMule has been developed to work with these networks (http://www.emule-project.net/). Download the program (~ 3.2 MB) using a regular browser, install it and start configuring it. The whole process is accompanied by a master, so it is difficult to make a mistake in anything. We indicate the name of your computer - under this name it will be displayed on the network (Fig.9.14):

Rice. 9.14. Setting the computer name

It is desirable to indicate this name together with the language, for example, chk (rus). The fact is that without this you may not be allowed to access some Russian servers. However, the name can be easily changed in the program settings. In the next step of the wizard, we are asked to check the operation of the ports working by default (Fig. 9.15):

Rice. 9.15. Port check

In the vast majority of cases, everything will work by default - if our ISP does not block anything. However, we click on the "Test ports" button and find ourselves on the program's website, where the result of a successful check is displayed (Fig. 9.16):

Rice. 9.16. Successful port testing

Next, we have to agree with the file priority policy. Its idea is to download files with a small number of sources independently of the download of popular files. In a word, we agree with the marked checkboxes and click on the "Next" button (Fig. 9.17):

Rice. 9.17. Priority setting

Veil (from the word "veil") of the application will allow you to bypass the restrictions that may be imposed by your provider. Let's try to work without this veiling (Figure 9.18):

Rice. 9.18. Setting up veiling

By default, eMule offers to work with two peer-to-peer networks at once - eDonkey (eD2K) and Kademlia (Kad). Let's leave this setting unchanged - the more networks there are, the more files are available in them (Figure 9.19):

Rice. 9.19. Selection of peer-to-peer networks

That's it, the setup is complete. The wizard once again reminds you that all the entered values ​​are available for changes in the course of work in the program settings (Fig. 9.20):

Rice. 9.20. Completing the wizard

The last thing left for us to do is indicate the bandwidth of our line. We select the correct value from the list (Fig. 9.21):

Rice. 9.21. Channel bandwidth selection

This step is very important as eMule takes custom and real-world connection speeds into account. If you do not know what your speed is, then use one of the sites that allow you to determine it (see Lecture 4).

Let's start downloading files. Click on the "Search" button, enter the name that we need to find, for example "Ubuntu Linux", click the "Start" button. The search results are displayed in the program window (Fig. 9.22):

Rice. 9.22. searching results

Note that the "Type" drop-down list is designed to set the search filter by content - video, image, music, etc.

Here we see iso image files. Such files can be mounted on a virtual drive, for example, using the Alcohol 120% program (http://www.alcohol-soft.com/). For us, however, it is not important - all we want is to download it. In the "Availability" field, we see different values ​​from 1 to 22. This is the number of users who have a file or the number of sources. We remember that the more sources, the higher the download speed. Therefore, you should try to select files for which at least 5-6 sources are indicated. The Complete Sources field indicates the completeness of the file. If all 5 computers have a complete version of one file, then the value will be 100%. This circumstance should also be taken into account.

Select the required line, right-click on it and select the "Receive" menu item (Fig. 9.23):

Rice. 9.23. Start downloading a file

Click on the "Transfer" button and see that the download has not started, nothing happens (Fig. 9.24):

Rice. 9.24. Start file download

This is where most of the users who come across eMule begin to think that something is not working for them, after which they close the program and lose interest in peer-to-peer networks. The fact is that during normal file downloads - especially at a good speed, we are accustomed to the fact that the download starts instantly. If it doesn't start, then something isn't working. But peer-to-peer networks operate on the principle "You are for me - I am for you." The more we send materials to the network, the higher our rating, the faster we start downloading. Do you remember? Materials are stored on ordinary computers of users, which are connected to the Internet by a regular communication channel, and not by a dedicated multi-megabit line, as in the case of data centers. Consequently, if ten people want to download one file, then they will queue up. The "oldies" who have already brought benefits themselves, that is, provided some interesting files, are skipped ahead. We'll have to wait a bit. How many? It depends on the relevance of the file, the number of sources, in a word, many parameters. However, in most cases the download will start after a reasonable amount of time. For example, in this case, the download started in less than 10 minutes (Figure 9.25):

Rice. 9.25. The file started downloading

In the screenshot, we see that three sources at once began to send this file. The speed is small - about 10 Kbps, but this is the maximum speed of my channel. Peer-to-peer networks are not to blame, nor is eMule. On a larger connection, the speed will be correspondingly higher.

The most amazing thing is that after downloading even a small part of the file, we immediately become its source. Other users can already connect to our machine and receive very small pieces. Click on the "Statistics" button and see the graph of reception and delivery in real time (Fig. 9.26):

Rice. 9.26. File sharing statistics

In order to increase our rating, move faster in the queue and receive files from many sources at the same time, we must also offer something interesting to other users. Click on the "Files" button and see the explorer of our computer. The main mistake of all beginners is that they open access (share) their entire disk (Fig.9.27):

Rice. 9.27. Incorrect opening of access to the entire disk

Users don't need the contents of our Windows folder and Program Files. As well as personal documents. Therefore, to properly open access, create a special folder, put the necessary files in it and right-click, selecting the "Share with subfolders" menu item (Fig. 9.28):

Rice. 9.28. Sharing a dedicated folder

If necessary, in the future we will close access to this folder in a similar way (Fig. 9.29):

Rice. 9.29. Close folder access

An important question arises - what prevents us from uploading files that do not match their content? Give your regular video clips sensational titles and place them in a shared folder? The fact is that the very first few users will ban us or even blacklist us for the entire system. After that, we won't be able to download files at all. Therefore, there is no need to try to deceive users.

As we have already noted, the peer-to-peer network is capable of completely occupying our communication channel. To prevent this from happening, in the program settings, you can set a limit for receiving and sending files (Fig. 9.30):

Rice. 9.30. Setting the connection limit

EMule contains a built-in IRC instant messenger and a messaging system - something like mail. These tools allow individual users to negotiate the privileged transfer of materials to each other. As usual, this action is called "making friends", becoming a friend. However, privileged file exchanges do not affect user ratings.

When getting started with eMule, it is helpful to read the reference materials http://www.emule-project.net/home/perl/help.cgi?l=34.

Top related articles