[Extracted this text version from LimeWire's wiki on 2008-07-05]

****** DHT Modes ******

This page describes the different DHT modes that can be assumed by a LimeWire
node on the network. Which mode is chosen depends on certain properties of the
host LimeWire is run on and is explained below.

***** Active *****

Nodes can join the DHT in active mode if they can receive unsolicited UDP (i.e.
if they're not firewalled) and fulfill certain requirements like have a good
uptime. Nodes running in active mode build up essentially the DHT and the goal
should be to run as many Nodes as possible in this mode.

***** Passive *****

The passive mode is almost identical to the active mode but it's reserved for
Ultrapeers. The big difference is that Nodes running in passive mode mark
themselves as firewalled even though they aren't. In fact are Ultrapeers
perfect active Nodes and they fulfill all requirements to become one. As
they're considered filewalled by the other (active) Nodes in the DHT they're
never added to the RouteTables and are therefore not part of the DHT. The
reasoning is that Ultrapeers are already performing various important Gnutella
tasks and we don't want to overload them. The long term should be however to
run Ultrapeers in active mode as well if it turns out that the additional load
generated by the DHT can be easily handled by Ultrapeers.
The required changes are relatively simple: Do everything like in active mode
but wrap the RouteTable in PassiveDHTNodeRouteTable (I'd also rename the
passive mode and PassiveDHTNodeRouteTable to say UltrapeerDHTNodeRouteTable).
IMPORTANT: Make always sure the number of active DHT Nodes is greater than the
number of passive Nodes or the DHT will crush under the load.

***** Passive Leaf *****

The passive leaf mode is reserved for Gnutella Leaf Nodes that do not fulfill
the requirements to become active DHT Nodes. The reasons can be because they
cannot receive unsolicited UDP (firewall, bad router configuration) or they
have a bad average uptime. They must however be able to receive solicited UDP
and like Ultrapeers they're marking themselves as firewalled so that nobody
will add them to the RouteTables.
Furthermore they must be connected (via Gnutella) to a DHT enabled Ultrapeer.
The reasoning is that passive leaf Node do not bootstrap nor perform any other
DHT maintenance operations like refreshing the Buckets to not add additional
load on the DHT. They depend entirely on their Ultrapeer which feeds them
constantly with fresh Contacts. The RouteTable of a passive leaf Node is a
simple List of size k with LRU eviction.
IMPORTANT: Make always sure the number of active DHT Nodes is greater than the
number of passive Nodes or the DHT will crush under the load.

***** Guided Leaf *****

This mode is currently not implemented (and the name of the mode is made up)
but it's reserved for firewalled Gnutella Nodes that cannot receive solicited
UDP. The idea would be to connect over TCP to an Ultrapeer, instruct it to
perform a certain DHT operation and send the result back over TCP.

***** Summary *****

The goal should be to run as many DHT Nodes in active mode as possible. Certain
features like Instant Messaging could encourage people to leave their Node
running for example. You should also think about security features for the
passive and guided leaf modes as they can be easily abused.
