Home
Publications
Download
Demo video
Features
Web interface
Geo map
DHT interface
Command interface
Connect to PlanetLab network
Setup an overlay
People
Acknowledgements
|
How to setup a P2PP overlay?
The instructions below are for building a peer-to-peer overlay in a public
or a private network.
Windows executable
1. Download the file* from here .
Linux executable
1. Download the file* from here.
*: The same executable is used by the bootstrap server, peer and clients.
Setting up the Bootstrap Server
1. Download the configuration file for the bootstrap server from
here.
2. Open it any any text editor.
3. There are several fields in this file. See below for an explaination.
TCP_PORT: This is the listening port for incoming requests over TCP. The
current implementation does NOT support TCP.
UDP_PORT: This is the listening port for incoming requests
over UDP.
P2P: This is the DHT to be used in the P2P network. Kademlia and Bamboo
are supported by the current implementation.
HASH_ALG: This is the hash algorithm to be used in the DHT. SHA1,
SHA256, MD4, MD5 are supported in the current implementation.
HASH_SIZE: Size of the IDs generated by the Hash Algorithm (in bytes).
This depends on the value in the HASH_ALG field. Use the following pairs,
HASH_ALG-HASH_SIZE
SHA1 - 20
SHA256 - 32
MD4 - 16
MD5 - 16
REC: (Value: '0' for iterative, '1' for recursive). Specifies whether
iterative or recursive routing is to be used. Current implementation supports
both recursive and iterative routing.
PARALLEL: (Value: '1' for parallel, '0' for sequential). Specifies
wether parallel requests are to be sent.
CMD: (Value: '1' for command-line usage, '0' for no-command line
option). Specifies wether command line usage is desired.
BASE: Indicates the base to be used by the DHT. Should be a power of 2.
MODE: Set this to BOOTSTRAP (default).
4. After editing the file, open a terminal and browse to the directory
containing the executable and configuration file.
5. On Linux type "$./p2main bootconfig.txt logfile" and for windows ">p2pmain.exe
bootconfig.txt logfile"
6. Bootstrap server is running
Setting up Peers
1. Download the configuration file for the peer from
here.
2. Open it with any text editor.
3. There are several fields in this file. See below for an explaination.
TCP_PORT: This is the listening port for incoming requests over TCP. The
current implementation does NOT support TCP.
UDP_PORT: This is the listening port for incoming requests
over UDP.
P2P: SHOULD be the same as that of the bootstrap server.
HASH_ALG: SHOULD be the same as that of the bootstrap server.
HASH_SIZE: SHOULD be the same as that of the bootstrap server.
REC: Set to '0' for iterative routing and '1' for recursive
routing.
PARALLEL: Same as that of bootstrap. Not used by current implementation.
CMD: Specifies wether command line usage is desired. See
this for using the command line interface
MODE: Set this to PEER (default).
BOOTIP: IP address of the bootstrap server.
BOOTPORT: UDP port of the bootstrap server.
USERID: Name of the peer. This should be unique for each peer.
4. After editing the file, open a terminal and browse to the directory
containing the executable and configuration file.
5. On Linux type "$./p2main configp.txt logfile" and for windows ">p2pmain.exe
configp.txt logfile"
6. Peer is running.
Setting up Clients
Clients are not part of the P2P overlay. They will be attached to a
peer which will act as a super-peer for the attached
clients. Clients will not store resource objects and will not take part in
lookups. However they can insert resource objects,
lookup for peers and resource objects in the same way as peers through their
super-peer.
1. Download the configuration file for the client from
here.
2. Open it with any text editor.
3. Fields are the same as
Peer. Except
MODE: Set this to CLIENT (default).
BOOTIP: Set this to that of bootstrap server.
BOOTPORT:Set this to the UDP port of the bootstrap server.
4. After editing the file, open a terminal and browse to the directory
containing the executable and configuration file.
5. On Linux type "$./p2main configc.txt logfile" and for windows ">p2pmain.exe
configc.txt logfile"
6. Client is running
|