Peer to Peer Networks Explained

This tutorial explains peer-to-peer networks through examples. Learn what a peer-to-peer network is and what the advantages and disadvantages of a peer-to-peer network are.

What is a peer-to-peer network?

A peer-to-peer network is a group of computers or devices that share resources and access shared resources without centralized control. In the group, there is no central authority that defines access rules. All group members have equal rights. A member cannot control another member in any form.

How does a peer-to-peer network work?

In this model, first, a group is created. Any computer or device that wants to share a resource or wants to access a shared resource joins the group. A group password can be set to block unauthorized devices from joining the group.

If a group password is set, the group is known as the private group. A group password is only required to join the group. It is not required to leave the group. Private groups are mostly used in the home or small office networks. If a group password is not set, the group is known as the public group. A device can join or leave a public group anytime. Public groups are mostly used on the Internet for sharing files.

After joining the group, a member can share resources or access shared resources. A resource can be any shareable object such as a file, hard disk, printer, etc. When a member shares a resource, the resource becomes available for all group members. The member that shares a resource is called the server, and the member that accesses a shared resource is called the client. A member can be a server, a client, or both at a time.

For example, two PCs are connected through a peer-to-peer network. A printer is attached to the first PC. A modem is attached to the second PC. Both printer and modem are shared in the network. When the first PC accesses the Internet through the shared modem of the second PC, the first PC acts as the client while the second PC acts as the server. When the second PC accesses the shared printer of the first PC, the second PC acts as the client while the first PC acts as the server.

The following image shows this example.

peer-to-peer example

To share a resource, a member has two options: simple sharing and advanced sharing. In simple sharing, the resource is shared with a single access rule. For example, a member can share a file with the read-only rule. In this situation, all group members can read the file.

In advanced sharing, a member may define some basic access rules for its shared resources. For this, the member creates different user accounts and defines access rules for each user account. Since user accounts and access rules both are created on the local system, the local system can check the rules before granting access to the file. If another member of the network wants to access this file, the member has to create and use the same user accounts with the same passwords.

Advantages of peer-to-peer networks

A peer-to-peer network is easier to set up. It does not require any special software or operating system. You can set up a peer-to-peer network by using any operating system. Almost all operating systems support peer-to-peer networking and include necessary components to connect an existing peer-to-peer group or to create a new peer-to-peer group.

Since a peer-to-peer network does not require additional components or applications, it does not increase the setup cost. A peer-to-peer network also does not require any special networking knowledge. With basic networking knowledge, anyone can easily set up a simple peer-to-peer network.

Disadvantages of peer-to-peer networks

Peer-to-peer networks provide only basic options for advanced sharing. To use these options, a lot of setups are required. For example, suppose you have 10 computers in your network and want to use this architecture to set up a folder where users can save files.

In this case, first, you have to create 10 local user accounts on the system that holds the shared folder and defines access rules for each user account. Then you have to create the same user accounts with the same passwords on all reaming computers. You have to create and manage 100 user accounts (10x10 = 100) for a simple setup.

The following image shows this example.

peer-to-peer network users database

Since usernames and passwords are stored locally, a user can change them without notifying you. If this happens, the user will not be able to connect to the shared folder. This can be an organizational nightmare.

Since peer-to-peer networks do not use dedicated network operating systems, the performance of these networks is less than client-server networks that use dedicated network operating systems or applications.

Peer-to-peer networks are also not considered secure networks. In a peer-to-peer network, shared resources can be easily discovered and used by unauthorized users.

In this type of network, since data is not stored in a centralized location, backing up critical data is quite a difficult task.

Where should peer-to-peer networking be used?

Peer-to-peer networking is useful in the following conditions.

  • The number of computers or devices in the network is less than 15.
  • Networking is mainly required for hardware sharing.
  • Data security is not the top priority.
  • Advanced sharing is not required.
  • Additional networking features are not required.
  • The administrator personally knows all users of the network.

The above conditions are usually fulfilled in home and small office networks. Thus, peer-to-peer networking is mostly used in home and small office networks.

Peer-to-peer file sharing on the Internet

A peer-to-peer file sharing service is a service that allows users to exchange files over the Internet. There are a lot of applications that allow users to use this service. Since this service allows users to exchange files directly over the Internet, this service is mostly used to share and download copyright-protected movies, music tracks, and games. But it does not mean that this service is used only for illegal purposes. Several open-source projects allow users to download their applications through the peer-to-peer file sharing service. Downloading a file through the peer-to-peer file sharing service is easier and faster than downloading it directly.

That all for this tutorial. In the next part of this tutorial, we will discuss the client-server network model in detail. If you like this tutorial, please don't forget to share this tutorial with friends through your favorite social channel.

Advertisements

ComputerNetworkingNotes Networking Tutorials Peer to Peer Networks Explained