Support #21236
closedNo ping check causes duplicated IP with MS DHCP
Description
Since I've upgraded from 1.13 to 1.15, the smart-proxy does not ping free ip returned by the dhcp before
assigning it. In the debug log there is no more message "Searching for free IP - pinging ..".
It just gives the first free ip returned by the dhcp.
Updated by Anonymous over 7 years ago
Ms dhcp provider relies on MS dhcps api for free ip suggestions. Getting an ip address that is already in use would means that there are ip addresses within dhcp scope that dhcp server isn't aware of (for example static ips not managed by the server).
Updated by Anthony Chevalet over 7 years ago
Yes that's the problem, when there are static ips in the dhcp scope. Previous version (<=1.13) didn't return pingable IPs.
Updated by Anonymous over 7 years ago
- Tracker changed from Bug to Support
This behaviour is by design. Check that ping checks are enabled in the scope in question. If not, try enabling them and see if the server still comes back with ips that are in use. If the checks are already enabled, I would suggest:
- create reservations for those ip addresses, or
- create an excluded ip range within dhcp scope to contain those static ips, or
- move static ips out of dhcp scope, or
- shrink the scope to exclude static ips
Updated by Anthony Chevalet over 7 years ago
This feature was present. Do you mean it has been removed intentionally?
Here is my workaround: https://github.com/achevalet/smart-proxy/commit/9023c7bfb637975654702c3042e68d1e9bb30eac
Updated by Anonymous over 7 years ago
The functionality has been rewritten to use ms api. There are no plans to add additional checks over the ones performed by api internally.
Updated by Anonymous over 7 years ago
The problem is that ms api does not provide this feature. The DhcpV4GetFreeIPAddress that is called only returns free IPs from DHCP point of view, there is no option to do a ping check.
Just in case, I've proposed a patch: https://github.com/theforeman/smart-proxy/pull/546
Please let me know what you think about it.
Updated by Fred Blaise over 7 years ago
I agree with Anthony. Getting an IP that is taken somewhere else is a PITA and it happens if we just rely on the MS DHCP. I am in favor of this patch.
Updated by Anthony Chevalet over 7 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
Applied in changeset ba7eceeff7b2e19c306097288a30ae2a49918450.
Updated by Jeff Sparrow about 7 years ago
Thank you for this!! Duplicate IPs just start wreaking havoc due to this. I'll try the patch now.
Updated by Anonymous about 7 years ago
I'll try the patch now.
Please note that the behaviour and the subsequent fix will be superseded by https://github.com/theforeman/smart-proxy/pull/567, which uses custom "unused ip" functionality.
Updated by Lukas Zapletal over 6 years ago
- Related to Bug #24816: MS DHCP cannot give free IP when it finds multiple pingable ip added