You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: src/routing/kad-dht.md
+30-3
Original file line number
Diff line number
Diff line change
@@ -177,7 +177,28 @@ the most stable peers are eventually retained in the Routing Table.
177
177
178
178
#### IP Diversity Filter
179
179
180
-
`FIXME:` DHT Servers SHOULD implement an [IP Diversity Filter](https://github.com/libp2p/go-libp2p-kbucket/blob/ddb36fa029a18ea0fd5a2b61eeb7235913749615/peerdiversity/filter.go#L45).
180
+
DHT servers SHOULD implement an IP Diversity Filter to ensure that nodes in
181
+
their routing table originate from a diverse set of Autonomous System Numbers
182
+
(ASNs). This measure helps mitigate Sybil attacks and enhances the network’s
183
+
resilience.
184
+
185
+
A recommended approach is to impose the following limits:
186
+
187
+
***Globally**, a maximum of `3` nodes sharing the same IP grouping should be
188
+
allowed in the routing table.
189
+
***Per routing table bucket**, a maximum of `2` nodes from the same IP
190
+
grouping should be permitted.
191
+
192
+
For IP grouping:
193
+
194
+
***IPv6 addresses** are grouped by ASN.
195
+
***IPv4 addresses** are grouped by `/16` prefixes, except for [legacy Class A
0 commit comments