Project

General

Profile

Peer discovery on 255.255.0.0 instead of 255.255.255.0 or a local peer cache, how to?

Added by Emad Medher about 12 years ago

Hi, First of all I want to express my fascination with this project. really hats off to you over the years I found several similar projects like AllianceP2P, LAN Shark and else but got lost in complexity or lack of stability or interested developers.

I would like your help if you may, thank you in advance. We are in a college campus and we are trying to use D-LAN. We have no problem compiling, modifying the code and everything else we just want some heads up and pointers. Our LAN gives IP addresses in the form of 10.80.x.y where x is the building number and y are all IP addresses in the same building. For the same building D-LAN works like a charm but we cannot discover any peers outside the building. Is there any local cache of IP addresses we can manually fill? or can you point us to the peer discovery code so we can change it to our specific network. Thank you for any help.

Also I noticed connectivity problems for connecting a windows instance of D-LAN with a linux instance (Ubuntu 12.04 - 64x). I am still trying to make sure its a bug before I file it. If such connectivity problem is already know, Please tell me so.

Emad Medher


Replies (5)

RE: Peer discovery on 255.255.0.0 instead of 255.255.255.0 or a local peer cache, how to? - Added by Greg Burri about 12 years ago

Hi, thanks for your comment.

There is actually no way to manually add some peers to the list. I will take a note about that to maybe implement this in a further version.

I guess your 'x' is the network address, so to communicate, for instance, between 10.80.1.1 and 10.80.2.1 the data has to pass a router (IP level). The router may not relay UDP multicast traffic for some reasons. The possible causes are listed here:

  • The router explicitly forbids multicast
  • The router doesn't support multicast IPv4 (support of IPv4 multicast is optional but IPv6 is mandatory)
  • The port is intentionally blocked by the router (59486)
  • TTL (time to live) is decreased to 0. It should not be the case, the default value is 31.
  • Other reasons?

Did you try to switch to IPv6? (in 'Settings' -> 'Network'), maybe it can resolve the issue.

Here is the involved code :

There is some settings stored in "~/.d-lan/core_settings.txt", description of each fields is here : https://github.com/Ummon/D-LAN/blob/1.1/application/Protos/core_settings.proto

About the connectivity problems between a Windows and a Linux instance I'm not aware about it and I never saw such problem before.

cya

/Greg

RE: Peer discovery on 255.255.0.0 instead of 255.255.255.0 or a local peer cache, how to? - Added by Emad Medher about 12 years ago

Hello, Thank you for answering.

The inner working of the of the LAN is not public knowledge and our ITC is really not cooperating so we have to test these ports ourselves, we are working on it. Thank you for pointing us to the right direction, for code and settings.

Another small question if I may ask,

- The DHCP server sets our network to broadcast on 255.255.255.0, If we manually set the broadcast address to 255.255.0.0 (Assuming the routing actually allows it). Would that be just enough for the peer discovery to work?

Thank you again.

Emad

RE: Peer discovery on 255.255.0.0 instead of 255.255.255.0 or a local peer cache, how to? - Added by Greg Burri about 12 years ago

- The DHCP server sets our network to broadcast on 255.255.255.0, If we manually set the broadcast address to 255.255.0.0 (Assuming the routing actually allows it). Would that be just enough for the peer discovery to work?

No no!! Don't do that, this is the net mask to determine your sub-network number and your host number1, you will be unable to communicate with other networks if you change it. Actually D-LAN isn't using broadcasting but multicasting2. The multicast address and the port are 236.13.43.24:59486 (IPv4).

[1]: http://en.wikipedia.org/wiki/Subnetwork
[2]: http://en.wikipedia.org/wiki/Multicast

RE: Peer discovery on 255.255.0.0 instead of 255.255.255.0 or a local peer cache, how to? - Added by Emad Medher about 12 years ago

Hi, Thank you for the fast reply. And I am terribly sorry not being able to reply any sooner. Especially since you really replied shortly after my last message.

I feel like a retard to mix multicast and broadcast up............... Thank you for pointing me to that direction.

Our network is quite restrictive and multicast is blocked. And I would think the ITC will block certain ports when we start using D-LAN on the network. So I thought since:
- More than one process can bind to the multicast port.
- D-LAN doesn't keep track of peerlist. because it finds them all at startup
- D-LAN is opensource, so as D-LAN's peer discovery protocol

I thought of opening the port locally again from a program I will make and "feed" D-LAN the addresses as I claim to be different users broadcasting. I think this would work since I tried connecting to other D-LANs guy directly from the settings and it works so unicast is working just fine.

Can you please confirm that what I wrote make sense? or slap me on the face and wake me up to my retardness again? Thank you.

If it made sense and quite doable. Would you please describe the initial communication over multicast so I imitate it? I would be using java to utilize the library "TomP2P" for caching peers.

Thank you very much for the help so far. I really appreciate it.

Emad/

RE: Peer discovery on 255.255.0.0 instead of 255.255.255.0 or a local peer cache, how to? - Added by Greg Burri about 12 years ago

Yes, it might work, the only problem is that the remote address is read directly from the received datagram: https://github.com/Ummon/D-LAN/blob/master/application/Core/NetworkListener/priv/UDPListener.cpp#L215 I don't know how you can resolve this problem.

The best solution would be to implement manually added peers, but it's not so easy. Maybe I will do that in the 1.1 branch.

    (1-5/5)