Hi Sergey,
The limits 8 and 30 are hard coded in the libdtndht, which can be found here: complete source: http://git.ibr.cs.tu-bs.de/?p=libdtndht.git;a=summary
defines are in "dtndht/bootstrapping.h":
BOOTSTRAPPING_SEARCH_THRESHOLD 8 DHT_READY_THRESHOLD 30
So feel free to change the DHT_READY_THRESHOLD to a lower value, but I would advice against reducing the BOOTSTRAPPING_SEARCH_THRESHOLD. All data structures and mechanisms of this DHT implementation are acting with multiple (about 8) parallel receivers of RPC calls. So I cannot say, if a lower number of nodes will work correct. In my tests, I had problems with reducing the BOOTSTRAPPING_SEARCH_THRESHOLD. But I could have be wrong. Feel free to clone/fork the project. If it will work, I'll think about merging it into the main project.
Building and installing the library: #################################### git clone git://git.ibr.cs.tu-bs.de/libdtndht.git libdtndht cd libdtndht ./autogen.sh ./configure make sudo make install ####################################
After this, you should build also IBRDTN from source, because the binary package has got its own hard linked library.
Second question: Yes, you could block all UDP communication on port 9999 from the internet to LAN, and vice versa. But again, if any client has contact to the internet, he will publish it contacts to the other clients. They wouldn't reach the internet nodes, but they'll try to. So there will be a lot of traffic to none reachable nodes. This is not a real problem, but a waste of bandwidth. But the internet connected node will store its data to the large/internet DHT, because the local nodes are highly irresponsible for its data. This data will be lost/unreachable for all firewalled local hosts.
But if you prevent all nodes from getting contact to the internet by blocking all incoming UDP messages for port a specific port (default is 9999), and if all instances of the internal DHT nodes are using the same specific port, there shouldn't be any problem.
And yes, you are right with a wiki page for this DHT stuff. I hope to find the time to write all scenarios down.
Best regards, Till Lorentzen
Am 23.10.2012 09:40, schrieb Sergey Sireskin:
Hi Till,
Thank you for the detailed answer, it is very helpful, and looks like a complete recipe! I think someone should collect all recipes and bits of knowledge from the mailing list in a single place like wiki or something.
Yes, I have got a large network with routing and no multicast support - this is exactly my case.
Are the numbers 7 and 30 hardcoded constants somewhere in IBR DTN sources, and is it possible to change, for example, 7 to 3 for testing purposes, in order to not set up extra nodes?
I suppose that it is possible to block port 9999 from the Internet with the help of a firewall in case if there is one host, which is part of the DHT and connected to the Internet, am I wrong?
Best regards, Sergey Sireskin
Mon, 22 Oct 2012 18:31:23 +0200 от Till Lorentzen lorentze@ibr.cs.tu-bs.de: Hi Sergey,
I'll try to answer your third question (like Sebastian has done already)
- Does Bittorrent DHT discovery and routing need (any) nodes to be connected to the Internet?
If yes, is it possible to setup a DHT server in the Intranet, which is isolated from the Internet, and make IBR-DTN use it?
The main idea of the DHT discovery is to find nodes across the internet. So, yes, if you want to use this feature, you should be in a large network. It doesn't have to be the internet, but the DHT only works with more than 7 nodes. And it tries to request for 30 nodes, until it will break up bootstrapping for more nodes.
So if you have got a large network with multiple subnets and routing between the subnets, but no multicast support between the subnets, then you could use the DHT. If you would like to setup such a system, this should be the setting of the DHT nodes:
dht_enabled = yes dht_bootstrapping = no dht_bootstrapping_ips = 10.0.0.1 9999;
The "10.0.0.1 9999" should be replaced by the IP and DHT Port of one available node. You could give a list of probably available nodes as well:
dht_bootstrapping_ips = 10.0.0.1 9999; 10.1.0.1 9999; 10.2.13.34 1234;
This should be all you need to build your own "private" DHT in a network, which is completely disconnected from the internet. If it is not disconnected from the internet. There is no mechanism to block this nodes! Only if one node connects to any node in the internet, this contact will be propagated across the whole "private" DHT!
If your nodes are all in the same LAN with IP broadcast/multicast support, then you don't need the DHT. So you can simply disable it and use the normal neighbour discovery instead. To disable the DHT, simply edit the line at ibrdtn.conf:
dht_enabled = no
If you have got one host, which is part of the DHT and connected to the internet and you would like to prevent this node to announce all of its neighbours to the internet, then you have got two possibilities:
Deactivating neighbour announcements completely on the node with the active DHT:
dht_allow_neighbour_announcement = no
Or a "private" node can publish, that he shouldn't be announced by anyone in the neighbourhood by setting:
dht_allow_neighbours_to_announce_me = false
_BUT_: This doesn't prevent from beeing connected from "outside". Like Sebastian already said, if any DHT node has got connection to you, they will communicate with each other and will try to exchange their DHT neighbour nodes.
I hope, this will help you with your setup!
Best regards, Till Lorentzen -- !! This message is brought to you via the `ibr-dtn' mailing list. !! Please do not reply to this message to unsubscribe. To unsubscribe or adjust !! your settings, send a mail message to ibr-dtn-request@ibr.cs.tu-bs.de !! or look at https://www.ibr.cs.tu-bs.de/mailman/listinfo/ibr-dtn.
-- !! This message is brought to you via the `ibr-dtn' mailing list. !! Please do not reply to this message to unsubscribe. To unsubscribe or adjust !! your settings, send a mail message to ibr-dtn-request@ibr.cs.tu-bs.de !! or look at https://www.ibr.cs.tu-bs.de/mailman/listinfo/ibr-dtn.