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

[ipam] have a default for -iprange #743

Closed
bboreham opened this issue May 26, 2015 · 4 comments
Closed

[ipam] have a default for -iprange #743

bboreham opened this issue May 26, 2015 · 4 comments
Assignees
Milestone

Comments

@bboreham
Copy link
Contributor

In general, we don't know what IP address ranges are in use on the target, so we ask the user to pick a free range.

However, we could have a default, check whether that default is OK to use, and refuse to start if not. The default might be 10.20.0.0/16; this is fairly large and steers clear of ranges like 10.0.2 which are used by virtualbox.

We can use the same approach that Docker does to check if a range is in use: see if there is any routing rule on the host that intersects the range.

Having just a single default is better than having several and picking the first one that is free, because the latter approach can lead to inconsistent choices across hosts which are much harder to diagnose.

@rade rade added the feature label May 26, 2015
@rade rade added this to the next milestone May 26, 2015
@rade
Copy link
Member

rade commented Jun 2, 2015

afaict virtualbox uses 10.0.2.

Would be good to have something larger than /16, but might be tricky to pick one that has a low probability of clashing.

@bboreham
Copy link
Contributor Author

bboreham commented Jun 4, 2015

After #675 is fixed, the requirement will be to pick both an overall range and a default subnet within that range.

Suggest 10.0.0.0/8 and 10.20.0.0/16, respectively.

@bboreham
Copy link
Contributor Author

bboreham commented Jun 4, 2015

After discussion, we should probably insist that -iprange is completely available for ipam to allocate within, so 10/8 not so good. How about 10.16.0.0/12 and 10.16.0.0/16 ?

@bboreham
Copy link
Contributor Author

bboreham commented Jun 4, 2015

Do we need an option to turn ipam off (i.e. what used to happen if you didn't specify -iprange) ?

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

No branches or pull requests

3 participants