Gnutella Forums

Gnutella Forums (https://www.gnutellaforums.com/)
-   General Gnutella Development Discussion (https://www.gnutellaforums.com/general-gnutella-development-discussion/)
-   -   P2P networking basics (https://www.gnutellaforums.com/general-gnutella-development-discussion/33611-p2p-networking-basics.html)

Cole_King February 9th, 2005 09:21 AM

P2P networking basics
 
Hi,

Sorry if this is not relevant for here but I'm trying to get some ideas whether this is possible or not.

I need to implement a personal pseudo P2P network. The architecture is as such:

Some PCs acting as providers (providing content)
Some PCs acting as requesters (only requesting content)
A central server holding the IP addresses of the server PCs.

The provider PCs will be on dial up, dsl, adsl, cable connections which do not provide public/live IPs. When the provider starts up it contacts the central server to register it's IP address and port no. The requester can request from the central server the IP addresses of all the live providers and connect to a provider directly using the IP registered. Once connected it can request for any specific content.

What I don't understand is how will the provider provide a correct IP address to the central server if it has a non-public/non-live IP? And how will the requester connect to the provider using this address or any address registered?

I tried it here and what gets registered/sent to the central server is the gateway address of my DSL/Cable provider. The provider logic works fine for dial-up connections and connections which have public/live IPs.

Any help, hint, docs, etc. would be appreciated.

Thanks in advance
Cole

King_Cole February 15th, 2005 04:03 AM

Thanks mate, I have been searching and haven't found the information I am looking for on DC++. Any other help would be appreciated, any links or docs, etc.

Thanks

arne_bab February 15th, 2005 12:55 PM

I can only tell you how I'd do it with Gnutella...

It isn't that easy on the providers, if they don't have a public IP, because they need to set up their program to report the correct IP (which only works, if you have a static IP or are willing to update the settings on every IP-change).

Normally in Gnutella, the Providers would simply connect to an other Gnutella client (in this case the server), which would tell them the IP it sees. Sadly this doesn't always work (and many hosts in the Gnutella Network are unreachable due to restrictive firewall-settings).

I for my part use port-forwarding in my NAT. My program automatically checks for my IP, and with port-forwarding in my router (an airport-station) it works seemlessly (after getting the station configured...).

At the moment I try to build a small private p2p-net using Phex (the forum can also be found in Gnutellaforums).
There you don't have one central tracker, but one host can act as first connection to get you into the network, except, if you'd have a really powerful server and would make the central server the only Ultrapeer.

But here all searches run through the Ultrapeer.

For how many hosts do you need this network?

King_Cole February 16th, 2005 11:06 PM

Thanks Arne

There would be a few hundred providers to start with. The problem I am facing is this:

My office is connected to the outside via a cable line, we have a private static IP. Internally we have a broadband router that also has a built in NAT and Firewall. The client PCs have their own internal IPs like 192.168.x.xxx and the gateway in the settings is the IP of the router.

I start the provider application on my PC and connect to the server and register my IP, but the IP that gets registered at the server is my cable providers gateway IP, not my assigned static IP.

you said---------------
"At the moment I try to build a small private p2p-net using Phex (the forum can also be found in Gnutellaforums).
There you don't have one central tracker, but one host can act as first connection to get you into the network, except, if you'd have a really powerful server and would make the central server the only Ultrapeer.
But here all searches run through the Ultrapeer. "--------

This sounds something that may work for me, could you please elaborate a little more as I am not very clear about this.

Thanks a lot, this is driving me mad!

Cole

arne_bab February 17th, 2005 02:19 AM

Is that server inside your private network or outside it?

Do you have to get outside that NAT shielded LAN?

It might be, that Phex is able to get by the router and connect all clients with the outside, because it randomly chooses a port at first start, but that could also be blocked by the firewall, so you might have to change it.

In Phex you can simply set your IP to the internal one, if you want to (tell it to use it).

To make the network private you'll have to change some small bits in the code (but that isn't so hard, I also managed to do it, and I left a guide in the phex-cvs, which describes how to do it).

Can the Provider Application be theh same as a Client App (so that clients can also share)?
Because that is what you get with Gnutella (and downloaders can also download from each other like they do in BitTorrent).

In Phex you can also block all hosts, which aren't from your internal network, but using it as private network, this shouldn't really be necessary.

King_Cole February 17th, 2005 04:28 AM

Quote:

Originally posted by arne_bab
Is that server inside your private network or outside it?

Do you have to get outside that NAT shielded LAN?

It might be, that Phex is able to get by the router and connect all clients with the outside, because it randomly chooses a port at first start, but that could also be blocked by the firewall, so you might have to change it.

In Phex you can simply set your IP to the internal one, if you want to (tell it to use it).

To make the network private you'll have to change some small bits in the code (but that isn't so hard, I also managed to do it, and I left a guide in the phex-cvs, which describes how to do it).

Can the Provider Application be theh same as a Client App (so that clients can also share)?
Because that is what you get with Gnutella (and downloaders can also download from each other like they do in BitTorrent).

In Phex you can also block all hosts, which aren't from your internal network, but using it as private network, this shouldn't really be necessary.

1: Server is outside the private network, it is a public server with a known IP.

2: What I meant by the internal network is my office LAN. All client PCs on this Lan have internal non-routeable IPs and the gateway is set to the IP of the broadband router. The Provider app running on client PCs lets me specify the port no. and then starts listening for incoming connections on that specified port.

3: The provider application cannot be the client, the provider will only provide the content and the client will only get the content. But it doesn't matter, I can change the provider to become a client also.

4: Basically what I need to do is allow the provider to provide its own connection details (ip, port) to the server so that a client can take these details from the server, initiate a connection to the provider and get the content. The problem I am running into is I don't know how to get the correct connection details of the provider and whether it is possible for the client to connect to a provider even though the provider is behind a NAT.

Thanks for your help Arne, I really appreciate it.

Cole


All times are GMT -7. The time now is 01:02 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 ©2011, Crawlability, Inc.

Copyright © 2020 Gnutella Forums.
All Rights Reserved.