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

Feature request: allow allocation of network/broadcast address if IPPool/ExternalIPPool is defined by CIDR #6186

Open
ghormoon opened this issue Apr 3, 2024 · 3 comments
Labels
area/api Issues or PRs related to an API. kind/feature Categorizes issue or PR as related to a new feature.

Comments

@ghormoon
Copy link

ghormoon commented Apr 3, 2024

In some cases (eg in some server hosting providers), you're given "subnets", eg /29, which are in reality just a range of IPs in a bigger subnet, so the first and last address are actually not a network/broadcast address.
The same applied if you're assigning single addresses to the pool with /32. - they get ignored (thanks for improving documentation in #6183)

it is actually currently possible to replace eg.

- cidr: 10.0.0.42/32

with

- start: 10.0.0.42
  end: 10.0.0.42

but it would be much nicer to just flip a flag on the (External)IPPool that would make it allocate the first/last cidr addresses (default would need to be false, to keep backwards compatibility).
It would make it much more readeable and allow me to use same lists of addresses in ansible for both antrea and metallb (which doesn't ignore them in CIDR like this) without having to transform the cidr by some heavy magic into the start+end format

@ghormoon ghormoon added the kind/feature Categorizes issue or PR as related to a new feature. label Apr 3, 2024
@tnqn tnqn added the area/api Issues or PRs related to an API. label Apr 3, 2024
@tnqn
Copy link
Member

tnqn commented Apr 3, 2024

@ghormoon thank you for the proposal. It makes sense to me. I will see if this can be included in the next release.

@antoninbas
Copy link
Contributor

antoninbas commented Apr 3, 2024

A similar MetalLB configuration flag that @ghormoon mentioned to us on Slack: https://metallb.universe.tf/configuration/_advanced_ipaddresspool_configuration/#handling-buggy-networks

@ghormoon
Copy link
Author

ghormoon commented Apr 3, 2024

just note that metallb has the oposite behaviour. it doesn't ignore them, only ignores .0 and .255 if he flag is on (and not even the other ip's if the subnet is eg /29 and doesn't start at x.x.x.0/29)
but for backwards compatibility we need to keep the default to ignore

@rajnkamr rajnkamr changed the title Feture request: allow allocation of network/broadcast address if IPPool/ExternalIPPool is defined by CIDR Feature request: allow allocation of network/broadcast address if IPPool/ExternalIPPool is defined by CIDR Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api Issues or PRs related to an API. kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

3 participants