[PR #342] Generate random Peer IP from 100.64.0.0/16 range #2717

Open
opened 2025-11-20 08:03:46 -05:00 by saavagebueno · 0 comments
Owner

Original Pull Request: https://github.com/netbirdio/netbird/pull/342

State: closed
Merged: Yes


The peer IP allocation logic was allocating sequential peer IPs
e.g. 100.64.0.1, 100.64.0.2, etc. from the 100.64.0.0/10 range.
Each account is created with a random subnet from 100.64.0.0/10 range. The total amount of potential subnets is 64. This gives us an option to "physically" groups peers on a subnet level.
The new logic allocates a random peer IP
from the account's subnet.

Example:
Account was created with a subnet 100.75.0.0/16.
New peer was added with an IP 100.75.65.8.

**Original Pull Request:** https://github.com/netbirdio/netbird/pull/342 **State:** closed **Merged:** Yes --- The peer IP allocation logic was allocating sequential peer IPs e.g. 100.64.0.1, 100.64.0.2, etc. from the 100.64.0.0/10 range. Each account is created with a random subnet from 100.64.0.0/10 range. The total amount of potential subnets is 64. This gives us an option to "physically" groups peers on a subnet level. The new logic allocates a random peer IP from the account's subnet. Example: Account was created with a subnet 100.75.0.0/16. New peer was added with an IP 100.75.65.8.
saavagebueno added the pull-request label 2025-11-20 08:03:46 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#2717