Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Controller shouldn't allocate IP addresses that are "reserved" for the subnet #165

Closed
christianang opened this issue Jun 23, 2023 · 4 comments · Fixed by #171
Closed

Controller shouldn't allocate IP addresses that are "reserved" for the subnet #165

christianang opened this issue Jun 23, 2023 · 4 comments · Fixed by #171
Assignees

Comments

@christianang
Copy link
Contributor

christianang commented Jun 23, 2023

Context

Broken out of the conversation started in #123 (comment).

There are ip addresses that shouldn't be given out that are reserved for special cases in the subnet. This is typically the network address, the broadcast address, and the gateway address.

Proposed Solution

If I defined the following pool:

Gateway: 192.168.0.1
Prefix: 16
Addresses:
- 192.168.0.0/16

The controller should not allocate: 192.168.0.0 (network address), 192.168.0.1 (gateway address), 192.168.255.255 (broadcast address). It would therefore give out 192.168.0.2-192.168.255.254.

If a user wants to allocate reserved addresses i.e ignore the above functionality except for gateway, a user can set a new flag called allocatedReservedAddresses, which would allocate 192.168.0.0-192.168.255.255 (except for 192.168.0.1). If the user doesn't want to reserve the gateway they should not set the gateway.

@schrej
Copy link
Member

schrej commented Jun 26, 2023

I think we should never allocate the gateway address when it's set. If you don't want it to be reserved, don't set it.

@christianang
Copy link
Contributor Author

Yeah that makes sense. Updated the body of the issue.

@tylerschultz
Copy link
Contributor

FYI - we're taking a hack at this issue

@schrej
Copy link
Member

schrej commented Jun 30, 2023

/assign @tylerschultz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants