views:

182

answers:

4

I would like to do this because it would make peer location much more effective in my p2p network as I would know that all the addresses would be part of this network.

How could I do this while remaining compatible with current transport layer protocols such as SCTP, and the current hardware used on the big wide Internet?

Thanks, Andreas

A: 

It looks like you're trying to create a network inside of a P2P "world". So all the users using the P2P app would have a second IP address, say Alice has 10.0.2.40, that could be used by Bob, another user of the app, to get to Alice. Right?

With that regards, it looks like you'd want to set up a VPN on each client and use some sort of route table modifications so the VPN is only used for the address-space allocated by the the P2P program (say the 10.x.x.x network).

But there are problems with that.. for example you'll never find an address space that everyone has free to use. Home Routers use 192.168.x.x, corporate networks or enthusiasts (like myself) use 10.x.x.x, and the 172.something is used by other sysadmins for stuff I'm sure.

Disclaimer: Not a networking genius, I'm speculating here.

Tom Ritter
+1  A: 

Put simply, you can't. IPv4 IPs are distributed by IANA to the five major IP registries: ARIN (North America), RIPE (Europe), APNIC (Asia/Pacific), LACNIC (Latin America/Carribean), and AfriNIC (Africa). These registries then distribute those out to ISPs.

There are blocks reserved for local networks, but those are not routable over the public Internet... they must be encapsulated; this is how VPNs work.

R. Bemrose
+2  A: 

I suggest using IPv6.

  • There is enough address space that you can create up to 2^40 "unique unicast" ranges, each with 16 bits of subnet and 64 bits of host ID.

  • Protocols such as UDP, TCP, and SCTP already work on top of it

  • It already has major operating system support.

See http://www.rfc-editor.org/rfc/rfc4193.txt

Densely filling the 40-bit unique-id is discouraged. Use the random generation method mentioned in the RFC.

Joe Koberg
"These addresses are not expected to be routable on the global Internet." My network would have peers on any part of the Internet. This may still be useful for something else though.
andreasw
+1  A: 

The best way to have this kind of functionality is probably to use a name lookup service, or even a peer discovery service in the protocol itself.

The fact is, no matter what you do, it is likely that you will have to get your application to perform extra work on top of the IP protocol anyway, because the IP protocol itself supports only 1 address space, you need to add another layer to add an independent address space.