Replies: 1 comment
-
|
@acul71 : Thank you for sharing this fantastic compilation on ipcidr. Appreciate it. Wish to share that I have reviewed + merged ipcidr protocol addition in py-multiaddr: please visit multiformats/py-multiaddr#95 Wish to recommend you to get in touch with Paul and collaborate on a new release of py-multiaddr. In the meantime, I will review the other missing protocols in py-multiaddr and will start working with you and Abhinav on it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
ipcidr Protocol Usage in libp2p
Overview
The
ipcidrprotocol is a multiaddr protocol extension that allows specifying CIDR (Classless Inter-Domain Routing) notation for IP address ranges. This protocol is used across different libp2p implementations for network access control, connection management, and resource allocation.Protocol Status by Implementation
Go libp2p Implementation
Basic Usage
Resource Manager Allowlist
Network Prefix Limits
Protocol Detection
JavaScript libp2p Implementation
Basic Usage
Connection Manager Usage
Network Configuration
Multiaddr to IpNet Conversion
Python libp2p Implementation
Current Status
❌ Not Supported: The Python libp2p implementation does not currently support the
ipcidrprotocol.Use Cases
1. Eclipse Attack Prevention
Allow trusted peers to connect even when under attack by specifying trusted IP ranges.
2. Network Access Control
Restrict connections to specific IP ranges for security purposes.
3. Resource Management
Set connection limits per network prefix to prevent resource exhaustion.
4. Peer Authentication
Combine IP ranges with specific peer IDs for enhanced security.
Default CIDR Behavior
When no
ipcidris specified, implementations typically add:/32CIDR for IPv4 addresses (single host)/128CIDR for IPv6 addresses (single host)Implementation Differences
Go libp2p
JavaScript libp2p
Python libp2p
Security Considerations
Eclipse Attack Prevention: The
ipcidrprotocol helps prevent eclipse attacks by ensuring trusted peers can always connect.Resource Exhaustion: Network prefix limits prevent resource exhaustion from specific IP ranges.
Access Control: Fine-grained control over which IP ranges can connect to the node.
Peer Authentication: Combination of IP ranges and peer IDs provides enhanced security.
Future Considerations
For Python libp2p implementation, adding
ipcidrsupport would require:References
Beta Was this translation helpful? Give feedback.
All reactions