desktop-edge-win icon indicating copy to clipboard operation
desktop-edge-win copied to clipboard

IP addresses assigned to TUN won't be reclaimed

Open dovholuknf opened this issue 3 years ago • 0 comments

The current implementation will assign IPs for services using the CIDR block defined in the config file. Each new service is assigned a new IP address. If a small CIDR block is defined - or if services are added and removed, added and removed over and over within the controller these services will be added and removed from the client, generating a new ip address for each time the service is added/delete.

For example: Bob creates a service named my.service in the controller for Bob's client Bob's client gets a new service notification, gets the next IP (192.168.1.5) from the CIDR block Bob deletes my.service Bob creates a service named my.service in the controller for Bob's client Bob's client gets a new service notification, gets the next IP (192.168.1.6) from the CIDR block

If Bob does this 256 times for a /24 CIDR block the IPs will begin to overflow and no longer be within the specified CIDR range.

For this situation it would be better to be able to reclaim any IP address which are released in this manner or something like that. Also when IPs are exhausted - decide if the client should shut down/panic or if it should wrap around or spill over

dovholuknf avatar Oct 21 '20 13:10 dovholuknf