ger3392 Posted April 10, 2013 Report Share Posted April 10, 2013 I am trying to demonstrate how DHT works, using 2 computers on my LAN. I created a trackerless torrent and edited it with a Bencode editor to include a nodes key indicating to use PC1 as a bootstrap node. The process was as follows:1) Create and edit the torrent file2) Delete dht.dat on both PCs so PC1 is the only node it knows of3) Start seeding on PC14) Open torrent file on PC2 and begin downloadingIt worked initially, but I realised this was because of Local Peer Discovery and not DHT (download didn't commence using only DHT but did work when using LPD).I'm pretty confused as to why it won't work as all the specifications Ive read of DHT tells me it would work this way:1) PC1 will talk to PC2 as it is the only node it knows of2) PC1 will respond either with info about other nodes closer to the info_hash of the torrent (which there are none), or info about peers currently on that torrent (if any)This is where I'm confused. PC1 will be the only computer with the actual file, so if PC1 is seeding the file it will respond to PC2 with its own IP/port and thus the download should begin?I am wondering if I edited the file incorrectly. The raw bencoded data of the 'nodes' key is:5:nodesll25:[ "192.168.10.3", 47823 ] eIn the Bencode editor it looked like:I'm posting this here hoping someone might please take a look and tell me if I'm going wrong. Thank you for any advice you can give me as I am still learning about Bittorrent Link to comment Share on other sites More sharing options...
Harold Feit Posted April 10, 2013 Report Share Posted April 10, 2013 Using such a small base to demonstrate DHT isn't actually going to work well. You're going to need to have more computers and have them connected to the regular internet.k`tech has done some good demonstrations of features of bittorrent clients. His website is http://www.ktetch.co.uk/ Link to comment Share on other sites More sharing options...
ger3392 Posted April 10, 2013 Author Report Share Posted April 10, 2013 I understand what you mean, as using only 2 PCs ignores the whole point of DHT, but my aim here is simply to get the file from one PC to the other. Kind of a cop-out but its all I need really, a basic demonstration. Would that still function using only 2-3 PCs or is it absolutely essential to have many on the internet? Link to comment Share on other sites More sharing options...
Harold Feit Posted April 10, 2013 Report Share Posted April 10, 2013 If you're just transferring between machines on a LAN where multicast works, local peer discovery is enough for getting the files around.The DHT system in BitTorrent automatically attempts to connect to a default set of nodes in addition to any defined in a torrent. Link to comment Share on other sites More sharing options...
ger3392 Posted April 10, 2013 Author Report Share Posted April 10, 2013 If I had to use only DHT though, should it still work in theory? I don't want to use LPD as its a DHT demonstration I have to produce (its not 'homework' per se as I'm doing this for my own benefit).I'm aware that it talks to the default nodes and I was planning on using that in another part of my work. Would they interfere with what I'm trying to do with the PCs? If so I could just disconnect my router from the internet Link to comment Share on other sites More sharing options...
Harold Feit Posted April 10, 2013 Report Share Posted April 10, 2013 The default nodes wouldn't interfere, and I'm fairly certain that local addresses are actually ignored by BitTorrent's DHT code. Using the main DHT wouldn't interfere with what you're trying to do. Link to comment Share on other sites More sharing options...
ger3392 Posted April 10, 2013 Author Report Share Posted April 10, 2013 That could be my problem then. If I replaced the 192.168 address with my home's public address do you think it would work? The DHT messages would leave my LAN for a moment and the router's NAT could do the rest. I'll try it now Link to comment Share on other sites More sharing options...
ger3392 Posted April 10, 2013 Author Report Share Posted April 10, 2013 Hmm I replaced the address but still no luck. I guess there's more to this that I'm not thinking of Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.