Skip to content

Instantly share code, notes, and snippets.

@horodchukanton
Created August 4, 2016 11:49
Show Gist options
  • Save horodchukanton/8647a76e7c60eb939c4a9e14baa3d619 to your computer and use it in GitHub Desktop.
Save horodchukanton/8647a76e7c60eb939c4a9e14baa3d619 to your computer and use it in GitHub Desktop.
Automatic fill of last range ip address
UPDATE dhcphosts_networks SET ip_range_last = INET_ATON(INET_NTOA(ip_range_first + (INET_ATON('255.255.255.255') - INET_ATON(INET_NTOA(mask))) - 2 ))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment