This script will scan your network interfaces and look for an allocatable free spaces inside your class-c segments for smaller subnetting.
Check Point system administrators which uses smaller-than-class-c subnets may find this script useful.
Just upload it to your gateway, give it run permission (using chmod command) and call it.