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

All 'containers' have the same IP #3

Closed
ccope opened this issue Jul 22, 2015 · 3 comments
Closed

All 'containers' have the same IP #3

ccope opened this issue Jul 22, 2015 · 3 comments

Comments

@ccope
Copy link

ccope commented Jul 22, 2015

This would prevent you from running two webservers on port 80, for instance. If doing dhcp isn't possible, the next best thing would be to maintain a list of currently used IPs.

@p8952
Copy link
Owner

p8952 commented Jul 23, 2015

You're right.

Ideally I don't want to have to keep track of state, or run a DHCP server.

I think the best way to deal with this is to have unique IP and MAC addresses deterministically generated from the container IDs.

@ccope
Copy link
Author

ccope commented Jul 23, 2015

Yeah, I was thinking about that. You could try generating them sequentially, but if you need to wrap (there are only ~250 addresses in the default bridge network) then you have to check which addresses are free.

@p8952
Copy link
Owner

p8952 commented Jul 23, 2015

It looks like I need to solve or at least work around #10 before fixing this. Currently there are 89999 possible UUIDs so conflicts are fairly rare.

If we go for deterministically generated IPs and limit ourselves to a maximum of 253 containers (a fair limit imo) the odds of conflicts go way up.

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

No branches or pull requests

2 participants