Changeset 11184 for dotorg/trunk/html
- Timestamp:
- 10/29/09 16:46:10 (5 months ago)
- Files:
-
- 1 modified
-
dotorg/trunk/html/beps/bep_0032.rst (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dotorg/trunk/html/beps/bep_0032.rst
r11182 r11184 1 BEP: 321 BEP: XXX 2 2 Title: BitTorrent DHT Extensions for IPv6 3 3 Version: $Revision$ … … 9 9 Content-Type: text/x-rst 10 10 Created: 14-Oct-2009 11 Post-History: 15-Oct-2009: Promote same ID in IPv6 and IPv4 nodes. Drop values6. Added some rationales11 Post-History: 12 12 13 13 … … 17 17 This proposal describes a set of extensions to the BitTorrent DHT [#BEP-5]_ 18 18 to allow operation over IPv6. 19 20 **This is a very early draft**, and **not suitable for implementation**. Yet.21 19 22 20 … … 76 74 77 75 78 D ouble-stack nodes79 ---------------- --76 Dual-stack nodes 77 ---------------- 80 78 81 79 While conceptually equivalent to a pair of single-protocol nodes, 82 a d ouble-stack (IPv4 and IPv6) node can make bootstrap faster and80 a dual-stack (IPv4 and IPv6) node can make bootstrap faster and 83 81 improve the reliability of the protocol by "leaking" data between the 84 82 two DHTs, as described in the following paragraphs. … … 88 86 ''''''''''''' 89 87 90 A d ouble-stack node that is bootstrapping its DHT will send find_nodes88 A dual-stack node that is bootstrapping its DHT will send find_nodes 91 89 requests in order to populate its routing tables. In order to accelerate 92 90 this process, it should request both "nodes" and "nodes6" fields. … … 105 103 network outage, however, a node may *ocasionally* send a request for 106 104 "nodes" to an IPv6 node, or a request for "nodes6" to an IPv4 node. 105 106 107 Maximum packet size 108 ------------------- 109 110 A node obeying this specification must not send UDP datagrams with 111 a payload larger than 1024 octets, and must be able to receive UDP 112 datagrams with a payload of 1024 octets or less. (In the interest of 113 robustness, a node should be able to receive datagrams with larger 114 payloads.) 115 116 **Rationale**: a UDP datagram with a payload of 1024 octets easily 117 fits within the IPv6 minimum maximum packet size, which is 1280 118 octets [#IPv6]_. In particular, such a packet will cross a Teredo 119 tunnel with no fragmentation. 120 121 In principle, IPv4 nodes might be unable to reassemble packets 122 larger than 576 octets [#IPv4]_; in practice, however, due to the 123 predominance of Ethernet networks, all IPv4 nodes are able to 124 reassemble packets up to 1500 octets. 125 126 127 Source address selection 128 ------------------------ 129 130 The IPv6 DHT should use a socket bound to one of the host's global 131 unicast IPv6 addresses rather than the "unspecified address" (::/128). 132 When selecting to which address to bind, Teredo addresses (addresses 133 in 2001:0000::/32) should be avoided if other global unicast addresses 134 are available. 135 136 **Rationale**: The DHT relies on the publicly visible IP address of 137 each node to remain constant. Since multi-homing is common in IPv6, 138 it is particularly important to bind the IPv6 socket to a well-defined 139 address. 140 141 While Teredo traffic can, in principle, be more efficient than 142 native traffic, especially when speaking to other Teredo hosts, 143 experience shows that Teredo routing tends to be brittle; hence, 144 Teredo addresses should be avoided whenever possible. 145 146 The same issues apply to multi-homed IPv4 hosts. However, in IPv4 147 multi-homing is not as common in IPv6, and in the presence of NAT 148 the issues are somewhat more complicated, so this specification 149 refrains from making any recommendations about binding of IPv4 150 sockets. 151 152 153 Changes to the BitTorrent protocol 154 ================================== 155 156 The PORT message, as defined in BEP-5, is extended to work over both 157 IPv4 and IPv6. The information provided by the PORT message only 158 applies to the address family it is carried over: a PORT message sent 159 over IPv4 only advertises participation in the IPv4 DHT, and a PORT 160 message sent over IPv6 only advertises participation in the IPv6 DHT. 161 162 **Rationale**: in the presence of the LTEP extension negotiation 163 protocol [#BEP-10]_, which advertises a peer's addresses across 164 address families, it might be possible to use the PORT message for 165 both address families. However, since an implementation need not 166 participate in both DHTs, nor use the same port in both DHTs, this 167 specification leaves the role of bridging the two DHTs to the 168 'find_nodes' message (see below). 169 107 170 108 171 … … 154 217 The "want" parameter is allowed in the find_nodes and get_peers requests, 155 218 and governs the presence or absence of the "nodes" and "nodes6" parameters 156 in the requested reply. Its value is a string of one or more characters,157 whichmay include158 159 * " 4": the node requests the presence of a "nodes" key;160 161 * " 6": the node requests the presence of a "nodes6" key.162 163 For future extensibility, other characters may be present in the string,219 in the requested reply. Its value is a list of one or more strings, which 220 may include 221 222 * "n4": the node requests the presence of a "nodes" key; 223 224 * "n6": the node requests the presence of a "nodes6" key. 225 226 For future extensibility, other strings may be present in the list, 164 227 and must be silently ignored on reception. 165 228 166 ** Note**: the "want" parameter is currently under discussion. It167 has been suggested that it should be renamed to "flags", and that168 it should be a list of flags rather than a string. This author169 is not convinced yet.229 **Rationale**: the "want" parameter is not intended to carry random 230 sundry flags, which can simply be included in the top-level 231 dictionary of the message. Extending the "want" parameter without 232 good reason is discouraged. 170 233 171 234 … … 188 251 189 252 **Rationale**: this is an incompatible change to the protocol 190 defined in BEP-5 [#BEP-5]_, which specifies that "nodes" and191 "values" are mutually exclusive. However, this change makes the DHT192 more reliable, and has been deployed by most implementations for193 overa year with no negative effects.253 defined in BEP-5, which specifies that "nodes" and "values" are 254 mutually exclusive. However, this change makes the DHT more 255 reliable, and has been deployed by most implementations for over 256 a year with no negative effects. 194 257 195 258 When a node receives a get_peers request and it has contact … … 207 270 **Rationale**: if the requesting node is a single-stack node, it has 208 271 no interest in values of the other address family. If the 209 requesting node is a d ouble-stack node, then it must perform the two272 requesting node is a dual-stack node, then it must perform the two 210 273 announces in parallel; providing both sets of data in both sets of 211 274 replies merely increases the amount of traffic without giving any … … 235 298 (http://www.bittorrent.org/beps/bep_0005.html) 236 299 300 .. [#BEP-10] BEP_0010. Extension Protocol. 301 (http://www.bittorrent.org/beps/bep_0010.html) 302 303 .. [#IPv6] RFC 2460. Internet Protocol, Version 6 (IPv6) Specification. 304 S. Deering, R. Hinden. December 1998. 305 306 .. [#IPv4] RFC 791. Internet Protocol. J. Postel. September 1981. 237 307 238 308 … … 240 310 ========= 241 311 242 This document has been placedin the public domain.312 This document is in the public domain. 243 313 244 314